Файловый менеджер - Редактировать - /home/bean7936/perfect-community.com/442aa3/wp-mail-logging.tar
Назад
vendor/composer/autoload_namespaces.php 0000644 00000000213 15174712143 0014411 0 ustar 00 <?php // autoload_namespaces.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( ); vendor/composer/platform_check.php 0000644 00000001625 15174712143 0013373 0 ustar 00 <?php // platform_check.php @generated by Composer $issues = array(); if (!(PHP_VERSION_ID >= 70100)) { $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.'; } if ($issues) { if (!headers_sent()) { header('HTTP/1.1 500 Internal Server Error'); } if (!ini_get('display_errors')) { if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); } elseif (!headers_sent()) { echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; } } throw new \RuntimeException( 'Composer detected issues in your platform: ' . implode(' ', $issues) ); } vendor/composer/autoload_psr4.php 0000644 00000000743 15174712143 0013172 0 ustar 00 <?php // autoload_psr4.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'No3x\\WPML\\Tests\\Helper\\' => array($baseDir . '/tests/helper'), 'No3x\\WPML\\Tests\\' => array($baseDir . '/tests/phpunit/tests'), 'No3x\\WPML\\Migration\\' => array($baseDir . '/src/inc/Migration'), 'No3x\\WPML\\Helpers\\' => array($baseDir . '/src/inc/Helpers'), 'No3x\\WPML\\Admin\\' => array($baseDir . '/src/inc/Admin'), ); vendor/composer/LICENSE 0000644 00000002056 15174712143 0010705 0 ustar 00 Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. vendor/composer/installed.php 0000644 00000001441 15174712143 0012365 0 ustar 00 <?php return array( 'root' => array( 'name' => 'awesomemotive/wp-mail-logging', 'pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '9601ccec98e48e32b10be8e649fbbf591eb8fc10', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => false, ), 'versions' => array( 'awesomemotive/wp-mail-logging' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '9601ccec98e48e32b10be8e649fbbf591eb8fc10', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), ), ); vendor/composer/autoload_static.php 0000644 00000005121 15174712143 0013564 0 ustar 00 <?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInit31f994310b2c7d6f9759f25f664a2dcc { public static $prefixLengthsPsr4 = array ( 'N' => array ( 'No3x\\WPML\\Tests\\Helper\\' => 23, 'No3x\\WPML\\Tests\\' => 16, 'No3x\\WPML\\Migration\\' => 20, 'No3x\\WPML\\Helpers\\' => 18, 'No3x\\WPML\\Admin\\' => 16, ), ); public static $prefixDirsPsr4 = array ( 'No3x\\WPML\\Tests\\Helper\\' => array ( 0 => __DIR__ . '/../..' . '/tests/helper', ), 'No3x\\WPML\\Tests\\' => array ( 0 => __DIR__ . '/../..' . '/tests/phpunit/tests', ), 'No3x\\WPML\\Migration\\' => array ( 0 => __DIR__ . '/../..' . '/src/inc/Migration', ), 'No3x\\WPML\\Helpers\\' => array ( 0 => __DIR__ . '/../..' . '/src/inc/Helpers', ), 'No3x\\WPML\\Admin\\' => array ( 0 => __DIR__ . '/../..' . '/src/inc/Admin', ), ); public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'No3x\\WPML\\Admin\\EmailLogsTab' => __DIR__ . '/../..' . '/src/inc/Admin/EmailLogsTab.php', 'No3x\\WPML\\Admin\\SMTPTab' => __DIR__ . '/../..' . '/src/inc/Admin/SMTPTab.php', 'No3x\\WPML\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/inc/Admin/SettingsTab.php', 'No3x\\WPML\\Helpers\\PluginSilentUpgrader' => __DIR__ . '/../..' . '/src/inc/Helpers/PluginSilentUpgrader.php', 'No3x\\WPML\\Helpers\\PluginSilentUpgraderSkin' => __DIR__ . '/../..' . '/src/inc/Helpers/PluginSilentUpgraderSkin.php', 'No3x\\WPML\\Migration\\Migration' => __DIR__ . '/../..' . '/src/inc/Migration/Migration.php', 'No3x\\WPML\\Tests\\Helper\\WPML_IntegrationTestCase' => __DIR__ . '/../..' . '/tests/helper/WPML_IntegrationTestCase.php', 'No3x\\WPML\\Tests\\Helper\\WPMailArrayBuilder' => __DIR__ . '/../..' . '/tests/helper/WPMailArrayBuilder.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInit31f994310b2c7d6f9759f25f664a2dcc::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit31f994310b2c7d6f9759f25f664a2dcc::$prefixDirsPsr4; $loader->classMap = ComposerStaticInit31f994310b2c7d6f9759f25f664a2dcc::$classMap; }, null, ClassLoader::class); } } vendor/composer/autoload_classmap.php 0000644 00000001756 15174712143 0014112 0 ustar 00 <?php // autoload_classmap.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'No3x\\WPML\\Admin\\EmailLogsTab' => $baseDir . '/src/inc/Admin/EmailLogsTab.php', 'No3x\\WPML\\Admin\\SMTPTab' => $baseDir . '/src/inc/Admin/SMTPTab.php', 'No3x\\WPML\\Admin\\SettingsTab' => $baseDir . '/src/inc/Admin/SettingsTab.php', 'No3x\\WPML\\Helpers\\PluginSilentUpgrader' => $baseDir . '/src/inc/Helpers/PluginSilentUpgrader.php', 'No3x\\WPML\\Helpers\\PluginSilentUpgraderSkin' => $baseDir . '/src/inc/Helpers/PluginSilentUpgraderSkin.php', 'No3x\\WPML\\Migration\\Migration' => $baseDir . '/src/inc/Migration/Migration.php', 'No3x\\WPML\\Tests\\Helper\\WPML_IntegrationTestCase' => $baseDir . '/tests/helper/WPML_IntegrationTestCase.php', 'No3x\\WPML\\Tests\\Helper\\WPMailArrayBuilder' => $baseDir . '/tests/helper/WPMailArrayBuilder.php', ); vendor/composer/InstalledVersions.php 0000644 00000041763 15174712143 0014071 0 ustar 00 <?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer; use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; /** * This class is copied in every Composer installed project and available to all * * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` * * @final */ class InstalledVersions { /** * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to * @internal */ private static $selfDir = null; /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null */ private static $installed; /** * @var bool */ private static $installedIsLocalDir; /** * @var bool|null */ private static $canGetVendors; /** * @var array[] * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ private static $installedByVendor = array(); /** * Returns a list of all package names which are present, either by being installed, replaced or provided * * @return string[] * @psalm-return list<string> */ public static function getInstalledPackages() { $packages = array(); foreach (self::getInstalled() as $installed) { $packages[] = array_keys($installed['versions']); } if (1 === \count($packages)) { return $packages[0]; } return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); } /** * Returns a list of all package names with a specific type e.g. 'library' * * @param string $type * @return string[] * @psalm-return list<string> */ public static function getInstalledPackagesByType($type) { $packagesByType = array(); foreach (self::getInstalled() as $installed) { foreach ($installed['versions'] as $name => $package) { if (isset($package['type']) && $package['type'] === $type) { $packagesByType[] = $name; } } } return $packagesByType; } /** * Checks whether the given package is installed * * This also returns true if the package name is provided or replaced by another package * * @param string $packageName * @param bool $includeDevRequirements * @return bool */ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } return false; } /** * Checks whether the given package satisfies a version constraint * * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: * * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') * * @param VersionParser $parser Install composer/semver to have access to this class and functionality * @param string $packageName * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package * @return bool */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } /** * Returns a version constraint representing all the range(s) which are installed for a given package * * It is easier to use this via isInstalled() with the $constraint argument if you need to check * whether a given version of a package is installed, and not just whether it exists * * @param string $packageName * @return string Version constraint usable with composer/semver */ public static function getVersionRanges($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } $ranges = array(); if (isset($installed['versions'][$packageName]['pretty_version'])) { $ranges[] = $installed['versions'][$packageName]['pretty_version']; } if (array_key_exists('aliases', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); } if (array_key_exists('replaced', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); } if (array_key_exists('provided', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); } return implode(' || ', $ranges); } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['version'])) { return null; } return $installed['versions'][$packageName]['version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference */ public static function getReference($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['reference'])) { return null; } return $installed['versions'][$packageName]['reference']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. */ public static function getInstallPath($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @return array * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } /** * Returns the raw installed.php data for custom implementations * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} */ public static function getRawData() { @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { self::$installed = include __DIR__ . '/installed.php'; } else { self::$installed = array(); } } return self::$installed; } /** * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ public static function getAllRawData() { return self::getInstalled(); } /** * Lets you reload the static array from another file * * This is only useful for complex integrations in which a project needs to use * this class but then also needs to execute another project's autoloader in process, * and wants to ensure both projects have access to their version of installed.php. * * A typical case would be PHPUnit, where it would need to make sure it reads all * the data it needs from this class, then call reload() with * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure * the project in which it runs can then also use this class safely, without * interference between PHPUnit's dependencies and the project's dependencies. * * @param array[] $data A vendor/composer/installed.php data set * @return void * * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data */ public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); // when using reload, we disable the duplicate protection to ensure that self::$installed data is // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, // so we have to assume it does not, and that may result in duplicate data being returned when listing // all installed packages for example self::$installedIsLocalDir = false; } /** * @return string */ private static function getSelfDir() { if (self::$selfDir === null) { self::$selfDir = strtr(__DIR__, '\\', '/'); } return self::$selfDir; } /** * @return array[] * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> */ private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); $copiedLocalDir = false; if (self::$canGetVendors) { $selfDir = self::getSelfDir(); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ $required = require $vendorDir.'/composer/installed.php'; self::$installedByVendor[$vendorDir] = $required; $installed[] = $required; if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { self::$installed = $required; self::$installedIsLocalDir = true; } } if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { $copiedLocalDir = true; } } } if (null === self::$installed) { // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ $required = require __DIR__ . '/installed.php'; self::$installed = $required; } else { self::$installed = array(); } } if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } return $installed; } } vendor/composer/autoload_real.php 0000644 00000002161 15174712143 0013221 0 ustar 00 <?php // autoload_real.php @generated by Composer class ComposerAutoloaderInit31f994310b2c7d6f9759f25f664a2dcc { private static $loader; public static function loadClassLoader($class) { if ('Composer\Autoload\ClassLoader' === $class) { require __DIR__ . '/ClassLoader.php'; } } /** * @return \Composer\Autoload\ClassLoader */ public static function getLoader() { if (null !== self::$loader) { return self::$loader; } require __DIR__ . '/platform_check.php'; spl_autoload_register(array('ComposerAutoloaderInit31f994310b2c7d6f9759f25f664a2dcc', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInit31f994310b2c7d6f9759f25f664a2dcc', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInit31f994310b2c7d6f9759f25f664a2dcc::getInitializer($loader)); $loader->register(true); return $loader; } } vendor/composer/ClassLoader.php 0000644 00000037772 15174712143 0012622 0 ustar 00 <?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Autoload; /** * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * * $loader = new \Composer\Autoload\ClassLoader(); * * // register classes with namespaces * $loader->add('Symfony\Component', __DIR__.'/component'); * $loader->add('Symfony', __DIR__.'/framework'); * * // activate the autoloader * $loader->register(); * * // to enable searching the include path (eg. for PEAR packages) * $loader->setUseIncludePath(true); * * In this example, if you try to use a class in the Symfony\Component * namespace or one of its children (Symfony\Component\Console for instance), * the autoloader will first look for the class under the component/ * directory, and it will then fallback to the framework/ directory if not * found before giving up. * * This class is loosely based on the Symfony UniversalClassLoader. * * @author Fabien Potencier <fabien@symfony.com> * @author Jordi Boggiano <j.boggiano@seld.be> * @see https://www.php-fig.org/psr/psr-0/ * @see https://www.php-fig.org/psr/psr-4/ */ class ClassLoader { /** @var \Closure(string):void */ private static $includeFile; /** @var string|null */ private $vendorDir; // PSR-4 /** * @var array<string, array<string, int>> */ private $prefixLengthsPsr4 = array(); /** * @var array<string, list<string>> */ private $prefixDirsPsr4 = array(); /** * @var list<string> */ private $fallbackDirsPsr4 = array(); // PSR-0 /** * List of PSR-0 prefixes * * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) * * @var array<string, array<string, list<string>>> */ private $prefixesPsr0 = array(); /** * @var list<string> */ private $fallbackDirsPsr0 = array(); /** @var bool */ private $useIncludePath = false; /** * @var array<string, string> */ private $classMap = array(); /** @var bool */ private $classMapAuthoritative = false; /** * @var array<string, bool> */ private $missingClasses = array(); /** @var string|null */ private $apcuPrefix; /** * @var array<string, self> */ private static $registeredLoaders = array(); /** * @param string|null $vendorDir */ public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; self::initializeIncludeClosure(); } /** * @return array<string, list<string>> */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); } /** * @return array<string, list<string>> */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } /** * @return list<string> */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } /** * @return list<string> */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } /** * @return array<string, string> Array of classname => path */ public function getClassMap() { return $this->classMap; } /** * @param array<string, string> $classMap Class to filename map * * @return void */ public function addClassMap(array $classMap) { if ($this->classMap) { $this->classMap = array_merge($this->classMap, $classMap); } else { $this->classMap = $classMap; } } /** * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * * @param string $prefix The prefix * @param list<string>|string $paths The PSR-0 root directories * @param bool $prepend Whether to prepend the directories * * @return void */ public function add($prefix, $paths, $prepend = false) { $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, $paths ); } return; } $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { $this->prefixesPsr0[$first][$prefix] = $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], $paths ); } } /** * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' * @param list<string>|string $paths The PSR-4 base directories * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException * * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { // Register directories for a new namespace. $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], $paths ); } } /** * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * * @param string $prefix The prefix * @param list<string>|string $paths The PSR-0 base directories * * @return void */ public function set($prefix, $paths) { if (!$prefix) { $this->fallbackDirsPsr0 = (array) $paths; } else { $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; } } /** * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' * @param list<string>|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException * * @return void */ public function setPsr4($prefix, $paths) { if (!$prefix) { $this->fallbackDirsPsr4 = (array) $paths; } else { $length = strlen($prefix); if ('\\' !== $prefix[$length - 1]) { throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixDirsPsr4[$prefix] = (array) $paths; } } /** * Turns on searching the include path for class files. * * @param bool $useIncludePath * * @return void */ public function setUseIncludePath($useIncludePath) { $this->useIncludePath = $useIncludePath; } /** * Can be used to check if the autoloader uses the include path to check * for classes. * * @return bool */ public function getUseIncludePath() { return $this->useIncludePath; } /** * Turns off searching the prefix and fallback directories for classes * that have not been registered with the class map. * * @param bool $classMapAuthoritative * * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { $this->classMapAuthoritative = $classMapAuthoritative; } /** * Should class lookup fail if not found in the current class map? * * @return bool */ public function isClassMapAuthoritative() { return $this->classMapAuthoritative; } /** * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix * * @return void */ public function setApcuPrefix($apcuPrefix) { $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; } /** * The APCu prefix in use, or null if APCu caching is not enabled. * * @return string|null */ public function getApcuPrefix() { return $this->apcuPrefix; } /** * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not * * @return void */ public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); if (null === $this->vendorDir) { return; } if ($prepend) { self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; } else { unset(self::$registeredLoaders[$this->vendorDir]); self::$registeredLoaders[$this->vendorDir] = $this; } } /** * Unregisters this instance as an autoloader. * * @return void */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); if (null !== $this->vendorDir) { unset(self::$registeredLoaders[$this->vendorDir]); } } /** * Loads the given class or interface. * * @param string $class The name of the class * @return true|null True if loaded, null otherwise */ public function loadClass($class) { if ($file = $this->findFile($class)) { $includeFile = self::$includeFile; $includeFile($file); return true; } return null; } /** * Finds the path to the file where the class is defined. * * @param string $class The name of the class * * @return string|false The path if found, false otherwise */ public function findFile($class) { // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; } if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } if (null !== $this->apcuPrefix) { $file = apcu_fetch($this->apcuPrefix.$class, $hit); if ($hit) { return $file; } } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } if (null !== $this->apcuPrefix) { apcu_add($this->apcuPrefix.$class, $file); } if (false === $file) { // Remember that this class does not exist. $this->missingClasses[$class] = true; } return $file; } /** * Returns the currently registered loaders keyed by their corresponding vendor directories. * * @return array<string, self> */ public static function getRegisteredLoaders() { return self::$registeredLoaders; } /** * @param string $class * @param string $ext * @return string|false */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { $subPath = $class; while (false !== $lastPos = strrpos($subPath, '\\')) { $subPath = substr($subPath, 0, $lastPos); $search = $subPath . '\\'; if (isset($this->prefixDirsPsr4[$search])) { $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { if (file_exists($file = $dir . $pathEnd)) { return $file; } } } } } // PSR-4 fallback dirs foreach ($this->fallbackDirsPsr4 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { return $file; } } // PSR-0 lookup if (false !== $pos = strrpos($class, '\\')) { // namespaced class name $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); } else { // PEAR-like class name $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; } if (isset($this->prefixesPsr0[$first])) { foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { if (0 === strpos($class, $prefix)) { foreach ($dirs as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } } } } // PSR-0 fallback dirs foreach ($this->fallbackDirsPsr0 as $dir) { if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { return $file; } } // PSR-0 include paths. if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } return false; } /** * @return void */ private static function initializeIncludeClosure() { if (self::$includeFile !== null) { return; } /** * Scope isolated include. * * Prevents access to $this/self from included files. * * @param string $file * @return void */ self::$includeFile = \Closure::bind(static function($file) { include $file; }, null, null); } } vendor/autoload.php 0000644 00000001354 15174712143 0010372 0 ustar 00 <?php // autoload.php @generated by Composer if (PHP_VERSION_ID < 50600) { if (!headers_sent()) { header('HTTP/1.1 500 Internal Server Error'); } $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; if (!ini_get('display_errors')) { if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { fwrite(STDERR, $err); } elseif (!headers_sent()) { echo $err; } } throw new RuntimeException($err); } require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInit31f994310b2c7d6f9759f25f664a2dcc::getLoader(); lib/vendor/brandonwamboldt/wp-orm/wp-orm.php 0000644 00000000426 15174712143 0015146 0 ustar 00 <?php /** * Plugin Name: WordPress ORM * Description: Light weight ORM for WordPress * Version: 1.0 * Author: Brandon Wamboldt * Author URI: http://brandonwamboldt.ca/ * License: MIT * License URI: http://opensource.org/licenses/MIT */ require 'vendor/autoload.php'; lib/vendor/brandonwamboldt/wp-orm/views/list-table.php 0000644 00000005546 15174712143 0017132 0 ustar 00 <div class="wrap"> <?php screen_icon() ?> <h2> <?php echo apply_filters('wporm:list_page_title', $page_title); // Action buttons do_action('wporm:list_page_actions'); // Searching if (!empty($_REQUEST['s'])) { printf(' <span class="subtitle">' . __('Search results for “%s”') . '</span>', $list_table->get_search_query()); } ?> </h2> <?php if (isset($_REQUEST['locked']) || isset($_REQUEST['updated']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed'])) { $messages = array(); echo '<div id="message" class="updated"><p>'; if (isset($_REQUEST['updated']) && $updated = absint($_REQUEST['updated'])) { $messages[] = sprintf(_n('%s post updated.', '%s posts updated.', $updated), number_format_i18n($updated)); } if (isset($_REQUEST['locked']) && $locked = absint($_REQUEST['locked'])) { $messages[] = sprintf(_n('%s item not updated, somebody is editing it.', '%s items not updated, somebody is editing them.', $locked), number_format_i18n($locked)); } if (isset($_REQUEST['deleted']) && $deleted = absint($_REQUEST['deleted'])) { $messages[] = sprintf(_n('Item permanently deleted.', '%s items permanently deleted.', $deleted), number_format_i18n($deleted)); } if (isset($_REQUEST['trashed']) && $trashed = absint($_REQUEST['trashed'])) { $messages[] = sprintf(_n('Item moved to the Trash.', '%s items moved to the Trash.', $trashed), number_format_i18n($trashed)); $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0; $messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", 'bulk-posts')) . '">' . __('Undo') . '</a>'; } if (isset($_REQUEST['untrashed']) && $untrashed = absint($_REQUEST['untrashed'])) { $messages[] = sprintf(_n('Item restored from the Trash.', '%s items restored from the Trash.', $untrashed), number_format_i18n($untrashed ) ); } if ($messages) { echo join(' ', $messages); } unset($messages); $_SERVER['REQUEST_URI'] = remove_query_arg(array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI']); echo '</p></div>'; } ?> <?php $list_table->views() ?> <form id="posts-filter" action="admin.php" method="get"> <input type="hidden" name="page" value="<?= esc_attr($_GET['page']) ?>"> <?php $list_table->search_box('Search', 'post') ?> <input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>"> <input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>"> <?php if (!empty($_REQUEST['show_sticky'])) { ?> <input type="hidden" name="show_sticky" value="1"> <?php } ?> <?php $list_table->display() ?> </form> <div id="ajax-response"></div> <br class="clear"> </div> lib/vendor/brandonwamboldt/wp-orm/src/Model/Post.php 0000644 00000011002 15174712143 0016471 0 ustar 00 <?php namespace No3x\WPML\ORM\Model; use DateTime; use No3x\WPML\ORM\BaseModel; /** * WordPress post model. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ class Post extends BaseModel { /** * @var integer */ protected $ID; /** * @var integer */ protected $post_author; /** * @var DateTime */ protected $post_date; /** * @var DateTime */ protected $post_date_gmt; /** * @var string */ protected $post_content; /** * @var string */ protected $post_title; /** * @var string */ protected $post_excerpt; /** * @var string */ protected $post_status; /** * @var string */ protected $comment_status; /** * @var string */ protected $ping_status; /** * @var string */ protected $post_password; /** * @var string */ protected $post_name; /** * @var string */ protected $to_ping; /** * @var string */ protected $pinged; /** * @var DateTime */ protected $post_modified; /** * @var DateTime */ protected $post_modified_gmt; /** * @var string */ protected $post_content_filtered; /** * @var integer */ protected $post_parent; /** * @var string */ protected $guid; /** * @var integer */ protected $menu_order; /** * @var string */ protected $post_type; /** * @var string */ protected $post_mime_type; /** * @var integer */ protected $comment_count; /** * @var array */ protected $meta = array(); /** * Override the default constructor so we can type cast certain properties. * * @param array $properties */ public function __construct(array $properties = array()) { global $wpdb; if (isset($properties['ID'])) { $metadata = $wpdb->get_results("SELECT * FROM `{$wpdb->postmeta}` WHERE `post_id` = {$properties['ID']}"); foreach ($metadata as $data) { $this->meta[$data->meta_key] = maybe_unserialize($data->meta_value); } } if (isset($properties['post_date'])) { $properties['post_date'] = new DateTime($properties['post_date']); } if (isset($properties['post_date_gmt'])) { $properties['post_date_gmt'] = new DateTime($properties['post_date_gmt']); } if (isset($properties['post_modified'])) { $properties['post_modified'] = new DateTime($properties['post_modified']); } if (isset($properties['post_modified_gmt'])) { $properties['post_modified_gmt'] = new DateTime($properties['post_modified_gmt']); } parent::__construct($properties); } /** * Get the post's meta data. * * @param string $meta_key * @param mixed $default * @return mixed */ public function get_metadata($meta_key, $default = null) { return $this->meta[$meta_key]; } /** * Update the post's meta data. * * @param string $meta_key * @param mixed $meta_value */ public function update_metadata($meta_key, $meta_value) { $this->meta[$meta_key] = $meta_value; update_post_meta($this->ID, $meta_key, $meta_value); } /** * Delete the post's meta data. * * @param string $meta_key */ public function delete_metadata($meta_key) { unset($this->meta[$meta_key]); delete_post_meta($this->ID, $meta_key); } /** * Convert complex objects to strings to insert into the database. * * @param array $props * @return array */ public function flatten_props($props) { unset($props['meta']); return parent::flatten_props($props); } /** * Get the model's primary key. * * @return string */ public static function get_primary_key() { return 'ID'; } /** * Get the table used to store posts. * * @return string */ public static function get_table() { global $wpdb; return $wpdb->posts; } /** * Get an array of properties to search when doing a search query. * * @return array */ public static function get_searchable_fields() { return array('post_title', 'post_content', 'post_excerpt'); } } lib/vendor/brandonwamboldt/wp-orm/src/Model/Page.php 0000644 00000000755 15174712143 0016435 0 ustar 00 <?php namespace No3x\WPML\ORM\Model; /** * WordPress page model. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ class Page extends Post { /** * @var string */ protected $post_type = 'page'; /** * Start a query to find models matching specific criteria. * * @return ModelQuery */ public static function query() { $query = parent::query(); $query->where('post_type', 'page'); return $query; } } lib/vendor/brandonwamboldt/wp-orm/src/Model/Comment.php 0000644 00000007454 15174712143 0017166 0 ustar 00 <?php namespace No3x\WPML\ORM\Model; use DateTime; use No3x\WPML\ORM\BaseModel; /** * WordPress comment model. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ class Comment extends BaseModel { /** * @var integer */ protected $comment_ID; /** * @var integer */ protected $comment_post_ID; /** * @var string */ protected $comment_author; /** * @var string */ protected $comment_author_email; /** * @var string */ protected $comment_author_url; /** * @var string */ protected $comment_author_IP; /** * @var DateTime */ protected $comment_date; /** * @var DateTime */ protected $comment_date_gmt; /** * @var string */ protected $comment_content; /** * @var integer */ protected $comment_karma; /** * @var string */ protected $comment_approved; /** * @var string */ protected $comment_agent; /** * @var string */ protected $comment_type; /** * @var integer */ protected $comment_parent; /** * @var integer */ protected $user_id; /** * @var array */ protected $meta = array(); /** * Override the default constructor so we can type cast certain properties. * * @param array $properties */ public function __construct(array $properties = array()) { global $wpdb; if (isset($properties['comment_ID'])) { $metadata = $wpdb->get_results("SELECT * FROM `{$wpdb->commentmeta}` WHERE `comment_id` = {$properties['comment_ID']}"); foreach ($metadata as $data) { $this->meta[$data->meta_key] = maybe_unserialize($data->meta_value); } } if (isset($properties['comment_date'])) { $properties['comment_date'] = new DateTime($properties['comment_date']); } if (isset($properties['comment_date_gmt'])) { $properties['comment_date_gmt'] = new DateTime($properties['comment_date_gmt']); } parent::__construct($properties); } /** * Get the post's meta data. * * @param string $meta_key * @param mixed $default * @return mixed */ public function get_metadata($meta_key, $default = null) { return $this->meta[$meta_key]; } /** * Update the post's meta data. * * @param string $meta_key * @param mixed $meta_value */ public function update_metadata($meta_key, $meta_value) { $this->meta[$meta_key] = $meta_value; update_comment_meta($this->comment_ID, $meta_key, $meta_value); } /** * Delete the post's meta data. * * @param string $meta_key */ public function delete_metadata($meta_key) { unset($this->meta[$meta_key]); delete_comment_meta($this->comment_ID, $meta_key); } /** * Convert complex objects to strings to insert into the database. * * @param array $props * @return array */ public function flatten_props($props) { unset($props['meta']); return parent::flatten_props($props); } /** * Get the model's primary key. * * @return string */ public static function get_primary_key() { return 'comment_ID'; } /** * Get the table used to store posts. * * @return string */ public static function get_table() { global $wpdb; return $wpdb->comments; } /** * Get an array of properties to search when doing a search query. * * @return array */ public static function get_searchable_fields() { return array('comment_content'); } } lib/vendor/brandonwamboldt/wp-orm/src/Model/User.php 0000644 00000006416 15174712143 0016477 0 ustar 00 <?php namespace No3x\WPML\ORM\Model; use DateTime; use No3x\WPML\ORM\BaseModel; /** * WordPress user model. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ class User extends BaseModel { /** * @var integer */ protected $ID; /** * @var string */ protected $user_login; /** * @var string */ protected $user_pass; /** * @var string */ protected $user_nicename; /** * @var string */ protected $user_email; /** * @var string */ protected $user_url; /** * @var DateTime */ protected $user_registered; /** * @var string */ protected $user_activation_key; /** * @var string */ protected $user_status; /** * @var string */ protected $display_name; /** * @var array */ protected $meta = array(); /** * Override the default constructor so we can type cast certain properties. * * @param array $properties */ public function __construct(array $properties = array()) { global $wpdb; if (isset($properties['ID'])) { $metadata = $wpdb->get_results("SELECT * FROM `{$wpdb->usermeta}` WHERE `user_id` = {$properties['ID']}"); foreach ($metadata as $data) { $this->meta[$data->meta_key] = maybe_unserialize($data->meta_value); } } if (isset($properties['user_registered'])) { $properties['user_registered'] = new DateTime($properties['user_registered']); } parent::__construct($properties); } /** * Get the user's meta data. * * @param string $meta_key * @param mixed $default * @return mixed */ public function get_metadata($meta_key, $default = null) { return $this->meta[$meta_key]; } /** * Update the user's meta data. * * @param string $meta_key * @param mixed $meta_value */ public function update_metadata($meta_key, $meta_value) { $this->meta[$meta_key] = $meta_value; update_user_meta($this->ID, $meta_key, $meta_value); } /** * Delete the user's meta data. * * @param string $meta_key */ public function delete_metadata($meta_key) { unset($this->meta[$meta_key]); delete_user_meta($this->ID, $meta_key); } /** * Convert complex objects to strings to insert into the database. * * @param array $props * @return array */ public function flatten_props($props) { unset($props['meta']); return parent::flatten_props($props); } /** * Get the model's primary key. * * @return string */ public static function get_primary_key() { return 'ID'; } /** * Get the table used to store posts. * * @return string */ public static function get_table() { global $wpdb; return $wpdb->users; } /** * Get an array of properties to search when doing a search query. * * @return array */ public static function get_searchable_fields() { return array('user_login', 'user_nicename', 'user_email', 'display_name'); } } lib/vendor/brandonwamboldt/wp-orm/src/BaseModel.php 0000644 00000015054 15174712143 0016352 0 ustar 00 <?php namespace No3x\WPML\ORM; /** * Base class for building models. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ abstract class BaseModel implements ModelInterface { /** * @var QueryFactory */ private static $queryFactory; /** * Get the column used as the primary key, defaults to 'id'. * * @return string */ public static function get_primary_key() { return 'id'; } /** * Constructor. * * @param array $properties */ public function __construct(array $properties = array()) { $model_props = $this->properties(); $properties = array_intersect_key($properties, $model_props); foreach ($properties as $property => $value) { $this->{$property} = maybe_unserialize($value); } } /** * Magically handle getters and setters. * * @param string $function * @param array $arguments * @return mixed */ public function __call($function, $arguments) { // Getters following the pattern 'get_{$property}' if (substr($function, 0, 4) == 'get_') { $model_props = $this->properties(); $property = substr($function, 4); if (array_key_exists($property, $model_props)) { return $this->{$property}; } } // Setters following the pattern 'set_{$property}' if (substr($function, 0, 4) == 'set_') { $model_props = $this->properties(); $property = substr($function, 4); if (array_key_exists($property, $model_props)) { $this->{$property} = $arguments[0]; return $this; } } } /** * Return the value of the primary key. * * @return integer */ public function primary_key() { return $this->{static::get_primary_key()}; } /** * Get all of the properties of this model as an array. * * @return array */ public function to_array() { return $this->properties(); } /** * Convert complex objects to strings to insert into the database. * * @param array $props * @return array */ public function flatten_props($props) { foreach ($props as $property => $value) { if (is_object($value) && get_class($value) == 'DateTime') { $props[$property] = $value->format('Y-m-d H:i:s'); } elseif (is_array($value)) { $props[$property] = serialize($value); } elseif ($value instanceof AbstractClass) { $props[$property] = $value->primary_key(); } } return $props; } /** * Return an array of all the properties for this model. By default, returns * every class variable. * * @return array */ public function properties() { return get_object_vars($this); } /** * Save this model to the database. Will create a new record if the ID * property isn't set, or update an existing record if the ID property is * set. * * @return integer */ public function save() { global $wpdb; // Get the model's properties $props = $this->properties(); // Flatten complex objects $props = $this->flatten_props($props); // Insert or update? if (is_null($props[static::get_primary_key()])) { $wpdb->insert($this->get_table(), $props); $this->{static::get_primary_key()} = $wpdb->insert_id; } else { $wpdb->update(static::get_table(), $props, array(static::get_primary_key() => $this->{static::get_primary_key()})); } return $this->{static::get_primary_key()}; } /** * Create a new model from the given data. * * @return self */ public static function create($properties) { return new static($properties); } /** * Delete the model from the database. Returns true if it was successful * or false if it was not. * * @return boolean */ public function delete() { global $wpdb; return $wpdb->delete(static::get_table(), array(static::get_primary_key() => $this->{static::get_primary_key()})); } /** * Find a specific model by a given property value. * * @param string $property * @param string $value * @return false|self */ public static function find_one_by($property, $value) { global $wpdb; // Escape the value $value = esc_sql($value); // Get the table name $table = static::get_table(); // Get the item $obj = $wpdb->get_row("SELECT * FROM `{$table}` WHERE `{$property}` = '{$value}'", ARRAY_A); // Return false if no item was found, or a new model return ($obj ? static::create($obj) : false); } /** * Find a specific model by it's unique ID. * * @param integer $id * @return false|self */ public static function find_one($id) { return static::find_one_by(static::get_primary_key(), (int) $id); } /** * Start a query to find models matching specific criteria. * * @return Query */ public static function query() { $query = self::getQueryFactory()->buildQuery(get_called_class()); $query->set_searchable_fields(static::get_searchable_fields()); $query->set_primary_key(static::get_primary_key()); return $query; } public static function getQueryFactory() { if (!isset(self::$queryFactory)) { self::$queryFactory = new DefaultQueryFactory(); } return self::$queryFactory; } public static function setQueryFactory(QueryFactory $queryFactory) { self::$queryFactory = $queryFactory; } /** * Return EVERY instance of this model from the database, with NO filtering. * * @return array */ public static function all() { global $wpdb; // Get the table name $table = static::get_table(); // Get the items $results = $wpdb->get_results("SELECT * FROM `{$table}`"); foreach ($results as $index => $result) { $results[$index] = static::create((array) $result); } return $results; } /** * Return configured table prefix. * @return string */ public function get_table_prefix() { global $wpdb; return $wpdb->prefix; } } lib/vendor/brandonwamboldt/wp-orm/src/QueryFactory.php 0000644 00000000152 15174712143 0017145 0 ustar 00 <?php namespace No3x\WPML\ORM; interface QueryFactory { public function buildQuery($modelClass); } lib/vendor/brandonwamboldt/wp-orm/src/Query.php 0000644 00000027726 15174712143 0015635 0 ustar 00 <?php namespace No3x\WPML\ORM; /** * Progressively build up a query to get results using an easy to understand * DSL. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ class Query { /** * @var string */ const ORDER_ASCENDING = 'ASC'; /** * @var string */ const ORDER_DESCENDING = 'DESC'; /** * @var integer */ protected $limit = 0; /** * @var integer */ protected $offset = 0; /** * @var array */ protected $where = array(); /** * @var string */ protected $sort_by = 'id'; /** * @var string */ protected $order = 'ASC'; /** * @var string|null */ protected $search_term = null; /** * @var array */ protected $search_fields = array(); /** * @var string */ protected $model; /** * @var string */ protected $primary_key; /** * @param string $model */ public function __construct($model) { $this->model = $model; } /** * Return the string representation of the query. * * @return string */ public function __toString() { return $this->compose_query(); } /** * Set the fields to include in the search. * * @param array $fields */ public function set_searchable_fields(array $fields) { $this->search_fields = $fields; } /** * Set the primary key column. * * @param string $primary_key */ public function set_primary_key($primary_key) { $this->primary_key = $primary_key; $this->sort_by = $primary_key; } /** * Set the maximum number of results to return at once. * * @param integer $limit * @return self */ public function limit($limit) { $this->limit = (int) $limit; return $this; } /** * Set the offset to use when calculating results. * * @param integer $offset * @return self */ public function offset($offset) { $this->offset = (int) $offset; return $this; } /** * Set the column we should sort by. * * @param string $sort_by * @return self */ public function sort_by($sort_by) { $this->sort_by = $sort_by; return $this; } /** * Set the order we should sort by. * * @param string $order * @return self */ public function order($order) { $this->order = $order; return $this; } /** * Add a `=` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where($column, $value) { $this->where[] = array('type' => 'where', 'column' => $column, 'value' => $value); return $this; } /** * Add a `!=` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_not($column, $value) { $this->where[] = array('type' => 'not', 'column' => $column, 'value' => $value); return $this; } /** * Add a `LIKE` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_like($column, $value) { $this->where[] = array('type' => 'like', 'column' => $column, 'value' => $value); return $this; } /** * Add a `NOT LIKE` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_not_like($column, $value) { $this->where[] = array('type' => 'not_like', 'column' => $column, 'value' => $value); return $this; } /** * Add a `<` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_lt($column, $value) { $this->where[] = array('type' => 'lt', 'column' => $column, 'value' => $value); return $this; } /** * Add a `<=` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_lte($column, $value) { $this->where[] = array('type' => 'lte', 'column' => $column, 'value' => $value); return $this; } /** * Add a `>` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_gt($column, $value) { $this->where[] = array('type' => 'gt', 'column' => $column, 'value' => $value); return $this; } /** * Add a `>=` clause to the search query. * * @param string $column * @param string $value * @return self */ public function where_gte($column, $value) { $this->where[] = array('type' => 'gte', 'column' => $column, 'value' => $value); return $this; } /** * Add an `IN` clause to the search query. * * @param string $column * @param array $value * @return self */ public function where_in($column, array $in) { $this->where[] = array('type' => 'in', 'column' => $column, 'value' => $in); return $this; } /** * Add a `NOT IN` clause to the search query. * * @param string $column * @param array $value * @return self */ public function where_not_in($column, array $not_in) { $this->where[] = array('type' => 'not_in', 'column' => $column, 'value' => $not_in); return $this; } /** * Add an OR statement to the where clause (e.g. (var = foo OR var = bar OR * var = baz)). * * @param array $where * @return self */ public function where_any(array $where) { $this->where[] = array('type' => 'any', 'where' => $where); return $this; } /** * Add an AND statement to the where clause (e.g. (var1 = foo AND var2 = bar * AND var3 = baz)). * * @param array $where * @return self */ public function where_all(array $where) { $this->where[] = array('type' => 'all', 'where' => $where); return $this; } /** * Get models where any of the designated fields match the given value. * * @param string $search_term * @return self */ public function search($search_term) { $this->search_term = $search_term; return $this; } /** * Runs the same query as find, but with no limit and don't retrieve the * results, just the total items found. * * @return integer */ public function total_count() { return $this->find(true); } /** * Compose & execute our query. * * @param boolean $only_count Whether to only return the row count * @return array */ public function find($only_count = false) { global $wpdb; $model = $this->model; // Query if ($only_count) { return (int) $wpdb->get_var($this->compose_query(true)); } $results = $wpdb->get_results($this->compose_query(false)); if ($results) { foreach ($results as $index => $result) { $results[$index] = $model::create((array) $result); } } return $results; } /** * Compose the actual SQL query from all of our filters and options. * * @param boolean $only_count Whether to only return the row count * @return string */ public function compose_query($only_count = false) { $model = $this->model; $table = $model::get_table(); $where = ''; $order = ''; $limit = ''; $offset = ''; // Search if (!empty($this->search_term)) { $where .= ' AND ('; foreach ($this->search_fields as $field) { $where .= '`' . $field . '` LIKE "%' . esc_sql($this->search_term) . '%" OR '; } $where = substr($where, 0, -4) . ')'; } // Where foreach ($this->where as $q) { // where if ($q['type'] == 'where') { $where .= ' AND `' . $q['column'] . '` = "' . esc_sql($q['value']) . '"'; } // where_not elseif ($q['type'] == 'not') { $where .= ' AND `' . $q['column'] . '` != "' . esc_sql($q['value']) . '"'; } // where_like elseif ($q['type'] == 'like') { $where .= ' AND `' . $q['column'] . '` LIKE "' . esc_sql($q['value']) . '"'; } // where_not_like elseif ($q['type'] == 'not_like') { $where .= ' AND `' . $q['column'] . '` NOT LIKE "' . esc_sql($q['value']) . '"'; } // where_lt elseif ($q['type'] == 'lt') { $where .= ' AND `' . $q['column'] . '` < "' . esc_sql($q['value']) . '"'; } // where_lte elseif ($q['type'] == 'lte') { $where .= ' AND `' . $q['column'] . '` <= "' . esc_sql($q['value']) . '"'; } // where_gt elseif ($q['type'] == 'gt') { $where .= ' AND `' . $q['column'] . '` > "' . esc_sql($q['value']) . '"'; } // where_gte elseif ($q['type'] == 'gte') { $where .= ' AND `' . $q['column'] . '` >= "' . esc_sql($q['value']) . '"'; } // where_in elseif ($q['type'] == 'in') { $where .= ' AND `' . $q['column'] . '` IN ('; foreach ($q['value'] as $value) { $where .= '"' . esc_sql($value) . '",'; } $where = substr($where, 0, -1) . ')'; } // where_not_in elseif ($q['type'] == 'not_in') { $where .= ' AND `' . $q['column'] . '` NOT IN ('; foreach ($q['value'] as $value) { $where .= '"' . esc_sql($value) . '",'; } $where = substr($where, 0, -1) . ')'; } // where_any elseif ($q['type'] == 'any') { $where .= ' AND ('; foreach ($q['where'] as $column => $value) { $where .= '`' . $column . '` = "' . esc_sql($value) . '" OR '; } $where = substr($where, 0, -5) . ')'; } // where_all elseif ($q['type'] == 'all') { $where .= ' AND ('; foreach ($q['where'] as $column => $value) { $where .= '`' . $column . '` = "' . esc_sql($value) . '" AND '; } $where = substr($where, 0, -5) . ')'; } } // Finish where clause if (!empty($where)) { $where = ' WHERE ' . substr($where, 5); } // Order if (strstr($this->sort_by, '(') !== false && strstr($this->sort_by, ')') !== false) { // The sort column contains () so we assume its a function, therefore // don't quote it $order = ' ORDER BY ' . $this->sort_by . ' ' . $this->order; } else { $order = ' ORDER BY `' . $this->sort_by . '` ' . $this->order; } // Limit if ($this->limit > 0) { $limit = ' LIMIT ' . $this->limit; } // Offset if ($this->offset > 0) { $offset = ' OFFSET ' . $this->offset; } // Query if ($only_count) { return apply_filters('wporm_count_query', "SELECT COUNT(*) FROM `{$table}`{$where}", $this->model); } return apply_filters('wporm_query', "SELECT * FROM `{$table}`{$where}{$order}{$limit}{$offset}", $this->model); } } lib/vendor/brandonwamboldt/wp-orm/src/DefaultQueryFactory.php 0000644 00000000263 15174712143 0020455 0 ustar 00 <?php namespace No3x\WPML\ORM; class DefaultQueryFactory implements QueryFactory { public function buildQuery($modelClass) { return new Query($modelClass); } } lib/vendor/brandonwamboldt/wp-orm/src/ModelInterface.php 0000644 00000001004 15174712143 0017366 0 ustar 00 <?php namespace No3x\WPML\ORM; /** * Interface for ORM models. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ interface ModelInterface { /** * Overwrite this in your concrete class. Returns the table name used to * store models of this class. * * @return string */ public static function get_table(); /** * Get an array of fields to search during a search query. * * @return array */ public static function get_searchable_fields(); } lib/vendor/brandonwamboldt/wp-orm/src/Admin/AdminHelper.php 0000644 00000007566 15174712143 0017750 0 ustar 00 <?php namespace No3x\WPML\ORM\Admin; /** * Hey * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ class AdminHelper { /** * Setup hooks for a new list table page. We'll call $callback, and you * should instantiate your list table class and pass it to the * render_list_table_page() function along with a page title. * * @param string $slug * @param callable $callback */ public static function setup_list_table_page($slug, $callback) { add_action('load-toplevel_page_' . $slug, array(__CLASS__, 'pre_list_table_page')); add_action('toplevel_page_' . $slug, $callback); } /** * Tell WordPress not to load the admin header automatically. We want to * load it manually when we're ready, so we can still do redirects and what * not. */ public static function pre_list_table_page() { $_GET['noheader'] = true; } /** * Setup the list table and render the list table page, or call the given * action. * * @param string $page_title * @param WordPress\Orm\Admin\ListTable $list_table */ public static function render_list_table_page($page_title, $list_table) { // We pass the class to filters & actions $list_table_class = get_class($list_table); // Get stuff $pagenum = $list_table->get_pagenum(); $action = $list_table->current_action(); if ($action) { check_admin_referer('bulk-posts'); $sendback = remove_query_arg(array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer()); // Comment this if (!$sendback) { $sendback = admin_url('admin.php?page=test-venues'); } // Add the current page to the sendback URL $sendback = add_query_arg('paged', $pagenum, $sendback); // ? if (strpos($sendback, 'post.php') !== false) { $sendback = admin_url($post_new_file); } // Get the post ids to operate on if ('delete_all' == $doaction) { $post_status = preg_replace('/[^a-z0-9_-]+/i', '', $_REQUEST['post_status']); if (get_post_status_object($post_status)) { $post_ids = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_type=%s AND post_status = %s", $post_type, $post_status)); } $doaction = 'delete'; } elseif (isset($_REQUEST['media'])) { $post_ids = $_REQUEST['media']; } elseif (isset($_REQUEST['ids'])) { $post_ids = explode(',', $_REQUEST['ids']); } elseif (!empty($_REQUEST['post'])) { $post_ids = array_map('intval', $_REQUEST['post']); } if (!isset($post_ids)) { wp_redirect($sendback); exit; } // Plugins need to do their thing here do_action('wporm:list_table:action', $action, $post_ids, $list_table, $list_table_class); // Redirect the user $sendback = remove_query_arg([ 'action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ], $sendback); wp_redirect($sendback); exit; } elseif (!empty($_REQUEST['_wp_http_referer'])) { wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']))); exit; } $list_table->prepare_items(); require ABSPATH . 'wp-admin/admin-header.php'; require __DIR__ . '/../views/list-table.php'; } } lib/vendor/brandonwamboldt/wp-orm/src/Admin/ListTable.php 0000644 00000057766 15174712143 0017452 0 ustar 00 <?php namespace No3x\WPML\ORM\Admin; /** * Base class for displaying a list of items in an HTML table. Intended to mimic * the internal class WP_List_Table which was not designed for non-core code to * use. The purpose of this class is to allow users to make custom list table * classes without a bunch of extra work. * * @author Brandon Wamboldt <brandon.wamboldt@gmail.com> */ abstract class ListTable { /** * @var array */ protected $items; /** * @var array */ protected $args; /** * @var array */ protected $pagination_args = array(); /** * @var object */ protected $screen; /** * @var array */ protected $actions; /** * @var string */ protected $pagination; /** * Constructor. The child class should call this constructor from its own constructor * * @param array $args */ public function __construct(array $args = array()) { $args = wp_parse_args($args, array( 'plural' => '', 'singular' => '', 'ajax' => false, 'screen' => null, )); $this->screen = convert_to_screen($args['screen']); add_filter("manage_{$this->screen->id}_columns", array(&$this, 'get_columns'), 0); if (!$args['plural']) { $args['plural'] = $this->screen->base; } $args['plural'] = sanitize_key($args['plural']); $args['singular'] = sanitize_key($args['singular']); $this->args = $args; if ($args['ajax']) { // wp_enqueue_script( 'list-table' ); add_action('admin_footer', array(&$this, 'js_vars')); } } /** * Checks the current user's permissions. * * @abstract */ abstract public function ajax_user_can(); /** * Prepares the list of items for displaying. * * @abstract */ abstract public function prepare_items(); /** * An internal method that sets all the necessary pagination arguments. * * @param array $args */ protected function set_pagination_args(array $args) { $args = wp_parse_args($args, array( 'total_items' => 0, 'total_pages' => 0, 'per_page' => 0 )); if (!$args['total_pages'] && $args['per_page'] > 0) { $args['total_pages'] = ceil($args['total_items'] / $args['per_page']); } // Redirect if page number is invalid and headers are not already sent if (!headers_sent() && (!defined('DOING_AJAX') || !DOING_AJAX) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages']) { wp_redirect(add_query_arg('paged', $args['total_pages'])); exit; } $this->pagination_args = $args; } /** * Access the pagination args. * * @param string $key * @return array */ public function get_pagination_arg($key) { if ('page' == $key) { return $this->get_pagenum(); } if (isset($this->pagination_args[$key])) { return $this->pagination_args[$key]; } } /** * Whether the table has items to display or not. * * @return bool */ public function has_items() { return !empty($this->items); } /** * Message to be displayed when there are no items. */ public function no_items() { _e('No items found.'); } /** * Cause the real one doesn't work. */ public function get_search_query($escaped = true) { $s = isset($_REQUEST['s']) ? $_REQUEST['s'] : ''; $query = apply_filters('get_search_query', $s); if ($escaped) { $query = esc_attr($query); } return $query; } /** * Display the search box. * * @param string $text * @param string $input_id */ public function search_box($text, $input_id) { if (empty($_REQUEST['s']) && !$this->has_items()) { return; } $input_id = $input_id . '-search-input'; if (!empty($_REQUEST['orderby'])) { echo '<input type="hidden" name="orderby" value="' . esc_attr($_REQUEST['orderby']) . '">'; } if (!empty($_REQUEST['order'])) { echo '<input type="hidden" name="order" value="' . esc_attr($_REQUEST['order']) . '">'; } if (!empty($_REQUEST['post_mime_type'])) { echo '<input type="hidden" name="post_mime_type" value="' . esc_attr($_REQUEST['post_mime_type']) . '">'; } if (!empty($_REQUEST['detached'])) { echo '<input type="hidden" name="detached" value="' . esc_attr($_REQUEST['detached']) . '">'; } ?> <p class="search-box"> <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text ?>:</label> <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query() ?>" /> <?php submit_button($text, 'button', false, false, array('id' => 'search-submit')) ?> </p> <?php } /** * Get an associative array ( id => link ) with the list of views available * on this table. * * @return array */ protected function get_views() { return array(); } /** * Display the list of views available on this table. */ public function views() { $views = $this->get_views(); $views = apply_filters('views_' . $this->screen->id, $views); if (empty($views)) { return; } echo "<ul class='subsubsub'>\n"; foreach ( $views as $class => $view ) { $views[ $class ] = "\t<li class='$class'>$view"; } echo implode( " |</li>\n", $views ) . "</li>\n"; echo "</ul>"; } /** * Get an associative array ( option_name => option_title ) with the list * of bulk actions available on this table. * * @return array */ protected function get_bulk_actions() { return array(); } /** * Display the bulk actions dropdown. */ public function bulk_actions() { if (is_null($this->actions)) { $this->actions = $this->get_bulk_actions(); $this->actions = apply_filters('bulk_actions-' . $this->screen->id, $this->actions); $two = ''; } else { $two = '2'; } if (empty($this->actions)) { return; } echo "<select name='action$two'>\n"; echo "<option value='-1' selected='selected'>" . __('Bulk Actions') . "</option>\n"; foreach ($this->actions as $name => $title) { $class = 'edit' == $name ? ' class="hide-if-no-js"' : ''; echo "\t<option value='$name'$class>$title</option>\n"; } echo "</select>\n"; submit_button(__('Apply'), 'action', false, false, array('id' => "doaction$two")); echo "\n"; } /** * Get the current action selected from the bulk actions dropdown. * * @return string|bool */ public function current_action() { if (isset($_REQUEST['action']) && -1 != $_REQUEST['action']) { return $_REQUEST['action']; } if (isset($_REQUEST['action2']) && -1 != $_REQUEST['action2']) { return $_REQUEST['action2']; } return false; } /** * Generate row actions div * * @param array $actions * @param bool $always_visible * @return string */ protected function row_actions($actions, $always_visible = false) { $action_count = count($actions); $i = 0; if (!$action_count) { return ''; } $out = '<div class="' . ($always_visible ? 'row-actions-visible' : 'row-actions') . '">'; foreach ($actions as $action => $link) { $i++; ($i == $action_count) ? $sep = '' : $sep = ' | '; $out .= "<span class='$action'>$link$sep</span>"; } $out .= '</div>'; return $out; } /** * Display a monthly dropdown for filtering items */ protected function months_dropdown($post_type) { global $wpdb, $wp_locale; $months = $wpdb->get_results($wpdb->prepare(" SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month FROM $wpdb->posts WHERE post_type = %s ORDER BY post_date DESC ", $post_type)); $month_count = count($months); if (!$month_count || (1 == $month_count && 0 == $months[0]->month)) { return; } $m = isset($_GET['m']) ? (int) $_GET['m'] : 0; ?> <select name='m'> <option<?php selected( $m, 0 ); ?> value='0'><?php _e( 'Show all dates' ); ?></option> <?php foreach ( $months as $arc_row ) { if ( 0 == $arc_row->year ) continue; $month = zeroise( $arc_row->month, 2 ); $year = $arc_row->year; printf( "<option %s value='%s'>%s</option>\n", selected( $m, $year . $month, false ), esc_attr( $arc_row->year . $month ), /* translators: 1: month name, 2: 4-digit year */ sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year ) ); } ?> </select> <?php } /** * Display a view switcher */ protected function view_switcher($current_mode) { $modes = array( 'list' => __('List View'), 'excerpt' => __('Excerpt View') ); ?> <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" /> <div class="view-switch"> <?php foreach ( $modes as $mode => $title ) { $class = ( $current_mode == $mode ) ? 'class="current"' : ''; echo "<a href='" . esc_url( add_query_arg( 'mode', $mode, $_SERVER['REQUEST_URI'] ) ) . "' $class><img id='view-switch-$mode' src='" . esc_url( includes_url( 'images/blank.gif' ) ) . "' width='20' height='20' title='$title' alt='$title' /></a>\n"; } ?> </div> <?php } /** * Display a comment count bubble * * @param integer $post_id * @param integer $pending_comments */ protected function comments_bubble($post_id, $pending_comments) { $pending_phrase = sprintf(__('%s pending'), number_format($pending_comments)); if ($pending_comments) { echo '<strong>'; } echo "<a href='" . esc_url(add_query_arg('p', $post_id, admin_url('edit-comments.php'))) . "' title='" . esc_attr($pending_phrase) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n(get_comments_number()) . "</span></a>"; if ($pending_comments) { echo '</strong>'; } } /** * Get the current page number * * @return integer */ public function get_pagenum() { $pagenum = isset($_REQUEST['paged']) ? absint($_REQUEST['paged']) : 0; if (isset($this->pagination_args['total_pages']) && $pagenum > $this->pagination_args['total_pages']) { $pagenum = $this->pagination_args['total_pages']; } return max(1, $pagenum); } /** * Get number of items to display on a single page * * @return integer */ protected function get_items_per_page($option, $default = 20) { $per_page = (int) get_user_option($option); if (empty($per_page) || $per_page < 1) { $per_page = $default; } return (int) apply_filters($option, $per_page); } /** * Display the pagination. */ protected function pagination($which) { if (empty($this->pagination_args)) { return; } extract($this->pagination_args, EXTR_SKIP); $output = '<span class="displaying-num">' . sprintf(_n('1 item', '%s items', $total_items), number_format_i18n($total_items)) . '</span>'; $current = $this->get_pagenum(); $current_url = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); $current_url = remove_query_arg(array('hotkeys_highlight_last', 'hotkeys_highlight_first'), $current_url); $page_links = array(); $disable_first = $disable_last = ''; if ($current == 1) { $disable_first = ' disabled'; } if ($current == $total_pages) { $disable_last = ' disabled'; } $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>", 'first-page' . $disable_first, esc_attr__('Go to the first page'), esc_url(remove_query_arg('paged', $current_url)), '«' ); $page_links[] = sprintf("<a class='%s' title='%s' href='%s'>%s</a>", 'prev-page' . $disable_first, esc_attr__('Go to the previous page'), esc_url(add_query_arg('paged', max(1, $current - 1), $current_url)), '‹' ); if ('bottom' == $which) { $html_current_page = $current; } else { $html_current_page = sprintf("<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />", esc_attr__('Current page'), $current, strlen($total_pages) ); } $html_total_pages = sprintf("<span class='total-pages'>%s</span>", number_format_i18n($total_pages)); $page_links[] = '<span class="paging-input">' . sprintf(_x('%1$s of %2$s', 'paging'), $html_current_page, $html_total_pages) . '</span>'; $page_links[] = sprintf("<a class='%s' title='%s' href='%s'>%s</a>", 'next-page' . $disable_last, esc_attr__('Go to the next page'), esc_url(add_query_arg('paged', min($total_pages, $current + 1), $current_url)), '›' ); $page_links[] = sprintf("<a class='%s' title='%s' href='%s'>%s</a>", 'last-page' . $disable_last, esc_attr__('Go to the last page'), esc_url(add_query_arg('paged', $total_pages, $current_url)), '»' ); $pagination_links_class = 'pagination-links'; if (!empty($infinite_scroll)) { $pagination_links_class = ' hide-if-js'; } $output .= "\n<span class='$pagination_links_class'>" . join("\n", $page_links) . '</span>'; if ($total_pages) { $page_class = $total_pages < 2 ? ' one-page' : ''; } else { $page_class = ' no-pages'; } $this->pagination = "<div class='tablenav-pages{$page_class}'>$output</div>"; echo $this->pagination; } /** * Get a list of columns. The format is: 'internal-name' => 'Title' * * @return array */ abstract protected function get_columns(); /** * Get a list of sortable columns. The format is: * 'internal-name' => 'orderby' * or * 'internal-name' => array( 'orderby', true ) * * The second format will make the initial sorting order be descending. * * @return array */ protected function get_sortable_columns() { return array(); } /** * Get a list of all, hidden and sortable columns, with filter applied * * @return array */ protected function get_column_info() { if (isset($this->column_headers)) { return $this->column_headers; } $columns = get_column_headers($this->screen); $hidden = get_hidden_columns($this->screen); $_sortable = apply_filters("manage_{$this->screen->id}_sortable_columns", $this->get_sortable_columns()); $sortable = array(); foreach ($_sortable as $id => $data) { if (empty($data)) { continue; } $data = (array) $data; if (!isset($data[1])) { $data[1] = false; } $sortable[$id] = $data; } $this->column_headers = array($columns, $hidden, $sortable); return $this->column_headers; } /** * Return number of visible columns. * * @return int */ public function get_column_count() { list($columns, $hidden) = $this->get_column_info(); $hidden = array_intersect(array_keys($columns), array_filter($hidden)); return count($columns) - count($hidden); } /** * Print column headers, accounting for hidden and sortable columns. * * @param bool $with_id */ protected function print_column_headers($with_id = true) { list($columns, $hidden, $sortable) = $this->get_column_info(); $current_url = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); $current_url = remove_query_arg('paged', $current_url); if (isset($_GET['orderby'])) { $current_orderby = $_GET['orderby']; } else { $current_orderby = ''; } if (isset($_GET['order']) && 'desc' == $_GET['order']) { $current_order = 'desc'; } else { $current_order = 'asc'; } if (!empty($columns['cb'])) { static $cb_counter = 1; $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __('Select All') . '</label>' . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />'; $cb_counter++; } foreach ($columns as $column_key => $column_display_name) { $class = array('manage-column', "column-$column_key"); $style = ''; if (in_array($column_key, $hidden)) { $style = 'display:none;'; } $style = ' style="' . $style . '"'; if ('cb' == $column_key) { $class[] = 'check-column'; } elseif (in_array($column_key, array('posts', 'comments', 'links'))) { $class[] = 'num'; } if (isset($sortable[$column_key])) { list($orderby, $desc_first) = $sortable[$column_key]; if ($current_orderby == $orderby) { $order = 'asc' == $current_order ? 'desc' : 'asc'; $class[] = 'sorted'; $class[] = $current_order; } else { $order = $desc_first ? 'desc' : 'asc'; $class[] = 'sortable'; $class[] = $desc_first ? 'asc' : 'desc'; } $column_display_name = '<a href="' . esc_url(add_query_arg(compact('orderby', 'order'), $current_url)) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>'; } $id = $with_id ? "id='$column_key'" : ''; if (!empty($class)) { $class = "class='" . join(' ', $class) . "'"; } echo "<th scope='col' $id $class $style>$column_display_name</th>"; } } /** * Display the table. */ public function display() { extract($this->args); $this->display_tablenav('top'); ?> <table class="wp-list-table <?php echo implode(' ', $this->get_table_classes()) ?>" cellspacing="0"> <thead> <tr> <?php $this->print_column_headers(); ?> </tr> </thead> <tfoot> <tr> <?php $this->print_column_headers( false ); ?> </tr> </tfoot> <tbody id="the-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>> <?php $this->display_rows_or_placeholder(); ?> </tbody> </table> <?php $this->display_tablenav('bottom'); } /** * Get a list of CSS classes for the <table> tag * * @return array */ protected function get_table_classes() { return array('widefat', 'fixed', $this->args['plural']); } /** * Generate the table navigation above or below the table. */ protected function display_tablenav($which) { if ('top' == $which) { wp_nonce_field('bulk-' . $this->args['plural']); } ?> <div class="tablenav <?php echo esc_attr($which) ?>"> <div class="alignleft actions"> <?php $this->bulk_actions() ?> </div> <?php $this->extra_tablenav($which); $this->pagination($which); ?> <br class="clear"> </div> <?php } /** * Extra controls to be displayed between bulk actions and pagination. */ protected function extra_tablenav($which) { } /** * Generate the <tbody> part of the table. */ protected function display_rows_or_placeholder() { if ($this->has_items()) { $this->display_rows(); } else { list($columns, $hidden) = $this->get_column_info(); echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">'; $this->no_items(); echo '</td></tr>'; } } /** * Generate the table rows. */ protected function display_rows() { foreach ($this->items as $item) { $this->single_row($item); } } /** * Generates content for a single row of the table. * * @param object $item The current item */ protected function single_row($item) { static $row_class = ''; $row_class = ($row_class == '' ? ' class="alternate"' : ''); echo '<tr' . $row_class . '>'; $this->single_row_columns($item); echo '</tr>'; } /** * Generates the columns for a single row of the table. * * @param object $item The current item */ protected function single_row_columns($item) { list($columns, $hidden) = $this->get_column_info(); foreach ($columns as $column_name => $column_display_name) { $class = "class='$column_name column-$column_name'"; $style = ''; if (in_array($column_name, $hidden)) { $style = ' style="display:none;"'; } $attributes = "$class$style"; if ('cb' == $column_name) { echo '<th scope="row" class="check-column">'; echo $this->column_cb($item); echo '</th>'; } elseif (method_exists($this, 'column_' . $column_name)) { echo "<td $attributes>"; echo call_user_func(array(&$this, 'column_' . $column_name), $item); echo "</td>"; } else { echo "<td $attributes>"; echo $this->column_default($item, $column_name); echo "</td>"; } } } /** * Handle an incoming ajax request (called from admin-ajax.php). */ public function ajax_response() { $this->prepare_items(); extract($this->args); extract($this->pagination_args, EXTR_SKIP); ob_start(); if (!empty($_REQUEST['no_placeholder'])) { $this->display_rows(); } else { $this->display_rows_or_placeholder(); } $rows = ob_get_clean(); $response = array('rows' => $rows); if (isset($total_items)) { $response['total_items_i18n'] = sprintf(_n('1 item', '%s items', $total_items), number_format_i18n($total_items)); } if (isset($total_pages)) { $response['total_pages'] = $total_pages; $response['total_pages_i18n'] = number_format_i18n($total_pages); } die(json_encode($response)); } /** * Send required variables to JavaScript land. */ protected function js_vars() { $args = array( 'class' => get_class($this), 'screen' => array( 'id' => $this->screen->id, 'base' => $this->screen->base, ) ); printf("<script type='text/javascript'>list_args = %s;</script>\n", json_encode($args)); } } lib/vendor/pimple/pimple/src/Container.php 0000644 00000021347 15174712143 0014621 0 ustar 00 <?php /* * This file is part of Pimple. * * Copyright (c) 2009 Fabien Potencier * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ namespace No3x\WPML\Pimple; /** * Container main class. * * @author Fabien Potencier */ class Container implements \ArrayAccess { private $values = []; private $factories; private $protected; private $frozen = []; private $raw = []; private $keys = []; /** * Instantiates the container. * * Objects and parameters can be passed as argument to the constructor. * * @param array $values The parameters or objects */ public function __construct(array $values = []) { $this->factories = new \SplObjectStorage(); $this->protected = new \SplObjectStorage(); foreach ($values as $key => $value) { $this->offsetSet($key, $value); } } /** * Sets a parameter or an object. * * Objects must be defined as Closures. * * Allowing any PHP callable leads to difficult to debug problems * as function names (strings) are callable (creating a function with * the same name as an existing parameter would break your container). * * @param string $id The unique identifier for the parameter or object * @param mixed $value The value of the parameter or a closure to define an object * * @return void * * @throws \RuntimeException Prevent override of a frozen service */ #[\ReturnTypeWillChange] public function offsetSet($id, $value) { if (isset($this->frozen[$id])) { throw new \RuntimeException(sprintf('Cannot override frozen service "%s".', $id)); } $this->values[$id] = $value; $this->keys[$id] = true; } /** * Gets a parameter or an object. * * @param string $id The unique identifier for the parameter or object * * @return mixed The value of the parameter or an object * * @throws \InvalidArgumentException if the identifier is not defined */ #[\ReturnTypeWillChange] public function offsetGet($id) { if (!isset($this->keys[$id])) { throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id)); } if ( isset($this->raw[$id]) || !is_object($this->values[$id]) || isset($this->protected[$this->values[$id]]) || !method_exists($this->values[$id], '__invoke') ) { return $this->values[$id]; } if (isset($this->factories[$this->values[$id]])) { return $this->values[$id]($this); } $raw = $this->values[$id]; $val = $this->values[$id] = $raw($this); $this->raw[$id] = $raw; $this->frozen[$id] = true; return $val; } /** * Checks if a parameter or an object is set. * * @param string $id The unique identifier for the parameter or object * * @return bool */ #[\ReturnTypeWillChange] public function offsetExists($id) { return isset($this->keys[$id]); } /** * Unsets a parameter or an object. * * @param string $id The unique identifier for the parameter or object * * @return void */ #[\ReturnTypeWillChange] public function offsetUnset($id) { if (isset($this->keys[$id])) { if (is_object($this->values[$id])) { unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]); } unset($this->values[$id], $this->frozen[$id], $this->raw[$id], $this->keys[$id]); } } /** * Marks a callable as being a factory service. * * @param callable $callable A service definition to be used as a factory * * @return callable The passed callable * * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object */ public function factory($callable) { if (!is_object($callable) || !method_exists($callable, '__invoke')) { throw new \InvalidArgumentException('Service definition is not a Closure or invokable object.'); } $this->factories->attach($callable); return $callable; } /** * Protects a callable from being interpreted as a service. * * This is useful when you want to store a callable as a parameter. * * @param callable $callable A callable to protect from being evaluated * * @return callable The passed callable * * @throws \InvalidArgumentException Service definition has to be a closure of an invokable object */ public function protect($callable) { if (!is_object($callable) || !method_exists($callable, '__invoke')) { throw new \InvalidArgumentException('Callable is not a Closure or invokable object.'); } $this->protected->attach($callable); return $callable; } /** * Gets a parameter or the closure defining an object. * * @param string $id The unique identifier for the parameter or object * * @return mixed The value of the parameter or the closure defining an object * * @throws \InvalidArgumentException if the identifier is not defined */ public function raw($id) { if (!isset($this->keys[$id])) { throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id)); } if (isset($this->raw[$id])) { return $this->raw[$id]; } return $this->values[$id]; } /** * Extends an object definition. * * Useful when you want to extend an existing object definition, * without necessarily loading that object. * * @param string $id The unique identifier for the object * @param callable $callable A service definition to extend the original * * @return callable The wrapped callable * * @throws \InvalidArgumentException if the identifier is not defined or not a service definition */ public function extend($id, $callable) { if (!isset($this->keys[$id])) { throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id)); } if (!is_object($this->values[$id]) || !method_exists($this->values[$id], '__invoke')) { throw new \InvalidArgumentException(sprintf('Identifier "%s" does not contain an object definition.', $id)); } if (!is_object($callable) || !method_exists($callable, '__invoke')) { throw new \InvalidArgumentException('Extension service definition is not a Closure or invokable object.'); } $factory = $this->values[$id]; $extended = function ($c) use ($callable, $factory) { return $callable($factory($c), $c); }; if (isset($this->factories[$factory])) { $this->factories->detach($factory); $this->factories->attach($extended); } return $this[$id] = $extended; } /** * Returns all defined value names. * * @return array An array of value names */ public function keys() { return array_keys($this->values); } /** * Registers a service provider. * * @param ServiceProviderInterface $provider A ServiceProviderInterface instance * @param array $values An array of values that customizes the provider * * @return static */ public function register(ServiceProviderInterface $provider, array $values = []) { $provider->register($this); foreach ($values as $key => $value) { $this[$key] = $value; } return $this; } } lib/vendor/pimple/pimple/src/ServiceProviderInterface.php 0000644 00000003135 15174712143 0017626 0 ustar 00 <?php /* * This file is part of Pimple. * * Copyright (c) 2009 Fabien Potencier * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is furnished * to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ namespace No3x\WPML\Pimple; /** * Pimple service provider interface. * * @author Fabien Potencier * @author Dominik Zogg */ interface ServiceProviderInterface { /** * Registers services on the given container. * * This method should only be used to configure services and parameters. * It should not get services. * * @param Container $pimple A container instance */ public function register(Container $pimple); } lib/lity/lity.min.js 0000644 00000014760 15174712143 0010411 0 ustar 00 /*! Lity - v2.4.1 - 2020-04-26 * http://sorgalla.com/lity/ * Copyright (c) 2015-2020 Jan Sorgalla; Licensed MIT */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){var b=B();return N&&a.length?(a.one(N,b.resolve),setTimeout(b.resolve,500)):b.resolve(),b.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if(void 0===d)return void 0===a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(a){for(var b,c=decodeURI(a.split("#")[0]).split("&"),d={},e=0,f=c.length;e<f;e++)c[e]&&(b=c[e].split("="),d[b[0]]=b[1]);return d}function f(a,c){return a+(a.indexOf("?")>-1?"&":"?")+b.param(c)}function g(a,b){var c=a.indexOf("#");return-1===c?b:(c>0&&(a=a.substr(c)),b+a)}function h(a){return b('<span class="lity-error"></span>').append(a)}function i(a,c){var d=c.opener()&&c.opener().data("lity-desc")||"Image with no description",e=b('<img src="'+a+'" alt="'+d+'"/>'),f=B(),g=function(){f.reject(h("Failed loading image"))};return e.on("load",function(){if(0===this.naturalWidth)return g();f.resolve(e)}).on("error",g),f.promise()}function j(a,c){var d,e,f;try{d=b(a)}catch(a){return!1}return!!d.length&&(e=b('<i style="display:none !important"></i>'),f=d.hasClass("lity-hide"),c.element().one("lity:remove",function(){e.before(d).remove(),f&&!d.closest(".lity-content").length&&d.addClass("lity-hide")}),d.removeClass("lity-hide").after(e))}function k(a){var c=J.exec(a);return!!c&&o(g(a,f("https://www.youtube"+(c[2]||"")+".com/embed/"+c[4],b.extend({autoplay:1},e(c[5]||"")))))}function l(a){var c=K.exec(a);return!!c&&o(g(a,f("https://player.vimeo.com/video/"+c[3],b.extend({autoplay:1},e(c[4]||"")))))}function m(a){var c=M.exec(a);return!!c&&(0!==a.indexOf("http")&&(a="https:"+a),o(g(a,f("https://www.facebook.com/plugins/video.php?href="+a,b.extend({autoplay:1},e(c[4]||""))))))}function n(a){var b=L.exec(a);return!!b&&o(g(a,f("https://www.google."+b[3]+"/maps?"+b[6],{output:b[6].indexOf("layer=c")>0?"svembed":"embed"})))}function o(a){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+a+'"/></div>'}function p(){return z.documentElement.clientHeight?z.documentElement.clientHeight:Math.round(A.height())}function q(a){var b=v();b&&(27===a.keyCode&&b.options("esc")&&b.close(),9===a.keyCode&&r(a,b))}function r(a,b){var c=b.element().find(G),d=c.index(z.activeElement);a.shiftKey&&d<=0?(c.get(c.length-1).focus(),a.preventDefault()):a.shiftKey||d!==c.length-1||(c.get(0).focus(),a.preventDefault())}function s(){b.each(D,function(a,b){b.resize()})}function t(a){1===D.unshift(a)&&(C.addClass("lity-active"),A.on({resize:s,keydown:q})),b("body > *").not(a.element()).addClass("lity-hidden").each(function(){var a=b(this);void 0===a.data(F)&&a.data(F,a.attr(E)||null)}).attr(E,"true")}function u(a){var c;a.element().attr(E,"true"),1===D.length&&(C.removeClass("lity-active"),A.off({resize:s,keydown:q})),D=b.grep(D,function(b){return a!==b}),c=D.length?D[0].element():b(".lity-hidden"),c.removeClass("lity-hidden").each(function(){var a=b(this),c=a.data(F);c?a.attr(E,c):a.removeAttr(E),a.removeData(F)})}function v(){return 0===D.length?null:D[0]}function w(a,c,d,e){var f,g="inline",h=b.extend({},d);return e&&h[e]?(f=h[e](a,c),g=e):(b.each(["inline","iframe"],function(a,b){delete h[b],h[b]=d[b]}),b.each(h,function(b,d){return!d||(!(!d.test||d.test(a,c))||(f=d(a,c),!1!==f?(g=b,!1):void 0))})),{handler:g,content:f||""}}function x(a,e,f,g){function h(a){k=b(a).css("max-height",p()+"px"),j.find(".lity-loader").each(function(){var a=b(this);c(a).always(function(){a.remove()})}),j.removeClass("lity-loading").find(".lity-content").empty().append(k),m=!0,k.trigger("lity:ready",[l])}var i,j,k,l=this,m=!1,n=!1;e=b.extend({},H,e),j=b(e.template),l.element=function(){return j},l.opener=function(){return f},l.options=b.proxy(d,l,e),l.handlers=b.proxy(d,l,e.handlers),l.resize=function(){m&&!n&&k.css("max-height",p()+"px").trigger("lity:resize",[l])},l.close=function(){if(m&&!n){n=!0,u(l);var a=B();if(g&&(z.activeElement===j[0]||b.contains(j[0],z.activeElement)))try{g.focus()}catch(a){}return k.trigger("lity:close",[l]),j.removeClass("lity-opened").addClass("lity-closed"),c(k.add(j)).always(function(){k.trigger("lity:remove",[l]),j.remove(),j=void 0,a.resolve()}),a.promise()}},i=w(a,l,e.handlers,e.handler),j.attr(E,"false").addClass("lity-loading lity-opened lity-"+i.handler).appendTo("body").focus().on("click","[data-lity-close]",function(a){b(a.target).is("[data-lity-close]")&&l.close()}).trigger("lity:open",[l]),t(l),b.when(i.content).always(h)}function y(a,c,d){a.preventDefault?(a.preventDefault(),d=b(this),a=d.data("lity-target")||d.attr("href")||d.attr("src")):d=b(d);var e=new x(a,b.extend({},d.data("lity-options")||d.data("lity"),c),d,z.activeElement);if(!a.preventDefault)return e}var z=a.document,A=b(a),B=b.Deferred,C=b("html"),D=[],E="aria-hidden",F="lity-"+E,G='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',H={esc:!0,handler:null,handlers:{image:i,inline:j,youtube:k,vimeo:l,googlemaps:n,facebookvideo:m,iframe:o},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>×</button></div></div></div>'},I=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,J=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,K=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,L=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,M=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,N=function(){var a=z.createElement("div"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return!1}();return i.test=function(a){return I.test(a)},y.version="2.4.1",y.options=b.proxy(d,y,H),y.handlers=b.proxy(d,y,H.handlers),y.current=v,b(z).on("click.lity","[data-lity]",y),y}); lib/lity/lity.min.css 0000644 00000006470 15174712143 0010564 0 ustar 00 /*! Lity - v2.4.1 - 2020-04-26 * http://sorgalla.com/lity/ * Copyright (c) 2015-2020 Jan Sorgalla; Licensed MIT */.lity{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;white-space:nowrap;background:#0b0b0b;background:rgba(0,0,0,0.9);outline:none !important;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}.lity.lity-opened{opacity:1}.lity.lity-closed{opacity:0}.lity *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lity-wrap{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;outline:none !important}.lity-wrap:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.lity-loader{z-index:9991;color:#fff;position:absolute;top:50%;margin-top:-0.8em;width:100%;text-align:center;font-size:14px;font-family:Arial,Helvetica,sans-serif;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}.lity-loading .lity-loader{opacity:1}.lity-container{z-index:9992;position:relative;text-align:left;vertical-align:middle;display:inline-block;white-space:normal;max-width:100%;max-height:100%;outline:none !important}.lity-content{z-index:9993;width:100%;-webkit-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1);-webkit-transition:-webkit-transform .3s ease;transition:-webkit-transform .3s ease;-o-transition:-o-transform .3s ease;transition:transform .3s ease;transition:transform .3s ease, -webkit-transform .3s ease, -o-transform .3s ease}.lity-loading .lity-content,.lity-closed .lity-content{-webkit-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}.lity-content:after{content:'';position:absolute;left:0;top:0;bottom:0;display:block;right:0;width:auto;height:auto;z-index:-1;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6)}.lity-close{z-index:9994;width:35px;height:35px;position:fixed;right:0;top:0;-webkit-appearance:none;cursor:pointer;text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.lity-close::-moz-focus-inner{border:0;padding:0}.lity-close:hover,.lity-close:focus,.lity-close:active,.lity-close:visited{text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.lity-close:active{top:1px}.lity-image img{max-width:100%;display:block;line-height:0;border:0}.lity-iframe .lity-container,.lity-youtube .lity-container,.lity-vimeo .lity-container,.lity-facebookvideo .lity-container,.lity-googlemaps .lity-container{width:100%;max-width:964px}.lity-iframe-container{width:100%;height:0;padding-top:56.25%;overflow:auto;pointer-events:auto;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-overflow-scrolling:touch}.lity-iframe-container iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}.lity-hide{display:none} lib/jquery-confirm/jquery-confirm.min.css 0000644 00000054013 15174712143 0014542 0 ustar 00 /*! * jquery-confirm v3.3.4 (http://craftpip.github.io/jquery-confirm/) * Author: boniface pereira * Website: www.craftpip.com * Contact: hey@craftpip.com * * Copyright 2013-2019 jquery-confirm * Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE) */@-webkit-keyframes jconfirm-spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes jconfirm-spin{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}body[class*=jconfirm-no-scroll-]{overflow:hidden!important}.jconfirm{position:fixed;top:0;left:0;right:0;bottom:0;z-index:99999999;font-family:inherit;overflow:hidden}.jconfirm .jconfirm-bg{position:fixed;top:0;left:0;right:0;bottom:0;-webkit-transition:opacity .4s;transition:opacity .4s}.jconfirm .jconfirm-bg.jconfirm-bg-h{opacity:0!important}.jconfirm .jconfirm-scrollpane{-webkit-perspective:500px;perspective:500px;-webkit-perspective-origin:center;perspective-origin:center;display:table;width:100%;height:100%}.jconfirm .jconfirm-row{display:table-row;width:100%}.jconfirm .jconfirm-cell{display:table-cell;vertical-align:middle}.jconfirm .jconfirm-holder{max-height:100%;padding:50px 0}.jconfirm .jconfirm-box-container{-webkit-transition:-webkit-transform;transition:-webkit-transform;transition:transform;transition:transform,-webkit-transform}.jconfirm .jconfirm-box-container.jconfirm-no-transition{-webkit-transition:none!important;transition:none!important}.jconfirm .jconfirm-box{background:white;border-radius:4px;position:relative;outline:0;padding:15px 15px 0;overflow:hidden;margin-left:auto;margin-right:auto}@-webkit-keyframes type-blue{1%,100%{border-color:#3498db}50%{border-color:#5faee3}}@keyframes type-blue{1%,100%{border-color:#3498db}50%{border-color:#5faee3}}@-webkit-keyframes type-green{1%,100%{border-color:#2ecc71}50%{border-color:#54d98c}}@keyframes type-green{1%,100%{border-color:#2ecc71}50%{border-color:#54d98c}}@-webkit-keyframes type-red{1%,100%{border-color:#e74c3c}50%{border-color:#ed7669}}@keyframes type-red{1%,100%{border-color:#e74c3c}50%{border-color:#ed7669}}@-webkit-keyframes type-orange{1%,100%{border-color:#f1c40f}50%{border-color:#f4d03f}}@keyframes type-orange{1%,100%{border-color:#f1c40f}50%{border-color:#f4d03f}}@-webkit-keyframes type-purple{1%,100%{border-color:#9b59b6}50%{border-color:#b07cc6}}@keyframes type-purple{1%,100%{border-color:#9b59b6}50%{border-color:#b07cc6}}@-webkit-keyframes type-dark{1%,100%{border-color:#34495e}50%{border-color:#46627f}}@keyframes type-dark{1%,100%{border-color:#34495e}50%{border-color:#46627f}}.jconfirm .jconfirm-box.jconfirm-type-animated{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.jconfirm .jconfirm-box.jconfirm-type-blue{border-top:solid 7px #3498db;-webkit-animation-name:type-blue;animation-name:type-blue}.jconfirm .jconfirm-box.jconfirm-type-green{border-top:solid 7px #2ecc71;-webkit-animation-name:type-green;animation-name:type-green}.jconfirm .jconfirm-box.jconfirm-type-red{border-top:solid 7px #e74c3c;-webkit-animation-name:type-red;animation-name:type-red}.jconfirm .jconfirm-box.jconfirm-type-orange{border-top:solid 7px #f1c40f;-webkit-animation-name:type-orange;animation-name:type-orange}.jconfirm .jconfirm-box.jconfirm-type-purple{border-top:solid 7px #9b59b6;-webkit-animation-name:type-purple;animation-name:type-purple}.jconfirm .jconfirm-box.jconfirm-type-dark{border-top:solid 7px #34495e;-webkit-animation-name:type-dark;animation-name:type-dark}.jconfirm .jconfirm-box.loading{height:120px}.jconfirm .jconfirm-box.loading:before{content:'';position:absolute;left:0;background:white;right:0;top:0;bottom:0;border-radius:10px;z-index:1}.jconfirm .jconfirm-box.loading:after{opacity:.6;content:'';height:30px;width:30px;border:solid 3px transparent;position:absolute;left:50%;margin-left:-15px;border-radius:50%;-webkit-animation:jconfirm-spin 1s infinite linear;animation:jconfirm-spin 1s infinite linear;border-bottom-color:dodgerblue;top:50%;margin-top:-15px;z-index:2}.jconfirm .jconfirm-box div.jconfirm-closeIcon{height:20px;width:20px;position:absolute;top:10px;right:10px;cursor:pointer;opacity:.6;text-align:center;font-size:27px!important;line-height:14px!important;display:none;z-index:1}.jconfirm .jconfirm-box div.jconfirm-closeIcon:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-closeIcon .fa{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon .glyphicon{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon .zmdi{font-size:16px}.jconfirm .jconfirm-box div.jconfirm-closeIcon:hover{opacity:1}.jconfirm .jconfirm-box div.jconfirm-title-c{display:block;font-size:22px;line-height:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;padding-bottom:15px}.jconfirm .jconfirm-box div.jconfirm-title-c.jconfirm-hand{cursor:move}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{font-size:inherit;display:inline-block;vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c i{vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:inherit;font-family:inherit;display:inline-block;vertical-align:middle}.jconfirm .jconfirm-box div.jconfirm-title-c .jconfirm-title:empty{display:none}.jconfirm .jconfirm-box div.jconfirm-content-pane{margin-bottom:15px;height:auto;-webkit-transition:height .4s ease-in;transition:height .4s ease-in;display:inline-block;width:100%;position:relative;overflow-x:hidden;overflow-y:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane.no-scroll{overflow-y:hidden}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar{width:3px}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.jconfirm .jconfirm-box div.jconfirm-content-pane::-webkit-scrollbar-thumb{background:#666;border-radius:3px}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content{overflow:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content img{max-width:100%;height:auto}.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content:empty{display:none}.jconfirm .jconfirm-box .jconfirm-buttons{padding-bottom:11px}.jconfirm .jconfirm-box .jconfirm-buttons>button{margin-bottom:4px;margin-left:2px;margin-right:2px}.jconfirm .jconfirm-box .jconfirm-buttons button{display:inline-block;padding:6px 12px;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:4px;min-height:1em;-webkit-transition:opacity .1s ease,background-color .1s ease,color .1s ease,background .1s ease,-webkit-box-shadow .1s ease;transition:opacity .1s ease,background-color .1s ease,color .1s ease,background .1s ease,-webkit-box-shadow .1s ease;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease;transition:opacity .1s ease,background-color .1s ease,color .1s ease,box-shadow .1s ease,background .1s ease,-webkit-box-shadow .1s ease;-webkit-tap-highlight-color:transparent;border:0;background-image:none}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue{background-color:#3498db;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-blue:hover{background-color:#2980b9;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-green{background-color:#2ecc71;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-green:hover{background-color:#27ae60;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red{background-color:#e74c3c;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-red:hover{background-color:#c0392b;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-orange{background-color:#f1c40f;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-orange:hover{background-color:#f39c12;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default{background-color:#ecf0f1;color:#000;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-default:hover{background-color:#bdc3c7;color:#000}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-purple{background-color:#9b59b6;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-purple:hover{background-color:#8e44ad;color:#FFF}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark{background-color:#34495e;color:#FFF;text-shadow:none;-webkit-transition:background .2s;transition:background .2s}.jconfirm .jconfirm-box .jconfirm-buttons button.btn-dark:hover{background-color:#2c3e50;color:#FFF}.jconfirm .jconfirm-box.jconfirm-type-red .jconfirm-title-c .jconfirm-icon-c{color:#e74c3c!important}.jconfirm .jconfirm-box.jconfirm-type-blue .jconfirm-title-c .jconfirm-icon-c{color:#3498db!important}.jconfirm .jconfirm-box.jconfirm-type-green .jconfirm-title-c .jconfirm-icon-c{color:#2ecc71!important}.jconfirm .jconfirm-box.jconfirm-type-purple .jconfirm-title-c .jconfirm-icon-c{color:#9b59b6!important}.jconfirm .jconfirm-box.jconfirm-type-orange .jconfirm-title-c .jconfirm-icon-c{color:#f1c40f!important}.jconfirm .jconfirm-box.jconfirm-type-dark .jconfirm-title-c .jconfirm-icon-c{color:#34495e!important}.jconfirm .jconfirm-clear{clear:both}.jconfirm.jconfirm-rtl{direction:rtl}.jconfirm.jconfirm-rtl div.jconfirm-closeIcon{left:5px;right:auto}.jconfirm.jconfirm-white .jconfirm-bg,.jconfirm.jconfirm-light .jconfirm-bg{background-color:#444;opacity:.2}.jconfirm.jconfirm-white .jconfirm-box,.jconfirm.jconfirm-light .jconfirm-box{-webkit-box-shadow:0 2px 6px rgba(0,0,0,0.2);box-shadow:0 2px 6px rgba(0,0,0,0.2);border-radius:5px}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons{float:right}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button{text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default{-webkit-box-shadow:none;box-shadow:none;color:#333}.jconfirm.jconfirm-white .jconfirm-box .jconfirm-buttons button.btn-default:hover,.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default:hover{background:#ddd}.jconfirm.jconfirm-white.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-light.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-black .jconfirm-bg,.jconfirm.jconfirm-dark .jconfirm-bg{background-color:darkslategray;opacity:.4}.jconfirm.jconfirm-black .jconfirm-box,.jconfirm.jconfirm-dark .jconfirm-box{-webkit-box-shadow:0 2px 6px rgba(0,0,0,0.2);box-shadow:0 2px 6px rgba(0,0,0,0.2);background:#444;border-radius:5px;color:white}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons{float:right}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button{border:0;background-image:none;text-transform:uppercase;font-size:14px;font-weight:bold;text-shadow:none;-webkit-transition:background .1s;transition:background .1s;color:white}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default{-webkit-box-shadow:none;box-shadow:none;color:#fff;background:0}.jconfirm.jconfirm-black .jconfirm-box .jconfirm-buttons button.btn-default:hover,.jconfirm.jconfirm-dark .jconfirm-box .jconfirm-buttons button.btn-default:hover{background:#666}.jconfirm.jconfirm-black.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c,.jconfirm.jconfirm-dark.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm .jconfirm-box.hilight.jconfirm-hilight-shake{-webkit-animation:shake .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:shake .82s cubic-bezier(0.36,0.07,0.19,0.97) both;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.jconfirm .jconfirm-box.hilight.jconfirm-hilight-glow{-webkit-animation:glow .82s cubic-bezier(0.36,0.07,0.19,0.97) both;animation:glow .82s cubic-bezier(0.36,0.07,0.19,0.97) both;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-2px,0,0);transform:translate3d(-2px,0,0)}20%,80%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-8px,0,0);transform:translate3d(-8px,0,0)}40%,60%{-webkit-transform:translate3d(8px,0,0);transform:translate3d(8px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-2px,0,0);transform:translate3d(-2px,0,0)}20%,80%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-8px,0,0);transform:translate3d(-8px,0,0)}40%,60%{-webkit-transform:translate3d(8px,0,0);transform:translate3d(8px,0,0)}}@-webkit-keyframes glow{0%,100%{-webkit-box-shadow:0 0 0 red;box-shadow:0 0 0 red}50%{-webkit-box-shadow:0 0 30px red;box-shadow:0 0 30px red}}@keyframes glow{0%,100%{-webkit-box-shadow:0 0 0 red;box-shadow:0 0 0 red}50%{-webkit-box-shadow:0 0 30px red;box-shadow:0 0 30px red}}.jconfirm{-webkit-perspective:400px;perspective:400px}.jconfirm .jconfirm-box{opacity:1;-webkit-transition-property:all;transition-property:all}.jconfirm .jconfirm-box.jconfirm-animation-top,.jconfirm .jconfirm-box.jconfirm-animation-left,.jconfirm .jconfirm-box.jconfirm-animation-right,.jconfirm .jconfirm-box.jconfirm-animation-bottom,.jconfirm .jconfirm-box.jconfirm-animation-opacity,.jconfirm .jconfirm-box.jconfirm-animation-zoom,.jconfirm .jconfirm-box.jconfirm-animation-scale,.jconfirm .jconfirm-box.jconfirm-animation-none,.jconfirm .jconfirm-box.jconfirm-animation-rotate,.jconfirm .jconfirm-box.jconfirm-animation-rotatex,.jconfirm .jconfirm-box.jconfirm-animation-rotatey,.jconfirm .jconfirm-box.jconfirm-animation-scaley,.jconfirm .jconfirm-box.jconfirm-animation-scalex{opacity:0}.jconfirm .jconfirm-box.jconfirm-animation-rotate{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.jconfirm .jconfirm-box.jconfirm-animation-rotatex{-webkit-transform:rotateX(90deg);transform:rotateX(90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatexr{-webkit-transform:rotateX(-90deg);transform:rotateX(-90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotatey{-webkit-transform:rotatey(90deg);transform:rotatey(90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-rotateyr{-webkit-transform:rotatey(-90deg);transform:rotatey(-90deg);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scaley{-webkit-transform:scaley(1.5);transform:scaley(1.5);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-scalex{-webkit-transform:scalex(1.5);transform:scalex(1.5);-webkit-transform-origin:center;transform-origin:center}.jconfirm .jconfirm-box.jconfirm-animation-top{-webkit-transform:translate(0px,-100px);transform:translate(0px,-100px)}.jconfirm .jconfirm-box.jconfirm-animation-left{-webkit-transform:translate(-100px,0px);transform:translate(-100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-right{-webkit-transform:translate(100px,0px);transform:translate(100px,0px)}.jconfirm .jconfirm-box.jconfirm-animation-bottom{-webkit-transform:translate(0px,100px);transform:translate(0px,100px)}.jconfirm .jconfirm-box.jconfirm-animation-zoom{-webkit-transform:scale(1.2);transform:scale(1.2)}.jconfirm .jconfirm-box.jconfirm-animation-scale{-webkit-transform:scale(0.5);transform:scale(0.5)}.jconfirm .jconfirm-box.jconfirm-animation-none{visibility:hidden}.jconfirm.jconfirm-supervan .jconfirm-bg{background-color:rgba(54,70,93,0.95)}.jconfirm.jconfirm-supervan .jconfirm-box{background-color:transparent}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-blue{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-green{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-red{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-orange{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-purple{border:0}.jconfirm.jconfirm-supervan .jconfirm-box.jconfirm-type-dark{border:0}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-closeIcon{color:white}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c{text-align:center;color:white;font-size:28px;font-weight:normal}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c>*{padding-bottom:25px}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-content-pane{margin-bottom:25px}.jconfirm.jconfirm-supervan .jconfirm-box div.jconfirm-content{text-align:center;color:white}.jconfirm.jconfirm-supervan .jconfirm-box .jconfirm-buttons{text-align:center}.jconfirm.jconfirm-supervan .jconfirm-box .jconfirm-buttons button{font-size:16px;border-radius:2px;background:#303f53;text-shadow:none;border:0;color:white;padding:10px;min-width:100px}.jconfirm.jconfirm-supervan.jconfirm-rtl .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-material .jconfirm-bg{background-color:rgba(0,0,0,0.67)}.jconfirm.jconfirm-material .jconfirm-box{background-color:white;-webkit-box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);padding:30px 25px 10px 25px}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:22px;font-weight:bold}.jconfirm.jconfirm-material .jconfirm-box div.jconfirm-content{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons{text-align:right}.jconfirm.jconfirm-material .jconfirm-box .jconfirm-buttons button{text-transform:uppercase;font-weight:500}.jconfirm.jconfirm-material.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-bootstrap .jconfirm-bg{background-color:rgba(0,0,0,0.21)}.jconfirm.jconfirm-bootstrap .jconfirm-box{background-color:white;-webkit-box-shadow:0 3px 8px 0 rgba(0,0,0,0.2);box-shadow:0 3px 8px 0 rgba(0,0,0,0.2);border:solid 1px rgba(0,0,0,0.4);padding:15px 0 0}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{margin-right:8px;margin-left:0}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87)}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:22px;font-weight:bold;padding-left:15px;padding-right:15px}.jconfirm.jconfirm-bootstrap .jconfirm-box div.jconfirm-content{color:rgba(0,0,0,0.87);padding:0 15px}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons{text-align:right;padding:10px;margin:-5px 0 0;border-top:solid 1px #ddd;overflow:hidden;border-radius:0 0 4px 4px}.jconfirm.jconfirm-bootstrap .jconfirm-box .jconfirm-buttons button{font-weight:500}.jconfirm.jconfirm-bootstrap.jconfirm-rtl .jconfirm-title-c .jconfirm-icon-c{margin-left:8px;margin-right:0}.jconfirm.jconfirm-modern .jconfirm-bg{background-color:slategray;opacity:.6}.jconfirm.jconfirm-modern .jconfirm-box{background-color:white;-webkit-box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);box-shadow:0 7px 8px -4px rgba(0,0,0,0.2),0 13px 19px 2px rgba(0,0,0,0.14),0 5px 24px 4px rgba(0,0,0,0.12);padding:30px 30px 15px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-closeIcon{color:rgba(0,0,0,0.87);top:15px;right:15px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c{color:rgba(0,0,0,0.87);font-size:24px;font-weight:bold;text-align:center;margin-bottom:10px}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-title-c .jconfirm-icon-c{-webkit-transition:-webkit-transform .5s;transition:-webkit-transform .5s;transition:transform .5s;transition:transform .5s,-webkit-transform .5s;-webkit-transform:scale(0);transform:scale(0);display:block;margin-right:0;margin-left:0;margin-bottom:10px;font-size:69px;color:#aaa}.jconfirm.jconfirm-modern .jconfirm-box div.jconfirm-content{text-align:center;font-size:15px;color:#777;margin-bottom:25px}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons{text-align:center}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons button{font-weight:bold;text-transform:uppercase;-webkit-transition:background .1s;transition:background .1s;padding:10px 20px}.jconfirm.jconfirm-modern .jconfirm-box .jconfirm-buttons button+button{margin-left:4px}.jconfirm.jconfirm-modern.jconfirm-open .jconfirm-box .jconfirm-title-c .jconfirm-icon-c{-webkit-transform:scale(1);transform:scale(1)} lib/jquery-confirm/jquery-confirm.min.js 0000644 00000067077 15174712143 0014404 0 ustar 00 /*! * jquery-confirm v3.3.4 (http://craftpip.github.io/jquery-confirm/) * Author: Boniface Pereira * Website: www.craftpip.com * Contact: hey@craftpip.com * * Copyright 2013-2019 jquery-confirm * Licensed under MIT (https://github.com/craftpip/jquery-confirm/blob/master/LICENSE) */ (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{if(typeof module==="object"&&module.exports){module.exports=function(root,jQuery){if(jQuery===undefined){if(typeof window!=="undefined"){jQuery=require("jquery");}else{jQuery=require("jquery")(root);}}factory(jQuery);return jQuery;};}else{factory(jQuery);}}}(function($){var w=window;$.fn.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}$(this).each(function(){var $this=$(this);if($this.attr("jc-attached")){console.warn("jConfirm has already been attached to this element ",$this[0]);return;}$this.on("click",function(e){e.preventDefault();var jcOption=$.extend({},options);if($this.attr("data-title")){jcOption.title=$this.attr("data-title");}if($this.attr("data-content")){jcOption.content=$this.attr("data-content");}if(typeof jcOption.buttons==="undefined"){jcOption.buttons={};}jcOption["$target"]=$this;if($this.attr("href")&&Object.keys(jcOption.buttons).length===0){var buttons=$.extend(true,{},w.jconfirm.pluginDefaults.defaultButtons,(w.jconfirm.defaults||{}).defaultButtons||{});var firstBtn=Object.keys(buttons)[0];jcOption.buttons=buttons;jcOption.buttons[firstBtn].action=function(){location.href=$this.attr("href");};}jcOption.closeIcon=false;var instance=$.confirm(jcOption);});$this.attr("jc-attached",true);});return $(this);};$.confirm=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}var putDefaultButtons=!(options.buttons===false);if(typeof options.buttons!=="object"){options.buttons={};}if(Object.keys(options.buttons).length===0&&putDefaultButtons){var buttons=$.extend(true,{},w.jconfirm.pluginDefaults.defaultButtons,(w.jconfirm.defaults||{}).defaultButtons||{});options.buttons=buttons;}return w.jconfirm(options);};$.alert=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false};}var putDefaultButtons=!(options.buttons===false);if(typeof options.buttons!=="object"){options.buttons={};}if(Object.keys(options.buttons).length===0&&putDefaultButtons){var buttons=$.extend(true,{},w.jconfirm.pluginDefaults.defaultButtons,(w.jconfirm.defaults||{}).defaultButtons||{});var firstBtn=Object.keys(buttons)[0];options.buttons[firstBtn]=buttons[firstBtn];}return w.jconfirm(options);};$.dialog=function(options,option2){if(typeof options==="undefined"){options={};}if(typeof options==="string"){options={content:options,title:(option2)?option2:false,closeIcon:function(){}};}options.buttons={};if(typeof options.closeIcon==="undefined"){options.closeIcon=function(){};}options.confirmKeys=[13];return w.jconfirm(options);};w.jconfirm=function(options){if(typeof options==="undefined"){options={};}var pluginOptions=$.extend(true,{},w.jconfirm.pluginDefaults);if(w.jconfirm.defaults){pluginOptions=$.extend(true,pluginOptions,w.jconfirm.defaults);}pluginOptions=$.extend(true,{},pluginOptions,options);var instance=new w.Jconfirm(pluginOptions);w.jconfirm.instances.push(instance);return instance;};w.Jconfirm=function(options){$.extend(this,options);this._init();};w.Jconfirm.prototype={_init:function(){var that=this;if(!w.jconfirm.instances.length){w.jconfirm.lastFocused=$("body").find(":focus");}this._id=Math.round(Math.random()*99999);this.contentParsed=$(document.createElement("div"));if(!this.lazyOpen){setTimeout(function(){that.open();},0);}},_buildHTML:function(){var that=this;this._parseAnimation(this.animation,"o");this._parseAnimation(this.closeAnimation,"c");this._parseBgDismissAnimation(this.backgroundDismissAnimation);this._parseColumnClass(this.columnClass);this._parseTheme(this.theme);this._parseType(this.type);var template=$(this.template);template.find(".jconfirm-box").addClass(this.animationParsed).addClass(this.backgroundDismissAnimationParsed).addClass(this.typeParsed);if(this.typeAnimated){template.find(".jconfirm-box").addClass("jconfirm-type-animated");}if(this.useBootstrap){template.find(".jc-bs3-row").addClass(this.bootstrapClasses.row);template.find(".jc-bs3-row").addClass("justify-content-md-center justify-content-sm-center justify-content-xs-center justify-content-lg-center");template.find(".jconfirm-box-container").addClass(this.columnClassParsed);if(this.containerFluid){template.find(".jc-bs3-container").addClass(this.bootstrapClasses.containerFluid);}else{template.find(".jc-bs3-container").addClass(this.bootstrapClasses.container);}}else{template.find(".jconfirm-box").css("width",this.boxWidth);}if(this.titleClass){template.find(".jconfirm-title-c").addClass(this.titleClass);}template.addClass(this.themeParsed);var ariaLabel="jconfirm-box"+this._id;template.find(".jconfirm-box").attr("aria-labelledby",ariaLabel).attr("tabindex",-1);template.find(".jconfirm-content").attr("id",ariaLabel);if(this.bgOpacity!==null){template.find(".jconfirm-bg").css("opacity",this.bgOpacity);}if(this.rtl){template.addClass("jconfirm-rtl");}this.$el=template.appendTo(this.container);this.$jconfirmBoxContainer=this.$el.find(".jconfirm-box-container");this.$jconfirmBox=this.$body=this.$el.find(".jconfirm-box");this.$jconfirmBg=this.$el.find(".jconfirm-bg");this.$title=this.$el.find(".jconfirm-title");this.$titleContainer=this.$el.find(".jconfirm-title-c");this.$content=this.$el.find("div.jconfirm-content");this.$contentPane=this.$el.find(".jconfirm-content-pane");this.$icon=this.$el.find(".jconfirm-icon-c");this.$closeIcon=this.$el.find(".jconfirm-closeIcon");this.$holder=this.$el.find(".jconfirm-holder");this.$btnc=this.$el.find(".jconfirm-buttons");this.$scrollPane=this.$el.find(".jconfirm-scrollpane");that.setStartingPoint();this._contentReady=$.Deferred();this._modalReady=$.Deferred();this.$holder.css({"padding-top":this.offsetTop,"padding-bottom":this.offsetBottom,});this.setTitle();this.setIcon();this._setButtons();this._parseContent();this.initDraggable();if(this.isAjax){this.showLoading(false);}$.when(this._contentReady,this._modalReady).then(function(){if(that.isAjaxLoading){setTimeout(function(){that.isAjaxLoading=false;that.setContent();that.setTitle();that.setIcon();setTimeout(function(){that.hideLoading(false);that._updateContentMaxHeight();},100);if(typeof that.onContentReady==="function"){that.onContentReady();}},50);}else{that._updateContentMaxHeight();that.setTitle();that.setIcon();if(typeof that.onContentReady==="function"){that.onContentReady();}}if(that.autoClose){that._startCountDown();}}).then(function(){that._watchContent();});if(this.animation==="none"){this.animationSpeed=1;this.animationBounce=1;}this.$body.css(this._getCSS(this.animationSpeed,this.animationBounce));this.$contentPane.css(this._getCSS(this.animationSpeed,1));this.$jconfirmBg.css(this._getCSS(this.animationSpeed,1));this.$jconfirmBoxContainer.css(this._getCSS(this.animationSpeed,1));},_typePrefix:"jconfirm-type-",typeParsed:"",_parseType:function(type){this.typeParsed=this._typePrefix+type;},setType:function(type){var oldClass=this.typeParsed;this._parseType(type);this.$jconfirmBox.removeClass(oldClass).addClass(this.typeParsed);},themeParsed:"",_themePrefix:"jconfirm-",setTheme:function(theme){var previous=this.theme;this.theme=theme||this.theme;this._parseTheme(this.theme);if(previous){this.$el.removeClass(previous);}this.$el.addClass(this.themeParsed);this.theme=theme;},_parseTheme:function(theme){var that=this;theme=theme.split(",");$.each(theme,function(k,a){if(a.indexOf(that._themePrefix)===-1){theme[k]=that._themePrefix+$.trim(a);}});this.themeParsed=theme.join(" ").toLowerCase();},backgroundDismissAnimationParsed:"",_bgDismissPrefix:"jconfirm-hilight-",_parseBgDismissAnimation:function(bgDismissAnimation){var animation=bgDismissAnimation.split(",");var that=this;$.each(animation,function(k,a){if(a.indexOf(that._bgDismissPrefix)===-1){animation[k]=that._bgDismissPrefix+$.trim(a);}});this.backgroundDismissAnimationParsed=animation.join(" ").toLowerCase();},animationParsed:"",closeAnimationParsed:"",_animationPrefix:"jconfirm-animation-",setAnimation:function(animation){this.animation=animation||this.animation;this._parseAnimation(this.animation,"o");},_parseAnimation:function(animation,which){which=which||"o";var animations=animation.split(",");var that=this;$.each(animations,function(k,a){if(a.indexOf(that._animationPrefix)===-1){animations[k]=that._animationPrefix+$.trim(a);}});var a_string=animations.join(" ").toLowerCase();if(which==="o"){this.animationParsed=a_string;}else{this.closeAnimationParsed=a_string;}return a_string;},setCloseAnimation:function(closeAnimation){this.closeAnimation=closeAnimation||this.closeAnimation;this._parseAnimation(this.closeAnimation,"c");},setAnimationSpeed:function(speed){this.animationSpeed=speed||this.animationSpeed;},columnClassParsed:"",setColumnClass:function(colClass){if(!this.useBootstrap){console.warn("cannot set columnClass, useBootstrap is set to false");return;}this.columnClass=colClass||this.columnClass;this._parseColumnClass(this.columnClass);this.$jconfirmBoxContainer.addClass(this.columnClassParsed);},_updateContentMaxHeight:function(){var height=$(window).height()-(this.$jconfirmBox.outerHeight()-this.$contentPane.outerHeight())-(this.offsetTop+this.offsetBottom);this.$contentPane.css({"max-height":height+"px"});},setBoxWidth:function(width){if(this.useBootstrap){console.warn("cannot set boxWidth, useBootstrap is set to true");return;}this.boxWidth=width;this.$jconfirmBox.css("width",width);},_parseColumnClass:function(colClass){colClass=colClass.toLowerCase();var p;switch(colClass){case"xl":case"xlarge":p="col-md-12";break;case"l":case"large":p="col-md-8 col-md-offset-2";break;case"m":case"medium":p="col-md-6 col-md-offset-3";break;case"s":case"small":p="col-md-4 col-md-offset-4";break;case"xs":case"xsmall":p="col-md-2 col-md-offset-5";break;default:p=colClass;}this.columnClassParsed=p;},initDraggable:function(){var that=this;var $t=this.$titleContainer;this.resetDrag();if(this.draggable){$t.on("mousedown",function(e){$t.addClass("jconfirm-hand");that.mouseX=e.clientX;that.mouseY=e.clientY;that.isDrag=true;});$(window).on("mousemove."+this._id,function(e){if(that.isDrag){that.movingX=e.clientX-that.mouseX+that.initialX;that.movingY=e.clientY-that.mouseY+that.initialY;that.setDrag();}});$(window).on("mouseup."+this._id,function(){$t.removeClass("jconfirm-hand");if(that.isDrag){that.isDrag=false;that.initialX=that.movingX;that.initialY=that.movingY;}});}},resetDrag:function(){this.isDrag=false;this.initialX=0;this.initialY=0;this.movingX=0;this.movingY=0;this.mouseX=0;this.mouseY=0;this.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");},setDrag:function(){if(!this.draggable){return;}this.alignMiddle=false;var boxWidth=this.$jconfirmBox.outerWidth();var boxHeight=this.$jconfirmBox.outerHeight();var windowWidth=$(window).width();var windowHeight=$(window).height();var that=this;var dragUpdate=1;if(that.movingX%dragUpdate===0||that.movingY%dragUpdate===0){if(that.dragWindowBorder){var leftDistance=(windowWidth/2)-boxWidth/2;var topDistance=(windowHeight/2)-boxHeight/2;topDistance-=that.dragWindowGap;leftDistance-=that.dragWindowGap;if(leftDistance+that.movingX<0){that.movingX=-leftDistance;}else{if(leftDistance-that.movingX<0){that.movingX=leftDistance;}}if(topDistance+that.movingY<0){that.movingY=-topDistance;}else{if(topDistance-that.movingY<0){that.movingY=topDistance;}}}that.$jconfirmBoxContainer.css("transform","translate("+that.movingX+"px, "+that.movingY+"px)");}},_scrollTop:function(){if(typeof pageYOffset!=="undefined"){return pageYOffset;}else{var B=document.body;var D=document.documentElement;D=(D.clientHeight)?D:B;return D.scrollTop;}},_watchContent:function(){var that=this;if(this._timer){clearInterval(this._timer);}var prevContentHeight=0;this._timer=setInterval(function(){if(that.smoothContent){var contentHeight=that.$content.outerHeight()||0;if(contentHeight!==prevContentHeight){prevContentHeight=contentHeight;}var wh=$(window).height();var total=that.offsetTop+that.offsetBottom+that.$jconfirmBox.height()-that.$contentPane.height()+that.$content.height();if(total<wh){that.$contentPane.addClass("no-scroll");}else{that.$contentPane.removeClass("no-scroll");}}},this.watchInterval);},_overflowClass:"jconfirm-overflow",_hilightAnimating:false,highlight:function(){this.hiLightModal();},hiLightModal:function(){var that=this;if(this._hilightAnimating){return;}that.$body.addClass("hilight");var duration=parseFloat(that.$body.css("animation-duration"))||2;this._hilightAnimating=true;setTimeout(function(){that._hilightAnimating=false;that.$body.removeClass("hilight");},duration*1000);},_bindEvents:function(){var that=this;this.boxClicked=false;this.$scrollPane.click(function(e){if(!that.boxClicked){var buttonName=false;var shouldClose=false;var str;if(typeof that.backgroundDismiss==="function"){str=that.backgroundDismiss();}else{str=that.backgroundDismiss;}if(typeof str==="string"&&typeof that.buttons[str]!=="undefined"){buttonName=str;shouldClose=false;}else{if(typeof str==="undefined"||!!(str)===true){shouldClose=true;}else{shouldClose=false;}}if(buttonName){var btnResponse=that.buttons[buttonName].action.apply(that);shouldClose=(typeof btnResponse==="undefined")||!!(btnResponse);}if(shouldClose){that.close();}else{that.hiLightModal();}}that.boxClicked=false;});this.$jconfirmBox.click(function(e){that.boxClicked=true;});var isKeyDown=false;$(window).on("jcKeyDown."+that._id,function(e){if(!isKeyDown){isKeyDown=true;}});$(window).on("keyup."+that._id,function(e){if(isKeyDown){that.reactOnKey(e);isKeyDown=false;}});$(window).on("resize."+this._id,function(){that._updateContentMaxHeight();setTimeout(function(){that.resetDrag();},100);});},_cubic_bezier:"0.36, 0.55, 0.19",_getCSS:function(speed,bounce){return{"-webkit-transition-duration":speed/1000+"s","transition-duration":speed/1000+"s","-webkit-transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+bounce+")","transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+bounce+")"};},_setButtons:function(){var that=this;var total_buttons=0;if(typeof this.buttons!=="object"){this.buttons={};}$.each(this.buttons,function(key,button){total_buttons+=1;if(typeof button==="function"){that.buttons[key]=button={action:button};}that.buttons[key].text=button.text||key;that.buttons[key].btnClass=button.btnClass||"btn-default";that.buttons[key].action=button.action||function(){};that.buttons[key].keys=button.keys||[];that.buttons[key].isHidden=button.isHidden||false;that.buttons[key].isDisabled=button.isDisabled||false;$.each(that.buttons[key].keys,function(i,a){that.buttons[key].keys[i]=a.toLowerCase();});var button_element=$('<button type="button" class="btn"></button>').html(that.buttons[key].text).addClass(that.buttons[key].btnClass).prop("disabled",that.buttons[key].isDisabled).css("display",that.buttons[key].isHidden?"none":"").click(function(e){e.preventDefault();var res=that.buttons[key].action.apply(that,[that.buttons[key]]);that.onAction.apply(that,[key,that.buttons[key]]);that._stopCountDown();if(typeof res==="undefined"||res){that.close();}});that.buttons[key].el=button_element;that.buttons[key].setText=function(text){button_element.html(text);};that.buttons[key].addClass=function(className){button_element.addClass(className);};that.buttons[key].removeClass=function(className){button_element.removeClass(className);};that.buttons[key].disable=function(){that.buttons[key].isDisabled=true;button_element.prop("disabled",true);};that.buttons[key].enable=function(){that.buttons[key].isDisabled=false;button_element.prop("disabled",false);};that.buttons[key].show=function(){that.buttons[key].isHidden=false;button_element.css("display","");};that.buttons[key].hide=function(){that.buttons[key].isHidden=true;button_element.css("display","none");};that["$_"+key]=that["$$"+key]=button_element;that.$btnc.append(button_element);});if(total_buttons===0){this.$btnc.hide();}if(this.closeIcon===null&&total_buttons===0){this.closeIcon=true;}if(this.closeIcon){if(this.closeIconClass){var closeHtml='<i class="'+this.closeIconClass+'"></i>';this.$closeIcon.html(closeHtml);}this.$closeIcon.click(function(e){e.preventDefault();var buttonName=false;var shouldClose=false;var str;if(typeof that.closeIcon==="function"){str=that.closeIcon();}else{str=that.closeIcon;}if(typeof str==="string"&&typeof that.buttons[str]!=="undefined"){buttonName=str;shouldClose=false;}else{if(typeof str==="undefined"||!!(str)===true){shouldClose=true;}else{shouldClose=false;}}if(buttonName){var btnResponse=that.buttons[buttonName].action.apply(that);shouldClose=(typeof btnResponse==="undefined")||!!(btnResponse);}if(shouldClose){that.close();}});this.$closeIcon.show();}else{this.$closeIcon.hide();}},setTitle:function(string,force){force=force||false;if(typeof string!=="undefined"){if(typeof string==="string"){this.title=string;}else{if(typeof string==="function"){if(typeof string.promise==="function"){console.error("Promise was returned from title function, this is not supported.");}var response=string();if(typeof response==="string"){this.title=response;}else{this.title=false;}}else{this.title=false;}}}if(this.isAjaxLoading&&!force){return;}this.$title.html(this.title||"");this.updateTitleContainer();},setIcon:function(iconClass,force){force=force||false;if(typeof iconClass!=="undefined"){if(typeof iconClass==="string"){this.icon=iconClass;}else{if(typeof iconClass==="function"){var response=iconClass();if(typeof response==="string"){this.icon=response;}else{this.icon=false;}}else{this.icon=false;}}}if(this.isAjaxLoading&&!force){return;}this.$icon.html(this.icon?'<i class="'+this.icon+'"></i>':"");this.updateTitleContainer();},updateTitleContainer:function(){if(!this.title&&!this.icon){this.$titleContainer.hide();}else{this.$titleContainer.show();}},setContentPrepend:function(content,force){if(!content){return;}this.contentParsed.prepend(content);},setContentAppend:function(content){if(!content){return;}this.contentParsed.append(content);},setContent:function(content,force){force=!!force;var that=this;if(content){this.contentParsed.html("").append(content);}if(this.isAjaxLoading&&!force){return;}this.$content.html("");this.$content.append(this.contentParsed);setTimeout(function(){that.$body.find("input[autofocus]:visible:first").focus();},100);},loadingSpinner:false,showLoading:function(disableButtons){this.loadingSpinner=true;this.$jconfirmBox.addClass("loading");if(disableButtons){this.$btnc.find("button").prop("disabled",true);}},hideLoading:function(enableButtons){this.loadingSpinner=false;this.$jconfirmBox.removeClass("loading");if(enableButtons){this.$btnc.find("button").prop("disabled",false);}},ajaxResponse:false,contentParsed:"",isAjax:false,isAjaxLoading:false,_parseContent:function(){var that=this;var e=" ";if(typeof this.content==="function"){var res=this.content.apply(this);if(typeof res==="string"){this.content=res;}else{if(typeof res==="object"&&typeof res.always==="function"){this.isAjax=true;this.isAjaxLoading=true;res.always(function(data,status,xhr){that.ajaxResponse={data:data,status:status,xhr:xhr};that._contentReady.resolve(data,status,xhr);if(typeof that.contentLoaded==="function"){that.contentLoaded(data,status,xhr);}});this.content=e;}else{this.content=e;}}}if(typeof this.content==="string"&&this.content.substr(0,4).toLowerCase()==="url:"){this.isAjax=true;this.isAjaxLoading=true;var u=this.content.substring(4,this.content.length);$.get(u).done(function(html){that.contentParsed.html(html);}).always(function(data,status,xhr){that.ajaxResponse={data:data,status:status,xhr:xhr};that._contentReady.resolve(data,status,xhr);if(typeof that.contentLoaded==="function"){that.contentLoaded(data,status,xhr);}});}if(!this.content){this.content=e;}if(!this.isAjax){this.contentParsed.html(this.content);this.setContent();that._contentReady.resolve();}},_stopCountDown:function(){clearInterval(this.autoCloseInterval);if(this.$cd){this.$cd.remove();}},_startCountDown:function(){var that=this;var opt=this.autoClose.split("|");if(opt.length!==2){console.error("Invalid option for autoClose. example 'close|10000'");return false;}var button_key=opt[0];var time=parseInt(opt[1]);if(typeof this.buttons[button_key]==="undefined"){console.error("Invalid button key '"+button_key+"' for autoClose");return false;}var seconds=Math.ceil(time/1000);this.$cd=$('<span class="countdown"> ('+seconds+")</span>").appendTo(this["$_"+button_key]);this.autoCloseInterval=setInterval(function(){that.$cd.html(" ("+(seconds-=1)+") ");if(seconds<=0){that["$$"+button_key].trigger("click");that._stopCountDown();}},1000);},_getKey:function(key){switch(key){case 192:return"tilde";case 13:return"enter";case 16:return"shift";case 9:return"tab";case 20:return"capslock";case 17:return"ctrl";case 91:return"win";case 18:return"alt";case 27:return"esc";case 32:return"space";}var initial=String.fromCharCode(key);if(/^[A-z0-9]+$/.test(initial)){return initial.toLowerCase();}else{return false;}},reactOnKey:function(e){var that=this;var a=$(".jconfirm");if(a.eq(a.length-1)[0]!==this.$el[0]){return false;}var key=e.which;if(this.$content.find(":input").is(":focus")&&/13|32/.test(key)){return false;}var keyChar=this._getKey(key);if(keyChar==="esc"&&this.escapeKey){if(this.escapeKey===true){this.$scrollPane.trigger("click");}else{if(typeof this.escapeKey==="string"||typeof this.escapeKey==="function"){var buttonKey;if(typeof this.escapeKey==="function"){buttonKey=this.escapeKey();}else{buttonKey=this.escapeKey;}if(buttonKey){if(typeof this.buttons[buttonKey]==="undefined"){console.warn("Invalid escapeKey, no buttons found with key "+buttonKey);}else{this["$_"+buttonKey].trigger("click");}}}}}$.each(this.buttons,function(key,button){if(button.keys.indexOf(keyChar)!==-1){that["$_"+key].trigger("click");}});},setDialogCenter:function(){console.info("setDialogCenter is deprecated, dialogs are centered with CSS3 tables");},_unwatchContent:function(){clearInterval(this._timer);},close:function(onClosePayload){var that=this;if(typeof this.onClose==="function"){this.onClose(onClosePayload);}this._unwatchContent();$(window).unbind("resize."+this._id);$(window).unbind("keyup."+this._id);$(window).unbind("jcKeyDown."+this._id);if(this.draggable){$(window).unbind("mousemove."+this._id);$(window).unbind("mouseup."+this._id);this.$titleContainer.unbind("mousedown");}that.$el.removeClass(that.loadedClass);$("body").removeClass("jconfirm-no-scroll-"+that._id);that.$jconfirmBoxContainer.removeClass("jconfirm-no-transition");setTimeout(function(){that.$body.addClass(that.closeAnimationParsed);that.$jconfirmBg.addClass("jconfirm-bg-h");var closeTimer=(that.closeAnimation==="none")?1:that.animationSpeed;setTimeout(function(){that.$el.remove();var l=w.jconfirm.instances;var i=w.jconfirm.instances.length-1;for(i;i>=0;i--){if(w.jconfirm.instances[i]._id===that._id){w.jconfirm.instances.splice(i,1);}}if(!w.jconfirm.instances.length){if(that.scrollToPreviousElement&&w.jconfirm.lastFocused&&w.jconfirm.lastFocused.length&&$.contains(document,w.jconfirm.lastFocused[0])){var $lf=w.jconfirm.lastFocused;if(that.scrollToPreviousElementAnimate){var st=$(window).scrollTop();var ot=w.jconfirm.lastFocused.offset().top;var wh=$(window).height();if(!(ot>st&&ot<(st+wh))){var scrollTo=(ot-Math.round((wh/3)));$("html, body").animate({scrollTop:scrollTo},that.animationSpeed,"swing",function(){$lf.focus();});}else{$lf.focus();}}else{$lf.focus();}w.jconfirm.lastFocused=false;}}if(typeof that.onDestroy==="function"){that.onDestroy();}},closeTimer*0.4);},50);return true;},open:function(){if(this.isOpen()){return false;}this._buildHTML();this._bindEvents();this._open();return true;},setStartingPoint:function(){var el=false;if(this.animateFromElement!==true&&this.animateFromElement){el=this.animateFromElement;w.jconfirm.lastClicked=false;}else{if(w.jconfirm.lastClicked&&this.animateFromElement===true){el=w.jconfirm.lastClicked;w.jconfirm.lastClicked=false;}else{return false;}}if(!el){return false;}var offset=el.offset();var iTop=el.outerHeight()/2;var iLeft=el.outerWidth()/2;iTop-=this.$jconfirmBox.outerHeight()/2;iLeft-=this.$jconfirmBox.outerWidth()/2;var sourceTop=offset.top+iTop;sourceTop=sourceTop-this._scrollTop();var sourceLeft=offset.left+iLeft;var wh=$(window).height()/2;var ww=$(window).width()/2;var targetH=wh-this.$jconfirmBox.outerHeight()/2;var targetW=ww-this.$jconfirmBox.outerWidth()/2;sourceTop-=targetH;sourceLeft-=targetW;if(Math.abs(sourceTop)>wh||Math.abs(sourceLeft)>ww){return false;}this.$jconfirmBoxContainer.css("transform","translate("+sourceLeft+"px, "+sourceTop+"px)");},_open:function(){var that=this;if(typeof that.onOpenBefore==="function"){that.onOpenBefore();}this.$body.removeClass(this.animationParsed);this.$jconfirmBg.removeClass("jconfirm-bg-h");this.$body.focus();that.$jconfirmBoxContainer.css("transform","translate("+0+"px, "+0+"px)");setTimeout(function(){that.$body.css(that._getCSS(that.animationSpeed,1));that.$body.css({"transition-property":that.$body.css("transition-property")+", margin"});that.$jconfirmBoxContainer.addClass("jconfirm-no-transition");that._modalReady.resolve();if(typeof that.onOpen==="function"){that.onOpen();}that.$el.addClass(that.loadedClass);},this.animationSpeed);},loadedClass:"jconfirm-open",isClosed:function(){return !this.$el||this.$el.parent().length===0;},isOpen:function(){return !this.isClosed();},toggle:function(){if(!this.isOpen()){this.open();}else{this.close();}}};w.jconfirm.instances=[];w.jconfirm.lastFocused=false;w.jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg jconfirm-bg-h"></div><div class="jconfirm-scrollpane"><div class="jconfirm-row"><div class="jconfirm-cell"><div class="jconfirm-holder"><div class="jc-bs3-container"><div class="jc-bs3-row"><div class="jconfirm-box-container jconfirm-animated"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="jconfirm-closeIcon">×</div><div class="jconfirm-title-c"><span class="jconfirm-icon-c"></span><span class="jconfirm-title"></span></div><div class="jconfirm-content-pane"><div class="jconfirm-content"></div></div><div class="jconfirm-buttons"></div><div class="jconfirm-clear"></div></div></div></div></div></div></div></div></div></div>',title:"Hello",titleClass:"",type:"default",typeAnimated:true,draggable:true,dragWindowGap:15,dragWindowBorder:true,animateFromElement:true,alignMiddle:true,smoothContent:true,content:"Are you sure to continue?",buttons:{},defaultButtons:{ok:{action:function(){}},close:{action:function(){}}},contentLoaded:function(){},icon:"",lazyOpen:false,bgOpacity:null,theme:"light",animation:"scale",closeAnimation:"scale",animationSpeed:400,animationBounce:1,escapeKey:true,rtl:false,container:"body",containerFluid:false,backgroundDismiss:false,backgroundDismissAnimation:"shake",autoClose:false,closeIcon:null,closeIconClass:false,watchInterval:100,columnClass:"col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1",boxWidth:"50%",scrollToPreviousElement:true,scrollToPreviousElementAnimate:true,useBootstrap:true,offsetTop:40,offsetBottom:40,bootstrapClasses:{container:"container",containerFluid:"container-fluid",row:"row"},onContentReady:function(){},onOpenBefore:function(){},onOpen:function(){},onClose:function(){},onDestroy:function(){},onAction:function(){}};var keyDown=false;$(window).on("keydown",function(e){if(!keyDown){var $target=$(e.target);var pass=false;if($target.closest(".jconfirm-box").length){pass=true;}if(pass){$(window).trigger("jcKeyDown");}keyDown=true;}});$(window).on("keyup",function(){keyDown=false;});w.jconfirm.lastClicked=false;$(document).on("mousedown","button, a, [jc-source]",function(){w.jconfirm.lastClicked=$(this);});})); wp-mail-logging.php 0000644 00000006045 15174712143 0010261 0 ustar 00 <?php /** * Plugin Name: WP Mail Logging * Plugin URI: https://wordpress.org/plugins/wp-mail-logging/ * Version: 1.16.0 * Requires at least: 5.3 * Requires PHP: 7.4 * Author: WP Mail Logging Team * Author URI: https://github.com/awesomemotive/wp-mail-logging * License: GPLv3 * Description: Logs each email sent by WordPress. * Text Domain: wp-mail-logging * Domain Path: /assets/languages */ namespace No3x\WPML; // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) exit; define( 'WPML_PHP_MIN_VERSION', '7.4' ); define( 'WP_MAIL_LOGGING_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'WP_MAIL_LOGGING_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /** * Check the PHP version and give a useful error message if the user's version is less than the required version * @return boolean true if version check passed. If false, triggers an error which WP will handle, by displaying * an error message on the Admin page */ function WPML_noticePhpVersionWrong() { echo '<div class="error">' . __( 'Error: plugin "WP Mail Logging" requires a newer version of PHP to be running.', 'wp-mail-logging' ). '<br/>' . __( 'Minimal version of PHP required: ', 'wp-mail-logging' ) . '<strong>' . WPML_PHP_MIN_VERSION . '</strong>' . '<br/>' . __( 'Your server\'s PHP version: ', 'wp-mail-logging' ) . '<strong>' . phpversion() . '</strong>' . '</div>'; } function WPML_PhpVersionCheck() { if ( version_compare( phpversion(), WPML_PHP_MIN_VERSION ) < 0 ) { add_action( 'admin_notices', __NAMESPACE__ . '\WPML_noticePhpVersionWrong' ); return false; } return true; } /** * Initialize internationalization (i18n) for this plugin. * References: * http://codex.wordpress.org/I18n_for_WordPress_Developers * http://www.wdmac.com/how-to-create-a-po-language-translation#more-631 * @return void */ function WPML_i18n_init() { $pluginDir = dirname(plugin_basename(__FILE__)); load_plugin_textdomain('wp-mail-logging', false, $pluginDir . '/languages/'); } ////////////////////////////////// // Run initialization ///////////////////////////////// // First initialize i18n add_action( 'init', __NAMESPACE__ .'\WPML_i18n_init' ); // Next, run the version check. // If it is successful, continue with initialization for this plugin if (WPML_PhpVersionCheck()) { // Only init and run the init function if we know PHP version can parse it require __DIR__ . '/autoload.php'; // Create a new instance of the autoloader $loader = new \WPML_Psr4AutoloaderClass(); // Register this instance $loader->register(); // Add our namespace and the folder it maps to $loader->addNamespace('No3x\\WPML\\', __DIR__ . '/src' ); $loader->addNamespace('No3x\\WPML\\ORM\\', __DIR__ . '/lib/vendor/brandonwamboldt/wp-orm/src'); $loader->addNamespace('No3x\\WPML\\Pimple\\', __DIR__ . '/lib/vendor/pimple/pimple/src'); if( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { require_once __DIR__ . '/vendor/autoload.php'; } WPML_Init::getInstance()->init( __FILE__ ); } assets/images/arrow-right.svg 0000644 00000000576 15174712143 0012316 0 ustar 00 <svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="none"><path fill="#E77C5C" fill-rule="evenodd" d="M5.229 1.297a.647.647 0 0 0 0 .946L8.515 5.33H.698a.647.647 0 0 0-.647.697v.846a.647.647 0 0 0 .647.647h7.817L5.23 10.657a.65.65 0 0 0 0 .946l.597.598a.647.647 0 0 0 .946 0L12 6.923a.65.65 0 0 0 0-.946L6.772.699a.647.647 0 0 0-.946 0z" clip-rule="evenodd"/></svg>