Файловый менеджер - Редактировать - /home/bean7936/perfect-community.com/442aa3/wp-mail-smtp.tar
Назад
uninstall.php 0000644 00000022556 15174671617 0007317 0 ustar 00 <?php /** * Uninstall all WP Mail SMTP data. * * @since 1.3.0 */ // Exit if accessed directly. if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { exit; } // Prevent data removal if Pro plugin is active. if ( is_plugin_active( 'wp-mail-smtp-pro/wp_mail_smtp.php' ) ) { return; } // Load plugin file. require_once 'wp_mail_smtp.php'; require_once dirname( __FILE__ ) . '/vendor/woocommerce/action-scheduler/action-scheduler.php'; global $wpdb; /* * Remove Legacy options. */ $options = [ '_amn_smtp_last_checked', 'pepipost_ssl', 'pepipost_port', 'pepipost_pass', 'pepipost_user', 'smtp_pass', 'smtp_user', 'smtp_auth', 'smtp_ssl', 'smtp_port', 'smtp_host', 'mail_set_return_path', 'mailer', 'mail_from_name', 'mail_from', ]; /** * Remove AM announcement posts. */ $am_announcement_params = [ 'post_type' => [ 'amn_smtp' ], 'post_status' => 'any', 'numberposts' => - 1, 'fields' => 'ids', ]; /** * Disable Action Schedule Queue Runner, to prevent a fatal error on the shutdown WP hook. */ if ( class_exists( 'ActionScheduler_QueueRunner' ) ) { $as_queue_runner = \ActionScheduler_QueueRunner::instance(); if ( method_exists( $as_queue_runner, 'unhook_dispatch_async_request' ) ) { $as_queue_runner->unhook_dispatch_async_request(); } } // WP MS uninstall process. //phpcs:disable WPForms.Formatting.EmptyLineAfterAssigmentVariables.AddEmptyLine, WPForms.PHP.BackSlash.UseShortSyntax if ( is_multisite() ) { $main_site_settings = get_blog_option( get_main_site_id(), 'wp_mail_smtp', [] ); $network_wide = ! empty( $main_site_settings['general']['network_wide'] ); $network_uninstall = ! empty( $main_site_settings['general']['uninstall'] ); $sites = get_sites(); foreach ( $sites as $site ) { $settings = get_blog_option( $site->blog_id, 'wp_mail_smtp', [] ); // Confirm network site admin has decided to remove all data, otherwise skip. if ( ( $network_wide && ! $network_uninstall ) || ( ! $network_wide && empty( $settings['general']['uninstall'] ) ) ) { continue; } /* * Delete network site plugin options. */ foreach ( $options as $option ) { delete_blog_option( $site->blog_id, $option ); } // Switch to the current network site. switch_to_blog( $site->blog_id ); // Delete plugin settings. $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp\_mail\_smtp%'" ); // phpcs:ignore WordPress.DB // Delete plugin user meta. $wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE 'wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB // Remove any transients we've left behind. $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_site\_transient\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_timeout\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_site\_transient\_timeout\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB // Delete debug events table. $debug_events_table = \WPMailSMTP\Admin\DebugEvents\DebugEvents::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $debug_events_table;" ); // phpcs:ignore WordPress.DB /* * Delete network site product announcements. */ $announcements = get_posts( $am_announcement_params ); if ( ! empty( $announcements ) ) { foreach ( $announcements as $announcement ) { wp_delete_post( $announcement, true ); } } // Delete queue table. $queue_table = \WPMailSMTP\Queue\Queue::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $queue_table;" ); // phpcs:ignore WordPress.DB // Delete all queue attachments. ( new \WPMailSMTP\Queue\Attachments() )->delete_attachments(); /* * Cleanup network site data for Pro plugin only. */ if ( function_exists( 'wp_mail_smtp' ) && is_readable( wp_mail_smtp()->plugin_path . '/src/Pro/Pro.php' ) ) { // Delete logs table. $table = \WPMailSMTP\Pro\Emails\Logs\Logs::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $table;" ); // phpcs:ignore WordPress.DB // Delete attachments tables. $attachment_files_table = \WPMailSMTP\Pro\Emails\Logs\Attachments\Attachments::get_attachment_files_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $attachment_files_table;" ); // phpcs:ignore WordPress.DB $email_attachments_table = \WPMailSMTP\Pro\Emails\Logs\Attachments\Attachments::get_email_attachments_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $email_attachments_table;" ); // phpcs:ignore WordPress.DB // Delete all attachments if any. ( new \WPMailSMTP\Pro\Emails\Logs\Attachments\Attachments() )->delete_all_attachments(); // Delete tracking tables. $tracking_events_table = \WPMailSMTP\Pro\Emails\Logs\Tracking\Tracking::get_events_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $tracking_events_table;" ); // phpcs:ignore WordPress.DB $tracking_links_table = \WPMailSMTP\Pro\Emails\Logs\Tracking\Tracking::get_links_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $tracking_links_table;" ); // phpcs:ignore WordPress.DB } /* * Drop all Action Scheduler data and unschedule all plugin ActionScheduler actions. */ ( new \WPMailSMTP\Tasks\Tasks() )->remove_all(); $meta_table = \WPMailSMTP\Tasks\Meta::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $meta_table;" ); // phpcs:ignore WordPress.DB // Delete current sub-site wp-mail-smtp uploads folder. \WPMailSMTP\Uploads::delete_upload_dir(); // Restore the current network site back to the original one. restore_current_blog(); } } else { // Non WP MS uninstall process (for normal WP installs). // Confirm user has decided to remove all data, otherwise stop. $settings = get_option( 'wp_mail_smtp', [] ); if ( empty( $settings['general']['uninstall'] ) ) { return; } /* * Delete plugin options. */ foreach ( $options as $option ) { delete_option( $option ); } // Delete plugin settings. $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp\_mail\_smtp%'" ); // phpcs:ignore WordPress.DB // Delete plugin user meta. $wpdb->query( "DELETE FROM {$wpdb->usermeta} WHERE meta_key LIKE 'wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB // Remove any transients we've left behind. $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_site\_transient\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_transient\_timeout\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '\_site\_transient\_timeout\_wp\_mail\_smtp\_%'" ); // phpcs:ignore WordPress.DB // Delete debug events table. $debug_events_table = \WPMailSMTP\Admin\DebugEvents\DebugEvents::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $debug_events_table;" ); // phpcs:ignore WordPress.DB /* * Remove product announcements. */ $announcements = get_posts( $am_announcement_params ); if ( ! empty( $announcements ) ) { foreach ( $announcements as $announcement ) { wp_delete_post( $announcement, true ); } } // Delete queue table. $queue_table = \WPMailSMTP\Queue\Queue::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $queue_table;" ); // phpcs:ignore WordPress.DB // Delete all queue attachments. ( new \WPMailSMTP\Queue\Attachments() )->delete_attachments(); /* * Cleanup data for Pro plugin only. */ if ( function_exists( 'wp_mail_smtp' ) && is_readable( wp_mail_smtp()->plugin_path . '/src/Pro/Pro.php' ) ) { // Delete logs table. $table = \WPMailSMTP\Pro\Emails\Logs\Logs::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $table;" ); // phpcs:ignore WordPress.DB // Delete attachments tables. $attachment_files_table = \WPMailSMTP\Pro\Emails\Logs\Attachments\Attachments::get_attachment_files_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $attachment_files_table;" ); // phpcs:ignore WordPress.DB $email_attachments_table = \WPMailSMTP\Pro\Emails\Logs\Attachments\Attachments::get_email_attachments_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $email_attachments_table;" ); // phpcs:ignore WordPress.DB // Delete all attachments if any. ( new \WPMailSMTP\Pro\Emails\Logs\Attachments\Attachments() )->delete_all_attachments(); // Delete tracking tables. $tracking_events_table = \WPMailSMTP\Pro\Emails\Logs\Tracking\Tracking::get_events_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $tracking_events_table;" ); // phpcs:ignore WordPress.DB $tracking_links_table = \WPMailSMTP\Pro\Emails\Logs\Tracking\Tracking::get_links_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $tracking_links_table;" ); // phpcs:ignore WordPress.DB } /* * Drop all Action Scheduler data and unschedule all plugin ActionScheduler actions. */ ( new \WPMailSMTP\Tasks\Tasks() )->remove_all(); $meta_table = \WPMailSMTP\Tasks\Meta::get_table_name(); $wpdb->query( "DROP TABLE IF EXISTS $meta_table;" ); // phpcs:ignore WordPress.DB // Delete wp-mail-smtp uploads folder. \WPMailSMTP\Uploads::delete_upload_dir(); } //phpcs:enable WPForms.Formatting.EmptyLineAfterAssigmentVariables.AddEmptyLine, WPForms.PHP.BackSlash.UseShortSyntax vendor_prefixed/guzzlehttp/guzzle/LICENSE 0000644 00000002664 15174671617 0014523 0 ustar 00 The MIT License (MIT) Copyright (c) 2011 Michael Dowling <mtdowling@gmail.com> Copyright (c) 2012 Jeremy Lindblom <jeremeamia@gmail.com> Copyright (c) 2014 Graham Campbell <hello@gjcampbell.co.uk> Copyright (c) 2015 Márk Sági-Kazár <mark.sagikazar@gmail.com> Copyright (c) 2015 Tobias Schultze <webmaster@tubo-world.de> Copyright (c) 2016 Tobias Nyholm <tobias.nyholm@gmail.com> Copyright (c) 2016 George Mponos <gmponos@gmail.com> 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_prefixed/guzzlehttp/guzzle/src/Utils.php 0000644 00000031676 15174671617 0016123 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Exception\InvalidArgumentException; use WPMailSMTP\Vendor\GuzzleHttp\Handler\CurlHandler; use WPMailSMTP\Vendor\GuzzleHttp\Handler\CurlMultiHandler; use WPMailSMTP\Vendor\GuzzleHttp\Handler\Proxy; use WPMailSMTP\Vendor\GuzzleHttp\Handler\StreamHandler; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; final class Utils { /** * Debug function used to describe the provided value type and class. * * @param mixed $input * * @return string Returns a string containing the type of the variable and * if a class is provided, the class name. */ public static function describeType($input) : string { switch (\gettype($input)) { case 'object': return 'object(' . \get_class($input) . ')'; case 'array': return 'array(' . \count($input) . ')'; default: \ob_start(); \var_dump($input); // normalize float vs double /** @var string $varDumpContent */ $varDumpContent = \ob_get_clean(); return \str_replace('double(', 'float(', \rtrim($varDumpContent)); } } /** * Parses an array of header lines into an associative array of headers. * * @param iterable $lines Header lines array of strings in the following * format: "Name: Value" */ public static function headersFromLines(iterable $lines) : array { $headers = []; foreach ($lines as $line) { $parts = \explode(':', $line, 2); $headers[\trim($parts[0])][] = isset($parts[1]) ? \trim($parts[1]) : null; } return $headers; } /** * Returns a debug stream based on the provided variable. * * @param mixed $value Optional value * * @return resource */ public static function debugResource($value = null) { if (\is_resource($value)) { return $value; } if (\defined('STDOUT')) { return \STDOUT; } return Psr7\Utils::tryFopen('php://output', 'w'); } /** * Chooses and creates a default handler to use based on the environment. * * The returned handler is not wrapped by any default middlewares. * * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. * * @throws \RuntimeException if no viable Handler is available. */ public static function chooseHandler() : callable { $handler = null; if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && \version_compare(\curl_version()['version'], '7.21.2') >= 0) { if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); } elseif (\function_exists('curl_exec')) { $handler = new CurlHandler(); } elseif (\function_exists('curl_multi_exec')) { $handler = new CurlMultiHandler(); } } if (\ini_get('allow_url_fopen')) { $handler = $handler ? Proxy::wrapStreaming($handler, new StreamHandler()) : new StreamHandler(); } elseif (!$handler) { throw new \RuntimeException('GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.'); } return $handler; } /** * Get the default User-Agent string to use with Guzzle. */ public static function defaultUserAgent() : string { return \sprintf('GuzzleHttp/%d', ClientInterface::MAJOR_VERSION); } /** * Returns the default cacert bundle for the current system. * * First, the openssl.cafile and curl.cainfo php.ini settings are checked. * If those settings are not configured, then the common locations for * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X * and Windows are checked. If any of these file locations are found on * disk, they will be utilized. * * Note: the result of this function is cached for subsequent calls. * * @throws \RuntimeException if no bundle can be found. * * @deprecated Utils::defaultCaBundle will be removed in guzzlehttp/guzzle:8.0. This method is not needed in PHP 5.6+. */ public static function defaultCaBundle() : string { static $cached = null; static $cafiles = [ // Red Hat, CentOS, Fedora (provided by the ca-certificates package) '/etc/pki/tls/certs/ca-bundle.crt', // Ubuntu, Debian (provided by the ca-certificates package) '/etc/ssl/certs/ca-certificates.crt', // FreeBSD (provided by the ca_root_nss package) '/usr/local/share/certs/ca-root-nss.crt', // SLES 12 (provided by the ca-certificates package) '/var/lib/ca-certificates/ca-bundle.pem', // OS X provided by homebrew (using the default path) '/usr/local/etc/openssl/cert.pem', // Google app engine '/etc/ca-certificates.crt', // Windows? 'C:\\windows\\system32\\curl-ca-bundle.crt', 'C:\\windows\\curl-ca-bundle.crt', ]; if ($cached) { return $cached; } if ($ca = \ini_get('openssl.cafile')) { return $cached = $ca; } if ($ca = \ini_get('curl.cainfo')) { return $cached = $ca; } foreach ($cafiles as $filename) { if (\file_exists($filename)) { return $cached = $filename; } } throw new \RuntimeException(<<<EOT No system CA bundle could be found in any of the the common system locations. PHP versions earlier than 5.6 are not properly configured to use the system's CA bundle by default. In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle to the 'verify' request option: https://docs.guzzlephp.org/en/latest/request-options.html#verify. If you do not need a specific certificate bundle, then Mozilla provides a commonly used CA bundle which can be downloaded here (provided by the maintainer of cURL): https://curl.haxx.se/ca/cacert.pem. Once you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP ini setting to point to the path to the file, allowing you to omit the 'verify' request option. See https://curl.haxx.se/docs/sslcerts.html for more information. EOT ); } /** * Creates an associative array of lowercase header names to the actual * header casing. */ public static function normalizeHeaderKeys(array $headers) : array { $result = []; foreach (\array_keys($headers) as $key) { $result[\strtolower($key)] = $key; } return $result; } /** * Returns true if the provided host matches any of the no proxy areas. * * This method will strip a port from the host if it is present. Each pattern * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == * "baz.foo.com", but ".foo.com" != "foo.com"). * * Areas are matched in the following cases: * 1. "*" (without quotes) always matches any hosts. * 2. An exact match. * 3. The area starts with "." and the area is the last part of the host. e.g. * '.mit.edu' will match any host that ends with '.mit.edu'. * * @param string $host Host to check against the patterns. * @param string[] $noProxyArray An array of host patterns. * * @throws InvalidArgumentException */ public static function isHostInNoProxy(string $host, array $noProxyArray) : bool { if (\strlen($host) === 0) { throw new InvalidArgumentException('Empty host provided'); } // Strip port if present. [$host] = \explode(':', $host, 2); foreach ($noProxyArray as $area) { // Always match on wildcards. if ($area === '*') { return \true; } if (empty($area)) { // Don't match on empty values. continue; } if ($area === $host) { // Exact matches. return \true; } // Special match if the area when prefixed with ".". Remove any // existing leading "." and add a new leading ".". $area = '.' . \ltrim($area, '.'); if (\substr($host, -\strlen($area)) === $area) { return \true; } } return \false; } /** * Wrapper for json_decode that throws when an error occurs. * * @param string $json JSON data to parse * @param bool $assoc When true, returned objects will be converted * into associative arrays. * @param int $depth User specified recursion depth. * @param int $options Bitmask of JSON decode options. * * @return object|array|string|int|float|bool|null * * @throws InvalidArgumentException if the JSON cannot be decoded. * * @see https://www.php.net/manual/en/function.json-decode.php */ public static function jsonDecode(string $json, bool $assoc = \false, int $depth = 512, int $options = 0) { $data = \json_decode($json, $assoc, $depth, $options); if (\JSON_ERROR_NONE !== \json_last_error()) { throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg()); } return $data; } /** * Wrapper for JSON encoding that throws when an error occurs. * * @param mixed $value The value being encoded * @param int $options JSON encode option bitmask * @param int $depth Set the maximum depth. Must be greater than zero. * * @throws InvalidArgumentException if the JSON cannot be encoded. * * @see https://www.php.net/manual/en/function.json-encode.php */ public static function jsonEncode($value, int $options = 0, int $depth = 512) : string { $json = \json_encode($value, $options, $depth); if (\JSON_ERROR_NONE !== \json_last_error()) { throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg()); } /** @var string */ return $json; } /** * Wrapper for the hrtime() or microtime() functions * (depending on the PHP version, one of the two is used) * * @return float UNIX timestamp * * @internal */ public static function currentTime() : float { return (float) \function_exists('hrtime') ? \hrtime(\true) / 1000000000.0 : \microtime(\true); } /** * @throws InvalidArgumentException * * @internal */ public static function idnUriConvert(UriInterface $uri, int $options = 0) : UriInterface { if ($uri->getHost()) { $asciiHost = self::idnToAsci($uri->getHost(), $options, $info); if ($asciiHost === \false) { $errorBitSet = $info['errors'] ?? 0; $errorConstants = \array_filter(\array_keys(\get_defined_constants()), static function (string $name) : bool { return \substr($name, 0, 11) === 'IDNA_ERROR_'; }); $errors = []; foreach ($errorConstants as $errorConstant) { if ($errorBitSet & \constant($errorConstant)) { $errors[] = $errorConstant; } } $errorMessage = 'IDN conversion failed'; if ($errors) { $errorMessage .= ' (errors: ' . \implode(', ', $errors) . ')'; } throw new InvalidArgumentException($errorMessage); } if ($uri->getHost() !== $asciiHost) { // Replace URI only if the ASCII version is different $uri = $uri->withHost($asciiHost); } } return $uri; } /** * @internal */ public static function getenv(string $name) : ?string { if (isset($_SERVER[$name])) { return (string) $_SERVER[$name]; } if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== \false && $value !== null) { return (string) $value; } return null; } /** * @return string|false */ private static function idnToAsci(string $domain, int $options, ?array &$info = []) { if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) { return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info); } throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old'); } } vendor_prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php 0000644 00000010311 15174671617 0022247 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; use WPMailSMTP\Vendor\GuzzleHttp\BodySummarizer; use WPMailSMTP\Vendor\GuzzleHttp\BodySummarizerInterface; use WPMailSMTP\Vendor\Psr\Http\Client\RequestExceptionInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * HTTP Request exception */ class RequestException extends TransferException implements RequestExceptionInterface { /** * @var RequestInterface */ private $request; /** * @var ResponseInterface|null */ private $response; /** * @var array */ private $handlerContext; public function __construct(string $message, RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $previous = null, array $handlerContext = []) { // Set the code of the exception if the response is set and not future. $code = $response ? $response->getStatusCode() : 0; parent::__construct($message, $code, $previous); $this->request = $request; $this->response = $response; $this->handlerContext = $handlerContext; } /** * Wrap non-RequestExceptions with a RequestException */ public static function wrapException(RequestInterface $request, \Throwable $e) : RequestException { return $e instanceof RequestException ? $e : new RequestException($e->getMessage(), $request, null, $e); } /** * Factory method to create a new exception with a normalized error message * * @param RequestInterface $request Request sent * @param ResponseInterface $response Response received * @param \Throwable|null $previous Previous exception * @param array $handlerContext Optional handler context * @param BodySummarizerInterface|null $bodySummarizer Optional body summarizer */ public static function create(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $previous = null, array $handlerContext = [], ?BodySummarizerInterface $bodySummarizer = null) : self { if (!$response) { return new self('Error completing request', $request, null, $previous, $handlerContext); } $level = (int) \floor($response->getStatusCode() / 100); if ($level === 4) { $label = 'Client error'; $className = ClientException::class; } elseif ($level === 5) { $label = 'Server error'; $className = ServerException::class; } else { $label = 'Unsuccessful request'; $className = __CLASS__; } $uri = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri()); // Client Error: `GET /` resulted in a `404 Not Found` response: // <html> ... (truncated) $message = \sprintf('%s: `%s %s` resulted in a `%s %s` response', $label, $request->getMethod(), $uri->__toString(), $response->getStatusCode(), $response->getReasonPhrase()); $summary = ($bodySummarizer ?? new BodySummarizer())->summarize($response); if ($summary !== null) { $message .= ":\n{$summary}\n"; } return new $className($message, $request, $response, $previous, $handlerContext); } /** * Get the request that caused the exception */ public function getRequest() : RequestInterface { return $this->request; } /** * Get the associated response */ public function getResponse() : ?ResponseInterface { return $this->response; } /** * Check if a response was received */ public function hasResponse() : bool { return $this->response !== null; } /** * Get contextual information about the error from the underlying handler. * * The contents of this array will vary depending on which handler you are * using. It may also be just an empty array. Relying on this data will * couple you to a specific handler, but can give more debug information * when needed. */ public function getHandlerContext() : array { return $this->handlerContext; } } vendor_prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php 0000644 00000002622 15174671617 0022216 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; use WPMailSMTP\Vendor\Psr\Http\Client\NetworkExceptionInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Exception thrown when a connection cannot be established. * * Note that no response is present for a ConnectException */ class ConnectException extends TransferException implements NetworkExceptionInterface { /** * @var RequestInterface */ private $request; /** * @var array */ private $handlerContext; public function __construct(string $message, RequestInterface $request, ?\Throwable $previous = null, array $handlerContext = []) { parent::__construct($message, 0, $previous); $this->request = $request; $this->handlerContext = $handlerContext; } /** * Get the request that caused the exception */ public function getRequest() : RequestInterface { return $this->request; } /** * Get contextual information about the error from the underlying handler. * * The contents of this array will vary depending on which handler you are * using. It may also be just an empty array. Relying on this data will * couple you to a specific handler, but can give more debug information * when needed. */ public function getHandlerContext() : array { return $this->handlerContext; } } vendor_prefixed/guzzlehttp/guzzle/src/Exception/ClientException.php 0000644 00000000265 15174671617 0022044 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; /** * Exception when a client error is encountered (4xx codes) */ class ClientException extends BadResponseException { } vendor_prefixed/guzzlehttp/guzzle/src/Exception/GuzzleException.php 0000644 00000000271 15174671617 0022103 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; use WPMailSMTP\Vendor\Psr\Http\Client\ClientExceptionInterface; interface GuzzleException extends ClientExceptionInterface { } vendor_prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php 0000644 00000001742 15174671617 0023034 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Exception when an HTTP error occurs (4xx or 5xx error) */ class BadResponseException extends RequestException { public function __construct(string $message, RequestInterface $request, ResponseInterface $response, ?\Throwable $previous = null, array $handlerContext = []) { parent::__construct($message, $request, $response, $previous, $handlerContext); } /** * Current exception and the ones that extend it will always have a response. */ public function hasResponse() : bool { return \true; } /** * This function narrows the return type from the parent class and does not allow it to be nullable. */ public function getResponse() : ResponseInterface { /** @var ResponseInterface */ return parent::getResponse(); } } vendor_prefixed/guzzlehttp/guzzle/src/Exception/ServerException.php 0000644 00000000265 15174671617 0022074 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; /** * Exception when a server error is encountered (5xx codes) */ class ServerException extends BadResponseException { } vendor_prefixed/guzzlehttp/guzzle/src/Exception/TransferException.php 0000644 00000000213 15174671617 0022403 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; class TransferException extends \RuntimeException implements GuzzleException { } vendor_prefixed/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php 0000644 00000000167 15174671617 0024062 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; class TooManyRedirectsException extends RequestException { } vendor_prefixed/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php 0000644 00000000240 15174671617 0023710 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Exception; final class InvalidArgumentException extends \InvalidArgumentException implements GuzzleException { } vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatter.php 0000644 00000015644 15174671617 0020270 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\Psr\Http\Message\MessageInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Formats log messages using variable substitutions for requests, responses, * and other transactional data. * * The following variable substitutions are supported: * * - {request}: Full HTTP request message * - {response}: Full HTTP response message * - {ts}: ISO 8601 date in GMT * - {date_iso_8601} ISO 8601 date in GMT * - {date_common_log} Apache common log date using the configured timezone. * - {host}: Host of the request * - {method}: Method of the request * - {uri}: URI of the request * - {version}: Protocol version * - {target}: Request target of the request (path + query + fragment) * - {hostname}: Hostname of the machine that sent the request * - {code}: Status code of the response (if available) * - {phrase}: Reason phrase of the response (if available) * - {error}: Any error messages (if available) * - {req_header_*}: Replace `*` with the lowercased name of a request header to add to the message * - {res_header_*}: Replace `*` with the lowercased name of a response header to add to the message * - {req_headers}: Request headers * - {res_headers}: Response headers * - {req_body}: Request body * - {res_body}: Response body * * @final */ class MessageFormatter implements MessageFormatterInterface { /** * Apache Common Log Format. * * @see https://httpd.apache.org/docs/2.4/logs.html#common * * @var string */ public const CLF = '{hostname} {req_header_User-Agent} - [{date_common_log}] "{method} {target} HTTP/{version}" {code} {res_header_Content-Length}'; public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; /** * @var string Template used to format log messages */ private $template; /** * @param string $template Log message template */ public function __construct(?string $template = self::CLF) { $this->template = $template ?: self::CLF; } /** * Returns a formatted message string. * * @param RequestInterface $request Request that was sent * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null) : string { $cache = []; /** @var string */ return \preg_replace_callback('/{\\s*([A-Za-z_\\-\\.0-9]+)\\s*}/', function (array $matches) use($request, $response, $error, &$cache) { if (isset($cache[$matches[1]])) { return $cache[$matches[1]]; } $result = ''; switch ($matches[1]) { case 'request': $result = Psr7\Message::toString($request); break; case 'response': $result = $response ? Psr7\Message::toString($response) : ''; break; case 'req_headers': $result = \trim($request->getMethod() . ' ' . $request->getRequestTarget()) . ' HTTP/' . $request->getProtocolVersion() . "\r\n" . $this->headers($request); break; case 'res_headers': $result = $response ? \sprintf('HTTP/%s %d %s', $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase()) . "\r\n" . $this->headers($response) : 'NULL'; break; case 'req_body': $result = $request->getBody()->__toString(); break; case 'res_body': if (!$response instanceof ResponseInterface) { $result = 'NULL'; break; } $body = $response->getBody(); if (!$body->isSeekable()) { $result = 'RESPONSE_NOT_LOGGEABLE'; break; } $result = $response->getBody()->__toString(); break; case 'ts': case 'date_iso_8601': $result = \gmdate('c'); break; case 'date_common_log': $result = \date('d/M/Y:H:i:s O'); break; case 'method': $result = $request->getMethod(); break; case 'version': $result = $request->getProtocolVersion(); break; case 'uri': case 'url': $result = $request->getUri()->__toString(); break; case 'target': $result = $request->getRequestTarget(); break; case 'req_version': $result = $request->getProtocolVersion(); break; case 'res_version': $result = $response ? $response->getProtocolVersion() : 'NULL'; break; case 'host': $result = $request->getHeaderLine('Host'); break; case 'hostname': $result = \gethostname(); break; case 'code': $result = $response ? $response->getStatusCode() : 'NULL'; break; case 'phrase': $result = $response ? $response->getReasonPhrase() : 'NULL'; break; case 'error': $result = $error ? $error->getMessage() : 'NULL'; break; default: // handle prefixed dynamic headers if (\strpos($matches[1], 'req_header_') === 0) { $result = $request->getHeaderLine(\substr($matches[1], 11)); } elseif (\strpos($matches[1], 'res_header_') === 0) { $result = $response ? $response->getHeaderLine(\substr($matches[1], 11)) : 'NULL'; } } $cache[$matches[1]] = $result; return $result; }, $this->template); } /** * Get headers from message as string */ private function headers(MessageInterface $message) : string { $result = ''; foreach ($message->getHeaders() as $name => $values) { $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; } return \trim($result); } } vendor_prefixed/guzzlehttp/guzzle/src/functions_include.php 0000644 00000000325 15174671617 0020521 0 ustar 00 <?php namespace WPMailSMTP\Vendor; // Don't redefine the functions if included multiple times. if (!\function_exists('WPMailSMTP\\Vendor\\GuzzleHttp\\describe_type')) { require __DIR__ . '/functions.php'; } vendor_prefixed/guzzlehttp/guzzle/src/RedirectMiddleware.php 0000644 00000017102 15174671617 0020546 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Exception\BadResponseException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\TooManyRedirectsException; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Request redirect middleware. * * Apply this middleware like other middleware using * {@see \GuzzleHttp\Middleware::redirect()}. * * @final */ class RedirectMiddleware { public const HISTORY_HEADER = 'X-Guzzle-Redirect-History'; public const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History'; /** * @var array */ public static $defaultSettings = ['max' => 5, 'protocols' => ['http', 'https'], 'strict' => \false, 'referer' => \false, 'track_redirects' => \false]; /** * @var callable(RequestInterface, array): PromiseInterface */ private $nextHandler; /** * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. */ public function __construct(callable $nextHandler) { $this->nextHandler = $nextHandler; } public function __invoke(RequestInterface $request, array $options) : PromiseInterface { $fn = $this->nextHandler; if (empty($options['allow_redirects'])) { return $fn($request, $options); } if ($options['allow_redirects'] === \true) { $options['allow_redirects'] = self::$defaultSettings; } elseif (!\is_array($options['allow_redirects'])) { throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); } else { // Merge the default settings with the provided settings $options['allow_redirects'] += self::$defaultSettings; } if (empty($options['allow_redirects']['max'])) { return $fn($request, $options); } return $fn($request, $options)->then(function (ResponseInterface $response) use($request, $options) { return $this->checkRedirect($request, $options, $response); }); } /** * @return ResponseInterface|PromiseInterface */ public function checkRedirect(RequestInterface $request, array $options, ResponseInterface $response) { if (\strpos((string) $response->getStatusCode(), '3') !== 0 || !$response->hasHeader('Location')) { return $response; } $this->guardMax($request, $response, $options); $nextRequest = $this->modifyRequest($request, $options, $response); // If authorization is handled by curl, unset it if URI is cross-origin. if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && \defined('\\CURLOPT_HTTPAUTH')) { unset($options['curl'][\CURLOPT_HTTPAUTH], $options['curl'][\CURLOPT_USERPWD]); } if (isset($options['allow_redirects']['on_redirect'])) { $options['allow_redirects']['on_redirect']($request, $response, $nextRequest->getUri()); } $promise = $this($nextRequest, $options); // Add headers to be able to track history of redirects. if (!empty($options['allow_redirects']['track_redirects'])) { return $this->withTracking($promise, (string) $nextRequest->getUri(), $response->getStatusCode()); } return $promise; } /** * Enable tracking on promise. */ private function withTracking(PromiseInterface $promise, string $uri, int $statusCode) : PromiseInterface { return $promise->then(static function (ResponseInterface $response) use($uri, $statusCode) { // Note that we are pushing to the front of the list as this // would be an earlier response than what is currently present // in the history header. $historyHeader = $response->getHeader(self::HISTORY_HEADER); $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); \array_unshift($historyHeader, $uri); \array_unshift($statusHeader, (string) $statusCode); return $response->withHeader(self::HISTORY_HEADER, $historyHeader)->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); }); } /** * Check for too many redirects. * * @throws TooManyRedirectsException Too many redirects. */ private function guardMax(RequestInterface $request, ResponseInterface $response, array &$options) : void { $current = $options['__redirect_count'] ?? 0; $options['__redirect_count'] = $current + 1; $max = $options['allow_redirects']['max']; if ($options['__redirect_count'] > $max) { throw new TooManyRedirectsException("Will not follow more than {$max} redirects", $request, $response); } } public function modifyRequest(RequestInterface $request, array $options, ResponseInterface $response) : RequestInterface { // Request modifications to apply. $modify = []; $protocols = $options['allow_redirects']['protocols']; // Use a GET request if this is an entity enclosing request and we are // not forcing RFC compliance, but rather emulating what all browsers // would do. $statusCode = $response->getStatusCode(); if ($statusCode == 303 || $statusCode <= 302 && !$options['allow_redirects']['strict']) { $safeMethods = ['GET', 'HEAD', 'OPTIONS']; $requestMethod = $request->getMethod(); $modify['method'] = \in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET'; $modify['body'] = ''; } $uri = self::redirectUri($request, $response, $protocols); if (isset($options['idn_conversion']) && $options['idn_conversion'] !== \false) { $idnOptions = $options['idn_conversion'] === \true ? \IDNA_DEFAULT : $options['idn_conversion']; $uri = Utils::idnUriConvert($uri, $idnOptions); } $modify['uri'] = $uri; Psr7\Message::rewindBody($request); // Add the Referer header if it is told to do so and only // add the header if we are not redirecting from https to http. if ($options['allow_redirects']['referer'] && $modify['uri']->getScheme() === $request->getUri()->getScheme()) { $uri = $request->getUri()->withUserInfo(''); $modify['set_headers']['Referer'] = (string) $uri; } else { $modify['remove_headers'][] = 'Referer'; } // Remove Authorization and Cookie headers if URI is cross-origin. if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) { $modify['remove_headers'][] = 'Authorization'; $modify['remove_headers'][] = 'Cookie'; } return Psr7\Utils::modifyRequest($request, $modify); } /** * Set the appropriate URL on the request based on the location header. */ private static function redirectUri(RequestInterface $request, ResponseInterface $response, array $protocols) : UriInterface { $location = Psr7\UriResolver::resolve($request->getUri(), new Psr7\Uri($response->getHeaderLine('Location'))); // Ensure that the redirect URI is allowed based on the protocols. if (!\in_array($location->getScheme(), $protocols)) { throw new BadResponseException(\sprintf('Redirect URI, %s, does not use one of the allowed redirect protocols: %s', $location, \implode(', ', $protocols)), $request, $response); } return $location; } } vendor_prefixed/guzzlehttp/guzzle/src/HandlerStack.php 0000644 00000021003 15174671617 0017345 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Creates a composed Guzzle handler function by stacking middlewares on top of * an HTTP handler function. * * @final */ class HandlerStack { /** * @var (callable(RequestInterface, array): PromiseInterface)|null */ private $handler; /** * @var array{(callable(callable(RequestInterface, array): PromiseInterface): callable), (string|null)}[] */ private $stack = []; /** * @var (callable(RequestInterface, array): PromiseInterface)|null */ private $cached; /** * Creates a default handler stack that can be used by clients. * * The returned handler will wrap the provided handler or use the most * appropriate default handler for your system. The returned HandlerStack has * support for cookies, redirects, HTTP error exceptions, and preparing a body * before sending. * * The returned handler stack can be passed to a client in the "handler" * option. * * @param (callable(RequestInterface, array): PromiseInterface)|null $handler HTTP handler function to use with the stack. If no * handler is provided, the best handler for your * system will be utilized. */ public static function create(?callable $handler = null) : self { $stack = new self($handler ?: Utils::chooseHandler()); $stack->push(Middleware::httpErrors(), 'http_errors'); $stack->push(Middleware::redirect(), 'allow_redirects'); $stack->push(Middleware::cookies(), 'cookies'); $stack->push(Middleware::prepareBody(), 'prepare_body'); return $stack; } /** * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. */ public function __construct(?callable $handler = null) { $this->handler = $handler; } /** * Invokes the handler stack as a composed handler * * @return ResponseInterface|PromiseInterface */ public function __invoke(RequestInterface $request, array $options) { $handler = $this->resolve(); return $handler($request, $options); } /** * Dumps a string representation of the stack. * * @return string */ public function __toString() { $depth = 0; $stack = []; if ($this->handler !== null) { $stack[] = '0) Handler: ' . $this->debugCallable($this->handler); } $result = ''; foreach (\array_reverse($this->stack) as $tuple) { ++$depth; $str = "{$depth}) Name: '{$tuple[1]}', "; $str .= 'Function: ' . $this->debugCallable($tuple[0]); $result = "> {$str}\n{$result}"; $stack[] = $str; } foreach (\array_keys($stack) as $k) { $result .= "< {$stack[$k]}\n"; } return $result; } /** * Set the HTTP handler that actually returns a promise. * * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and * returns a Promise. */ public function setHandler(callable $handler) : void { $this->handler = $handler; $this->cached = null; } /** * Returns true if the builder has a handler. */ public function hasHandler() : bool { return $this->handler !== null; } /** * Unshift a middleware to the bottom of the stack. * * @param callable(callable): callable $middleware Middleware function * @param string $name Name to register for this middleware. */ public function unshift(callable $middleware, ?string $name = null) : void { \array_unshift($this->stack, [$middleware, $name]); $this->cached = null; } /** * Push a middleware to the top of the stack. * * @param callable(callable): callable $middleware Middleware function * @param string $name Name to register for this middleware. */ public function push(callable $middleware, string $name = '') : void { $this->stack[] = [$middleware, $name]; $this->cached = null; } /** * Add a middleware before another middleware by name. * * @param string $findName Middleware to find * @param callable(callable): callable $middleware Middleware function * @param string $withName Name to register for this middleware. */ public function before(string $findName, callable $middleware, string $withName = '') : void { $this->splice($findName, $withName, $middleware, \true); } /** * Add a middleware after another middleware by name. * * @param string $findName Middleware to find * @param callable(callable): callable $middleware Middleware function * @param string $withName Name to register for this middleware. */ public function after(string $findName, callable $middleware, string $withName = '') : void { $this->splice($findName, $withName, $middleware, \false); } /** * Remove a middleware by instance or name from the stack. * * @param callable|string $remove Middleware to remove by instance or name. */ public function remove($remove) : void { if (!\is_string($remove) && !\is_callable($remove)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a callable or string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->cached = null; $idx = \is_callable($remove) ? 0 : 1; $this->stack = \array_values(\array_filter($this->stack, static function ($tuple) use($idx, $remove) { return $tuple[$idx] !== $remove; })); } /** * Compose the middleware and handler into a single callable function. * * @return callable(RequestInterface, array): PromiseInterface */ public function resolve() : callable { if ($this->cached === null) { if (($prev = $this->handler) === null) { throw new \LogicException('No handler has been specified'); } foreach (\array_reverse($this->stack) as $fn) { /** @var callable(RequestInterface, array): PromiseInterface $prev */ $prev = $fn[0]($prev); } $this->cached = $prev; } return $this->cached; } private function findByName(string $name) : int { foreach ($this->stack as $k => $v) { if ($v[1] === $name) { return $k; } } throw new \InvalidArgumentException("Middleware not found: {$name}"); } /** * Splices a function into the middleware list at a specific position. */ private function splice(string $findName, string $withName, callable $middleware, bool $before) : void { $this->cached = null; $idx = $this->findByName($findName); $tuple = [$middleware, $withName]; if ($before) { if ($idx === 0) { \array_unshift($this->stack, $tuple); } else { $replacement = [$tuple, $this->stack[$idx]]; \array_splice($this->stack, $idx, 1, $replacement); } } elseif ($idx === \count($this->stack) - 1) { $this->stack[] = $tuple; } else { $replacement = [$this->stack[$idx], $tuple]; \array_splice($this->stack, $idx, 1, $replacement); } } /** * Provides a debug string for a given callable. * * @param callable|string $fn Function to write as a string. */ private function debugCallable($fn) : string { if (\is_string($fn)) { return "callable({$fn})"; } if (\is_array($fn)) { return \is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])"; } /** @var object $fn */ return 'callable(' . \spl_object_hash($fn) . ')'; } } vendor_prefixed/guzzlehttp/guzzle/src/Client.php 0000644 00000043466 15174671617 0016241 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Cookie\CookieJar; use WPMailSMTP\Vendor\GuzzleHttp\Exception\GuzzleException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\InvalidArgumentException; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * @final */ class Client implements ClientInterface, \WPMailSMTP\Vendor\Psr\Http\Client\ClientInterface { use ClientTrait; /** * @var array Default request options */ private $config; /** * Clients accept an array of constructor parameters. * * Here's an example of creating a client using a base_uri and an array of * default request options to apply to each request: * * $client = new Client([ * 'base_uri' => 'http://www.foo.com/1.0/', * 'timeout' => 0, * 'allow_redirects' => false, * 'proxy' => '192.168.16.1:10' * ]); * * Client configuration settings include the following options: * * - handler: (callable) Function that transfers HTTP requests over the * wire. The function is called with a Psr7\Http\Message\RequestInterface * and array of transfer options, and must return a * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a * Psr7\Http\Message\ResponseInterface on success. * If no handler is provided, a default handler will be created * that enables all of the request options below by attaching all of the * default middleware to the handler. * - base_uri: (string|UriInterface) Base URI of the client that is merged * into relative URIs. Can be a string or instance of UriInterface. * - **: any request option * * @param array $config Client configuration settings. * * @see RequestOptions for a list of available request options. */ public function __construct(array $config = []) { if (!isset($config['handler'])) { $config['handler'] = HandlerStack::create(); } elseif (!\is_callable($config['handler'])) { throw new InvalidArgumentException('handler must be a callable'); } // Convert the base_uri to a UriInterface if (isset($config['base_uri'])) { $config['base_uri'] = Psr7\Utils::uriFor($config['base_uri']); } $this->configureDefaults($config); } /** * @param string $method * @param array $args * * @return PromiseInterface|ResponseInterface * * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0. */ public function __call($method, $args) { if (\count($args) < 1) { throw new InvalidArgumentException('Magic request methods require a URI and optional options array'); } $uri = $args[0]; $opts = $args[1] ?? []; return \substr($method, -5) === 'Async' ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) : $this->request($method, $uri, $opts); } /** * Asynchronously send an HTTP request. * * @param array $options Request options to apply to the given * request and to the transfer. See \GuzzleHttp\RequestOptions. */ public function sendAsync(RequestInterface $request, array $options = []) : PromiseInterface { // Merge the base URI into the request URI if needed. $options = $this->prepareDefaults($options); return $this->transfer($request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), $options); } /** * Send an HTTP request. * * @param array $options Request options to apply to the given * request and to the transfer. See \GuzzleHttp\RequestOptions. * * @throws GuzzleException */ public function send(RequestInterface $request, array $options = []) : ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = \true; return $this->sendAsync($request, $options)->wait(); } /** * The HttpClient PSR (PSR-18) specify this method. * * {@inheritDoc} */ public function sendRequest(RequestInterface $request) : ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = \true; $options[RequestOptions::ALLOW_REDIRECTS] = \false; $options[RequestOptions::HTTP_ERRORS] = \false; return $this->sendAsync($request, $options)->wait(); } /** * Create and send an asynchronous HTTP request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string $method HTTP method * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. */ public function requestAsync(string $method, $uri = '', array $options = []) : PromiseInterface { $options = $this->prepareDefaults($options); // Remove request modifying parameter because it can be done up-front. $headers = $options['headers'] ?? []; $body = $options['body'] ?? null; $version = $options['version'] ?? '1.1'; // Merge the URI into the base URI. $uri = $this->buildUri(Psr7\Utils::uriFor($uri), $options); if (\is_array($body)) { throw $this->invalidBody(); } $request = new Psr7\Request($method, $uri, $headers, $body, $version); // Remove the option so that they are not doubly-applied. unset($options['headers'], $options['body'], $options['version']); return $this->transfer($request, $options); } /** * Create and send an HTTP request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string $method HTTP method. * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions. * * @throws GuzzleException */ public function request(string $method, $uri = '', array $options = []) : ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = \true; return $this->requestAsync($method, $uri, $options)->wait(); } /** * Get a client configuration option. * * These options include default request options of the client, a "handler" * (if utilized by the concrete client), and a "base_uri" if utilized by * the concrete client. * * @param string|null $option The config option to retrieve. * * @return mixed * * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. */ public function getConfig(?string $option = null) { return $option === null ? $this->config : $this->config[$option] ?? null; } private function buildUri(UriInterface $uri, array $config) : UriInterface { if (isset($config['base_uri'])) { $uri = Psr7\UriResolver::resolve(Psr7\Utils::uriFor($config['base_uri']), $uri); } if (isset($config['idn_conversion']) && $config['idn_conversion'] !== \false) { $idnOptions = $config['idn_conversion'] === \true ? \IDNA_DEFAULT : $config['idn_conversion']; $uri = Utils::idnUriConvert($uri, $idnOptions); } return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; } /** * Configures the default options for a client. */ private function configureDefaults(array $config) : void { $defaults = ['allow_redirects' => RedirectMiddleware::$defaultSettings, 'http_errors' => \true, 'decode_content' => \true, 'verify' => \true, 'cookies' => \false, 'idn_conversion' => \false]; // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. // We can only trust the HTTP_PROXY environment variable in a CLI // process due to the fact that PHP has no reliable mechanism to // get environment variables that start with "HTTP_". if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) { $defaults['proxy']['http'] = $proxy; } if ($proxy = Utils::getenv('HTTPS_PROXY')) { $defaults['proxy']['https'] = $proxy; } if ($noProxy = Utils::getenv('NO_PROXY')) { $cleanedNoProxy = \str_replace(' ', '', $noProxy); $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy); } $this->config = $config + $defaults; if (!empty($config['cookies']) && $config['cookies'] === \true) { $this->config['cookies'] = new CookieJar(); } // Add the default user-agent header. if (!isset($this->config['headers'])) { $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()]; } else { // Add the User-Agent header if one was not already set. foreach (\array_keys($this->config['headers']) as $name) { if (\strtolower($name) === 'user-agent') { return; } } $this->config['headers']['User-Agent'] = Utils::defaultUserAgent(); } } /** * Merges default options into the array. * * @param array $options Options to modify by reference */ private function prepareDefaults(array $options) : array { $defaults = $this->config; if (!empty($defaults['headers'])) { // Default headers are only added if they are not present. $defaults['_conditional'] = $defaults['headers']; unset($defaults['headers']); } // Special handling for headers is required as they are added as // conditional headers and as headers passed to a request ctor. if (\array_key_exists('headers', $options)) { // Allows default headers to be unset. if ($options['headers'] === null) { $defaults['_conditional'] = []; unset($options['headers']); } elseif (!\is_array($options['headers'])) { throw new InvalidArgumentException('headers must be an array'); } } // Shallow merge defaults underneath options. $result = $options + $defaults; // Remove null values. foreach ($result as $k => $v) { if ($v === null) { unset($result[$k]); } } return $result; } /** * Transfers the given request and applies request options. * * The URI of the request is not modified and the request options are used * as-is without merging in default options. * * @param array $options See \GuzzleHttp\RequestOptions. */ private function transfer(RequestInterface $request, array $options) : PromiseInterface { $request = $this->applyOptions($request, $options); /** @var HandlerStack $handler */ $handler = $options['handler']; try { return P\Create::promiseFor($handler($request, $options)); } catch (\Exception $e) { return P\Create::rejectionFor($e); } } /** * Applies the array of request options to a request. */ private function applyOptions(RequestInterface $request, array &$options) : RequestInterface { $modify = ['set_headers' => []]; if (isset($options['headers'])) { if (\array_keys($options['headers']) === \range(0, \count($options['headers']) - 1)) { throw new InvalidArgumentException('The headers array must have header name as keys.'); } $modify['set_headers'] = $options['headers']; unset($options['headers']); } if (isset($options['form_params'])) { if (isset($options['multipart'])) { throw new InvalidArgumentException('You cannot use ' . 'form_params and multipart at the same time. Use the ' . 'form_params option if you want to send application/' . 'x-www-form-urlencoded requests, and the multipart ' . 'option to send multipart/form-data requests.'); } $options['body'] = \http_build_query($options['form_params'], '', '&'); unset($options['form_params']); // Ensure that we don't have the header in different case and set the new value. $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; } if (isset($options['multipart'])) { $options['body'] = new Psr7\MultipartStream($options['multipart']); unset($options['multipart']); } if (isset($options['json'])) { $options['body'] = Utils::jsonEncode($options['json']); unset($options['json']); // Ensure that we don't have the header in different case and set the new value. $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'application/json'; } if (!empty($options['decode_content']) && $options['decode_content'] !== \true) { // Ensure that we don't have the header in different case and set the new value. $options['_conditional'] = Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']); $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; } if (isset($options['body'])) { if (\is_array($options['body'])) { throw $this->invalidBody(); } $modify['body'] = Psr7\Utils::streamFor($options['body']); unset($options['body']); } if (!empty($options['auth']) && \is_array($options['auth'])) { $value = $options['auth']; $type = isset($value[2]) ? \strtolower($value[2]) : 'basic'; switch ($type) { case 'basic': // Ensure that we don't have the header in different case and set the new value. $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); $modify['set_headers']['Authorization'] = 'Basic ' . \base64_encode("{$value[0]}:{$value[1]}"); break; case 'digest': // @todo: Do not rely on curl $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST; $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}"; break; case 'ntlm': $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM; $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}"; break; } } if (isset($options['query'])) { $value = $options['query']; if (\is_array($value)) { $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986); } if (!\is_string($value)) { throw new InvalidArgumentException('query must be a string or array'); } $modify['query'] = $value; unset($options['query']); } // Ensure that sink is not an invalid value. if (isset($options['sink'])) { // TODO: Add more sink validation? if (\is_bool($options['sink'])) { throw new InvalidArgumentException('sink must not be a boolean'); } } if (isset($options['version'])) { $modify['version'] = $options['version']; } $request = Psr7\Utils::modifyRequest($request, $modify); if ($request->getBody() instanceof Psr7\MultipartStream) { // Use a multipart/form-data POST if a Content-Type is not set. // Ensure that we don't have the header in different case and set the new value. $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' . $request->getBody()->getBoundary(); } // Merge in conditional headers if they are not present. if (isset($options['_conditional'])) { // Build up the changes so it's in a single clone of the message. $modify = []; foreach ($options['_conditional'] as $k => $v) { if (!$request->hasHeader($k)) { $modify['set_headers'][$k] = $v; } } $request = Psr7\Utils::modifyRequest($request, $modify); // Don't pass this internal value along to middleware/handlers. unset($options['_conditional']); } return $request; } /** * Return an InvalidArgumentException with pre-set message. */ private function invalidBody() : InvalidArgumentException { return new InvalidArgumentException('Passing in the "body" request ' . 'option as an array to send a request is not supported. ' . 'Please use the "form_params" request option to send a ' . 'application/x-www-form-urlencoded request, or the "multipart" ' . 'request option to send a multipart/form-data request.'); } } vendor_prefixed/guzzlehttp/guzzle/src/RequestOptions.php 0000644 00000025302 15174671617 0020014 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; /** * This class contains a list of built-in Guzzle request options. * * @see https://docs.guzzlephp.org/en/latest/request-options.html */ final class RequestOptions { /** * allow_redirects: (bool|array) Controls redirect behavior. Pass false * to disable redirects, pass true to enable redirects, pass an * associative to provide custom redirect settings. Defaults to "false". * This option only works if your handler has the RedirectMiddleware. When * passing an associative array, you can provide the following key value * pairs: * * - max: (int, default=5) maximum number of allowed redirects. * - strict: (bool, default=false) Set to true to use strict redirects * meaning redirect POST requests with POST requests vs. doing what most * browsers do which is redirect POST requests with GET requests * - referer: (bool, default=false) Set to true to enable the Referer * header. * - protocols: (array, default=['http', 'https']) Allowed redirect * protocols. * - on_redirect: (callable) PHP callable that is invoked when a redirect * is encountered. The callable is invoked with the request, the redirect * response that was received, and the effective URI. Any return value * from the on_redirect function is ignored. */ public const ALLOW_REDIRECTS = 'allow_redirects'; /** * auth: (array) Pass an array of HTTP authentication parameters to use * with the request. The array must contain the username in index [0], * the password in index [1], and you can optionally provide a built-in * authentication type in index [2]. Pass null to disable authentication * for a request. */ public const AUTH = 'auth'; /** * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator) * Body to send in the request. */ public const BODY = 'body'; /** * cert: (string|array) Set to a string to specify the path to a file * containing a PEM formatted SSL client side certificate. If a password * is required, then set cert to an array containing the path to the PEM * file in the first array element followed by the certificate password * in the second array element. */ public const CERT = 'cert'; /** * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false) * Specifies whether or not cookies are used in a request or what cookie * jar to use or what cookies to send. This option only works if your * handler has the `cookie` middleware. Valid values are `false` and * an instance of {@see Cookie\CookieJarInterface}. */ public const COOKIES = 'cookies'; /** * connect_timeout: (float, default=0) Float describing the number of * seconds to wait while trying to connect to a server. Use 0 to wait * 300 seconds (the default behavior). */ public const CONNECT_TIMEOUT = 'connect_timeout'; /** * crypto_method: (int) A value describing the minimum TLS protocol * version to use. * * This setting must be set to one of the * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required * in order to specify a crypto method, with cURL 7.52.0 or higher being * required to use TLS 1.3. */ public const CRYPTO_METHOD = 'crypto_method'; /** * debug: (bool|resource) Set to true or set to a PHP stream returned by * fopen() enable debug output with the HTTP handler used to send a * request. */ public const DEBUG = 'debug'; /** * decode_content: (bool, default=true) Specify whether or not * Content-Encoding responses (gzip, deflate, etc.) are automatically * decoded. */ public const DECODE_CONTENT = 'decode_content'; /** * delay: (int) The amount of time to delay before sending in milliseconds. */ public const DELAY = 'delay'; /** * expect: (bool|integer) Controls the behavior of the * "Expect: 100-Continue" header. * * Set to `true` to enable the "Expect: 100-Continue" header for all * requests that sends a body. Set to `false` to disable the * "Expect: 100-Continue" header for all requests. Set to a number so that * the size of the payload must be greater than the number in order to send * the Expect header. Setting to a number will send the Expect header for * all requests in which the size of the payload cannot be determined or * where the body is not rewindable. * * By default, Guzzle will add the "Expect: 100-Continue" header when the * size of the body of a request is greater than 1 MB and a request is * using HTTP/1.1. */ public const EXPECT = 'expect'; /** * form_params: (array) Associative array of form field names to values * where each value is a string or array of strings. Sets the Content-Type * header to application/x-www-form-urlencoded when no Content-Type header * is already present. */ public const FORM_PARAMS = 'form_params'; /** * headers: (array) Associative array of HTTP headers. Each value MUST be * a string or array of strings. */ public const HEADERS = 'headers'; /** * http_errors: (bool, default=true) Set to false to disable exceptions * when a non- successful HTTP response is received. By default, * exceptions will be thrown for 4xx and 5xx responses. This option only * works if your handler has the `httpErrors` middleware. */ public const HTTP_ERRORS = 'http_errors'; /** * idn: (bool|int, default=true) A combination of IDNA_* constants for * idn_to_ascii() PHP's function (see "options" parameter). Set to false to * disable IDN support completely, or to true to use the default * configuration (IDNA_DEFAULT constant). */ public const IDN_CONVERSION = 'idn_conversion'; /** * json: (mixed) Adds JSON data to a request. The provided value is JSON * encoded and a Content-Type header of application/json will be added to * the request if no Content-Type header is already present. */ public const JSON = 'json'; /** * multipart: (array) Array of associative arrays, each containing a * required "name" key mapping to the form field, name, a required * "contents" key mapping to a StreamInterface|resource|string, an * optional "headers" associative array of custom headers, and an * optional "filename" key mapping to a string to send as the filename in * the part. If no "filename" key is present, then no "filename" attribute * will be added to the part. */ public const MULTIPART = 'multipart'; /** * on_headers: (callable) A callable that is invoked when the HTTP headers * of the response have been received but the body has not yet begun to * download. */ public const ON_HEADERS = 'on_headers'; /** * on_stats: (callable) allows you to get access to transfer statistics of * a request and access the lower level transfer details of the handler * associated with your client. ``on_stats`` is a callable that is invoked * when a handler has finished sending a request. The callback is invoked * with transfer statistics about the request, the response received, or * the error encountered. Included in the data is the total amount of time * taken to send the request. */ public const ON_STATS = 'on_stats'; /** * progress: (callable) Defines a function to invoke when transfer * progress is made. The function accepts the following positional * arguments: the total number of bytes expected to be downloaded, the * number of bytes downloaded so far, the number of bytes expected to be * uploaded, the number of bytes uploaded so far. */ public const PROGRESS = 'progress'; /** * proxy: (string|array) Pass a string to specify an HTTP proxy, or an * array to specify different proxies for different protocols (where the * key is the protocol and the value is a proxy string). */ public const PROXY = 'proxy'; /** * query: (array|string) Associative array of query string values to add * to the request. This option uses PHP's http_build_query() to create * the string representation. Pass a string value if you need more * control than what this method provides */ public const QUERY = 'query'; /** * sink: (resource|string|StreamInterface) Where the data of the * response is written to. Defaults to a PHP temp stream. Providing a * string will write data to a file by the given name. */ public const SINK = 'sink'; /** * synchronous: (bool) Set to true to inform HTTP handlers that you intend * on waiting on the response. This can be useful for optimizations. Note * that a promise is still returned if you are using one of the async * client methods. */ public const SYNCHRONOUS = 'synchronous'; /** * ssl_key: (array|string) Specify the path to a file containing a private * SSL key in PEM format. If a password is required, then set to an array * containing the path to the SSL key in the first array element followed * by the password required for the certificate in the second element. */ public const SSL_KEY = 'ssl_key'; /** * stream: Set to true to attempt to stream a response rather than * download it all up-front. */ public const STREAM = 'stream'; /** * verify: (bool|string, default=true) Describes the SSL certificate * verification behavior of a request. Set to true to enable SSL * certificate verification using the system CA bundle when available * (the default). Set to false to disable certificate verification (this * is insecure!). Set to a string to provide the path to a CA bundle on * disk to enable verification using a custom certificate. */ public const VERIFY = 'verify'; /** * timeout: (float, default=0) Float describing the timeout of the * request in seconds. Use 0 to wait indefinitely (the default behavior). */ public const TIMEOUT = 'timeout'; /** * read_timeout: (float, default=default_socket_timeout ini setting) Float describing * the body read timeout, for stream requests. */ public const READ_TIMEOUT = 'read_timeout'; /** * version: (float) Specifies the HTTP protocol version to attempt to use. */ public const VERSION = 'version'; /** * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol */ public const FORCE_IP_RESOLVE = 'force_ip_resolve'; } vendor_prefixed/guzzlehttp/guzzle/src/functions.php 0000644 00000013076 15174671617 0017025 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; /** * Debug function used to describe the provided value type and class. * * @param mixed $input Any type of variable to describe the type of. This * parameter misses a typehint because of that. * * @return string Returns a string containing the type of the variable and * if a class is provided, the class name. * * @deprecated describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead. */ function describe_type($input) : string { return Utils::describeType($input); } /** * Parses an array of header lines into an associative array of headers. * * @param iterable $lines Header lines array of strings in the following * format: "Name: Value" * * @deprecated headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead. */ function headers_from_lines(iterable $lines) : array { return Utils::headersFromLines($lines); } /** * Returns a debug stream based on the provided variable. * * @param mixed $value Optional value * * @return resource * * @deprecated debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead. */ function debug_resource($value = null) { return Utils::debugResource($value); } /** * Chooses and creates a default handler to use based on the environment. * * The returned handler is not wrapped by any default middlewares. * * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. * * @throws \RuntimeException if no viable Handler is available. * * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead. */ function choose_handler() : callable { return Utils::chooseHandler(); } /** * Get the default User-Agent string to use with Guzzle. * * @deprecated default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead. */ function default_user_agent() : string { return Utils::defaultUserAgent(); } /** * Returns the default cacert bundle for the current system. * * First, the openssl.cafile and curl.cainfo php.ini settings are checked. * If those settings are not configured, then the common locations for * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X * and Windows are checked. If any of these file locations are found on * disk, they will be utilized. * * Note: the result of this function is cached for subsequent calls. * * @throws \RuntimeException if no bundle can be found. * * @deprecated default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+. */ function default_ca_bundle() : string { return Utils::defaultCaBundle(); } /** * Creates an associative array of lowercase header names to the actual * header casing. * * @deprecated normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead. */ function normalize_header_keys(array $headers) : array { return Utils::normalizeHeaderKeys($headers); } /** * Returns true if the provided host matches any of the no proxy areas. * * This method will strip a port from the host if it is present. Each pattern * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == * "baz.foo.com", but ".foo.com" != "foo.com"). * * Areas are matched in the following cases: * 1. "*" (without quotes) always matches any hosts. * 2. An exact match. * 3. The area starts with "." and the area is the last part of the host. e.g. * '.mit.edu' will match any host that ends with '.mit.edu'. * * @param string $host Host to check against the patterns. * @param string[] $noProxyArray An array of host patterns. * * @throws Exception\InvalidArgumentException * * @deprecated is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead. */ function is_host_in_noproxy(string $host, array $noProxyArray) : bool { return Utils::isHostInNoProxy($host, $noProxyArray); } /** * Wrapper for json_decode that throws when an error occurs. * * @param string $json JSON data to parse * @param bool $assoc When true, returned objects will be converted * into associative arrays. * @param int $depth User specified recursion depth. * @param int $options Bitmask of JSON decode options. * * @return object|array|string|int|float|bool|null * * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. * * @see https://www.php.net/manual/en/function.json-decode.php * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead. */ function json_decode(string $json, bool $assoc = \false, int $depth = 512, int $options = 0) { return Utils::jsonDecode($json, $assoc, $depth, $options); } /** * Wrapper for JSON encoding that throws when an error occurs. * * @param mixed $value The value being encoded * @param int $options JSON encode option bitmask * @param int $depth Set the maximum depth. Must be greater than zero. * * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. * * @see https://www.php.net/manual/en/function.json-encode.php * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead. */ function json_encode($value, int $options = 0, int $depth = 512) : string { return Utils::jsonEncode($value, $options, $depth); } vendor_prefixed/guzzlehttp/guzzle/src/Middleware.php 0000644 00000024716 15174671617 0017075 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Cookie\CookieJarInterface; use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Log\LoggerInterface; /** * Functions used to create and wrap handlers with handler middleware. */ final class Middleware { /** * Middleware that adds cookies to requests. * * The options array must be set to a CookieJarInterface in order to use * cookies. This is typically handled for you by a client. * * @return callable Returns a function that accepts the next handler. */ public static function cookies() : callable { return static function (callable $handler) : callable { return static function ($request, array $options) use($handler) { if (empty($options['cookies'])) { return $handler($request, $options); } elseif (!$options['cookies'] instanceof CookieJarInterface) { throw new \InvalidArgumentException('WPMailSMTP\\Vendor\\cookies must be an instance of GuzzleHttp\\Cookie\\CookieJarInterface'); } $cookieJar = $options['cookies']; $request = $cookieJar->withCookieHeader($request); return $handler($request, $options)->then(static function (ResponseInterface $response) use($cookieJar, $request) : ResponseInterface { $cookieJar->extractCookies($request, $response); return $response; }); }; }; } /** * Middleware that throws exceptions for 4xx or 5xx responses when the * "http_errors" request option is set to true. * * @param BodySummarizerInterface|null $bodySummarizer The body summarizer to use in exception messages. * * @return callable(callable): callable Returns a function that accepts the next handler. */ public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null) : callable { return static function (callable $handler) use($bodySummarizer) : callable { return static function ($request, array $options) use($handler, $bodySummarizer) { if (empty($options['http_errors'])) { return $handler($request, $options); } return $handler($request, $options)->then(static function (ResponseInterface $response) use($request, $bodySummarizer) { $code = $response->getStatusCode(); if ($code < 400) { return $response; } throw RequestException::create($request, $response, null, [], $bodySummarizer); }); }; }; } /** * Middleware that pushes history data to an ArrayAccess container. * * @param array|\ArrayAccess<int, array> $container Container to hold the history (by reference). * * @return callable(callable): callable Returns a function that accepts the next handler. * * @throws \InvalidArgumentException if container is not an array or ArrayAccess. */ public static function history(&$container) : callable { if (!\is_array($container) && !$container instanceof \ArrayAccess) { throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); } return static function (callable $handler) use(&$container) : callable { return static function (RequestInterface $request, array $options) use($handler, &$container) { return $handler($request, $options)->then(static function ($value) use($request, &$container, $options) { $container[] = ['request' => $request, 'response' => $value, 'error' => null, 'options' => $options]; return $value; }, static function ($reason) use($request, &$container, $options) { $container[] = ['request' => $request, 'response' => null, 'error' => $reason, 'options' => $options]; return P\Create::rejectionFor($reason); }); }; }; } /** * Middleware that invokes a callback before and after sending a request. * * The provided listener cannot modify or alter the response. It simply * "taps" into the chain to be notified before returning the promise. The * before listener accepts a request and options array, and the after * listener accepts a request, options array, and response promise. * * @param callable $before Function to invoke before forwarding the request. * @param callable $after Function invoked after forwarding. * * @return callable Returns a function that accepts the next handler. */ public static function tap(?callable $before = null, ?callable $after = null) : callable { return static function (callable $handler) use($before, $after) : callable { return static function (RequestInterface $request, array $options) use($handler, $before, $after) { if ($before) { $before($request, $options); } $response = $handler($request, $options); if ($after) { $after($request, $options, $response); } return $response; }; }; } /** * Middleware that handles request redirects. * * @return callable Returns a function that accepts the next handler. */ public static function redirect() : callable { return static function (callable $handler) : RedirectMiddleware { return new RedirectMiddleware($handler); }; } /** * Middleware that retries requests based on the boolean result of * invoking the provided "decider" function. * * If no delay function is provided, a simple implementation of exponential * backoff will be utilized. * * @param callable $decider Function that accepts the number of retries, * a request, [response], and [exception] and * returns true if the request is to be retried. * @param callable $delay Function that accepts the number of retries and * returns the number of milliseconds to delay. * * @return callable Returns a function that accepts the next handler. */ public static function retry(callable $decider, ?callable $delay = null) : callable { return static function (callable $handler) use($decider, $delay) : RetryMiddleware { return new RetryMiddleware($decider, $handler, $delay); }; } /** * Middleware that logs requests, responses, and errors using a message * formatter. * * @param LoggerInterface $logger Logs messages. * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings. * @param string $logLevel Level at which to log requests. * * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests. * * @return callable Returns a function that accepts the next handler. */ public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info') : callable { // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) { throw new \LogicException(\sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class)); } return static function (callable $handler) use($logger, $formatter, $logLevel) : callable { return static function (RequestInterface $request, array $options = []) use($handler, $logger, $formatter, $logLevel) { return $handler($request, $options)->then(static function ($response) use($logger, $request, $formatter, $logLevel) : ResponseInterface { $message = $formatter->format($request, $response); $logger->log($logLevel, $message); return $response; }, static function ($reason) use($logger, $request, $formatter) : PromiseInterface { $response = $reason instanceof RequestException ? $reason->getResponse() : null; $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); $logger->error($message); return P\Create::rejectionFor($reason); }); }; }; } /** * This middleware adds a default content-type if possible, a default * content-length or transfer-encoding header, and the expect header. */ public static function prepareBody() : callable { return static function (callable $handler) : PrepareBodyMiddleware { return new PrepareBodyMiddleware($handler); }; } /** * Middleware that applies a map function to the request before passing to * the next handler. * * @param callable $fn Function that accepts a RequestInterface and returns * a RequestInterface. */ public static function mapRequest(callable $fn) : callable { return static function (callable $handler) use($fn) : callable { return static function (RequestInterface $request, array $options) use($handler, $fn) { return $handler($fn($request), $options); }; }; } /** * Middleware that applies a map function to the resolved promise's * response. * * @param callable $fn Function that accepts a ResponseInterface and * returns a ResponseInterface. */ public static function mapResponse(callable $fn) : callable { return static function (callable $handler) use($fn) : callable { return static function (RequestInterface $request, array $options) use($handler, $fn) { return $handler($request, $options)->then($fn); }; }; } } vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php 0000644 00000005677 15174671617 0020064 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Exception\GuzzleException; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Client interface for sending HTTP requests. */ interface ClientInterface { /** * The Guzzle major version. */ public const MAJOR_VERSION = 7; /** * Send an HTTP request. * * @param RequestInterface $request Request to send * @param array $options Request options to apply to the given * request and to the transfer. * * @throws GuzzleException */ public function send(RequestInterface $request, array $options = []) : ResponseInterface; /** * Asynchronously send an HTTP request. * * @param RequestInterface $request Request to send * @param array $options Request options to apply to the given * request and to the transfer. */ public function sendAsync(RequestInterface $request, array $options = []) : PromiseInterface; /** * Create and send an HTTP request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string $method HTTP method. * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function request(string $method, $uri, array $options = []) : ResponseInterface; /** * Create and send an asynchronous HTTP request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string $method HTTP method * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function requestAsync(string $method, $uri, array $options = []) : PromiseInterface; /** * Get a client configuration option. * * These options include default request options of the client, a "handler" * (if utilized by the concrete client), and a "base_uri" if utilized by * the concrete client. * * @param string|null $option The config option to retrieve. * * @return mixed * * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. */ public function getConfig(?string $option = null); } vendor_prefixed/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php 0000644 00000005347 15174671617 0020676 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Cookie; use WPMailSMTP\Vendor\GuzzleHttp\Utils; /** * Persists non-session cookies using a JSON formatted file */ class FileCookieJar extends CookieJar { /** * @var string filename */ private $filename; /** * @var bool Control whether to persist session cookies or not. */ private $storeSessionCookies; /** * Create a new FileCookieJar object * * @param string $cookieFile File to store the cookie data * @param bool $storeSessionCookies Set to true to store session cookies * in the cookie jar. * * @throws \RuntimeException if the file cannot be found or created */ public function __construct(string $cookieFile, bool $storeSessionCookies = \false) { parent::__construct(); $this->filename = $cookieFile; $this->storeSessionCookies = $storeSessionCookies; if (\file_exists($cookieFile)) { $this->load($cookieFile); } } /** * Saves the file when shutting down */ public function __destruct() { $this->save($this->filename); } /** * Saves the cookies to a file. * * @param string $filename File to save * * @throws \RuntimeException if the file cannot be found or created */ public function save(string $filename) : void { $json = []; /** @var SetCookie $cookie */ foreach ($this as $cookie) { if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { $json[] = $cookie->toArray(); } } $jsonStr = Utils::jsonEncode($json); if (\false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) { throw new \RuntimeException("Unable to save file {$filename}"); } } /** * Load cookies from a JSON formatted file. * * Old cookies are kept unless overwritten by newly loaded ones. * * @param string $filename Cookie file to load. * * @throws \RuntimeException if the file cannot be loaded. */ public function load(string $filename) : void { $json = \file_get_contents($filename); if (\false === $json) { throw new \RuntimeException("Unable to load file {$filename}"); } if ($json === '') { return; } $data = Utils::jsonDecode($json, \true); if (\is_array($data)) { foreach ($data as $cookie) { $this->setCookie(new SetCookie($cookie)); } } elseif (\is_scalar($data) && !empty($data)) { throw new \RuntimeException("Invalid cookie file: {$filename}"); } } } vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SetCookie.php 0000644 00000034043 15174671617 0020110 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Cookie; /** * Set-Cookie object */ class SetCookie { /** * @var array */ private static $defaults = ['Name' => null, 'Value' => null, 'Domain' => null, 'Path' => '/', 'Max-Age' => null, 'Expires' => null, 'Secure' => \false, 'Discard' => \false, 'HttpOnly' => \false]; /** * @var array Cookie data */ private $data; /** * Create a new SetCookie object from a string. * * @param string $cookie Set-Cookie header string */ public static function fromString(string $cookie) : self { // Create the default return array $data = self::$defaults; // Explode the cookie string using a series of semicolons $pieces = \array_filter(\array_map('trim', \explode(';', $cookie))); // The name of the cookie (first kvp) must exist and include an equal sign. if (!isset($pieces[0]) || \strpos($pieces[0], '=') === \false) { return new self($data); } // Add the cookie pieces into the parsed data array foreach ($pieces as $part) { $cookieParts = \explode('=', $part, 2); $key = \trim($cookieParts[0]); $value = isset($cookieParts[1]) ? \trim($cookieParts[1], " \n\r\t\x00\v") : \true; // Only check for non-cookies when cookies have been found if (!isset($data['Name'])) { $data['Name'] = $key; $data['Value'] = $value; } else { foreach (\array_keys(self::$defaults) as $search) { if (!\strcasecmp($search, $key)) { if ($search === 'Max-Age') { if (\is_numeric($value)) { $data[$search] = (int) $value; } } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') { if ($value) { $data[$search] = \true; } } else { $data[$search] = $value; } continue 2; } } $data[$key] = $value; } } return new self($data); } /** * @param array $data Array of cookie data provided by a Cookie parser */ public function __construct(array $data = []) { $this->data = self::$defaults; if (isset($data['Name'])) { $this->setName($data['Name']); } if (isset($data['Value'])) { $this->setValue($data['Value']); } if (isset($data['Domain'])) { $this->setDomain($data['Domain']); } if (isset($data['Path'])) { $this->setPath($data['Path']); } if (isset($data['Max-Age'])) { $this->setMaxAge($data['Max-Age']); } if (isset($data['Expires'])) { $this->setExpires($data['Expires']); } if (isset($data['Secure'])) { $this->setSecure($data['Secure']); } if (isset($data['Discard'])) { $this->setDiscard($data['Discard']); } if (isset($data['HttpOnly'])) { $this->setHttpOnly($data['HttpOnly']); } // Set the remaining values that don't have extra validation logic foreach (\array_diff(\array_keys($data), \array_keys(self::$defaults)) as $key) { $this->data[$key] = $data[$key]; } // Extract the Expires value and turn it into a UNIX timestamp if needed if (!$this->getExpires() && $this->getMaxAge()) { // Calculate the Expires date $this->setExpires(\time() + $this->getMaxAge()); } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) { $this->setExpires($expires); } } public function __toString() { $str = $this->data['Name'] . '=' . ($this->data['Value'] ?? '') . '; '; foreach ($this->data as $k => $v) { if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== \false) { if ($k === 'Expires') { $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \\G\\M\\T', $v) . '; '; } else { $str .= ($v === \true ? $k : "{$k}={$v}") . '; '; } } } return \rtrim($str, '; '); } public function toArray() : array { return $this->data; } /** * Get the cookie name. * * @return string */ public function getName() { return $this->data['Name']; } /** * Set the cookie name. * * @param string $name Cookie name */ public function setName($name) : void { if (!\is_string($name)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Name'] = (string) $name; } /** * Get the cookie value. * * @return string|null */ public function getValue() { return $this->data['Value']; } /** * Set the cookie value. * * @param string $value Cookie value */ public function setValue($value) : void { if (!\is_string($value)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Value'] = (string) $value; } /** * Get the domain. * * @return string|null */ public function getDomain() { return $this->data['Domain']; } /** * Set the domain of the cookie. * * @param string|null $domain */ public function setDomain($domain) : void { if (!\is_string($domain) && null !== $domain) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Domain'] = null === $domain ? null : (string) $domain; } /** * Get the path. * * @return string */ public function getPath() { return $this->data['Path']; } /** * Set the path of the cookie. * * @param string $path Path of the cookie */ public function setPath($path) : void { if (!\is_string($path)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a string to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Path'] = (string) $path; } /** * Maximum lifetime of the cookie in seconds. * * @return int|null */ public function getMaxAge() { return null === $this->data['Max-Age'] ? null : (int) $this->data['Max-Age']; } /** * Set the max-age of the cookie. * * @param int|null $maxAge Max age of the cookie in seconds */ public function setMaxAge($maxAge) : void { if (!\is_int($maxAge) && null !== $maxAge) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Max-Age'] = $maxAge === null ? null : (int) $maxAge; } /** * The UNIX timestamp when the cookie Expires. * * @return string|int|null */ public function getExpires() { return $this->data['Expires']; } /** * Set the unix timestamp for which the cookie will expire. * * @param int|string|null $timestamp Unix timestamp or any English textual datetime description. */ public function setExpires($timestamp) : void { if (!\is_int($timestamp) && !\is_string($timestamp) && null !== $timestamp) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an int, string or null to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Expires'] = null === $timestamp ? null : (\is_numeric($timestamp) ? (int) $timestamp : \strtotime((string) $timestamp)); } /** * Get whether or not this is a secure cookie. * * @return bool */ public function getSecure() { return $this->data['Secure']; } /** * Set whether or not the cookie is secure. * * @param bool $secure Set to true or false if secure */ public function setSecure($secure) : void { if (!\is_bool($secure)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Secure'] = (bool) $secure; } /** * Get whether or not this is a session cookie. * * @return bool|null */ public function getDiscard() { return $this->data['Discard']; } /** * Set whether or not this is a session cookie. * * @param bool $discard Set to true or false if this is a session cookie */ public function setDiscard($discard) : void { if (!\is_bool($discard)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['Discard'] = (bool) $discard; } /** * Get whether or not this is an HTTP only cookie. * * @return bool */ public function getHttpOnly() { return $this->data['HttpOnly']; } /** * Set whether or not this is an HTTP only cookie. * * @param bool $httpOnly Set to true or false if this is HTTP only */ public function setHttpOnly($httpOnly) : void { if (!\is_bool($httpOnly)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing a bool to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } $this->data['HttpOnly'] = (bool) $httpOnly; } /** * Check if the cookie matches a path value. * * A request-path path-matches a given cookie-path if at least one of * the following conditions holds: * * - The cookie-path and the request-path are identical. * - The cookie-path is a prefix of the request-path, and the last * character of the cookie-path is %x2F ("/"). * - The cookie-path is a prefix of the request-path, and the first * character of the request-path that is not included in the cookie- * path is a %x2F ("/") character. * * @param string $requestPath Path to check against */ public function matchesPath(string $requestPath) : bool { $cookiePath = $this->getPath(); // Match on exact matches or when path is the default empty "/" if ($cookiePath === '/' || $cookiePath == $requestPath) { return \true; } // Ensure that the cookie-path is a prefix of the request path. if (0 !== \strpos($requestPath, $cookiePath)) { return \false; } // Match if the last character of the cookie-path is "/" if (\substr($cookiePath, -1, 1) === '/') { return \true; } // Match if the first character not included in cookie path is "/" return \substr($requestPath, \strlen($cookiePath), 1) === '/'; } /** * Check if the cookie matches a domain value. * * @param string $domain Domain to check against */ public function matchesDomain(string $domain) : bool { $cookieDomain = $this->getDomain(); if (null === $cookieDomain) { return \true; } // Remove the leading '.' as per spec in RFC 6265. // https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.3 $cookieDomain = \ltrim(\strtolower($cookieDomain), '.'); $domain = \strtolower($domain); // Domain not set or exact match. if ('' === $cookieDomain || $domain === $cookieDomain) { return \true; } // Matching the subdomain according to RFC 6265. // https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3 if (\filter_var($domain, \FILTER_VALIDATE_IP)) { return \false; } return (bool) \preg_match('/\\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); } /** * Check if the cookie is expired. */ public function isExpired() : bool { return $this->getExpires() !== null && \time() > $this->getExpires(); } /** * Check if the cookie is valid according to RFC 6265. * * @return bool|string Returns true if valid or an error message if invalid */ public function validate() { $name = $this->getName(); if ($name === '') { return 'The cookie name must not be empty'; } // Check if any of the invalid characters are present in the cookie name if (\preg_match('/[\\x00-\\x20\\x22\\x28-\\x29\\x2c\\x2f\\x3a-\\x40\\x5c\\x7b\\x7d\\x7f]/', $name)) { return 'Cookie name must not contain invalid characters: ASCII ' . 'Control characters (0-31;127), space, tab and the ' . 'following characters: ()<>@,;:\\"/?={}'; } // Value must not be null. 0 and empty string are valid. Empty strings // are technically against RFC 6265, but known to happen in the wild. $value = $this->getValue(); if ($value === null) { return 'The cookie value must not be empty'; } // Domains must not be empty, but can be 0. "0" is not a valid internet // domain, but may be used as server name in a private network. $domain = $this->getDomain(); if ($domain === null || $domain === '') { return 'The cookie domain must not be empty'; } return \true; } } vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php 0000644 00000021473 15174671617 0020074 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Cookie; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Cookie jar that stores cookies as an array */ class CookieJar implements CookieJarInterface { /** * @var SetCookie[] Loaded cookie data */ private $cookies = []; /** * @var bool */ private $strictMode; /** * @param bool $strictMode Set to true to throw exceptions when invalid * cookies are added to the cookie jar. * @param array $cookieArray Array of SetCookie objects or a hash of * arrays that can be used with the SetCookie * constructor */ public function __construct(bool $strictMode = \false, array $cookieArray = []) { $this->strictMode = $strictMode; foreach ($cookieArray as $cookie) { if (!$cookie instanceof SetCookie) { $cookie = new SetCookie($cookie); } $this->setCookie($cookie); } } /** * Create a new Cookie jar from an associative array and domain. * * @param array $cookies Cookies to create the jar from * @param string $domain Domain to set the cookies to */ public static function fromArray(array $cookies, string $domain) : self { $cookieJar = new self(); foreach ($cookies as $name => $value) { $cookieJar->setCookie(new SetCookie(['Domain' => $domain, 'Name' => $name, 'Value' => $value, 'Discard' => \true])); } return $cookieJar; } /** * Evaluate if this cookie should be persisted to storage * that survives between requests. * * @param SetCookie $cookie Being evaluated. * @param bool $allowSessionCookies If we should persist session cookies */ public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = \false) : bool { if ($cookie->getExpires() || $allowSessionCookies) { if (!$cookie->getDiscard()) { return \true; } } return \false; } /** * Finds and returns the cookie based on the name * * @param string $name cookie name to search for * * @return SetCookie|null cookie that was found or null if not found */ public function getCookieByName(string $name) : ?SetCookie { foreach ($this->cookies as $cookie) { if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) { return $cookie; } } return null; } public function toArray() : array { return \array_map(static function (SetCookie $cookie) : array { return $cookie->toArray(); }, $this->getIterator()->getArrayCopy()); } public function clear(?string $domain = null, ?string $path = null, ?string $name = null) : void { if (!$domain) { $this->cookies = []; return; } elseif (!$path) { $this->cookies = \array_filter($this->cookies, static function (SetCookie $cookie) use($domain) : bool { return !$cookie->matchesDomain($domain); }); } elseif (!$name) { $this->cookies = \array_filter($this->cookies, static function (SetCookie $cookie) use($path, $domain) : bool { return !($cookie->matchesPath($path) && $cookie->matchesDomain($domain)); }); } else { $this->cookies = \array_filter($this->cookies, static function (SetCookie $cookie) use($path, $domain, $name) { return !($cookie->getName() == $name && $cookie->matchesPath($path) && $cookie->matchesDomain($domain)); }); } } public function clearSessionCookies() : void { $this->cookies = \array_filter($this->cookies, static function (SetCookie $cookie) : bool { return !$cookie->getDiscard() && $cookie->getExpires(); }); } public function setCookie(SetCookie $cookie) : bool { // If the name string is empty (but not 0), ignore the set-cookie // string entirely. $name = $cookie->getName(); if (!$name && $name !== '0') { return \false; } // Only allow cookies with set and valid domain, name, value $result = $cookie->validate(); if ($result !== \true) { if ($this->strictMode) { throw new \RuntimeException('Invalid cookie: ' . $result); } $this->removeCookieIfEmpty($cookie); return \false; } // Resolve conflicts with previously set cookies foreach ($this->cookies as $i => $c) { // Two cookies are identical, when their path, and domain are // identical. if ($c->getPath() != $cookie->getPath() || $c->getDomain() != $cookie->getDomain() || $c->getName() != $cookie->getName()) { continue; } // The previously set cookie is a discard cookie and this one is // not so allow the new cookie to be set if (!$cookie->getDiscard() && $c->getDiscard()) { unset($this->cookies[$i]); continue; } // If the new cookie's expiration is further into the future, then // replace the old cookie if ($cookie->getExpires() > $c->getExpires()) { unset($this->cookies[$i]); continue; } // If the value has changed, we better change it if ($cookie->getValue() !== $c->getValue()) { unset($this->cookies[$i]); continue; } // The cookie exists, so no need to continue return \false; } $this->cookies[] = $cookie; return \true; } public function count() : int { return \count($this->cookies); } /** * @return \ArrayIterator<int, SetCookie> */ public function getIterator() : \ArrayIterator { return new \ArrayIterator(\array_values($this->cookies)); } public function extractCookies(RequestInterface $request, ResponseInterface $response) : void { if ($cookieHeader = $response->getHeader('Set-Cookie')) { foreach ($cookieHeader as $cookie) { $sc = SetCookie::fromString($cookie); if (!$sc->getDomain()) { $sc->setDomain($request->getUri()->getHost()); } if (0 !== \strpos($sc->getPath(), '/')) { $sc->setPath($this->getCookiePathFromRequest($request)); } if (!$sc->matchesDomain($request->getUri()->getHost())) { continue; } // Note: At this point `$sc->getDomain()` being a public suffix should // be rejected, but we don't want to pull in the full PSL dependency. $this->setCookie($sc); } } } /** * Computes cookie path following RFC 6265 section 5.1.4 * * @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.4 */ private function getCookiePathFromRequest(RequestInterface $request) : string { $uriPath = $request->getUri()->getPath(); if ('' === $uriPath) { return '/'; } if (0 !== \strpos($uriPath, '/')) { return '/'; } if ('/' === $uriPath) { return '/'; } $lastSlashPos = \strrpos($uriPath, '/'); if (0 === $lastSlashPos || \false === $lastSlashPos) { return '/'; } return \substr($uriPath, 0, $lastSlashPos); } public function withCookieHeader(RequestInterface $request) : RequestInterface { $values = []; $uri = $request->getUri(); $scheme = $uri->getScheme(); $host = $uri->getHost(); $path = $uri->getPath() ?: '/'; foreach ($this->cookies as $cookie) { if ($cookie->matchesPath($path) && $cookie->matchesDomain($host) && !$cookie->isExpired() && (!$cookie->getSecure() || $scheme === 'https')) { $values[] = $cookie->getName() . '=' . $cookie->getValue(); } } return $values ? $request->withHeader('Cookie', \implode('; ', $values)) : $request; } /** * If a cookie already exists and the server asks to set it again with a * null value, the cookie must be deleted. */ private function removeCookieIfEmpty(SetCookie $cookie) : void { $cookieValue = $cookie->getValue(); if ($cookieValue === null || $cookieValue === '') { $this->clear($cookie->getDomain(), $cookie->getPath(), $cookie->getName()); } } } vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php 0000644 00000005503 15174671617 0021711 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Cookie; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Stores HTTP cookies. * * It extracts cookies from HTTP requests, and returns them in HTTP responses. * CookieJarInterface instances automatically expire contained cookies when * necessary. Subclasses are also responsible for storing and retrieving * cookies from a file, database, etc. * * @see https://docs.python.org/2/library/cookielib.html Inspiration * * @extends \IteratorAggregate<SetCookie> */ interface CookieJarInterface extends \Countable, \IteratorAggregate { /** * Create a request with added cookie headers. * * If no matching cookies are found in the cookie jar, then no Cookie * header is added to the request and the same request is returned. * * @param RequestInterface $request Request object to modify. * * @return RequestInterface returns the modified request. */ public function withCookieHeader(RequestInterface $request) : RequestInterface; /** * Extract cookies from an HTTP response and store them in the CookieJar. * * @param RequestInterface $request Request that was sent * @param ResponseInterface $response Response that was received */ public function extractCookies(RequestInterface $request, ResponseInterface $response) : void; /** * Sets a cookie in the cookie jar. * * @param SetCookie $cookie Cookie to set. * * @return bool Returns true on success or false on failure */ public function setCookie(SetCookie $cookie) : bool; /** * Remove cookies currently held in the cookie jar. * * Invoking this method without arguments will empty the whole cookie jar. * If given a $domain argument only cookies belonging to that domain will * be removed. If given a $domain and $path argument, cookies belonging to * the specified path within that domain are removed. If given all three * arguments, then the cookie with the specified name, path and domain is * removed. * * @param string|null $domain Clears cookies matching a domain * @param string|null $path Clears cookies matching a domain and path * @param string|null $name Clears cookies matching a domain, path, and name */ public function clear(?string $domain = null, ?string $path = null, ?string $name = null) : void; /** * Discard all sessions cookies. * * Removes cookies that don't have an expire field or a have a discard * field set to true. To be called when the user agent shuts down according * to RFC 2965. */ public function clearSessionCookies() : void; /** * Converts the cookie jar to an array. */ public function toArray() : array; } vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php 0000644 00000003743 15174671617 0021440 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Cookie; /** * Persists cookies in the client session */ class SessionCookieJar extends CookieJar { /** * @var string session key */ private $sessionKey; /** * @var bool Control whether to persist session cookies or not. */ private $storeSessionCookies; /** * Create a new SessionCookieJar object * * @param string $sessionKey Session key name to store the cookie * data in session * @param bool $storeSessionCookies Set to true to store session cookies * in the cookie jar. */ public function __construct(string $sessionKey, bool $storeSessionCookies = \false) { parent::__construct(); $this->sessionKey = $sessionKey; $this->storeSessionCookies = $storeSessionCookies; $this->load(); } /** * Saves cookies to session when shutting down */ public function __destruct() { $this->save(); } /** * Save cookies to the client session */ public function save() : void { $json = []; /** @var SetCookie $cookie */ foreach ($this as $cookie) { if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { $json[] = $cookie->toArray(); } } $_SESSION[$this->sessionKey] = \json_encode($json); } /** * Load the contents of the client session into the data array */ protected function load() : void { if (!isset($_SESSION[$this->sessionKey])) { return; } $data = \json_decode($_SESSION[$this->sessionKey], \true); if (\is_array($data)) { foreach ($data as $cookie) { $this->setCookie(new SetCookie($cookie)); } } elseif (\strlen($data)) { throw new \RuntimeException('Invalid cookie data'); } } } vendor_prefixed/guzzlehttp/guzzle/src/TransferStats.php 0000644 00000006202 15174671617 0017611 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Represents data at the point after it was transferred either successfully * or after a network error. */ final class TransferStats { /** * @var RequestInterface */ private $request; /** * @var ResponseInterface|null */ private $response; /** * @var float|null */ private $transferTime; /** * @var array */ private $handlerStats; /** * @var mixed|null */ private $handlerErrorData; /** * @param RequestInterface $request Request that was sent. * @param ResponseInterface|null $response Response received (if any) * @param float|null $transferTime Total handler transfer time. * @param mixed $handlerErrorData Handler error data. * @param array $handlerStats Handler specific stats. */ public function __construct(RequestInterface $request, ?ResponseInterface $response = null, ?float $transferTime = null, $handlerErrorData = null, array $handlerStats = []) { $this->request = $request; $this->response = $response; $this->transferTime = $transferTime; $this->handlerErrorData = $handlerErrorData; $this->handlerStats = $handlerStats; } public function getRequest() : RequestInterface { return $this->request; } /** * Returns the response that was received (if any). */ public function getResponse() : ?ResponseInterface { return $this->response; } /** * Returns true if a response was received. */ public function hasResponse() : bool { return $this->response !== null; } /** * Gets handler specific error data. * * This might be an exception, a integer representing an error code, or * anything else. Relying on this value assumes that you know what handler * you are using. * * @return mixed */ public function getHandlerErrorData() { return $this->handlerErrorData; } /** * Get the effective URI the request was sent to. */ public function getEffectiveUri() : UriInterface { return $this->request->getUri(); } /** * Get the estimated time the request was being transferred by the handler. * * @return float|null Time in seconds. */ public function getTransferTime() : ?float { return $this->transferTime; } /** * Gets an array of all of the handler specific transfer data. */ public function getHandlerStats() : array { return $this->handlerStats; } /** * Get a specific handler statistic from the handler by name. * * @param string $stat Handler specific transfer stat to retrieve. * * @return mixed|null */ public function getHandlerStat(string $stat) { return $this->handlerStats[$stat] ?? null; } } vendor_prefixed/guzzlehttp/guzzle/src/Pool.php 0000644 00000011315 15174671617 0015720 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\EachPromise; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromisorInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Sends an iterator of requests concurrently using a capped pool size. * * The pool will read from an iterator until it is cancelled or until the * iterator is consumed. When a request is yielded, the request is sent after * applying the "request_options" request options (if provided in the ctor). * * When a function is yielded by the iterator, the function is provided the * "request_options" array that should be merged on top of any existing * options, and the function MUST then return a wait-able promise. * * @final */ class Pool implements PromisorInterface { /** * @var EachPromise */ private $each; /** * @param ClientInterface $client Client used to send the requests. * @param array|\Iterator $requests Requests or functions that return * requests to send concurrently. * @param array $config Associative array of options * - concurrency: (int) Maximum number of requests to send concurrently * - options: Array of request options to apply to each request. * - fulfilled: (callable) Function to invoke when a request completes. * - rejected: (callable) Function to invoke when a request is rejected. */ public function __construct(ClientInterface $client, $requests, array $config = []) { if (!isset($config['concurrency'])) { $config['concurrency'] = 25; } if (isset($config['options'])) { $opts = $config['options']; unset($config['options']); } else { $opts = []; } $iterable = P\Create::iterFor($requests); $requests = static function () use($iterable, $client, $opts) { foreach ($iterable as $key => $rfn) { if ($rfn instanceof RequestInterface) { (yield $key => $client->sendAsync($rfn, $opts)); } elseif (\is_callable($rfn)) { (yield $key => $rfn($opts)); } else { throw new \InvalidArgumentException('Each value yielded by the iterator must be a Psr7\\Http\\Message\\RequestInterface or a callable that returns a promise that fulfills with a Psr7\\Message\\Http\\ResponseInterface object.'); } } }; $this->each = new EachPromise($requests(), $config); } /** * Get promise */ public function promise() : PromiseInterface { return $this->each->promise(); } /** * Sends multiple requests concurrently and returns an array of responses * and exceptions that uses the same ordering as the provided requests. * * IMPORTANT: This method keeps every request and response in memory, and * as such, is NOT recommended when sending a large number or an * indeterminate number of requests concurrently. * * @param ClientInterface $client Client used to send the requests * @param array|\Iterator $requests Requests to send concurrently. * @param array $options Passes through the options available in * {@see Pool::__construct} * * @return array Returns an array containing the response or an exception * in the same order that the requests were sent. * * @throws \InvalidArgumentException if the event format is incorrect. */ public static function batch(ClientInterface $client, $requests, array $options = []) : array { $res = []; self::cmpCallback($options, 'fulfilled', $res); self::cmpCallback($options, 'rejected', $res); $pool = new static($client, $requests, $options); $pool->promise()->wait(); \ksort($res); return $res; } /** * Execute callback(s) */ private static function cmpCallback(array &$options, string $name, array &$results) : void { if (!isset($options[$name])) { $options[$name] = static function ($v, $k) use(&$results) { $results[$k] = $v; }; } else { $currentFn = $options[$name]; $options[$name] = static function ($v, $k) use(&$results, $currentFn) { $currentFn($v, $k); $results[$k] = $v; }; } } } vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php 0000644 00000001147 15174671617 0022102 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; interface MessageFormatterInterface { /** * Returns a formatted message string. * * @param RequestInterface $request Request that was sent * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null) : string; } vendor_prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php 0000644 00000006116 15174671617 0021224 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Prepares requests that contain a body, adding the Content-Length, * Content-Type, and Expect headers. * * @final */ class PrepareBodyMiddleware { /** * @var callable(RequestInterface, array): PromiseInterface */ private $nextHandler; /** * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. */ public function __construct(callable $nextHandler) { $this->nextHandler = $nextHandler; } public function __invoke(RequestInterface $request, array $options) : PromiseInterface { $fn = $this->nextHandler; // Don't do anything if the request has no body. if ($request->getBody()->getSize() === 0) { return $fn($request, $options); } $modify = []; // Add a default content-type if possible. if (!$request->hasHeader('Content-Type')) { if ($uri = $request->getBody()->getMetadata('uri')) { if (\is_string($uri) && ($type = Psr7\MimeType::fromFilename($uri))) { $modify['set_headers']['Content-Type'] = $type; } } } // Add a default content-length or transfer-encoding header. if (!$request->hasHeader('Content-Length') && !$request->hasHeader('Transfer-Encoding')) { $size = $request->getBody()->getSize(); if ($size !== null) { $modify['set_headers']['Content-Length'] = $size; } else { $modify['set_headers']['Transfer-Encoding'] = 'chunked'; } } // Add the expect header if needed. $this->addExpectHeader($request, $options, $modify); return $fn(Psr7\Utils::modifyRequest($request, $modify), $options); } /** * Add expect header */ private function addExpectHeader(RequestInterface $request, array $options, array &$modify) : void { // Determine if the Expect header should be used if ($request->hasHeader('Expect')) { return; } $expect = $options['expect'] ?? null; // Return if disabled or using HTTP/1.0 if ($expect === \false || $request->getProtocolVersion() === '1.0') { return; } // The expect header is unconditionally enabled if ($expect === \true) { $modify['set_headers']['Expect'] = '100-Continue'; return; } // By default, send the expect header when the payload is > 1mb if ($expect === null) { $expect = 1048576; } // Always add if the body cannot be rewound, the size cannot be // determined, or the size is greater than the cutoff threshold $body = $request->getBody(); $size = $body->getSize(); if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { $modify['set_headers']['Expect'] = '100-Continue'; } } } vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php 0000644 00000006631 15174671617 0020117 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Middleware that retries requests based on the boolean result of * invoking the provided "decider" function. * * @final */ class RetryMiddleware { /** * @var callable(RequestInterface, array): PromiseInterface */ private $nextHandler; /** * @var callable */ private $decider; /** * @var callable(int) */ private $delay; /** * @param callable $decider Function that accepts the number of retries, * a request, [response], and [exception] and * returns true if the request is to be * retried. * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke. * @param (callable(int): int)|null $delay Function that accepts the number of retries * and returns the number of * milliseconds to delay. */ public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null) { $this->decider = $decider; $this->nextHandler = $nextHandler; $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; } /** * Default exponential backoff delay function. * * @return int milliseconds. */ public static function exponentialDelay(int $retries) : int { return (int) 2 ** ($retries - 1) * 1000; } public function __invoke(RequestInterface $request, array $options) : PromiseInterface { if (!isset($options['retries'])) { $options['retries'] = 0; } $fn = $this->nextHandler; return $fn($request, $options)->then($this->onFulfilled($request, $options), $this->onRejected($request, $options)); } /** * Execute fulfilled closure */ private function onFulfilled(RequestInterface $request, array $options) : callable { return function ($value) use($request, $options) { if (!($this->decider)($options['retries'], $request, $value, null)) { return $value; } return $this->doRetry($request, $options, $value); }; } /** * Execute rejected closure */ private function onRejected(RequestInterface $req, array $options) : callable { return function ($reason) use($req, $options) { if (!($this->decider)($options['retries'], $req, null, $reason)) { return P\Create::rejectionFor($reason); } return $this->doRetry($req, $options); }; } private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null) : PromiseInterface { $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); return $this($request, $options); } } vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizerInterface.php 0000644 00000000415 15174671617 0021603 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\Psr\Http\Message\MessageInterface; interface BodySummarizerInterface { /** * Returns a summarized message body. */ public function summarize(MessageInterface $message) : ?string; } vendor_prefixed/guzzlehttp/guzzle/src/Handler/Proxy.php 0000644 00000004122 15174671617 0017503 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\GuzzleHttp\RequestOptions; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Provides basic proxies for handlers. * * @final */ class Proxy { /** * Sends synchronous requests to a specific handler while sending all other * requests to another handler. * * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses * @param callable(RequestInterface, array): PromiseInterface $sync Handler used for synchronous responses. * * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. */ public static function wrapSync(callable $default, callable $sync) : callable { return static function (RequestInterface $request, array $options) use($default, $sync) : PromiseInterface { return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($request, $options); }; } /** * Sends streaming requests to a streaming compatible handler while sending * all other requests to a default handler. * * This, for example, could be useful for taking advantage of the * performance benefits of curl while still supporting true streaming * through the StreamHandler. * * @param callable(RequestInterface, array): PromiseInterface $default Handler used for non-streaming responses * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses * * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. */ public static function wrapStreaming(callable $default, callable $streaming) : callable { return static function (RequestInterface $request, array $options) use($default, $streaming) : PromiseInterface { return empty($options['stream']) ? $default($request, $options) : $streaming($request, $options); }; } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/EasyHandle.php 0000644 00000005556 15174671617 0020413 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Response; use WPMailSMTP\Vendor\GuzzleHttp\Utils; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Represents a cURL easy handle and the data it populates. * * @internal */ final class EasyHandle { /** * @var resource|\CurlHandle cURL resource */ public $handle; /** * @var StreamInterface Where data is being written */ public $sink; /** * @var array Received HTTP headers so far */ public $headers = []; /** * @var ResponseInterface|null Received response (if any) */ public $response; /** * @var RequestInterface Request being sent */ public $request; /** * @var array Request options */ public $options = []; /** * @var int cURL error number (if any) */ public $errno = 0; /** * @var \Throwable|null Exception during on_headers (if any) */ public $onHeadersException; /** * @var \Exception|null Exception during createResponse (if any) */ public $createResponseException; /** * Attach a response to the easy handle based on the received headers. * * @throws \RuntimeException if no headers have been received or the first * header line is invalid. */ public function createResponse() : void { [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($this->headers); $normalizedKeys = Utils::normalizeHeaderKeys($headers); if (!empty($this->options['decode_content']) && isset($normalizedKeys['content-encoding'])) { $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; unset($headers[$normalizedKeys['content-encoding']]); if (isset($normalizedKeys['content-length'])) { $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; $bodyLength = (int) $this->sink->getSize(); if ($bodyLength) { $headers[$normalizedKeys['content-length']] = $bodyLength; } else { unset($headers[$normalizedKeys['content-length']]); } } } // Attach a response to the easy handle with the parsed headers. $this->response = new Response($status, $headers, $this->sink, $ver, $reason); } /** * @param string $name * * @return void * * @throws \BadMethodCallException */ public function __get($name) { $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name; throw new \BadMethodCallException($msg); } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php 0000644 00000002077 15174671617 0021461 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Utils; /** * @internal */ final class HeaderProcessor { /** * Returns the HTTP version, status code, reason phrase, and headers. * * @param string[] $headers * * @return array{0:string, 1:int, 2:?string, 3:array} * * @throws \RuntimeException */ public static function parseHeaders(array $headers) : array { if ($headers === []) { throw new \RuntimeException('Expected a non-empty array of header data'); } $parts = \explode(' ', \array_shift($headers), 3); $version = \explode('/', $parts[0])[1] ?? null; if ($version === null) { throw new \RuntimeException('HTTP version missing from header data'); } $status = $parts[1] ?? null; if ($status === null) { throw new \RuntimeException('HTTP status code missing from header data'); } return [$version, (int) $status, $parts[2] ?? null, Utils::headersFromLines($headers)]; } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php 0000644 00000020753 15174671617 0021610 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use Closure; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\Promise; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\GuzzleHttp\Utils; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Returns an asynchronous response using curl_multi_* functions. * * When using the CurlMultiHandler, custom curl options can be specified as an * associative array of curl option constants mapping to values in the * **curl** key of the provided request options. * * @final */ class CurlMultiHandler { /** * @var CurlFactoryInterface */ private $factory; /** * @var int */ private $selectTimeout; /** * @var int Will be higher than 0 when `curl_multi_exec` is still running. */ private $active = 0; /** * @var array Request entry handles, indexed by handle id in `addRequest`. * * @see CurlMultiHandler::addRequest */ private $handles = []; /** * @var array<int, float> An array of delay times, indexed by handle id in `addRequest`. * * @see CurlMultiHandler::addRequest */ private $delays = []; /** * @var array<mixed> An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt() */ private $options = []; /** @var resource|\CurlMultiHandle */ private $_mh; /** * This handler accepts the following options: * * - handle_factory: An optional factory used to create curl handles * - select_timeout: Optional timeout (in seconds) to block before timing * out while selecting curl handles. Defaults to 1 second. * - options: An associative array of CURLMOPT_* options and * corresponding values for curl_multi_setopt() */ public function __construct(array $options = []) { $this->factory = $options['handle_factory'] ?? new CurlFactory(50); if (isset($options['select_timeout'])) { $this->selectTimeout = $options['select_timeout']; } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) { @\trigger_error('Since guzzlehttp/guzzle 7.2.0: Using environment variable GUZZLE_CURL_SELECT_TIMEOUT is deprecated. Use option "select_timeout" instead.', \E_USER_DEPRECATED); $this->selectTimeout = (int) $selectTimeout; } else { $this->selectTimeout = 1; } $this->options = $options['options'] ?? []; // unsetting the property forces the first access to go through // __get(). unset($this->_mh); } /** * @param string $name * * @return resource|\CurlMultiHandle * * @throws \BadMethodCallException when another field as `_mh` will be gotten * @throws \RuntimeException when curl can not initialize a multi handle */ public function __get($name) { if ($name !== '_mh') { throw new \BadMethodCallException("Can not get other property as '_mh'."); } $multiHandle = \curl_multi_init(); if (\false === $multiHandle) { throw new \RuntimeException('Can not initialize curl multi handle.'); } $this->_mh = $multiHandle; foreach ($this->options as $option => $value) { // A warning is raised in case of a wrong option. \curl_multi_setopt($this->_mh, $option, $value); } return $this->_mh; } public function __destruct() { if (isset($this->_mh)) { \curl_multi_close($this->_mh); unset($this->_mh); } } public function __invoke(RequestInterface $request, array $options) : PromiseInterface { $easy = $this->factory->create($request, $options); $id = (int) $easy->handle; $promise = new Promise([$this, 'execute'], function () use($id) { return $this->cancel($id); }); $this->addRequest(['easy' => $easy, 'deferred' => $promise]); return $promise; } /** * Ticks the curl event loop. */ public function tick() : void { // Add any delayed handles if needed. if ($this->delays) { $currentTime = Utils::currentTime(); foreach ($this->delays as $id => $delay) { if ($currentTime >= $delay) { unset($this->delays[$id]); \curl_multi_add_handle($this->_mh, $this->handles[$id]['easy']->handle); } } } // Run curl_multi_exec in the queue to enable other async tasks to run P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); // Step through the task queue which may add additional requests. P\Utils::queue()->run(); if ($this->active && \curl_multi_select($this->_mh, $this->selectTimeout) === -1) { // Perform a usleep if a select returns -1. // See: https://bugs.php.net/bug.php?id=61141 \usleep(250); } while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { // Prevent busy looping for slow HTTP requests. \curl_multi_select($this->_mh, $this->selectTimeout); } $this->processMessages(); } /** * Runs \curl_multi_exec() inside the event loop, to prevent busy looping */ private function tickInQueue() : void { if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { \curl_multi_select($this->_mh, 0); P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); } } /** * Runs until all outstanding connections have completed. */ public function execute() : void { $queue = P\Utils::queue(); while ($this->handles || !$queue->isEmpty()) { // If there are no transfers, then sleep for the next delay if (!$this->active && $this->delays) { \usleep($this->timeToNext()); } $this->tick(); } } private function addRequest(array $entry) : void { $easy = $entry['easy']; $id = (int) $easy->handle; $this->handles[$id] = $entry; if (empty($easy->options['delay'])) { \curl_multi_add_handle($this->_mh, $easy->handle); } else { $this->delays[$id] = Utils::currentTime() + $easy->options['delay'] / 1000; } } /** * Cancels a handle from sending and removes references to it. * * @param int $id Handle ID to cancel and remove. * * @return bool True on success, false on failure. */ private function cancel($id) : bool { if (!\is_int($id)) { trigger_deprecation('guzzlehttp/guzzle', '7.4', 'Not passing an integer to %s::%s() is deprecated and will cause an error in 8.0.', __CLASS__, __FUNCTION__); } // Cannot cancel if it has been processed. if (!isset($this->handles[$id])) { return \false; } $handle = $this->handles[$id]['easy']->handle; unset($this->delays[$id], $this->handles[$id]); \curl_multi_remove_handle($this->_mh, $handle); if (\PHP_VERSION_ID < 80000) { \curl_close($handle); } return \true; } private function processMessages() : void { while ($done = \curl_multi_info_read($this->_mh)) { if ($done['msg'] !== \CURLMSG_DONE) { // if it's not done, then it would be premature to remove the handle. ref https://github.com/guzzle/guzzle/pull/2892#issuecomment-945150216 continue; } $id = (int) $done['handle']; \curl_multi_remove_handle($this->_mh, $done['handle']); if (!isset($this->handles[$id])) { // Probably was cancelled. continue; } $entry = $this->handles[$id]; unset($this->handles[$id], $this->delays[$id]); $entry['easy']->errno = $done['result']; $entry['deferred']->resolve(CurlFactory::finish($this, $entry['easy'], $this->factory)); } } private function timeToNext() : int { $currentTime = Utils::currentTime(); $nextTime = \PHP_INT_MAX; foreach ($this->delays as $time) { if ($time < $nextTime) { $nextTime = $time; } } return (int) \max(0, $nextTime - $currentTime) * 1000000; } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php 0000644 00000065206 15174671617 0020631 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Exception\ConnectException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\FulfilledPromise; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\LazyOpenStream; use WPMailSMTP\Vendor\GuzzleHttp\TransferStats; use WPMailSMTP\Vendor\GuzzleHttp\Utils; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Creates curl resources from a request * * @final */ class CurlFactory implements CurlFactoryInterface { public const CURL_VERSION_STR = 'curl_version'; /** * @deprecated */ public const LOW_CURL_VERSION_NUMBER = '7.21.2'; /** * @var resource[]|\CurlHandle[] */ private $handles = []; /** * @var int Total number of idle handles to keep in cache */ private $maxHandles; /** * @param int $maxHandles Maximum number of idle handles. */ public function __construct(int $maxHandles) { $this->maxHandles = $maxHandles; } public function create(RequestInterface $request, array $options) : EasyHandle { $protocolVersion = $request->getProtocolVersion(); if ('2' === $protocolVersion || '2.0' === $protocolVersion) { if (!self::supportsHttp2()) { throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request); } } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { throw new ConnectException(\sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request); } if (isset($options['curl']['body_as_string'])) { $options['_body_as_string'] = $options['curl']['body_as_string']; unset($options['curl']['body_as_string']); } $easy = new EasyHandle(); $easy->request = $request; $easy->options = $options; $conf = $this->getDefaultConf($easy); $this->applyMethod($easy, $conf); $this->applyHandlerOptions($easy, $conf); $this->applyHeaders($easy, $conf); unset($conf['_headers']); // Add handler options from the request configuration options if (isset($options['curl'])) { $conf = \array_replace($conf, $options['curl']); } $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); $easy->handle = $this->handles ? \array_pop($this->handles) : \curl_init(); \curl_setopt_array($easy->handle, $conf); return $easy; } private static function supportsHttp2() : bool { static $supportsHttp2 = null; if (null === $supportsHttp2) { $supportsHttp2 = self::supportsTls12() && \defined('CURL_VERSION_HTTP2') && \CURL_VERSION_HTTP2 & \curl_version()['features']; } return $supportsHttp2; } private static function supportsTls12() : bool { static $supportsTls12 = null; if (null === $supportsTls12) { $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features']; } return $supportsTls12; } private static function supportsTls13() : bool { static $supportsTls13 = null; if (null === $supportsTls13) { $supportsTls13 = \defined('CURL_SSLVERSION_TLSv1_3') && \CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']; } return $supportsTls13; } public function release(EasyHandle $easy) : void { $resource = $easy->handle; unset($easy->handle); if (\count($this->handles) >= $this->maxHandles) { if (\PHP_VERSION_ID < 80000) { \curl_close($resource); } } else { // Remove all callback functions as they can hold onto references // and are not cleaned up by curl_reset. Using curl_setopt_array // does not work for some reason, so removing each one // individually. \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null); \curl_setopt($resource, \CURLOPT_READFUNCTION, null); \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null); \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null); \curl_reset($resource); $this->handles[] = $resource; } } /** * Completes a cURL transaction, either returning a response promise or a * rejected promise. * * @param callable(RequestInterface, array): PromiseInterface $handler * @param CurlFactoryInterface $factory Dictates how the handle is released */ public static function finish(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory) : PromiseInterface { if (isset($easy->options['on_stats'])) { self::invokeStats($easy); } if (!$easy->response || $easy->errno) { return self::finishError($handler, $easy, $factory); } // Return the response if it is present and there is no error. $factory->release($easy); // Rewind the body of the response if possible. $body = $easy->response->getBody(); if ($body->isSeekable()) { $body->rewind(); } return new FulfilledPromise($easy->response); } private static function invokeStats(EasyHandle $easy) : void { $curlStats = \curl_getinfo($easy->handle); $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME); $stats = new TransferStats($easy->request, $easy->response, $curlStats['total_time'], $easy->errno, $curlStats); $easy->options['on_stats']($stats); } /** * @param callable(RequestInterface, array): PromiseInterface $handler */ private static function finishError(callable $handler, EasyHandle $easy, CurlFactoryInterface $factory) : PromiseInterface { // Get error information and release the handle to the factory. $ctx = ['errno' => $easy->errno, 'error' => \curl_error($easy->handle), 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME)] + \curl_getinfo($easy->handle); $ctx[self::CURL_VERSION_STR] = self::getCurlVersion(); $factory->release($easy); // Retry when nothing is present or when curl failed to rewind. if (empty($easy->options['_err_message']) && (!$easy->errno || $easy->errno == 65)) { return self::retryFailedRewind($handler, $easy, $ctx); } return self::createRejection($easy, $ctx); } private static function getCurlVersion() : string { static $curlVersion = null; if (null === $curlVersion) { $curlVersion = \curl_version()['version']; } return $curlVersion; } private static function createRejection(EasyHandle $easy, array $ctx) : PromiseInterface { static $connectionErrors = [\CURLE_OPERATION_TIMEOUTED => \true, \CURLE_COULDNT_RESOLVE_HOST => \true, \CURLE_COULDNT_CONNECT => \true, \CURLE_SSL_CONNECT_ERROR => \true, \CURLE_GOT_NOTHING => \true]; if ($easy->createResponseException) { return P\Create::rejectionFor(new RequestException('An error was encountered while creating the response', $easy->request, $easy->response, $easy->createResponseException, $ctx)); } // If an exception was encountered during the onHeaders event, then // return a rejected promise that wraps that exception. if ($easy->onHeadersException) { return P\Create::rejectionFor(new RequestException('An error was encountered during the on_headers event', $easy->request, $easy->response, $easy->onHeadersException, $ctx)); } $uri = $easy->request->getUri(); $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri); $message = \sprintf('cURL error %s: %s (%s)', $ctx['errno'], $sanitizedError, 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'); if ('' !== $sanitizedError) { $redactedUriString = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString(); if ($redactedUriString !== '' && \false === \strpos($sanitizedError, $redactedUriString)) { $message .= \sprintf(' for %s', $redactedUriString); } } // Create a connection exception if it was a specific error code. $error = isset($connectionErrors[$easy->errno]) ? new ConnectException($message, $easy->request, null, $ctx) : new RequestException($message, $easy->request, $easy->response, null, $ctx); return P\Create::rejectionFor($error); } private static function sanitizeCurlError(string $error, UriInterface $uri) : string { if ('' === $error) { return $error; } $baseUri = $uri->withQuery('')->withFragment(''); $baseUriString = $baseUri->__toString(); if ('' === $baseUriString) { return $error; } $redactedUriString = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString(); return \str_replace($baseUriString, $redactedUriString, $error); } /** * @return array<int|string, mixed> */ private function getDefaultConf(EasyHandle $easy) : array { $conf = ['_headers' => $easy->request->getHeaders(), \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), \CURLOPT_RETURNTRANSFER => \false, \CURLOPT_HEADER => \false, \CURLOPT_CONNECTTIMEOUT => 300]; if (\defined('CURLOPT_PROTOCOLS')) { $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS; } $version = $easy->request->getProtocolVersion(); if ('2' === $version || '2.0' === $version) { $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; } elseif ('1.1' === $version) { $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; } else { $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; } return $conf; } private function applyMethod(EasyHandle $easy, array &$conf) : void { $body = $easy->request->getBody(); $size = $body->getSize(); if ($size === null || $size > 0) { $this->applyBody($easy->request, $easy->options, $conf); return; } $method = $easy->request->getMethod(); if ($method === 'PUT' || $method === 'POST') { // See https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2 if (!$easy->request->hasHeader('Content-Length')) { $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; } } elseif ($method === 'HEAD') { $conf[\CURLOPT_NOBODY] = \true; unset($conf[\CURLOPT_WRITEFUNCTION], $conf[\CURLOPT_READFUNCTION], $conf[\CURLOPT_FILE], $conf[\CURLOPT_INFILE]); } } private function applyBody(RequestInterface $request, array $options, array &$conf) : void { $size = $request->hasHeader('Content-Length') ? (int) $request->getHeaderLine('Content-Length') : null; // Send the body as a string if the size is less than 1MB OR if the // [curl][body_as_string] request value is set. if ($size !== null && $size < 1000000 || !empty($options['_body_as_string'])) { $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody(); // Don't duplicate the Content-Length header $this->removeHeader('Content-Length', $conf); $this->removeHeader('Transfer-Encoding', $conf); } else { $conf[\CURLOPT_UPLOAD] = \true; if ($size !== null) { $conf[\CURLOPT_INFILESIZE] = $size; $this->removeHeader('Content-Length', $conf); } $body = $request->getBody(); if ($body->isSeekable()) { $body->rewind(); } $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use($body) { return $body->read($length); }; } // If the Expect header is not present, prevent curl from adding it if (!$request->hasHeader('Expect')) { $conf[\CURLOPT_HTTPHEADER][] = 'Expect:'; } // cURL sometimes adds a content-type by default. Prevent this. if (!$request->hasHeader('Content-Type')) { $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:'; } } private function applyHeaders(EasyHandle $easy, array &$conf) : void { foreach ($conf['_headers'] as $name => $values) { foreach ($values as $value) { $value = (string) $value; if ($value === '') { // cURL requires a special format for empty headers. // See https://github.com/guzzle/guzzle/issues/1882 for more details. $conf[\CURLOPT_HTTPHEADER][] = "{$name};"; } else { $conf[\CURLOPT_HTTPHEADER][] = "{$name}: {$value}"; } } } // Remove the Accept header if one was not set if (!$easy->request->hasHeader('Accept')) { $conf[\CURLOPT_HTTPHEADER][] = 'Accept:'; } } /** * Remove a header from the options array. * * @param string $name Case-insensitive header to remove * @param array $options Array of options to modify */ private function removeHeader(string $name, array &$options) : void { foreach (\array_keys($options['_headers']) as $key) { if (!\strcasecmp($key, $name)) { unset($options['_headers'][$key]); return; } } } private function applyHandlerOptions(EasyHandle $easy, array &$conf) : void { $options = $easy->options; if (isset($options['verify'])) { if ($options['verify'] === \false) { unset($conf[\CURLOPT_CAINFO]); $conf[\CURLOPT_SSL_VERIFYHOST] = 0; $conf[\CURLOPT_SSL_VERIFYPEER] = \false; } else { $conf[\CURLOPT_SSL_VERIFYHOST] = 2; $conf[\CURLOPT_SSL_VERIFYPEER] = \true; if (\is_string($options['verify'])) { // Throw an error if the file/folder/link path is not valid or doesn't exist. if (!\file_exists($options['verify'])) { throw new \InvalidArgumentException("SSL CA bundle not found: {$options['verify']}"); } // If it's a directory or a link to a directory use CURLOPT_CAPATH. // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. if (\is_dir($options['verify']) || \is_link($options['verify']) === \true && ($verifyLink = \readlink($options['verify'])) !== \false && \is_dir($verifyLink)) { $conf[\CURLOPT_CAPATH] = $options['verify']; } else { $conf[\CURLOPT_CAINFO] = $options['verify']; } } } } if (!isset($options['curl'][\CURLOPT_ENCODING]) && !empty($options['decode_content'])) { $accept = $easy->request->getHeaderLine('Accept-Encoding'); if ($accept) { $conf[\CURLOPT_ENCODING] = $accept; } else { // The empty string enables all available decoders and implicitly // sets a matching 'Accept-Encoding' header. $conf[\CURLOPT_ENCODING] = ''; // But as the user did not specify any encoding preference, // let's leave it up to server by preventing curl from sending // the header, which will be interpreted as 'Accept-Encoding: *'. // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; } } if (!isset($options['sink'])) { // Use a default temp stream if no sink was set. $options['sink'] = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils::tryFopen('php://temp', 'w+'); } $sink = $options['sink']; if (!\is_string($sink)) { $sink = \WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils::streamFor($sink); } elseif (!\is_dir(\dirname($sink))) { // Ensure that the directory exists before failing in curl. throw new \RuntimeException(\sprintf('Directory %s does not exist for sink value of %s', \dirname($sink), $sink)); } else { $sink = new LazyOpenStream($sink, 'w+'); } $easy->sink = $sink; $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use($sink) : int { return $sink->write($write); }; $timeoutRequiresNoSignal = \false; if (isset($options['timeout'])) { $timeoutRequiresNoSignal |= $options['timeout'] < 1; $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; } // CURL default value is CURL_IPRESOLVE_WHATEVER if (isset($options['force_ip_resolve'])) { if ('v4' === $options['force_ip_resolve']) { $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4; } elseif ('v6' === $options['force_ip_resolve']) { $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6; } } if (isset($options['connect_timeout'])) { $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; } if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') { $conf[\CURLOPT_NOSIGNAL] = \true; } if (isset($options['proxy'])) { if (!\is_array($options['proxy'])) { $conf[\CURLOPT_PROXY] = $options['proxy']; } else { $scheme = $easy->request->getUri()->getScheme(); if (isset($options['proxy'][$scheme])) { $host = $easy->request->getUri()->getHost(); if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) { unset($conf[\CURLOPT_PROXY]); } else { $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme]; } } } } if (isset($options['crypto_method'])) { $protocolVersion = $easy->request->getProtocolVersion(); // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; } elseif (\defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { if (!self::supportsTls13()) { throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); } $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; } else { throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); } } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { if (!self::supportsTls12()) { throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); } $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; } elseif (\defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { if (!self::supportsTls13()) { throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); } $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; } else { throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); } } if (isset($options['cert'])) { $cert = $options['cert']; if (\is_array($cert)) { $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1]; $cert = $cert[0]; } if (!\file_exists($cert)) { throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); } // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html $ext = \pathinfo($cert, \PATHINFO_EXTENSION); if (\preg_match('#^(der|p12)$#i', $ext)) { $conf[\CURLOPT_SSLCERTTYPE] = \strtoupper($ext); } $conf[\CURLOPT_SSLCERT] = $cert; } if (isset($options['ssl_key'])) { if (\is_array($options['ssl_key'])) { if (\count($options['ssl_key']) === 2) { [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key']; } else { [$sslKey] = $options['ssl_key']; } } $sslKey = $sslKey ?? $options['ssl_key']; if (!\file_exists($sslKey)) { throw new \InvalidArgumentException("SSL private key not found: {$sslKey}"); } $conf[\CURLOPT_SSLKEY] = $sslKey; } if (isset($options['progress'])) { $progress = $options['progress']; if (!\is_callable($progress)) { throw new \InvalidArgumentException('progress client option must be callable'); } $conf[\CURLOPT_NOPROGRESS] = \false; $conf[\CURLOPT_PROGRESSFUNCTION] = static function ($resource, int $downloadSize, int $downloaded, int $uploadSize, int $uploaded) use($progress) { $progress($downloadSize, $downloaded, $uploadSize, $uploaded); }; } if (!empty($options['debug'])) { $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']); $conf[\CURLOPT_VERBOSE] = \true; } } /** * This function ensures that a response was set on a transaction. If one * was not set, then the request is retried if possible. This error * typically means you are sending a payload, curl encountered a * "Connection died, retrying a fresh connect" error, tried to rewind the * stream, and then encountered a "necessary data rewind wasn't possible" * error, causing the request to be sent through curl_multi_info_read() * without an error status. * * @param callable(RequestInterface, array): PromiseInterface $handler */ private static function retryFailedRewind(callable $handler, EasyHandle $easy, array $ctx) : PromiseInterface { try { // Only rewind if the body has been read from. $body = $easy->request->getBody(); if ($body->tell() > 0) { $body->rewind(); } } catch (\RuntimeException $e) { $ctx['error'] = 'The connection unexpectedly failed without ' . 'providing an error. The request would have been retried, ' . 'but attempting to rewind the request body failed. ' . 'Exception: ' . $e; return self::createRejection($easy, $ctx); } // Retry no more than 3 times before giving up. if (!isset($easy->options['_curl_retries'])) { $easy->options['_curl_retries'] = 1; } elseif ($easy->options['_curl_retries'] == 2) { $ctx['error'] = 'The cURL request was retried 3 times ' . 'and did not succeed. The most likely reason for the failure ' . 'is that cURL was unable to rewind the body of the request ' . 'and subsequent retries resulted in the same error. Turn on ' . 'the debug option to see what went wrong. See ' . 'https://bugs.php.net/bug.php?id=47204 for more information.'; return self::createRejection($easy, $ctx); } else { ++$easy->options['_curl_retries']; } return $handler($easy->request, $easy->options); } private function createHeaderFn(EasyHandle $easy) : callable { if (isset($easy->options['on_headers'])) { $onHeaders = $easy->options['on_headers']; if (!\is_callable($onHeaders)) { throw new \InvalidArgumentException('on_headers must be callable'); } } else { $onHeaders = null; } return static function ($ch, $h) use($onHeaders, $easy, &$startingResponse) { $value = \trim($h); if ($value === '') { $startingResponse = \true; try { $easy->createResponse(); } catch (\Exception $e) { $easy->createResponseException = $e; return -1; } if ($onHeaders !== null) { try { $onHeaders($easy->response); } catch (\Exception $e) { // Associate the exception with the handle and trigger // a curl header write error by returning 0. $easy->onHeadersException = $e; return -1; } } } elseif ($startingResponse) { $startingResponse = \false; $easy->headers = [$value]; } else { $easy->headers[] = $value; } return \strlen($h); }; } public function __destruct() { foreach ($this->handles as $id => $handle) { if (\PHP_VERSION_ID < 80000) { \curl_close($handle); } unset($this->handles[$id]); } } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlHandler.php 0000644 00000002530 15174671617 0020566 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * HTTP handler that uses cURL easy handles as a transport layer. * * When using the CurlHandler, custom curl options can be specified as an * associative array of curl option constants mapping to values in the * **curl** key of the "client" key of the request. * * @final */ class CurlHandler { /** * @var CurlFactoryInterface */ private $factory; /** * Accepts an associative array of options: * * - handle_factory: Optional curl factory used to create cURL handles. * * @param array{handle_factory?: ?CurlFactoryInterface} $options Array of options to use with the handler */ public function __construct(array $options = []) { $this->factory = $options['handle_factory'] ?? new CurlFactory(3); } public function __invoke(RequestInterface $request, array $options) : PromiseInterface { if (isset($options['delay'])) { \usleep($options['delay'] * 1000); } $easy = $this->factory->create($request, $options); \curl_exec($easy->handle); $easy->errno = \curl_errno($easy->handle); return CurlFactory::finish($this, $easy, $this->factory); } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php 0000644 00000001265 15174671617 0022445 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; interface CurlFactoryInterface { /** * Creates a cURL handle resource. * * @param RequestInterface $request Request * @param array $options Transfer options * * @throws \RuntimeException when an option cannot be applied */ public function create(RequestInterface $request, array $options) : EasyHandle; /** * Release an easy handle, allowing it to be reused or closed. * * This function must call unset on the easy handle's "handle" property. */ public function release(EasyHandle $easy) : void; } vendor_prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php 0000644 00000051161 15174671617 0021120 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Exception\ConnectException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\FulfilledPromise; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\GuzzleHttp\TransferStats; use WPMailSMTP\Vendor\GuzzleHttp\Utils; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * HTTP handler that uses PHP's HTTP stream wrapper. * * @final */ class StreamHandler { /** * @var array */ private $lastHeaders = []; /** * Sends an HTTP request. * * @param RequestInterface $request Request to send. * @param array $options Request transfer options. */ public function __invoke(RequestInterface $request, array $options) : PromiseInterface { // Sleep if there is a delay specified. if (isset($options['delay'])) { \usleep($options['delay'] * 1000); } $protocolVersion = $request->getProtocolVersion(); if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { throw new ConnectException(\sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request); } $startTime = isset($options['on_stats']) ? Utils::currentTime() : null; try { // Does not support the expect header. $request = $request->withoutHeader('Expect'); // Append a content-length header if body size is zero to match // the behavior of `CurlHandler` if ((0 === \strcasecmp('PUT', $request->getMethod()) || 0 === \strcasecmp('POST', $request->getMethod())) && 0 === $request->getBody()->getSize()) { $request = $request->withHeader('Content-Length', '0'); } return $this->createResponse($request, $options, $this->createStream($request, $options), $startTime); } catch (\InvalidArgumentException $e) { throw $e; } catch (\Exception $e) { // Determine if the error was a networking error. $message = $e->getMessage(); // This list can probably get more comprehensive. if (\false !== \strpos($message, 'getaddrinfo') || \false !== \strpos($message, 'Connection refused') || \false !== \strpos($message, "couldn't connect to host") || \false !== \strpos($message, 'connection attempt failed')) { $e = new ConnectException($e->getMessage(), $request, $e); } else { $e = RequestException::wrapException($request, $e); } $this->invokeStats($options, $request, $startTime, null, $e); return P\Create::rejectionFor($e); } } private function invokeStats(array $options, RequestInterface $request, ?float $startTime, ?ResponseInterface $response = null, ?\Throwable $error = null) : void { if (isset($options['on_stats'])) { $stats = new TransferStats($request, $response, Utils::currentTime() - $startTime, $error, []); $options['on_stats']($stats); } } /** * @param resource $stream */ private function createResponse(RequestInterface $request, array $options, $stream, ?float $startTime) : PromiseInterface { $hdrs = $this->lastHeaders; $this->lastHeaders = []; try { [$ver, $status, $reason, $headers] = HeaderProcessor::parseHeaders($hdrs); } catch (\Exception $e) { return P\Create::rejectionFor(new RequestException('An error was encountered while creating the response', $request, null, $e)); } [$stream, $headers] = $this->checkDecode($options, $headers, $stream); $stream = Psr7\Utils::streamFor($stream); $sink = $stream; if (\strcasecmp('HEAD', $request->getMethod())) { $sink = $this->createSink($stream, $options); } try { $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); } catch (\Exception $e) { return P\Create::rejectionFor(new RequestException('An error was encountered while creating the response', $request, null, $e)); } if (isset($options['on_headers'])) { try { $options['on_headers']($response); } catch (\Exception $e) { return P\Create::rejectionFor(new RequestException('An error was encountered during the on_headers event', $request, $response, $e)); } } // Do not drain when the request is a HEAD request because they have // no body. if ($sink !== $stream) { $this->drain($stream, $sink, $response->getHeaderLine('Content-Length')); } $this->invokeStats($options, $request, $startTime, $response, null); return new FulfilledPromise($response); } private function createSink(StreamInterface $stream, array $options) : StreamInterface { if (!empty($options['stream'])) { return $stream; } $sink = $options['sink'] ?? Psr7\Utils::tryFopen('php://temp', 'r+'); return \is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\Utils::streamFor($sink); } /** * @param resource $stream */ private function checkDecode(array $options, array $headers, $stream) : array { // Automatically decode responses when instructed. if (!empty($options['decode_content'])) { $normalizedKeys = Utils::normalizeHeaderKeys($headers); if (isset($normalizedKeys['content-encoding'])) { $encoding = $headers[$normalizedKeys['content-encoding']]; if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { $stream = new Psr7\InflateStream(Psr7\Utils::streamFor($stream)); $headers['x-encoded-content-encoding'] = $headers[$normalizedKeys['content-encoding']]; // Remove content-encoding header unset($headers[$normalizedKeys['content-encoding']]); // Fix content-length header if (isset($normalizedKeys['content-length'])) { $headers['x-encoded-content-length'] = $headers[$normalizedKeys['content-length']]; $length = (int) $stream->getSize(); if ($length === 0) { unset($headers[$normalizedKeys['content-length']]); } else { $headers[$normalizedKeys['content-length']] = [$length]; } } } } } return [$stream, $headers]; } /** * Drains the source stream into the "sink" client option. * * @param string $contentLength Header specifying the amount of * data to read. * * @throws \RuntimeException when the sink option is invalid. */ private function drain(StreamInterface $source, StreamInterface $sink, string $contentLength) : StreamInterface { // If a content-length header is provided, then stop reading once // that number of bytes has been read. This can prevent infinitely // reading from a stream when dealing with servers that do not honor // Connection: Close headers. Psr7\Utils::copyToStream($source, $sink, \strlen($contentLength) > 0 && (int) $contentLength > 0 ? (int) $contentLength : -1); $sink->seek(0); $source->close(); return $sink; } /** * Create a resource and check to ensure it was created successfully * * @param callable $callback Callable that returns stream resource * * @return resource * * @throws \RuntimeException on error */ private function createResource(callable $callback) { $errors = []; \set_error_handler(static function ($_, $msg, $file, $line) use(&$errors) : bool { $errors[] = ['message' => $msg, 'file' => $file, 'line' => $line]; return \true; }); try { $resource = $callback(); } finally { \restore_error_handler(); } if (!$resource) { $message = 'Error creating resource: '; foreach ($errors as $err) { foreach ($err as $key => $value) { $message .= "[{$key}] {$value}" . \PHP_EOL; } } throw new \RuntimeException(\trim($message)); } return $resource; } /** * @return resource */ private function createStream(RequestInterface $request, array $options) { static $methods; if (!$methods) { $methods = \array_flip(\get_class_methods(__CLASS__)); } if (!\in_array($request->getUri()->getScheme(), ['http', 'https'])) { throw new RequestException(\sprintf("The scheme '%s' is not supported.", $request->getUri()->getScheme()), $request); } // HTTP/1.1 streams using the PHP stream wrapper require a // Connection: close header if ($request->getProtocolVersion() === '1.1' && !$request->hasHeader('Connection')) { $request = $request->withHeader('Connection', 'close'); } // Ensure SSL is verified by default if (!isset($options['verify'])) { $options['verify'] = \true; } $params = []; $context = $this->getDefaultContext($request); if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) { throw new \InvalidArgumentException('on_headers must be callable'); } if (!empty($options)) { foreach ($options as $key => $value) { $method = "add_{$key}"; if (isset($methods[$method])) { $this->{$method}($request, $context, $value, $params); } } } if (isset($options['stream_context'])) { if (!\is_array($options['stream_context'])) { throw new \InvalidArgumentException('stream_context must be an array'); } $context = \array_replace_recursive($context, $options['stream_context']); } // Microsoft NTLM authentication only supported with curl handler if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) { throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); } $uri = $this->resolveHost($request, $options); $contextResource = $this->createResource(static function () use($context, $params) { return \stream_context_create($context, $params); }); return $this->createResource(function () use($uri, $contextResource, $context, $options, $request) { $resource = @\fopen((string) $uri, 'r', \false, $contextResource); // See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_http_response_header_predefined_variable if (\function_exists('WPMailSMTP\\Vendor\\http_get_last_response_headers')) { /** @var array|null */ $http_response_header = \WPMailSMTP\Vendor\http_get_last_response_headers(); } $this->lastHeaders = $http_response_header ?? []; if (\false === $resource) { throw new ConnectException(\sprintf('Connection refused for URI %s', $uri), $request, null, $context); } if (isset($options['read_timeout'])) { $readTimeout = $options['read_timeout']; $sec = (int) $readTimeout; $usec = ($readTimeout - $sec) * 100000; \stream_set_timeout($resource, $sec, $usec); } return $resource; }); } private function resolveHost(RequestInterface $request, array $options) : UriInterface { $uri = $request->getUri(); if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) { if ('v4' === $options['force_ip_resolve']) { $records = \dns_get_record($uri->getHost(), \DNS_A); if (\false === $records || !isset($records[0]['ip'])) { throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); } return $uri->withHost($records[0]['ip']); } if ('v6' === $options['force_ip_resolve']) { $records = \dns_get_record($uri->getHost(), \DNS_AAAA); if (\false === $records || !isset($records[0]['ipv6'])) { throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); } return $uri->withHost('[' . $records[0]['ipv6'] . ']'); } } return $uri; } private function getDefaultContext(RequestInterface $request) : array { $headers = ''; foreach ($request->getHeaders() as $name => $value) { foreach ($value as $val) { $headers .= "{$name}: {$val}\r\n"; } } $context = ['http' => ['method' => $request->getMethod(), 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), 'ignore_errors' => \true, 'follow_location' => 0], 'ssl' => ['peer_name' => $request->getUri()->getHost()]]; $body = (string) $request->getBody(); if ('' !== $body) { $context['http']['content'] = $body; // Prevent the HTTP handler from adding a Content-Type header. if (!$request->hasHeader('Content-Type')) { $context['http']['header'] .= "Content-Type:\r\n"; } } $context['http']['header'] = \rtrim($context['http']['header']); return $context; } /** * @param mixed $value as passed via Request transfer options. */ private function add_proxy(RequestInterface $request, array &$options, $value, array &$params) : void { $uri = null; if (!\is_array($value)) { $uri = $value; } else { $scheme = $request->getUri()->getScheme(); if (isset($value[$scheme])) { if (!isset($value['no']) || !Utils::isHostInNoProxy($request->getUri()->getHost(), $value['no'])) { $uri = $value[$scheme]; } } } if (!$uri) { return; } $parsed = $this->parse_proxy($uri); $options['http']['proxy'] = $parsed['proxy']; if ($parsed['auth']) { if (!isset($options['http']['header'])) { $options['http']['header'] = []; } $options['http']['header'] .= "\r\nProxy-Authorization: {$parsed['auth']}"; } } /** * Parses the given proxy URL to make it compatible with the format PHP's stream context expects. */ private function parse_proxy(string $url) : array { $parsed = \parse_url($url); if ($parsed !== \false && isset($parsed['scheme']) && $parsed['scheme'] === 'http') { if (isset($parsed['host']) && isset($parsed['port'])) { $auth = null; if (isset($parsed['user']) && isset($parsed['pass'])) { $auth = \base64_encode("{$parsed['user']}:{$parsed['pass']}"); } return ['proxy' => "tcp://{$parsed['host']}:{$parsed['port']}", 'auth' => $auth ? "Basic {$auth}" : null]; } } // Return proxy as-is. return ['proxy' => $url, 'auth' => null]; } /** * @param mixed $value as passed via Request transfer options. */ private function add_timeout(RequestInterface $request, array &$options, $value, array &$params) : void { if ($value > 0) { $options['http']['timeout'] = $value; } } /** * @param mixed $value as passed via Request transfer options. */ private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params) : void { if ($value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT || \defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) { $options['http']['crypto_method'] = $value; return; } throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); } /** * @param mixed $value as passed via Request transfer options. */ private function add_verify(RequestInterface $request, array &$options, $value, array &$params) : void { if ($value === \false) { $options['ssl']['verify_peer'] = \false; $options['ssl']['verify_peer_name'] = \false; return; } if (\is_string($value)) { $options['ssl']['cafile'] = $value; if (!\file_exists($value)) { throw new \RuntimeException("SSL CA bundle not found: {$value}"); } } elseif ($value !== \true) { throw new \InvalidArgumentException('Invalid verify request option'); } $options['ssl']['verify_peer'] = \true; $options['ssl']['verify_peer_name'] = \true; $options['ssl']['allow_self_signed'] = \false; } /** * @param mixed $value as passed via Request transfer options. */ private function add_cert(RequestInterface $request, array &$options, $value, array &$params) : void { if (\is_array($value)) { $options['ssl']['passphrase'] = $value[1]; $value = $value[0]; } if (!\file_exists($value)) { throw new \RuntimeException("SSL certificate not found: {$value}"); } $options['ssl']['local_cert'] = $value; } /** * @param mixed $value as passed via Request transfer options. */ private function add_progress(RequestInterface $request, array &$options, $value, array &$params) : void { self::addNotification($params, static function ($code, $a, $b, $c, $transferred, $total) use($value) { if ($code == \STREAM_NOTIFY_PROGRESS) { // The upload progress cannot be determined. Use 0 for cURL compatibility: // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html $value($total, $transferred, 0, 0); } }); } /** * @param mixed $value as passed via Request transfer options. */ private function add_debug(RequestInterface $request, array &$options, $value, array &$params) : void { if ($value === \false) { return; } static $map = [\STREAM_NOTIFY_CONNECT => 'CONNECT', \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', \STREAM_NOTIFY_PROGRESS => 'PROGRESS', \STREAM_NOTIFY_FAILURE => 'FAILURE', \STREAM_NOTIFY_COMPLETED => 'COMPLETED', \STREAM_NOTIFY_RESOLVE => 'RESOLVE']; static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; $value = Utils::debugResource($value); $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); self::addNotification($params, static function (int $code, ...$passed) use($ident, $value, $map, $args) : void { \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); foreach (\array_filter($passed) as $i => $v) { \fwrite($value, $args[$i] . ': "' . $v . '" '); } \fwrite($value, "\n"); }); } private static function addNotification(array &$params, callable $notify) : void { // Wrap the existing function if needed. if (!isset($params['notification'])) { $params['notification'] = $notify; } else { $params['notification'] = self::callArray([$params['notification'], $notify]); } } private static function callArray(array $functions) : callable { return static function (...$args) use($functions) { foreach ($functions as $fn) { $fn(...$args); } }; } } vendor_prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php 0000644 00000014257 15174671617 0020563 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp\Handler; use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException; use WPMailSMTP\Vendor\GuzzleHttp\HandlerStack; use WPMailSMTP\Vendor\GuzzleHttp\Promise as P; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\GuzzleHttp\TransferStats; use WPMailSMTP\Vendor\GuzzleHttp\Utils; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Handler that returns responses or throw exceptions from a queue. * * @final */ class MockHandler implements \Countable { /** * @var array */ private $queue = []; /** * @var RequestInterface|null */ private $lastRequest; /** * @var array */ private $lastOptions = []; /** * @var callable|null */ private $onFulfilled; /** * @var callable|null */ private $onRejected; /** * Creates a new MockHandler that uses the default handler stack list of * middlewares. * * @param array|null $queue Array of responses, callables, or exceptions. * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. * @param callable|null $onRejected Callback to invoke when the return value is rejected. */ public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) : HandlerStack { return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); } /** * The passed in value must be an array of * {@see ResponseInterface} objects, Exceptions, * callables, or Promises. * * @param array<int, mixed>|null $queue The parameters to be passed to the append function, as an indexed array. * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled. * @param callable|null $onRejected Callback to invoke when the return value is rejected. */ public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) { $this->onFulfilled = $onFulfilled; $this->onRejected = $onRejected; if ($queue) { // array_values included for BC $this->append(...\array_values($queue)); } } public function __invoke(RequestInterface $request, array $options) : PromiseInterface { if (!$this->queue) { throw new \OutOfBoundsException('Mock queue is empty'); } if (isset($options['delay']) && \is_numeric($options['delay'])) { \usleep((int) $options['delay'] * 1000); } $this->lastRequest = $request; $this->lastOptions = $options; $response = \array_shift($this->queue); if (isset($options['on_headers'])) { if (!\is_callable($options['on_headers'])) { throw new \InvalidArgumentException('on_headers must be callable'); } try { $options['on_headers']($response); } catch (\Exception $e) { $msg = 'An error was encountered during the on_headers event'; $response = new RequestException($msg, $request, $response, $e); } } if (\is_callable($response)) { $response = $response($request, $options); } $response = $response instanceof \Throwable ? P\Create::rejectionFor($response) : P\Create::promiseFor($response); return $response->then(function (?ResponseInterface $value) use($request, $options) { $this->invokeStats($request, $options, $value); if ($this->onFulfilled) { ($this->onFulfilled)($value); } if ($value !== null && isset($options['sink'])) { $contents = (string) $value->getBody(); $sink = $options['sink']; if (\is_resource($sink)) { \fwrite($sink, $contents); } elseif (\is_string($sink)) { \file_put_contents($sink, $contents); } elseif ($sink instanceof StreamInterface) { $sink->write($contents); } } return $value; }, function ($reason) use($request, $options) { $this->invokeStats($request, $options, null, $reason); if ($this->onRejected) { ($this->onRejected)($reason); } return P\Create::rejectionFor($reason); }); } /** * Adds one or more variadic requests, exceptions, callables, or promises * to the queue. * * @param mixed ...$values */ public function append(...$values) : void { foreach ($values as $value) { if ($value instanceof ResponseInterface || $value instanceof \Throwable || $value instanceof PromiseInterface || \is_callable($value)) { $this->queue[] = $value; } else { throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value)); } } } /** * Get the last received request. */ public function getLastRequest() : ?RequestInterface { return $this->lastRequest; } /** * Get the last received request options. */ public function getLastOptions() : array { return $this->lastOptions; } /** * Returns the number of remaining items in the queue. */ public function count() : int { return \count($this->queue); } public function reset() : void { $this->queue = []; } /** * @param mixed $reason Promise or reason. */ private function invokeStats(RequestInterface $request, array $options, ?ResponseInterface $response = null, $reason = null) : void { if (isset($options['on_stats'])) { $transferTime = $options['transfer_time'] ?? 0; $stats = new TransferStats($request, $response, $transferTime, $reason); $options['on_stats']($stats); } } } vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php 0000644 00000001152 15174671617 0017761 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\Psr\Http\Message\MessageInterface; final class BodySummarizer implements BodySummarizerInterface { /** * @var int|null */ private $truncateAt; public function __construct(?int $truncateAt = null) { $this->truncateAt = $truncateAt; } /** * Returns a summarized message body. */ public function summarize(MessageInterface $message) : ?string { return $this->truncateAt === null ? Psr7\Message::bodySummary($message) : Psr7\Message::bodySummary($message, $this->truncateAt); } } vendor_prefixed/guzzlehttp/guzzle/src/ClientTrait.php 0000644 00000021610 15174671617 0017230 0 ustar 00 <?php namespace WPMailSMTP\Vendor\GuzzleHttp; use WPMailSMTP\Vendor\GuzzleHttp\Exception\GuzzleException; use WPMailSMTP\Vendor\GuzzleHttp\Promise\PromiseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Client interface for sending HTTP requests. */ trait ClientTrait { /** * Create and send an HTTP request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string $method HTTP method. * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public abstract function request(string $method, $uri, array $options = []) : ResponseInterface; /** * Create and send an HTTP GET request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function get($uri, array $options = []) : ResponseInterface { return $this->request('GET', $uri, $options); } /** * Create and send an HTTP HEAD request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function head($uri, array $options = []) : ResponseInterface { return $this->request('HEAD', $uri, $options); } /** * Create and send an HTTP PUT request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function put($uri, array $options = []) : ResponseInterface { return $this->request('PUT', $uri, $options); } /** * Create and send an HTTP POST request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function post($uri, array $options = []) : ResponseInterface { return $this->request('POST', $uri, $options); } /** * Create and send an HTTP PATCH request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function patch($uri, array $options = []) : ResponseInterface { return $this->request('PATCH', $uri, $options); } /** * Create and send an HTTP DELETE request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. * * @throws GuzzleException */ public function delete($uri, array $options = []) : ResponseInterface { return $this->request('DELETE', $uri, $options); } /** * Create and send an asynchronous HTTP request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string $method HTTP method * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public abstract function requestAsync(string $method, $uri, array $options = []) : PromiseInterface; /** * Create and send an asynchronous HTTP GET request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function getAsync($uri, array $options = []) : PromiseInterface { return $this->requestAsync('GET', $uri, $options); } /** * Create and send an asynchronous HTTP HEAD request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function headAsync($uri, array $options = []) : PromiseInterface { return $this->requestAsync('HEAD', $uri, $options); } /** * Create and send an asynchronous HTTP PUT request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function putAsync($uri, array $options = []) : PromiseInterface { return $this->requestAsync('PUT', $uri, $options); } /** * Create and send an asynchronous HTTP POST request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function postAsync($uri, array $options = []) : PromiseInterface { return $this->requestAsync('POST', $uri, $options); } /** * Create and send an asynchronous HTTP PATCH request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function patchAsync($uri, array $options = []) : PromiseInterface { return $this->requestAsync('PATCH', $uri, $options); } /** * Create and send an asynchronous HTTP DELETE request. * * Use an absolute path to override the base path of the client, or a * relative path to append to the base path of the client. The URL can * contain the query string as well. Use an array to provide a URL * template and additional variables to use in the URL template expansion. * * @param string|UriInterface $uri URI object or string. * @param array $options Request options to apply. */ public function deleteAsync($uri, array $options = []) : PromiseInterface { return $this->requestAsync('DELETE', $uri, $options); } } vendor_prefixed/guzzlehttp/promises/LICENSE 0000644 00000002404 15174671617 0015034 0 ustar 00 The MIT License (MIT) Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com> Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk> Copyright (c) 2017 Tobias Schultze <webmaster@tubo-world.de> Copyright (c) 2020 Tobias Nyholm <tobias.nyholm@gmail.com> 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_prefixed/guzzlehttp/promises/src/Utils.php 0000644 00000017614 15174671617 0016440 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; final class Utils { /** * Get the global task queue used for promise resolution. * * This task queue MUST be run in an event loop in order for promises to be * settled asynchronously. It will be automatically run when synchronously * waiting on a promise. * * <code> * while ($eventLoop->isRunning()) { * GuzzleHttp\Promise\Utils::queue()->run(); * } * </code> * * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. */ public static function queue(?TaskQueueInterface $assign = null) : TaskQueueInterface { static $queue; if ($assign) { $queue = $assign; } elseif (!$queue) { $queue = new TaskQueue(); } return $queue; } /** * Adds a function to run in the task queue when it is next `run()` and * returns a promise that is fulfilled or rejected with the result. * * @param callable $task Task function to run. */ public static function task(callable $task) : PromiseInterface { $queue = self::queue(); $promise = new Promise([$queue, 'run']); $queue->add(function () use($task, $promise) : void { try { if (Is::pending($promise)) { $promise->resolve($task()); } } catch (\Throwable $e) { $promise->reject($e); } }); return $promise; } /** * Synchronously waits on a promise to resolve and returns an inspection * state array. * * Returns a state associative array containing a "state" key mapping to a * valid promise state. If the state of the promise is "fulfilled", the * array will contain a "value" key mapping to the fulfilled value of the * promise. If the promise is rejected, the array will contain a "reason" * key mapping to the rejection reason of the promise. * * @param PromiseInterface $promise Promise or value. */ public static function inspect(PromiseInterface $promise) : array { try { return ['state' => PromiseInterface::FULFILLED, 'value' => $promise->wait()]; } catch (RejectionException $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; } catch (\Throwable $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; } } /** * Waits on all of the provided promises, but does not unwrap rejected * promises as thrown exception. * * Returns an array of inspection state arrays. * * @see inspect for the inspection state array format. * * @param PromiseInterface[] $promises Traversable of promises to wait upon. */ public static function inspectAll($promises) : array { $results = []; foreach ($promises as $key => $promise) { $results[$key] = self::inspect($promise); } return $results; } /** * Waits on all of the provided promises and returns the fulfilled values. * * Returns an array that contains the value of each promise (in the same * order the promises were provided). An exception is thrown if any of the * promises are rejected. * * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on. * * @throws \Throwable on error */ public static function unwrap($promises) : array { $results = []; foreach ($promises as $key => $promise) { $results[$key] = $promise->wait(); } return $results; } /** * Given an array of promises, return a promise that is fulfilled when all * the items in the array are fulfilled. * * The promise's fulfillment value is an array with fulfillment values at * respective positions to the original array. If any promise in the array * rejects, the returned promise is rejected with the rejection reason. * * @param mixed $promises Promises or values. * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. */ public static function all($promises, bool $recursive = \false) : PromiseInterface { $results = []; $promise = Each::of($promises, function ($value, $idx) use(&$results) : void { $results[$idx] = $value; }, function ($reason, $idx, Promise $aggregate) : void { if (Is::pending($aggregate)) { $aggregate->reject($reason); } })->then(function () use(&$results) { \ksort($results); return $results; }); if (\true === $recursive) { $promise = $promise->then(function ($results) use($recursive, &$promises) { foreach ($promises as $promise) { if (Is::pending($promise)) { return self::all($promises, $recursive); } } return $results; }); } return $promise; } /** * Initiate a competitive race between multiple promises or values (values * will become immediately fulfilled promises). * * When count amount of promises have been fulfilled, the returned promise * is fulfilled with an array that contains the fulfillment values of the * winners in order of resolution. * * This promise is rejected with a {@see AggregateException} if the number * of fulfilled promises is less than the desired $count. * * @param int $count Total number of promises. * @param mixed $promises Promises or values. */ public static function some(int $count, $promises) : PromiseInterface { $results = []; $rejections = []; return Each::of($promises, function ($value, $idx, PromiseInterface $p) use(&$results, $count) : void { if (Is::settled($p)) { return; } $results[$idx] = $value; if (\count($results) >= $count) { $p->resolve(null); } }, function ($reason) use(&$rejections) : void { $rejections[] = $reason; })->then(function () use(&$results, &$rejections, $count) { if (\count($results) !== $count) { throw new AggregateException('Not enough promises to fulfill count', $rejections); } \ksort($results); return \array_values($results); }); } /** * Like some(), with 1 as count. However, if the promise fulfills, the * fulfillment value is not an array of 1 but the value directly. * * @param mixed $promises Promises or values. */ public static function any($promises) : PromiseInterface { return self::some(1, $promises)->then(function ($values) { return $values[0]; }); } /** * Returns a promise that is fulfilled when all of the provided promises have * been fulfilled or rejected. * * The returned promise is fulfilled with an array of inspection state arrays. * * @see inspect for the inspection state array format. * * @param mixed $promises Promises or values. */ public static function settle($promises) : PromiseInterface { $results = []; return Each::of($promises, function ($value, $idx) use(&$results) : void { $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; }, function ($reason, $idx) use(&$results) : void { $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; })->then(function () use(&$results) { \ksort($results); return $results; }); } } vendor_prefixed/guzzlehttp/promises/src/PromiseInterface.php 0000644 00000005405 15174671617 0020572 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * A promise represents the eventual result of an asynchronous operation. * * The primary way of interacting with a promise is through its then method, * which registers callbacks to receive either a promise’s eventual value or * the reason why the promise cannot be fulfilled. * * @see https://promisesaplus.com/ */ interface PromiseInterface { public const PENDING = 'pending'; public const FULFILLED = 'fulfilled'; public const REJECTED = 'rejected'; /** * Appends fulfillment and rejection handlers to the promise, and returns * a new promise resolving to the return value of the called handler. * * @param callable $onFulfilled Invoked when the promise fulfills. * @param callable $onRejected Invoked when the promise is rejected. */ public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface; /** * Appends a rejection handler callback to the promise, and returns a new * promise resolving to the return value of the callback if it is called, * or to its original fulfillment value if the promise is instead * fulfilled. * * @param callable $onRejected Invoked when the promise is rejected. */ public function otherwise(callable $onRejected) : PromiseInterface; /** * Get the state of the promise ("pending", "rejected", or "fulfilled"). * * The three states can be checked against the constants defined on * PromiseInterface: PENDING, FULFILLED, and REJECTED. */ public function getState() : string; /** * Resolve the promise with the given value. * * @param mixed $value * * @throws \RuntimeException if the promise is already resolved. */ public function resolve($value) : void; /** * Reject the promise with the given reason. * * @param mixed $reason * * @throws \RuntimeException if the promise is already resolved. */ public function reject($reason) : void; /** * Cancels the promise if possible. * * @see https://github.com/promises-aplus/cancellation-spec/issues/7 */ public function cancel() : void; /** * Waits until the promise completes if possible. * * Pass $unwrap as true to unwrap the result of the promise, either * returning the resolved value or throwing the rejected exception. * * If the promise cannot be waited on, then the promise will be rejected. * * @return mixed * * @throws \LogicException if the promise has no wait function or if the * promise does not settle after waiting. */ public function wait(bool $unwrap = \true); } vendor_prefixed/guzzlehttp/promises/src/Promise.php 0000644 00000021105 15174671617 0016744 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * Promises/A+ implementation that avoids recursion when possible. * * @see https://promisesaplus.com/ * * @final */ class Promise implements PromiseInterface { private $state = self::PENDING; private $result; private $cancelFn; private $waitFn; private $waitList; private $handlers = []; /** * @param callable $waitFn Fn that when invoked resolves the promise. * @param callable $cancelFn Fn that when invoked cancels the promise. */ public function __construct(?callable $waitFn = null, ?callable $cancelFn = null) { $this->waitFn = $waitFn; $this->cancelFn = $cancelFn; } public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { if ($this->state === self::PENDING) { $p = new Promise(null, [$this, 'cancel']); $this->handlers[] = [$p, $onFulfilled, $onRejected]; $p->waitList = $this->waitList; $p->waitList[] = $this; return $p; } // Return a fulfilled promise and immediately invoke any callbacks. if ($this->state === self::FULFILLED) { $promise = Create::promiseFor($this->result); return $onFulfilled ? $promise->then($onFulfilled) : $promise; } // It's either cancelled or rejected, so return a rejected promise // and immediately invoke any callbacks. $rejection = Create::rejectionFor($this->result); return $onRejected ? $rejection->then(null, $onRejected) : $rejection; } public function otherwise(callable $onRejected) : PromiseInterface { return $this->then(null, $onRejected); } public function wait(bool $unwrap = \true) { $this->waitIfPending(); if ($this->result instanceof PromiseInterface) { return $this->result->wait($unwrap); } if ($unwrap) { if ($this->state === self::FULFILLED) { return $this->result; } // It's rejected so "unwrap" and throw an exception. throw Create::exceptionFor($this->result); } } public function getState() : string { return $this->state; } public function cancel() : void { if ($this->state !== self::PENDING) { return; } $this->waitFn = $this->waitList = null; if ($this->cancelFn) { $fn = $this->cancelFn; $this->cancelFn = null; try { $fn(); } catch (\Throwable $e) { $this->reject($e); } } // Reject the promise only if it wasn't rejected in a then callback. /** @psalm-suppress RedundantCondition */ if ($this->state === self::PENDING) { $this->reject(new CancellationException('Promise has been cancelled')); } } public function resolve($value) : void { $this->settle(self::FULFILLED, $value); } public function reject($reason) : void { $this->settle(self::REJECTED, $reason); } private function settle(string $state, $value) : void { if ($this->state !== self::PENDING) { // Ignore calls with the same resolution. if ($state === $this->state && $value === $this->result) { return; } throw $this->state === $state ? new \LogicException("The promise is already {$state}.") : new \LogicException("Cannot change a {$this->state} promise to {$state}"); } if ($value === $this) { throw new \LogicException('Cannot fulfill or reject a promise with itself'); } // Clear out the state of the promise but stash the handlers. $this->state = $state; $this->result = $value; $handlers = $this->handlers; $this->handlers = null; $this->waitList = $this->waitFn = null; $this->cancelFn = null; if (!$handlers) { return; } // If the value was not a settled promise or a thenable, then resolve // it in the task queue using the correct ID. if (!\is_object($value) || !\method_exists($value, 'then')) { $id = $state === self::FULFILLED ? 1 : 2; // It's a success, so resolve the handlers in the queue. Utils::queue()->add(static function () use($id, $value, $handlers) : void { foreach ($handlers as $handler) { self::callHandler($id, $value, $handler); } }); } elseif ($value instanceof Promise && Is::pending($value)) { // We can just merge our handlers onto the next promise. $value->handlers = \array_merge($value->handlers, $handlers); } else { // Resolve the handlers when the forwarded promise is resolved. $value->then(static function ($value) use($handlers) : void { foreach ($handlers as $handler) { self::callHandler(1, $value, $handler); } }, static function ($reason) use($handlers) : void { foreach ($handlers as $handler) { self::callHandler(2, $reason, $handler); } }); } } /** * Call a stack of handlers using a specific callback index and value. * * @param int $index 1 (resolve) or 2 (reject). * @param mixed $value Value to pass to the callback. * @param array $handler Array of handler data (promise and callbacks). */ private static function callHandler(int $index, $value, array $handler) : void { /** @var PromiseInterface $promise */ $promise = $handler[0]; // The promise may have been cancelled or resolved before placing // this thunk in the queue. if (Is::settled($promise)) { return; } try { if (isset($handler[$index])) { /* * If $f throws an exception, then $handler will be in the exception * stack trace. Since $handler contains a reference to the callable * itself we get a circular reference. We clear the $handler * here to avoid that memory leak. */ $f = $handler[$index]; unset($handler); $promise->resolve($f($value)); } elseif ($index === 1) { // Forward resolution values as-is. $promise->resolve($value); } else { // Forward rejections down the chain. $promise->reject($value); } } catch (\Throwable $reason) { $promise->reject($reason); } } private function waitIfPending() : void { if ($this->state !== self::PENDING) { return; } elseif ($this->waitFn) { $this->invokeWaitFn(); } elseif ($this->waitList) { $this->invokeWaitList(); } else { // If there's no wait function, then reject the promise. $this->reject('Cannot wait on a promise that has ' . 'no internal wait function. You must provide a wait ' . 'function when constructing the promise to be able to ' . 'wait on a promise.'); } Utils::queue()->run(); /** @psalm-suppress RedundantCondition */ if ($this->state === self::PENDING) { $this->reject('Invoking the wait callback did not resolve the promise'); } } private function invokeWaitFn() : void { try { $wfn = $this->waitFn; $this->waitFn = null; $wfn(\true); } catch (\Throwable $reason) { if ($this->state === self::PENDING) { // The promise has not been resolved yet, so reject the promise // with the exception. $this->reject($reason); } else { // The promise was already resolved, so there's a problem in // the application. throw $reason; } } } private function invokeWaitList() : void { $waitList = $this->waitList; $this->waitList = null; foreach ($waitList as $result) { do { $result->waitIfPending(); $result = $result->result; } while ($result instanceof Promise); if ($result instanceof PromiseInterface) { $result->wait(\false); } } } } vendor_prefixed/guzzlehttp/promises/src/TaskQueue.php 0000644 00000003765 15174671617 0017251 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * A task queue that executes tasks in a FIFO order. * * This task queue class is used to settle promises asynchronously and * maintains a constant stack size. You can use the task queue asynchronously * by calling the `run()` function of the global task queue in an event loop. * * GuzzleHttp\Promise\Utils::queue()->run(); * * @final */ class TaskQueue implements TaskQueueInterface { private $enableShutdown = \true; private $queue = []; public function __construct(bool $withShutdown = \true) { if ($withShutdown) { \register_shutdown_function(function () : void { if ($this->enableShutdown) { // Only run the tasks if an E_ERROR didn't occur. $err = \error_get_last(); if (!$err || $err['type'] ^ \E_ERROR) { $this->run(); } } }); } } public function isEmpty() : bool { return !$this->queue; } public function add(callable $task) : void { $this->queue[] = $task; } public function run() : void { while ($task = \array_shift($this->queue)) { /** @var callable $task */ $task(); } } /** * The task queue will be run and exhausted by default when the process * exits IFF the exit is not the result of a PHP E_ERROR error. * * You can disable running the automatic shutdown of the queue by calling * this function. If you disable the task queue shutdown process, then you * MUST either run the task queue (as a result of running your event loop * or manually using the run() method) or wait on each outstanding promise. * * Note: This shutdown will occur before any destructors are triggered. */ public function disableShutdown() : void { $this->enableShutdown = \false; } } vendor_prefixed/guzzlehttp/promises/src/TaskQueueInterface.php 0000644 00000000725 15174671617 0021063 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; interface TaskQueueInterface { /** * Returns true if the queue is empty. */ public function isEmpty() : bool; /** * Adds a task to the queue that will be executed the next time run is * called. */ public function add(callable $task) : void; /** * Execute all of the pending task in the queue. */ public function run() : void; } vendor_prefixed/guzzlehttp/promises/src/Is.php 0000644 00000001700 15174671617 0015700 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; final class Is { /** * Returns true if a promise is pending. */ public static function pending(PromiseInterface $promise) : bool { return $promise->getState() === PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled or rejected. */ public static function settled(PromiseInterface $promise) : bool { return $promise->getState() !== PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled. */ public static function fulfilled(PromiseInterface $promise) : bool { return $promise->getState() === PromiseInterface::FULFILLED; } /** * Returns true if a promise is rejected. */ public static function rejected(PromiseInterface $promise) : bool { return $promise->getState() === PromiseInterface::REJECTED; } } vendor_prefixed/guzzlehttp/promises/src/CancellationException.php 0000644 00000000343 15174671617 0021602 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * Exception that is set as the reason for a promise that has been cancelled. */ class CancellationException extends RejectionException { } vendor_prefixed/guzzlehttp/promises/src/FulfilledPromise.php 0000644 00000003735 15174671617 0020604 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * A promise that has been fulfilled. * * Thenning off of this promise will invoke the onFulfilled callback * immediately and ignore other callbacks. * * @final */ class FulfilledPromise implements PromiseInterface { private $value; /** * @param mixed $value */ public function __construct($value) { if (\is_object($value) && \method_exists($value, 'then')) { throw new \InvalidArgumentException('You cannot create a FulfilledPromise with a promise.'); } $this->value = $value; } public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { // Return itself if there is no onFulfilled function. if (!$onFulfilled) { return $this; } $queue = Utils::queue(); $p = new Promise([$queue, 'run']); $value = $this->value; $queue->add(static function () use($p, $value, $onFulfilled) : void { if (Is::pending($p)) { try { $p->resolve($onFulfilled($value)); } catch (\Throwable $e) { $p->reject($e); } } }); return $p; } public function otherwise(callable $onRejected) : PromiseInterface { return $this->then(null, $onRejected); } public function wait(bool $unwrap = \true) { return $unwrap ? $this->value : null; } public function getState() : string { return self::FULFILLED; } public function resolve($value) : void { if ($value !== $this->value) { throw new \LogicException('Cannot resolve a fulfilled promise'); } } public function reject($reason) : void { throw new \LogicException('Cannot reject a fulfilled promise'); } public function cancel() : void { // pass } } vendor_prefixed/guzzlehttp/promises/src/RejectedPromise.php 0000644 00000004273 15174671617 0020421 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * A promise that has been rejected. * * Thenning off of this promise will invoke the onRejected callback * immediately and ignore other callbacks. * * @final */ class RejectedPromise implements PromiseInterface { private $reason; /** * @param mixed $reason */ public function __construct($reason) { if (\is_object($reason) && \method_exists($reason, 'then')) { throw new \InvalidArgumentException('You cannot create a RejectedPromise with a promise.'); } $this->reason = $reason; } public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { // If there's no onRejected callback then just return self. if (!$onRejected) { return $this; } $queue = Utils::queue(); $reason = $this->reason; $p = new Promise([$queue, 'run']); $queue->add(static function () use($p, $reason, $onRejected) : void { if (Is::pending($p)) { try { // Return a resolved promise if onRejected does not throw. $p->resolve($onRejected($reason)); } catch (\Throwable $e) { // onRejected threw, so return a rejected promise. $p->reject($e); } } }); return $p; } public function otherwise(callable $onRejected) : PromiseInterface { return $this->then(null, $onRejected); } public function wait(bool $unwrap = \true) { if ($unwrap) { throw Create::exceptionFor($this->reason); } return null; } public function getState() : string { return self::REJECTED; } public function resolve($value) : void { throw new \LogicException('Cannot resolve a rejected promise'); } public function reject($reason) : void { if ($reason !== $this->reason) { throw new \LogicException('Cannot reject a rejected promise'); } } public function cancel() : void { // pass } } vendor_prefixed/guzzlehttp/promises/src/AggregateException.php 0000644 00000000617 15174671617 0021100 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * Exception thrown when too many errors occur in the some() or any() methods. */ class AggregateException extends RejectionException { public function __construct(string $msg, array $reasons) { parent::__construct($reasons, \sprintf('%s; %d rejected promises', $msg, \count($reasons))); } } vendor_prefixed/guzzlehttp/promises/src/PromisorInterface.php 0000644 00000000414 15174671617 0020761 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * Interface used with classes that return a promise. */ interface PromisorInterface { /** * Returns a promise. */ public function promise() : PromiseInterface; } vendor_prefixed/guzzlehttp/promises/src/EachPromise.php 0000644 00000016174 15174671617 0017537 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * Represents a promise that iterates over many promises and invokes * side-effect functions in the process. * * @final */ class EachPromise implements PromisorInterface { private $pending = []; private $nextPendingIndex = 0; /** @var \Iterator|null */ private $iterable; /** @var callable|int|null */ private $concurrency; /** @var callable|null */ private $onFulfilled; /** @var callable|null */ private $onRejected; /** @var Promise|null */ private $aggregate; /** @var bool|null */ private $mutex; /** * Configuration hash can include the following key value pairs: * * - fulfilled: (callable) Invoked when a promise fulfills. The function * is invoked with three arguments: the fulfillment value, the index * position from the iterable list of the promise, and the aggregate * promise that manages all of the promises. The aggregate promise may * be resolved from within the callback to short-circuit the promise. * - rejected: (callable) Invoked when a promise is rejected. The * function is invoked with three arguments: the rejection reason, the * index position from the iterable list of the promise, and the * aggregate promise that manages all of the promises. The aggregate * promise may be resolved from within the callback to short-circuit * the promise. * - concurrency: (integer) Pass this configuration option to limit the * allowed number of outstanding concurrently executing promises, * creating a capped pool of promises. There is no limit by default. * * @param mixed $iterable Promises or values to iterate. * @param array $config Configuration options */ public function __construct($iterable, array $config = []) { $this->iterable = Create::iterFor($iterable); if (isset($config['concurrency'])) { $this->concurrency = $config['concurrency']; } if (isset($config['fulfilled'])) { $this->onFulfilled = $config['fulfilled']; } if (isset($config['rejected'])) { $this->onRejected = $config['rejected']; } } /** @psalm-suppress InvalidNullableReturnType */ public function promise() : PromiseInterface { if ($this->aggregate) { return $this->aggregate; } try { $this->createPromise(); /** @psalm-assert Promise $this->aggregate */ $this->iterable->rewind(); $this->refillPending(); } catch (\Throwable $e) { $this->aggregate->reject($e); } /** * @psalm-suppress NullableReturnStatement */ return $this->aggregate; } private function createPromise() : void { $this->mutex = \false; $this->aggregate = new Promise(function () : void { if ($this->checkIfFinished()) { return; } \reset($this->pending); // Consume a potentially fluctuating list of promises while // ensuring that indexes are maintained (precluding array_shift). while ($promise = \current($this->pending)) { \next($this->pending); $promise->wait(); if (Is::settled($this->aggregate)) { return; } } }); // Clear the references when the promise is resolved. $clearFn = function () : void { $this->iterable = $this->concurrency = $this->pending = null; $this->onFulfilled = $this->onRejected = null; $this->nextPendingIndex = 0; }; $this->aggregate->then($clearFn, $clearFn); } private function refillPending() : void { if (!$this->concurrency) { // Add all pending promises. while ($this->addPending() && $this->advanceIterator()) { } return; } // Add only up to N pending promises. $concurrency = \is_callable($this->concurrency) ? ($this->concurrency)(\count($this->pending)) : $this->concurrency; $concurrency = \max($concurrency - \count($this->pending), 0); // Concurrency may be set to 0 to disallow new promises. if (!$concurrency) { return; } // Add the first pending promise. $this->addPending(); // Note this is special handling for concurrency=1 so that we do // not advance the iterator after adding the first promise. This // helps work around issues with generators that might not have the // next value to yield until promise callbacks are called. while (--$concurrency && $this->advanceIterator() && $this->addPending()) { } } private function addPending() : bool { if (!$this->iterable || !$this->iterable->valid()) { return \false; } $promise = Create::promiseFor($this->iterable->current()); $key = $this->iterable->key(); // Iterable keys may not be unique, so we use a counter to // guarantee uniqueness $idx = $this->nextPendingIndex++; $this->pending[$idx] = $promise->then(function ($value) use($idx, $key) : void { if ($this->onFulfilled) { ($this->onFulfilled)($value, $key, $this->aggregate); } $this->step($idx); }, function ($reason) use($idx, $key) : void { if ($this->onRejected) { ($this->onRejected)($reason, $key, $this->aggregate); } $this->step($idx); }); return \true; } private function advanceIterator() : bool { // Place a lock on the iterator so that we ensure to not recurse, // preventing fatal generator errors. if ($this->mutex) { return \false; } $this->mutex = \true; try { $this->iterable->next(); $this->mutex = \false; return \true; } catch (\Throwable $e) { $this->aggregate->reject($e); $this->mutex = \false; return \false; } } private function step(int $idx) : void { // If the promise was already resolved, then ignore this step. if (Is::settled($this->aggregate)) { return; } unset($this->pending[$idx]); // Only refill pending promises if we are not locked, preventing the // EachPromise to recursively invoke the provided iterator, which // cause a fatal error: "Cannot resume an already running generator" if ($this->advanceIterator() && !$this->checkIfFinished()) { // Add more pending promises if possible. $this->refillPending(); } } private function checkIfFinished() : bool { if (!$this->pending && !$this->iterable->valid()) { // Resolve the promise if there's nothing left to do. $this->aggregate->resolve(null); return \true; } return \false; } } vendor_prefixed/guzzlehttp/promises/src/RejectionException.php 0000644 00000002332 15174671617 0021130 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; /** * A special exception that is thrown when waiting on a rejected promise. * * The reason value is available via the getReason() method. */ class RejectionException extends \RuntimeException { /** @var mixed Rejection reason. */ private $reason; /** * @param mixed $reason Rejection reason. * @param string|null $description Optional description. */ public function __construct($reason, ?string $description = null) { $this->reason = $reason; $message = 'The promise was rejected'; if ($description) { $message .= ' with reason: ' . $description; } elseif (\is_string($reason) || \is_object($reason) && \method_exists($reason, '__toString')) { $message .= ' with reason: ' . $this->reason; } elseif ($reason instanceof \JsonSerializable) { $message .= ' with reason: ' . \json_encode($this->reason, \JSON_PRETTY_PRINT); } parent::__construct($message); } /** * Returns the rejection reason. * * @return mixed */ public function getReason() { return $this->reason; } } vendor_prefixed/guzzlehttp/promises/src/Each.php 0000644 00000004622 15174671617 0016173 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; final class Each { /** * Given an iterator that yields promises or values, returns a promise that * is fulfilled with a null value when the iterator has been consumed or * the aggregate promise has been fulfilled or rejected. * * $onFulfilled is a function that accepts the fulfilled value, iterator * index, and the aggregate promise. The callback can invoke any necessary * side effects and choose to resolve or reject the aggregate if needed. * * $onRejected is a function that accepts the rejection reason, iterator * index, and the aggregate promise. The callback can invoke any necessary * side effects and choose to resolve or reject the aggregate if needed. * * @param mixed $iterable Iterator or array to iterate over. */ public static function of($iterable, ?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { return (new EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected]))->promise(); } /** * Like of, but only allows a certain number of outstanding promises at any * given time. * * $concurrency may be an integer or a function that accepts the number of * pending promises and returns a numeric concurrency limit value to allow * for dynamic a concurrency size. * * @param mixed $iterable * @param int|callable $concurrency */ public static function ofLimit($iterable, $concurrency, ?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { return (new EachPromise($iterable, ['fulfilled' => $onFulfilled, 'rejected' => $onRejected, 'concurrency' => $concurrency]))->promise(); } /** * Like limit, but ensures that no promise in the given $iterable argument * is rejected. If any promise is rejected, then the aggregate promise is * rejected with the encountered rejection. * * @param mixed $iterable * @param int|callable $concurrency */ public static function ofLimitAll($iterable, $concurrency, ?callable $onFulfilled = null) : PromiseInterface { return self::ofLimit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, PromiseInterface $aggregate) : void { $aggregate->reject($reason); }); } } vendor_prefixed/guzzlehttp/promises/src/Coroutine.php 0000644 00000010063 15174671617 0017276 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; use Generator; use Throwable; /** * Creates a promise that is resolved using a generator that yields values or * promises (somewhat similar to C#'s async keyword). * * When called, the Coroutine::of method will start an instance of the generator * and returns a promise that is fulfilled with its final yielded value. * * Control is returned back to the generator when the yielded promise settles. * This can lead to less verbose code when doing lots of sequential async calls * with minimal processing in between. * * use GuzzleHttp\Promise; * * function createPromise($value) { * return new Promise\FulfilledPromise($value); * } * * $promise = Promise\Coroutine::of(function () { * $value = (yield createPromise('a')); * try { * $value = (yield createPromise($value . 'b')); * } catch (\Throwable $e) { * // The promise was rejected. * } * yield $value . 'c'; * }); * * // Outputs "abc" * $promise->then(function ($v) { echo $v; }); * * @param callable $generatorFn Generator function to wrap into a promise. * * @return Promise * * @see https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration */ final class Coroutine implements PromiseInterface { /** * @var PromiseInterface|null */ private $currentPromise; /** * @var Generator */ private $generator; /** * @var Promise */ private $result; public function __construct(callable $generatorFn) { $this->generator = $generatorFn(); $this->result = new Promise(function () : void { while (isset($this->currentPromise)) { $this->currentPromise->wait(); } }); try { $this->nextCoroutine($this->generator->current()); } catch (Throwable $throwable) { $this->result->reject($throwable); } } /** * Create a new coroutine. */ public static function of(callable $generatorFn) : self { return new self($generatorFn); } public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { return $this->result->then($onFulfilled, $onRejected); } public function otherwise(callable $onRejected) : PromiseInterface { return $this->result->otherwise($onRejected); } public function wait(bool $unwrap = \true) { return $this->result->wait($unwrap); } public function getState() : string { return $this->result->getState(); } public function resolve($value) : void { $this->result->resolve($value); } public function reject($reason) : void { $this->result->reject($reason); } public function cancel() : void { $this->currentPromise->cancel(); $this->result->cancel(); } private function nextCoroutine($yielded) : void { $this->currentPromise = Create::promiseFor($yielded)->then([$this, '_handleSuccess'], [$this, '_handleFailure']); } /** * @internal */ public function _handleSuccess($value) : void { unset($this->currentPromise); try { $next = $this->generator->send($value); if ($this->generator->valid()) { $this->nextCoroutine($next); } else { $this->result->resolve($value); } } catch (Throwable $throwable) { $this->result->reject($throwable); } } /** * @internal */ public function _handleFailure($reason) : void { unset($this->currentPromise); try { $nextYield = $this->generator->throw(Create::exceptionFor($reason)); // The throw was caught, so keep iterating on the coroutine $this->nextCoroutine($nextYield); } catch (Throwable $throwable) { $this->result->reject($throwable); } } } vendor_prefixed/guzzlehttp/promises/src/Create.php 0000644 00000003754 15174671617 0016543 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Promise; final class Create { /** * Creates a promise for a value if the value is not a promise. * * @param mixed $value Promise or value. */ public static function promiseFor($value) : PromiseInterface { if ($value instanceof PromiseInterface) { return $value; } // Return a Guzzle promise that shadows the given promise. if (\is_object($value) && \method_exists($value, 'then')) { $wfn = \method_exists($value, 'wait') ? [$value, 'wait'] : null; $cfn = \method_exists($value, 'cancel') ? [$value, 'cancel'] : null; $promise = new Promise($wfn, $cfn); $value->then([$promise, 'resolve'], [$promise, 'reject']); return $promise; } return new FulfilledPromise($value); } /** * Creates a rejected promise for a reason if the reason is not a promise. * If the provided reason is a promise, then it is returned as-is. * * @param mixed $reason Promise or reason. */ public static function rejectionFor($reason) : PromiseInterface { if ($reason instanceof PromiseInterface) { return $reason; } return new RejectedPromise($reason); } /** * Create an exception for a rejected promise value. * * @param mixed $reason */ public static function exceptionFor($reason) : \Throwable { if ($reason instanceof \Throwable) { return $reason; } return new RejectionException($reason); } /** * Returns an iterator for the given value. * * @param mixed $value */ public static function iterFor($value) : \Iterator { if ($value instanceof \Iterator) { return $value; } if (\is_array($value)) { return new \ArrayIterator($value); } return new \ArrayIterator([$value]); } } vendor_prefixed/guzzlehttp/psr7/LICENSE 0000644 00000002572 15174671617 0014074 0 ustar 00 The MIT License (MIT) Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com> Copyright (c) 2015 Márk Sági-Kazár <mark.sagikazar@gmail.com> Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk> Copyright (c) 2016 Tobias Schultze <webmaster@tubo-world.de> Copyright (c) 2016 George Mponos <gmponos@gmail.com> Copyright (c) 2018 Tobias Nyholm <tobias.nyholm@gmail.com> 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_prefixed/guzzlehttp/psr7/src/MultipartStream.php 0000644 00000011661 15174671617 0017523 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Stream that when read returns bytes for a streaming multipart or * multipart/form-data stream. */ final class MultipartStream implements StreamInterface { use StreamDecoratorTrait; /** @var string */ private $boundary; /** @var StreamInterface */ private $stream; /** * @param array $elements Array of associative arrays, each containing a * required "name" key mapping to the form field, * name, a required "contents" key mapping to a * StreamInterface/resource/string, an optional * "headers" associative array of custom headers, * and an optional "filename" key mapping to a * string to send as the filename in the part. * @param string $boundary You can optionally provide a specific boundary * * @throws \InvalidArgumentException */ public function __construct(array $elements = [], ?string $boundary = null) { $this->boundary = $boundary ?: \bin2hex(\random_bytes(20)); $this->stream = $this->createStream($elements); } public function getBoundary() : string { return $this->boundary; } public function isWritable() : bool { return \false; } /** * Get the headers needed before transferring the content of a POST file * * @param string[] $headers */ private function getHeaders(array $headers) : string { $str = ''; foreach ($headers as $key => $value) { $str .= "{$key}: {$value}\r\n"; } return "--{$this->boundary}\r\n" . \trim($str) . "\r\n\r\n"; } /** * Create the aggregate stream that will be used to upload the POST data */ protected function createStream(array $elements = []) : StreamInterface { $stream = new AppendStream(); foreach ($elements as $element) { if (!\is_array($element)) { throw new \UnexpectedValueException('An array is expected'); } $this->addElement($stream, $element); } // Add the trailing boundary with CRLF $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n")); return $stream; } private function addElement(AppendStream $stream, array $element) : void { foreach (['contents', 'name'] as $key) { if (!\array_key_exists($key, $element)) { throw new \InvalidArgumentException("A '{$key}' key is required"); } } $element['contents'] = Utils::streamFor($element['contents']); if (empty($element['filename'])) { $uri = $element['contents']->getMetadata('uri'); if ($uri && \is_string($uri) && \substr($uri, 0, 6) !== 'php://' && \substr($uri, 0, 7) !== 'data://') { $element['filename'] = $uri; } } [$body, $headers] = $this->createElement($element['name'], $element['contents'], $element['filename'] ?? null, $element['headers'] ?? []); $stream->addStream(Utils::streamFor($this->getHeaders($headers))); $stream->addStream($body); $stream->addStream(Utils::streamFor("\r\n")); } /** * @param string[] $headers * * @return array{0: StreamInterface, 1: string[]} */ private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers) : array { // Set a default content-disposition header if one was no provided $disposition = self::getHeader($headers, 'content-disposition'); if (!$disposition) { $headers['Content-Disposition'] = $filename === '0' || $filename ? \sprintf('form-data; name="%s"; filename="%s"', $name, \basename($filename)) : "form-data; name=\"{$name}\""; } // Set a default content-length header if one was no provided $length = self::getHeader($headers, 'content-length'); if (!$length) { if ($length = $stream->getSize()) { $headers['Content-Length'] = (string) $length; } } // Set a default Content-Type if one was not supplied $type = self::getHeader($headers, 'content-type'); if (!$type && ($filename === '0' || $filename)) { $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; } return [$stream, $headers]; } /** * @param string[] $headers */ private static function getHeader(array $headers, string $key) : ?string { $lowercaseHeader = \strtolower($key); foreach ($headers as $k => $v) { if (\strtolower((string) $k) === $lowercaseHeader) { return $v; } } return null; } } vendor_prefixed/guzzlehttp/psr7/src/HttpFactory.php 0000644 00000006302 15174671617 0016631 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\RequestFactoryInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseFactoryInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ServerRequestFactoryInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ServerRequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamFactoryInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UploadedFileFactoryInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UploadedFileInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriFactoryInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Implements all of the PSR-17 interfaces. * * Note: in consuming code it is recommended to require the implemented interfaces * and inject the instance of this class multiple times. */ final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface { public function createUploadedFile(StreamInterface $stream, ?int $size = null, int $error = \UPLOAD_ERR_OK, ?string $clientFilename = null, ?string $clientMediaType = null) : UploadedFileInterface { if ($size === null) { $size = $stream->getSize(); } return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType); } public function createStream(string $content = '') : StreamInterface { return Utils::streamFor($content); } public function createStreamFromFile(string $file, string $mode = 'r') : StreamInterface { try { $resource = Utils::tryFopen($file, $mode); } catch (\RuntimeException $e) { if ('' === $mode || \false === \in_array($mode[0], ['r', 'w', 'a', 'x', 'c'], \true)) { throw new \InvalidArgumentException(\sprintf('Invalid file opening mode "%s"', $mode), 0, $e); } throw $e; } return Utils::streamFor($resource); } public function createStreamFromResource($resource) : StreamInterface { return Utils::streamFor($resource); } public function createServerRequest(string $method, $uri, array $serverParams = []) : ServerRequestInterface { if (empty($method)) { if (!empty($serverParams['REQUEST_METHOD'])) { $method = $serverParams['REQUEST_METHOD']; } else { throw new \InvalidArgumentException('Cannot determine HTTP method'); } } return new ServerRequest($method, $uri, [], null, '1.1', $serverParams); } public function createResponse(int $code = 200, string $reasonPhrase = '') : ResponseInterface { return new Response($code, [], null, '1.1', $reasonPhrase); } public function createRequest(string $method, $uri) : RequestInterface { return new Request($method, $uri); } public function createUri(string $uri = '') : UriInterface { return new Uri($uri); } } vendor_prefixed/guzzlehttp/psr7/src/InflateStream.php 0000644 00000002652 15174671617 0017124 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Uses PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content. * * This stream decorator converts the provided stream to a PHP stream resource, * then appends the zlib.inflate filter. The stream is then converted back * to a Guzzle stream resource to be used as a Guzzle stream. * * @see https://datatracker.ietf.org/doc/html/rfc1950 * @see https://datatracker.ietf.org/doc/html/rfc1952 * @see https://www.php.net/manual/en/filters.compression.php */ final class InflateStream implements StreamInterface { use StreamDecoratorTrait; /** @var StreamInterface */ private $stream; public function __construct(StreamInterface $stream) { $resource = StreamWrapper::getResource($stream); // Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data // See https://www.zlib.net/manual.html#Advanced definition of inflateInit2 // "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection" // Default window size is 15. \stream_filter_append($resource, 'zlib.inflate', \STREAM_FILTER_READ, ['window' => 15 + 32]); $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); } } vendor_prefixed/guzzlehttp/psr7/src/Message.php 0000644 00000020025 15174671617 0015744 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\MessageInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; final class Message { /** * Returns the string representation of an HTTP message. * * @param MessageInterface $message Message to convert to a string. */ public static function toString(MessageInterface $message) : string { if ($message instanceof RequestInterface) { $msg = \trim($message->getMethod() . ' ' . $message->getRequestTarget()) . ' HTTP/' . $message->getProtocolVersion(); if (!$message->hasHeader('host')) { $msg .= "\r\nHost: " . $message->getUri()->getHost(); } } elseif ($message instanceof ResponseInterface) { $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' . $message->getStatusCode() . ' ' . $message->getReasonPhrase(); } else { throw new \InvalidArgumentException('Unknown message type'); } foreach ($message->getHeaders() as $name => $values) { if (\is_string($name) && \strtolower($name) === 'set-cookie') { foreach ($values as $value) { $msg .= "\r\n{$name}: " . $value; } } else { $msg .= "\r\n{$name}: " . \implode(', ', $values); } } return "{$msg}\r\n\r\n" . $message->getBody(); } /** * Get a short summary of the message body. * * Will return `null` if the response is not printable. * * @param MessageInterface $message The message to get the body summary * @param int $truncateAt The maximum allowed size of the summary */ public static function bodySummary(MessageInterface $message, int $truncateAt = 120) : ?string { $body = $message->getBody(); if (!$body->isSeekable() || !$body->isReadable()) { return null; } $size = $body->getSize(); if ($size === 0) { return null; } $body->rewind(); $summary = $body->read($truncateAt); $body->rewind(); if ($size > $truncateAt) { $summary .= ' (truncated...)'; } // Matches any printable character, including unicode characters: // letters, marks, numbers, punctuation, spacing, and separators. if (\preg_match('/[^\\pL\\pM\\pN\\pP\\pS\\pZ\\n\\r\\t]/u', $summary) !== 0) { return null; } return $summary; } /** * Attempts to rewind a message body and throws an exception on failure. * * The body of the message will only be rewound if a call to `tell()` * returns a value other than `0`. * * @param MessageInterface $message Message to rewind * * @throws \RuntimeException */ public static function rewindBody(MessageInterface $message) : void { $body = $message->getBody(); if ($body->tell()) { $body->rewind(); } } /** * Parses an HTTP message into an associative array. * * The array contains the "start-line" key containing the start line of * the message, "headers" key containing an associative array of header * array values, and a "body" key containing the body of the message. * * @param string $message HTTP request or response to parse. */ public static function parseMessage(string $message) : array { if (!$message) { throw new \InvalidArgumentException('Invalid message'); } $message = \ltrim($message, "\r\n"); $messageParts = \preg_split("/\r?\n\r?\n/", $message, 2); if ($messageParts === \false || \count($messageParts) !== 2) { throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); } [$rawHeaders, $body] = $messageParts; $rawHeaders .= "\r\n"; // Put back the delimiter we split previously $headerParts = \preg_split("/\r?\n/", $rawHeaders, 2); if ($headerParts === \false || \count($headerParts) !== 2) { throw new \InvalidArgumentException('Invalid message: Missing status line'); } [$startLine, $rawHeaders] = $headerParts; if (\preg_match("/(?:^HTTP\\/|^[A-Z]+ \\S+ HTTP\\/)(\\d+(?:\\.\\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 $rawHeaders = \preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); } /** @var array[] $headerLines */ $count = \preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, \PREG_SET_ORDER); // If these aren't the same, then one line didn't match and there's an invalid header. if ($count !== \substr_count($rawHeaders, "\n")) { // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 if (\preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); } throw new \InvalidArgumentException('Invalid header syntax'); } $headers = []; foreach ($headerLines as $headerLine) { $headers[$headerLine[1]][] = $headerLine[2]; } return ['start-line' => $startLine, 'headers' => $headers, 'body' => $body]; } /** * Constructs a URI for an HTTP request message. * * @param string $path Path from the start-line * @param array $headers Array of headers (each value an array). */ public static function parseRequestUri(string $path, array $headers) : string { $hostKey = \array_filter(\array_keys($headers), function ($k) { // Numeric array keys are converted to int by PHP. $k = (string) $k; return \strtolower($k) === 'host'; }); // If no host is found, then a full URI cannot be constructed. if (!$hostKey) { return $path; } $host = $headers[\reset($hostKey)][0]; $scheme = \substr($host, -4) === ':443' ? 'https' : 'http'; return $scheme . '://' . $host . '/' . \ltrim($path, '/'); } /** * Parses a request message string into a request object. * * @param string $message Request message string. */ public static function parseRequest(string $message) : RequestInterface { $data = self::parseMessage($message); $matches = []; if (!\preg_match('/^[\\S]+\\s+([a-zA-Z]+:\\/\\/|\\/).*/', $data['start-line'], $matches)) { throw new \InvalidArgumentException('Invalid request string'); } $parts = \explode(' ', $data['start-line'], 3); $version = isset($parts[2]) ? \explode('/', $parts[2])[1] : '1.1'; $request = new Request($parts[0], $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1], $data['headers'], $data['body'], $version); return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); } /** * Parses a response message string into a response object. * * @param string $message Response message string. */ public static function parseResponse(string $message) : ResponseInterface { $data = self::parseMessage($message); // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2 // the space between status-code and reason-phrase is required. But // browsers accept responses without space and reason as well. if (!\preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); } $parts = \explode(' ', $data['start-line'], 3); return new Response((int) $parts[1], $data['headers'], $data['body'], \explode('/', $parts[0])[1], $parts[2] ?? null); } } vendor_prefixed/guzzlehttp/psr7/src/BufferStream.php 0000644 00000006263 15174671617 0016755 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Provides a buffer stream that can be written to to fill a buffer, and read * from to remove bytes from the buffer. * * This stream returns a "hwm" metadata value that tells upstream consumers * what the configured high water mark of the stream is, or the maximum * preferred size of the buffer. */ final class BufferStream implements StreamInterface { /** @var int */ private $hwm; /** @var string */ private $buffer = ''; /** * @param int $hwm High water mark, representing the preferred maximum * buffer size. If the size of the buffer exceeds the high * water mark, then calls to write will continue to succeed * but will return 0 to inform writers to slow down * until the buffer has been drained by reading from it. */ public function __construct(int $hwm = 16384) { $this->hwm = $hwm; } public function __toString() : string { return $this->getContents(); } public function getContents() : string { $buffer = $this->buffer; $this->buffer = ''; return $buffer; } public function close() : void { $this->buffer = ''; } public function detach() { $this->close(); return null; } public function getSize() : ?int { return \strlen($this->buffer); } public function isReadable() : bool { return \true; } public function isWritable() : bool { return \true; } public function isSeekable() : bool { return \false; } public function rewind() : void { $this->seek(0); } public function seek($offset, $whence = \SEEK_SET) : void { throw new \RuntimeException('Cannot seek a BufferStream'); } public function eof() : bool { return \strlen($this->buffer) === 0; } public function tell() : int { throw new \RuntimeException('Cannot determine the position of a BufferStream'); } /** * Reads data from the buffer. */ public function read($length) : string { $currentLength = \strlen($this->buffer); if ($length >= $currentLength) { // No need to slice the buffer because we don't have enough data. $result = $this->buffer; $this->buffer = ''; } else { // Slice up the result to provide a subset of the buffer. $result = \substr($this->buffer, 0, $length); $this->buffer = \substr($this->buffer, $length); } return $result; } /** * Writes data to the buffer. */ public function write($string) : int { $this->buffer .= $string; if (\strlen($this->buffer) >= $this->hwm) { return 0; } return \strlen($string); } /** * @return mixed */ public function getMetadata($key = null) { if ($key === 'hwm') { return $this->hwm; } return $key ? null : []; } } vendor_prefixed/guzzlehttp/psr7/src/Utils.php 0000644 00000036271 15174671617 0015472 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ServerRequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; final class Utils { /** * Remove the items given by the keys, case insensitively from the data. * * @param (string|int)[] $keys */ public static function caselessRemove(array $keys, array $data) : array { $result = []; foreach ($keys as &$key) { $key = \strtolower((string) $key); } foreach ($data as $k => $v) { if (!\in_array(\strtolower((string) $k), $keys)) { $result[$k] = $v; } } return $result; } /** * Copy the contents of a stream into another stream until the given number * of bytes have been read. * * @param StreamInterface $source Stream to read from * @param StreamInterface $dest Stream to write to * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. * * @throws \RuntimeException on error. */ public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1) : void { $bufferSize = 8192; if ($maxLen === -1) { while (!$source->eof()) { if (!$dest->write($source->read($bufferSize))) { break; } } } else { $remaining = $maxLen; while ($remaining > 0 && !$source->eof()) { $buf = $source->read(\min($bufferSize, $remaining)); $len = \strlen($buf); if (!$len) { break; } $remaining -= $len; $dest->write($buf); } } } /** * Copy the contents of a stream into a string until the given number of * bytes have been read. * * @param StreamInterface $stream Stream to read * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. * * @throws \RuntimeException on error. */ public static function copyToString(StreamInterface $stream, int $maxLen = -1) : string { $buffer = ''; if ($maxLen === -1) { while (!$stream->eof()) { $buf = $stream->read(1048576); if ($buf === '') { break; } $buffer .= $buf; } return $buffer; } $len = 0; while (!$stream->eof() && $len < $maxLen) { $buf = $stream->read($maxLen - $len); if ($buf === '') { break; } $buffer .= $buf; $len = \strlen($buffer); } return $buffer; } /** * Calculate a hash of a stream. * * This method reads the entire stream to calculate a rolling hash, based * on PHP's `hash_init` functions. * * @param StreamInterface $stream Stream to calculate the hash for * @param string $algo Hash algorithm (e.g. md5, crc32, etc) * @param bool $rawOutput Whether or not to use raw output * * @throws \RuntimeException on error. */ public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = \false) : string { $pos = $stream->tell(); if ($pos > 0) { $stream->rewind(); } $ctx = \hash_init($algo); while (!$stream->eof()) { \hash_update($ctx, $stream->read(1048576)); } $out = \hash_final($ctx, $rawOutput); $stream->seek($pos); return $out; } /** * Clone and modify a request with the given changes. * * This method is useful for reducing the number of clones needed to mutate * a message. * * The changes can be one of: * - method: (string) Changes the HTTP method. * - set_headers: (array) Sets the given headers. * - remove_headers: (array) Remove the given headers. * - body: (mixed) Sets the given body. * - uri: (UriInterface) Set the URI. * - query: (string) Set the query string value of the URI. * - version: (string) Set the protocol version. * * @param RequestInterface $request Request to clone and modify. * @param array $changes Changes to apply. */ public static function modifyRequest(RequestInterface $request, array $changes) : RequestInterface { if (!$changes) { return $request; } $headers = $request->getHeaders(); if (!isset($changes['uri'])) { $uri = $request->getUri(); } else { // Remove the host header if one is on the URI if ($host = $changes['uri']->getHost()) { $changes['set_headers']['Host'] = $host; if ($port = $changes['uri']->getPort()) { $standardPorts = ['http' => 80, 'https' => 443]; $scheme = $changes['uri']->getScheme(); if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { $changes['set_headers']['Host'] .= ':' . $port; } } } $uri = $changes['uri']; } if (!empty($changes['remove_headers'])) { $headers = self::caselessRemove($changes['remove_headers'], $headers); } if (!empty($changes['set_headers'])) { $headers = self::caselessRemove(\array_keys($changes['set_headers']), $headers); $headers = $changes['set_headers'] + $headers; } if (isset($changes['query'])) { $uri = $uri->withQuery($changes['query']); } if ($request instanceof ServerRequestInterface) { $new = (new ServerRequest($changes['method'] ?? $request->getMethod(), $uri, $headers, $changes['body'] ?? $request->getBody(), $changes['version'] ?? $request->getProtocolVersion(), $request->getServerParams()))->withParsedBody($request->getParsedBody())->withQueryParams($request->getQueryParams())->withCookieParams($request->getCookieParams())->withUploadedFiles($request->getUploadedFiles()); foreach ($request->getAttributes() as $key => $value) { $new = $new->withAttribute($key, $value); } return $new; } return new Request($changes['method'] ?? $request->getMethod(), $uri, $headers, $changes['body'] ?? $request->getBody(), $changes['version'] ?? $request->getProtocolVersion()); } /** * Read a line from the stream up to the maximum allowed buffer length. * * @param StreamInterface $stream Stream to read from * @param int|null $maxLength Maximum buffer length */ public static function readLine(StreamInterface $stream, ?int $maxLength = null) : string { $buffer = ''; $size = 0; while (!$stream->eof()) { if ('' === ($byte = $stream->read(1))) { return $buffer; } $buffer .= $byte; // Break when a new line is found or the max length - 1 is reached if ($byte === "\n" || ++$size === $maxLength - 1) { break; } } return $buffer; } /** * Redact the password in the user info part of a URI. */ public static function redactUserInfo(UriInterface $uri) : UriInterface { $userInfo = $uri->getUserInfo(); if (\false !== ($pos = \strpos($userInfo, ':'))) { return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); } return $uri; } /** * Create a new stream based on the input type. * * Options is an associative array that can contain the following keys: * - metadata: Array of custom metadata. * - size: Size of the stream. * * This method accepts the following `$resource` types: * - `Psr\Http\Message\StreamInterface`: Returns the value as-is. * - `string`: Creates a stream object that uses the given string as the contents. * - `resource`: Creates a stream object that wraps the given PHP stream resource. * - `Iterator`: If the provided value implements `Iterator`, then a read-only * stream object will be created that wraps the given iterable. Each time the * stream is read from, data from the iterator will fill a buffer and will be * continuously called until the buffer is equal to the requested read size. * Subsequent read calls will first read from the buffer and then call `next` * on the underlying iterator until it is exhausted. * - `object` with `__toString()`: If the object has the `__toString()` method, * the object will be cast to a string and then a stream will be returned that * uses the string value. * - `NULL`: When `null` is passed, an empty stream object is returned. * - `callable` When a callable is passed, a read-only stream object will be * created that invokes the given callable. The callable is invoked with the * number of suggested bytes to read. The callable can return any number of * bytes, but MUST return `false` when there is no more data to return. The * stream object that wraps the callable will invoke the callable until the * number of requested bytes are available. Any additional bytes will be * buffered and used in subsequent reads. * * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data * @param array{size?: int, metadata?: array} $options Additional options * * @throws \InvalidArgumentException if the $resource arg is not valid. */ public static function streamFor($resource = '', array $options = []) : StreamInterface { if (\is_scalar($resource)) { $stream = self::tryFopen('php://temp', 'r+'); if ($resource !== '') { \fwrite($stream, (string) $resource); \fseek($stream, 0); } return new Stream($stream, $options); } switch (\gettype($resource)) { case 'resource': /* * The 'php://input' is a special stream with quirks and inconsistencies. * We avoid using that stream by reading it into php://temp */ /** @var resource $resource */ if ((\stream_get_meta_data($resource)['uri'] ?? '') === 'php://input') { $stream = self::tryFopen('php://temp', 'w+'); \stream_copy_to_stream($resource, $stream); \fseek($stream, 0); $resource = $stream; } return new Stream($resource, $options); case 'object': /** @var object $resource */ if ($resource instanceof StreamInterface) { return $resource; } elseif ($resource instanceof \Iterator) { return new PumpStream(function () use($resource) { if (!$resource->valid()) { return \false; } $result = $resource->current(); $resource->next(); return $result; }, $options); } elseif (\method_exists($resource, '__toString')) { return self::streamFor((string) $resource, $options); } break; case 'NULL': return new Stream(self::tryFopen('php://temp', 'r+'), $options); } if (\is_callable($resource)) { return new PumpStream($resource, $options); } throw new \InvalidArgumentException('Invalid resource type: ' . \gettype($resource)); } /** * Safely opens a PHP stream resource using a filename. * * When fopen fails, PHP normally raises a warning. This function adds an * error handler that checks for errors and throws an exception instead. * * @param string $filename File to open * @param string $mode Mode used to open the file * * @return resource * * @throws \RuntimeException if the file cannot be opened */ public static function tryFopen(string $filename, string $mode) { $ex = null; \set_error_handler(static function (int $errno, string $errstr) use($filename, $mode, &$ex) : bool { $ex = new \RuntimeException(\sprintf('Unable to open "%s" using mode "%s": %s', $filename, $mode, $errstr)); return \true; }); try { /** @var resource $handle */ $handle = \fopen($filename, $mode); } catch (\Throwable $e) { $ex = new \RuntimeException(\sprintf('Unable to open "%s" using mode "%s": %s', $filename, $mode, $e->getMessage()), 0, $e); } \restore_error_handler(); if ($ex) { /** @var \RuntimeException $ex */ throw $ex; } return $handle; } /** * Safely gets the contents of a given stream. * * When stream_get_contents fails, PHP normally raises a warning. This * function adds an error handler that checks for errors and throws an * exception instead. * * @param resource $stream * * @throws \RuntimeException if the stream cannot be read */ public static function tryGetContents($stream) : string { $ex = null; \set_error_handler(static function (int $errno, string $errstr) use(&$ex) : bool { $ex = new \RuntimeException(\sprintf('Unable to read stream contents: %s', $errstr)); return \true; }); try { /** @var string|false $contents */ $contents = \stream_get_contents($stream); if ($contents === \false) { $ex = new \RuntimeException('Unable to read stream contents'); } } catch (\Throwable $e) { $ex = new \RuntimeException(\sprintf('Unable to read stream contents: %s', $e->getMessage()), 0, $e); } \restore_error_handler(); if ($ex) { /** @var \RuntimeException $ex */ throw $ex; } return $contents; } /** * Returns a UriInterface for the given value. * * This function accepts a string or UriInterface and returns a * UriInterface for the given value. If the value is already a * UriInterface, it is returned as-is. * * @param string|UriInterface $uri * * @throws \InvalidArgumentException */ public static function uriFor($uri) : UriInterface { if ($uri instanceof UriInterface) { return $uri; } if (\is_string($uri)) { return new Uri($uri); } throw new \InvalidArgumentException('URI must be a string or UriInterface'); } } vendor_prefixed/guzzlehttp/psr7/src/Exception/MalformedUriException.php 0000644 00000000406 15174671617 0022564 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7\Exception; use InvalidArgumentException; /** * Exception thrown if a URI cannot be parsed because it's malformed. */ class MalformedUriException extends InvalidArgumentException { } vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php 0000644 00000002313 15174671617 0017316 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Stream decorator that begins dropping data once the size of the underlying * stream becomes too full. */ final class DroppingStream implements StreamInterface { use StreamDecoratorTrait; /** @var int */ private $maxLength; /** @var StreamInterface */ private $stream; /** * @param StreamInterface $stream Underlying stream to decorate. * @param int $maxLength Maximum size before dropping data. */ public function __construct(StreamInterface $stream, int $maxLength) { $this->stream = $stream; $this->maxLength = $maxLength; } public function write($string) : int { $diff = $this->maxLength - $this->stream->getSize(); // Begin returning 0 when the underlying stream is too large. if ($diff <= 0) { return 0; } // Write the stream or a subset of the stream if needed. if (\strlen($string) < $diff) { return $this->stream->write($string); } return $this->stream->write(\substr($string, 0, $diff)); } } vendor_prefixed/guzzlehttp/psr7/src/UriResolver.php 0000644 00000020532 15174671617 0016644 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Resolves a URI reference in the context of a base URI and the opposite way. * * @author Tobias Schultze * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5 */ final class UriResolver { /** * Removes dot segments from a path and returns the new path. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4 */ public static function removeDotSegments(string $path) : string { if ($path === '' || $path === '/') { return $path; } $results = []; $segments = \explode('/', $path); foreach ($segments as $segment) { if ($segment === '..') { \array_pop($results); } elseif ($segment !== '.') { $results[] = $segment; } } $newPath = \implode('/', $results); if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) { // Re-add the leading slash if necessary for cases like "/.." $newPath = '/' . $newPath; } elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) { // Add the trailing slash if necessary // If newPath is not empty, then $segment must be set and is the last segment from the foreach $newPath .= '/'; } return $newPath; } /** * Converts the relative URI into a new URI that is resolved against the base URI. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2 */ public static function resolve(UriInterface $base, UriInterface $rel) : UriInterface { if ((string) $rel === '') { // we can simply return the same base URI instance for this same-document reference return $base; } if ($rel->getScheme() != '') { return $rel->withPath(self::removeDotSegments($rel->getPath())); } if ($rel->getAuthority() != '') { $targetAuthority = $rel->getAuthority(); $targetPath = self::removeDotSegments($rel->getPath()); $targetQuery = $rel->getQuery(); } else { $targetAuthority = $base->getAuthority(); if ($rel->getPath() === '') { $targetPath = $base->getPath(); $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); } else { if ($rel->getPath()[0] === '/') { $targetPath = $rel->getPath(); } else { if ($targetAuthority != '' && $base->getPath() === '') { $targetPath = '/' . $rel->getPath(); } else { $lastSlashPos = \strrpos($base->getPath(), '/'); if ($lastSlashPos === \false) { $targetPath = $rel->getPath(); } else { $targetPath = \substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); } } } $targetPath = self::removeDotSegments($targetPath); $targetQuery = $rel->getQuery(); } } return new Uri(Uri::composeComponents($base->getScheme(), $targetAuthority, $targetPath, $targetQuery, $rel->getFragment())); } /** * Returns the target URI as a relative reference from the base URI. * * This method is the counterpart to resolve(): * * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) * * One use-case is to use the current request URI as base URI and then generate relative links in your documents * to reduce the document size or offer self-contained downloadable document archives. * * $base = new Uri('http://example.com/a/b/'); * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. * * This method also accepts a target that is already relative and will try to relativize it further. Only a * relative-path reference will be returned as-is. * * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well */ public static function relativize(UriInterface $base, UriInterface $target) : UriInterface { if ($target->getScheme() !== '' && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')) { return $target; } if (Uri::isRelativePathReference($target)) { // As the target is already highly relative we return it as-is. It would be possible to resolve // the target with `$target = self::resolve($base, $target);` and then try make it more relative // by removing a duplicate query. But let's not do that automatically. return $target; } if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { return $target->withScheme(''); } // We must remove the path before removing the authority because if the path starts with two slashes, the URI // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also // invalid. $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); if ($base->getPath() !== $target->getPath()) { return $emptyPathUri->withPath(self::getRelativePath($base, $target)); } if ($base->getQuery() === $target->getQuery()) { // Only the target fragment is left. And it must be returned even if base and target fragment are the same. return $emptyPathUri->withQuery(''); } // If the base URI has a query but the target has none, we cannot return an empty path reference as it would // inherit the base query component when resolving. if ($target->getQuery() === '') { $segments = \explode('/', $target->getPath()); /** @var string $lastSegment */ $lastSegment = \end($segments); return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); } return $emptyPathUri; } private static function getRelativePath(UriInterface $base, UriInterface $target) : string { $sourceSegments = \explode('/', $base->getPath()); $targetSegments = \explode('/', $target->getPath()); \array_pop($sourceSegments); $targetLastSegment = \array_pop($targetSegments); foreach ($sourceSegments as $i => $segment) { if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { unset($sourceSegments[$i], $targetSegments[$i]); } else { break; } } $targetSegments[] = $targetLastSegment; $relativePath = \str_repeat('../', \count($sourceSegments)) . \implode('/', $targetSegments); // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. if ('' === $relativePath || \false !== \strpos(\explode('/', $relativePath, 2)[0], ':')) { $relativePath = "./{$relativePath}"; } elseif ('/' === $relativePath[0]) { if ($base->getAuthority() != '' && $base->getPath() === '') { // In this case an extra slash is added by resolve() automatically. So we must not add one here. $relativePath = ".{$relativePath}"; } else { $relativePath = "./{$relativePath}"; } } return $relativePath; } private function __construct() { // cannot be instantiated } } vendor_prefixed/guzzlehttp/psr7/src/UriNormalizer.php 0000644 00000020123 15174671617 0017161 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Provides methods to normalize and compare URIs. * * @author Tobias Schultze * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6 */ final class UriNormalizer { /** * Default normalizations which only include the ones that preserve semantics. */ public const PRESERVING_NORMALIZATIONS = self::CAPITALIZE_PERCENT_ENCODING | self::DECODE_UNRESERVED_CHARACTERS | self::CONVERT_EMPTY_PATH | self::REMOVE_DEFAULT_HOST | self::REMOVE_DEFAULT_PORT | self::REMOVE_DOT_SEGMENTS; /** * All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. * * Example: http://example.org/a%c2%b1b → http://example.org/a%C2%B1b */ public const CAPITALIZE_PERCENT_ENCODING = 1; /** * Decodes percent-encoded octets of unreserved characters. * * For consistency, percent-encoded octets in the ranges of ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), * hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and, * when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers. * * Example: http://example.org/%7Eusern%61me/ → http://example.org/~username/ */ public const DECODE_UNRESERVED_CHARACTERS = 2; /** * Converts the empty path to "/" for http and https URIs. * * Example: http://example.org → http://example.org/ */ public const CONVERT_EMPTY_PATH = 4; /** * Removes the default host of the given URI scheme from the URI. * * Only the "file" scheme defines the default host "localhost". * All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` * are equivalent according to RFC 3986. The first format is not accepted * by PHPs stream functions and thus already normalized implicitly to the * second format in the Uri class. See `GuzzleHttp\Psr7\Uri::composeComponents`. * * Example: file://localhost/myfile → file:///myfile */ public const REMOVE_DEFAULT_HOST = 8; /** * Removes the default port of the given URI scheme from the URI. * * Example: http://example.org:80/ → http://example.org/ */ public const REMOVE_DEFAULT_PORT = 16; /** * Removes unnecessary dot-segments. * * Dot-segments in relative-path references are not removed as it would * change the semantics of the URI reference. * * Example: http://example.org/../a/b/../c/./d.html → http://example.org/a/c/d.html */ public const REMOVE_DOT_SEGMENTS = 32; /** * Paths which include two or more adjacent slashes are converted to one. * * Webservers usually ignore duplicate slashes and treat those URIs equivalent. * But in theory those URIs do not need to be equivalent. So this normalization * may change the semantics. Encoded slashes (%2F) are not removed. * * Example: http://example.org//foo///bar.html → http://example.org/foo/bar.html */ public const REMOVE_DUPLICATE_SLASHES = 64; /** * Sort query parameters with their values in alphabetical order. * * However, the order of parameters in a URI may be significant (this is not defined by the standard). * So this normalization is not safe and may change the semantics of the URI. * * Example: ?lang=en&article=fred → ?article=fred&lang=en * * Note: The sorting is neither locale nor Unicode aware (the URI query does not get decoded at all) as the * purpose is to be able to compare URIs in a reproducible way, not to have the params sorted perfectly. */ public const SORT_QUERY_PARAMETERS = 128; /** * Returns a normalized URI. * * The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. * This methods adds additional normalizations that can be configured with the $flags parameter. * * PSR-7 UriInterface cannot distinguish between an empty component and a missing component as * getQuery(), getFragment() etc. always return a string. This means the URIs "/?#" and "/" are * treated equivalent which is not necessarily true according to RFC 3986. But that difference * is highly uncommon in reality. So this potential normalization is implied in PSR-7 as well. * * @param UriInterface $uri The URI to normalize * @param int $flags A bitmask of normalizations to apply, see constants * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2 */ public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS) : UriInterface { if ($flags & self::CAPITALIZE_PERCENT_ENCODING) { $uri = self::capitalizePercentEncoding($uri); } if ($flags & self::DECODE_UNRESERVED_CHARACTERS) { $uri = self::decodeUnreservedCharacters($uri); } if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')) { $uri = $uri->withPath('/'); } if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { $uri = $uri->withHost(''); } if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { $uri = $uri->withPort(null); } if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); } if ($flags & self::REMOVE_DUPLICATE_SLASHES) { $uri = $uri->withPath(\preg_replace('#//++#', '/', $uri->getPath())); } if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { $queryKeyValues = \explode('&', $uri->getQuery()); \sort($queryKeyValues); $uri = $uri->withQuery(\implode('&', $queryKeyValues)); } return $uri; } /** * Whether two URIs can be considered equivalent. * * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be * resolved against the same base URI. If this is not the case, determination of equivalence or difference of * relative references does not mean anything. * * @param UriInterface $uri1 An URI to compare * @param UriInterface $uri2 An URI to compare * @param int $normalizations A bitmask of normalizations to apply, see constants * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS) : bool { return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); } private static function capitalizePercentEncoding(UriInterface $uri) : UriInterface { $regex = '/(?:%[A-Fa-f0-9]{2})++/'; $callback = function (array $match) : string { return \strtoupper($match[0]); }; return $uri->withPath(\preg_replace_callback($regex, $callback, $uri->getPath()))->withQuery(\preg_replace_callback($regex, $callback, $uri->getQuery())); } private static function decodeUnreservedCharacters(UriInterface $uri) : UriInterface { $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; $callback = function (array $match) : string { return \rawurldecode($match[0]); }; return $uri->withPath(\preg_replace_callback($regex, $callback, $uri->getPath()))->withQuery(\preg_replace_callback($regex, $callback, $uri->getQuery())); } private function __construct() { // cannot be instantiated } } vendor_prefixed/guzzlehttp/psr7/src/NoSeekStream.php 0000644 00000001060 15174671617 0016716 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Stream decorator that prevents a stream from being seeked. */ final class NoSeekStream implements StreamInterface { use StreamDecoratorTrait; /** @var StreamInterface */ private $stream; public function seek($offset, $whence = \SEEK_SET) : void { throw new \RuntimeException('Cannot seek a NoSeekStream'); } public function isSeekable() : bool { return \false; } } vendor_prefixed/guzzlehttp/psr7/src/ServerRequest.php 0000644 00000022214 15174671617 0017201 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use InvalidArgumentException; use WPMailSMTP\Vendor\Psr\Http\Message\ServerRequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UploadedFileInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Server-side HTTP request * * Extends the Request definition to add methods for accessing incoming data, * specifically server parameters, cookies, matched path parameters, query * string arguments, body parameters, and upload file information. * * "Attributes" are discovered via decomposing the request (and usually * specifically the URI path), and typically will be injected by the application. * * Requests are considered immutable; all methods that might change state are * implemented such that they retain the internal state of the current * message and return a new instance that contains the changed state. */ class ServerRequest extends Request implements ServerRequestInterface { /** * @var array */ private $attributes = []; /** * @var array */ private $cookieParams = []; /** * @var array|object|null */ private $parsedBody; /** * @var array */ private $queryParams = []; /** * @var array */ private $serverParams; /** * @var array */ private $uploadedFiles = []; /** * @param string $method HTTP method * @param string|UriInterface $uri URI * @param (string|string[])[] $headers Request headers * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version * @param array $serverParams Typically the $_SERVER superglobal */ public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1', array $serverParams = []) { $this->serverParams = $serverParams; parent::__construct($method, $uri, $headers, $body, $version); } /** * Return an UploadedFile instance array. * * @param array $files An array which respect $_FILES structure * * @throws InvalidArgumentException for unrecognized values */ public static function normalizeFiles(array $files) : array { $normalized = []; foreach ($files as $key => $value) { if ($value instanceof UploadedFileInterface) { $normalized[$key] = $value; } elseif (\is_array($value) && isset($value['tmp_name'])) { $normalized[$key] = self::createUploadedFileFromSpec($value); } elseif (\is_array($value)) { $normalized[$key] = self::normalizeFiles($value); continue; } else { throw new InvalidArgumentException('Invalid value in files specification'); } } return $normalized; } /** * Create and return an UploadedFile instance from a $_FILES specification. * * If the specification represents an array of values, this method will * delegate to normalizeNestedFileSpec() and return that return value. * * @param array $value $_FILES struct * * @return UploadedFileInterface|UploadedFileInterface[] */ private static function createUploadedFileFromSpec(array $value) { if (\is_array($value['tmp_name'])) { return self::normalizeNestedFileSpec($value); } return new UploadedFile($value['tmp_name'], (int) $value['size'], (int) $value['error'], $value['name'], $value['type']); } /** * Normalize an array of file specifications. * * Loops through all nested files and returns a normalized array of * UploadedFileInterface instances. * * @return UploadedFileInterface[] */ private static function normalizeNestedFileSpec(array $files = []) : array { $normalizedFiles = []; foreach (\array_keys($files['tmp_name']) as $key) { $spec = ['tmp_name' => $files['tmp_name'][$key], 'size' => $files['size'][$key] ?? null, 'error' => $files['error'][$key] ?? null, 'name' => $files['name'][$key] ?? null, 'type' => $files['type'][$key] ?? null]; $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); } return $normalizedFiles; } /** * Return a ServerRequest populated with superglobals: * $_GET * $_POST * $_COOKIE * $_FILES * $_SERVER */ public static function fromGlobals() : ServerRequestInterface { $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; $headers = \getallheaders(); $uri = self::getUriFromGlobals(); $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? \str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); return $serverRequest->withCookieParams($_COOKIE)->withQueryParams($_GET)->withParsedBody($_POST)->withUploadedFiles(self::normalizeFiles($_FILES)); } private static function extractHostAndPortFromAuthority(string $authority) : array { $uri = 'http://' . $authority; $parts = \parse_url($uri); if (\false === $parts) { return [null, null]; } $host = $parts['host'] ?? null; $port = $parts['port'] ?? null; return [$host, $port]; } /** * Get a Uri populated with values from $_SERVER. */ public static function getUriFromGlobals() : UriInterface { $uri = new Uri(''); $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); $hasPort = \false; if (isset($_SERVER['HTTP_HOST'])) { [$host, $port] = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); if ($host !== null) { $uri = $uri->withHost($host); } if ($port !== null) { $hasPort = \true; $uri = $uri->withPort($port); } } elseif (isset($_SERVER['SERVER_NAME'])) { $uri = $uri->withHost($_SERVER['SERVER_NAME']); } elseif (isset($_SERVER['SERVER_ADDR'])) { $uri = $uri->withHost($_SERVER['SERVER_ADDR']); } if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { $uri = $uri->withPort($_SERVER['SERVER_PORT']); } $hasQuery = \false; if (isset($_SERVER['REQUEST_URI'])) { $requestUriParts = \explode('?', $_SERVER['REQUEST_URI'], 2); $uri = $uri->withPath($requestUriParts[0]); if (isset($requestUriParts[1])) { $hasQuery = \true; $uri = $uri->withQuery($requestUriParts[1]); } } if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { $uri = $uri->withQuery($_SERVER['QUERY_STRING']); } return $uri; } public function getServerParams() : array { return $this->serverParams; } public function getUploadedFiles() : array { return $this->uploadedFiles; } public function withUploadedFiles(array $uploadedFiles) : ServerRequestInterface { $new = clone $this; $new->uploadedFiles = $uploadedFiles; return $new; } public function getCookieParams() : array { return $this->cookieParams; } public function withCookieParams(array $cookies) : ServerRequestInterface { $new = clone $this; $new->cookieParams = $cookies; return $new; } public function getQueryParams() : array { return $this->queryParams; } public function withQueryParams(array $query) : ServerRequestInterface { $new = clone $this; $new->queryParams = $query; return $new; } /** * @return array|object|null */ public function getParsedBody() { return $this->parsedBody; } public function withParsedBody($data) : ServerRequestInterface { $new = clone $this; $new->parsedBody = $data; return $new; } public function getAttributes() : array { return $this->attributes; } /** * @return mixed */ public function getAttribute($attribute, $default = null) { if (\false === \array_key_exists($attribute, $this->attributes)) { return $default; } return $this->attributes[$attribute]; } public function withAttribute($attribute, $value) : ServerRequestInterface { $new = clone $this; $new->attributes[$attribute] = $value; return $new; } public function withoutAttribute($attribute) : ServerRequestInterface { if (\false === \array_key_exists($attribute, $this->attributes)) { return $this; } $new = clone $this; unset($new->attributes[$attribute]); return $new; } } vendor_prefixed/guzzlehttp/psr7/src/StreamWrapper.php 0000644 00000010206 15174671617 0017154 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Converts Guzzle streams into PHP stream resources. * * @see https://www.php.net/streamwrapper */ final class StreamWrapper { /** @var resource */ public $context; /** @var StreamInterface */ private $stream; /** @var string r, r+, or w */ private $mode; /** * Returns a resource representing the stream. * * @param StreamInterface $stream The stream to get a resource for * * @return resource * * @throws \InvalidArgumentException if stream is not readable or writable */ public static function getResource(StreamInterface $stream) { self::register(); if ($stream->isReadable()) { $mode = $stream->isWritable() ? 'r+' : 'r'; } elseif ($stream->isWritable()) { $mode = 'w'; } else { throw new \InvalidArgumentException('The stream must be readable, ' . 'writable, or both.'); } return \fopen('guzzle://stream', $mode, \false, self::createStreamContext($stream)); } /** * Creates a stream context that can be used to open a stream as a php stream resource. * * @return resource */ public static function createStreamContext(StreamInterface $stream) { return \stream_context_create(['guzzle' => ['stream' => $stream]]); } /** * Registers the stream wrapper if needed */ public static function register() : void { if (!\in_array('guzzle', \stream_get_wrappers())) { \stream_wrapper_register('guzzle', __CLASS__); } } public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null) : bool { $options = \stream_context_get_options($this->context); if (!isset($options['guzzle']['stream'])) { return \false; } $this->mode = $mode; $this->stream = $options['guzzle']['stream']; return \true; } public function stream_read(int $count) : string { return $this->stream->read($count); } public function stream_write(string $data) : int { return $this->stream->write($data); } public function stream_tell() : int { return $this->stream->tell(); } public function stream_eof() : bool { return $this->stream->eof(); } public function stream_seek(int $offset, int $whence) : bool { $this->stream->seek($offset, $whence); return \true; } /** * @return resource|false */ public function stream_cast(int $cast_as) { $stream = clone $this->stream; $resource = $stream->detach(); return $resource ?? \false; } /** * @return array{ * dev: int, * ino: int, * mode: int, * nlink: int, * uid: int, * gid: int, * rdev: int, * size: int, * atime: int, * mtime: int, * ctime: int, * blksize: int, * blocks: int * }|false */ public function stream_stat() { if ($this->stream->getSize() === null) { return \false; } static $modeMap = ['r' => 33060, 'rb' => 33060, 'r+' => 33206, 'w' => 33188, 'wb' => 33188]; return ['dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0]; } /** * @return array{ * dev: int, * ino: int, * mode: int, * nlink: int, * uid: int, * gid: int, * rdev: int, * size: int, * atime: int, * mtime: int, * ctime: int, * blksize: int, * blocks: int * } */ public function url_stat(string $path, int $flags) : array { return ['dev' => 0, 'ino' => 0, 'mode' => 0, 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0]; } } vendor_prefixed/guzzlehttp/psr7/src/Response.php 0000644 00000010510 15174671617 0016154 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * PSR-7 response implementation. */ class Response implements ResponseInterface { use MessageTrait; /** Map of standard HTTP status code/reason phrases */ private const PHRASES = [100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Unordered Collection', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported', 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 510 => 'Not Extended', 511 => 'Network Authentication Required']; /** @var string */ private $reasonPhrase; /** @var int */ private $statusCode; /** * @param int $status Status code * @param (string|string[])[] $headers Response headers * @param string|resource|StreamInterface|null $body Response body * @param string $version Protocol version * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) */ public function __construct(int $status = 200, array $headers = [], $body = null, string $version = '1.1', ?string $reason = null) { $this->assertStatusCodeRange($status); $this->statusCode = $status; if ($body !== '' && $body !== null) { $this->stream = Utils::streamFor($body); } $this->setHeaders($headers); if ($reason == '' && isset(self::PHRASES[$this->statusCode])) { $this->reasonPhrase = self::PHRASES[$this->statusCode]; } else { $this->reasonPhrase = (string) $reason; } $this->protocol = $version; } public function getStatusCode() : int { return $this->statusCode; } public function getReasonPhrase() : string { return $this->reasonPhrase; } public function withStatus($code, $reasonPhrase = '') : ResponseInterface { $this->assertStatusCodeIsInteger($code); $code = (int) $code; $this->assertStatusCodeRange($code); $new = clone $this; $new->statusCode = $code; if ($reasonPhrase == '' && isset(self::PHRASES[$new->statusCode])) { $reasonPhrase = self::PHRASES[$new->statusCode]; } $new->reasonPhrase = (string) $reasonPhrase; return $new; } /** * @param mixed $statusCode */ private function assertStatusCodeIsInteger($statusCode) : void { if (\filter_var($statusCode, \FILTER_VALIDATE_INT) === \false) { throw new \InvalidArgumentException('Status code must be an integer value.'); } } private function assertStatusCodeRange(int $statusCode) : void { if ($statusCode < 100 || $statusCode >= 600) { throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); } } } vendor_prefixed/guzzlehttp/psr7/src/LimitStream.php 0000644 00000010216 15174671617 0016613 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Decorator used to return only a subset of a stream. */ final class LimitStream implements StreamInterface { use StreamDecoratorTrait; /** @var int Offset to start reading from */ private $offset; /** @var int Limit the number of bytes that can be read */ private $limit; /** @var StreamInterface */ private $stream; /** * @param StreamInterface $stream Stream to wrap * @param int $limit Total number of bytes to allow to be read * from the stream. Pass -1 for no limit. * @param int $offset Position to seek to before reading (only * works on seekable streams). */ public function __construct(StreamInterface $stream, int $limit = -1, int $offset = 0) { $this->stream = $stream; $this->setLimit($limit); $this->setOffset($offset); } public function eof() : bool { // Always return true if the underlying stream is EOF if ($this->stream->eof()) { return \true; } // No limit and the underlying stream is not at EOF if ($this->limit === -1) { return \false; } return $this->stream->tell() >= $this->offset + $this->limit; } /** * Returns the size of the limited subset of data */ public function getSize() : ?int { if (null === ($length = $this->stream->getSize())) { return null; } elseif ($this->limit === -1) { return $length - $this->offset; } else { return \min($this->limit, $length - $this->offset); } } /** * Allow for a bounded seek on the read limited stream */ public function seek($offset, $whence = \SEEK_SET) : void { if ($whence !== \SEEK_SET || $offset < 0) { throw new \RuntimeException(\sprintf('Cannot seek to offset %s with whence %s', $offset, $whence)); } $offset += $this->offset; if ($this->limit !== -1) { if ($offset > $this->offset + $this->limit) { $offset = $this->offset + $this->limit; } } $this->stream->seek($offset); } /** * Give a relative tell() */ public function tell() : int { return $this->stream->tell() - $this->offset; } /** * Set the offset to start limiting from * * @param int $offset Offset to seek to and begin byte limiting from * * @throws \RuntimeException if the stream cannot be seeked. */ public function setOffset(int $offset) : void { $current = $this->stream->tell(); if ($current !== $offset) { // If the stream cannot seek to the offset position, then read to it if ($this->stream->isSeekable()) { $this->stream->seek($offset); } elseif ($current > $offset) { throw new \RuntimeException("Could not seek to stream offset {$offset}"); } else { $this->stream->read($offset - $current); } } $this->offset = $offset; } /** * Set the limit of bytes that the decorator allows to be read from the * stream. * * @param int $limit Number of bytes to allow to be read from the stream. * Use -1 for no limit. */ public function setLimit(int $limit) : void { $this->limit = $limit; } public function read($length) : string { if ($this->limit === -1) { return $this->stream->read($length); } // Check if the current position is less than the total allowed // bytes + original offset $remaining = $this->offset + $this->limit - $this->stream->tell(); if ($remaining > 0) { // Only return the amount of requested data, ensuring that the byte // limit is not exceeded return $this->stream->read(\min($remaining, $length)); } return ''; } } vendor_prefixed/guzzlehttp/psr7/src/Uri.php 0000644 00000051515 15174671617 0015127 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Exception\MalformedUriException; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * PSR-7 URI implementation. * * @author Michael Dowling * @author Tobias Schultze * @author Matthew Weier O'Phinney */ class Uri implements UriInterface, \JsonSerializable { /** * Absolute http and https URIs require a host per RFC 7230 Section 2.7 * but in generic URIs the host can be empty. So for http(s) URIs * we apply this default host when no host is given yet to form a * valid URI. */ private const HTTP_DEFAULT_HOST = 'localhost'; private const DEFAULT_PORTS = ['http' => 80, 'https' => 443, 'ftp' => 21, 'gopher' => 70, 'nntp' => 119, 'news' => 119, 'telnet' => 23, 'tn3270' => 23, 'imap' => 143, 'pop' => 110, 'ldap' => 389]; /** * Unreserved characters for use in a regex. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3 */ private const CHAR_UNRESERVED = 'a-zA-Z0-9_\\-\\.~'; /** * Sub-delims for use in a regex. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 */ private const CHAR_SUB_DELIMS = '!\\$&\'\\(\\)\\*\\+,;='; private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26']; /** @var string Uri scheme. */ private $scheme = ''; /** @var string Uri user info. */ private $userInfo = ''; /** @var string Uri host. */ private $host = ''; /** @var int|null Uri port. */ private $port; /** @var string Uri path. */ private $path = ''; /** @var string Uri query string. */ private $query = ''; /** @var string Uri fragment. */ private $fragment = ''; /** @var string|null String representation */ private $composedComponents; public function __construct(string $uri = '') { if ($uri !== '') { $parts = self::parse($uri); if ($parts === \false) { throw new MalformedUriException("Unable to parse URI: {$uri}"); } $this->applyParts($parts); } } /** * UTF-8 aware \parse_url() replacement. * * The internal function produces broken output for non ASCII domain names * (IDN) when used with locales other than "C". * * On the other hand, cURL understands IDN correctly only when UTF-8 locale * is configured ("C.UTF-8", "en_US.UTF-8", etc.). * * @see https://bugs.php.net/bug.php?id=52923 * @see https://www.php.net/manual/en/function.parse-url.php#114817 * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING * * @return array|false */ private static function parse(string $url) { // If IPv6 $prefix = ''; if (\preg_match('%^(.*://\\[[0-9:a-fA-F]+\\])(.*?)$%', $url, $matches)) { /** @var array{0:string, 1:string, 2:string} $matches */ $prefix = $matches[1]; $url = $matches[2]; } /** @var string */ $encodedUrl = \preg_replace_callback('%[^:/@?&=#]+%usD', static function ($matches) { return \urlencode($matches[0]); }, $url); $result = \parse_url($prefix . $encodedUrl); if ($result === \false) { return \false; } return \array_map('urldecode', $result); } public function __toString() : string { if ($this->composedComponents === null) { $this->composedComponents = self::composeComponents($this->scheme, $this->getAuthority(), $this->path, $this->query, $this->fragment); } return $this->composedComponents; } /** * Composes a URI reference string from its various components. * * Usually this method does not need to be called manually but instead is used indirectly via * `Psr\Http\Message\UriInterface::__toString`. * * PSR-7 UriInterface treats an empty component the same as a missing component as * getQuery(), getFragment() etc. always return a string. This explains the slight * difference to RFC 3986 Section 5.3. * * Another adjustment is that the authority separator is added even when the authority is missing/empty * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to * that format). * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3 */ public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment) : string { $uri = ''; // weak type checks to also accept null until we can add scalar type hints if ($scheme != '') { $uri .= $scheme . ':'; } if ($authority != '' || $scheme === 'file') { $uri .= '//' . $authority; } if ($authority != '' && $path != '' && $path[0] != '/') { $path = '/' . $path; } $uri .= $path; if ($query != '') { $uri .= '?' . $query; } if ($fragment != '') { $uri .= '#' . $fragment; } return $uri; } /** * Whether the URI has the default port of the current scheme. * * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used * independently of the implementation. */ public static function isDefaultPort(UriInterface $uri) : bool { return $uri->getPort() === null || isset(self::DEFAULT_PORTS[$uri->getScheme()]) && $uri->getPort() === self::DEFAULT_PORTS[$uri->getScheme()]; } /** * Whether the URI is absolute, i.e. it has a scheme. * * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative * to another URI, the base URI. Relative references can be divided into several forms: * - network-path references, e.g. '//example.com/path' * - absolute-path references, e.g. '/path' * - relative-path references, e.g. 'subpath' * * @see Uri::isNetworkPathReference * @see Uri::isAbsolutePathReference * @see Uri::isRelativePathReference * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4 */ public static function isAbsolute(UriInterface $uri) : bool { return $uri->getScheme() !== ''; } /** * Whether the URI is a network-path reference. * * A relative reference that begins with two slash characters is termed an network-path reference. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 */ public static function isNetworkPathReference(UriInterface $uri) : bool { return $uri->getScheme() === '' && $uri->getAuthority() !== ''; } /** * Whether the URI is a absolute-path reference. * * A relative reference that begins with a single slash character is termed an absolute-path reference. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 */ public static function isAbsolutePathReference(UriInterface $uri) : bool { return $uri->getScheme() === '' && $uri->getAuthority() === '' && isset($uri->getPath()[0]) && $uri->getPath()[0] === '/'; } /** * Whether the URI is a relative-path reference. * * A relative reference that does not begin with a slash character is termed a relative-path reference. * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2 */ public static function isRelativePathReference(UriInterface $uri) : bool { return $uri->getScheme() === '' && $uri->getAuthority() === '' && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); } /** * Whether the URI is a same-document reference. * * A same-document reference refers to a URI that is, aside from its fragment * component, identical to the base URI. When no base URI is given, only an empty * URI reference (apart from its fragment) is considered a same-document reference. * * @param UriInterface $uri The URI to check * @param UriInterface|null $base An optional base URI to compare against * * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 */ public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null) : bool { if ($base !== null) { $uri = UriResolver::resolve($base, $uri); return $uri->getScheme() === $base->getScheme() && $uri->getAuthority() === $base->getAuthority() && $uri->getPath() === $base->getPath() && $uri->getQuery() === $base->getQuery(); } return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; } /** * Creates a new URI with a specific query string value removed. * * Any existing query string values that exactly match the provided key are * removed. * * @param UriInterface $uri URI to use as a base. * @param string $key Query string key to remove. */ public static function withoutQueryValue(UriInterface $uri, string $key) : UriInterface { $result = self::getFilteredQueryString($uri, [$key]); return $uri->withQuery(\implode('&', $result)); } /** * Creates a new URI with a specific query string value. * * Any existing query string values that exactly match the provided key are * removed and replaced with the given key value pair. * * A value of null will set the query string key without a value, e.g. "key" * instead of "key=value". * * @param UriInterface $uri URI to use as a base. * @param string $key Key to set. * @param string|null $value Value to set */ public static function withQueryValue(UriInterface $uri, string $key, ?string $value) : UriInterface { $result = self::getFilteredQueryString($uri, [$key]); $result[] = self::generateQueryString($key, $value); return $uri->withQuery(\implode('&', $result)); } /** * Creates a new URI with multiple specific query string values. * * It has the same behavior as withQueryValue() but for an associative array of key => value. * * @param UriInterface $uri URI to use as a base. * @param (string|null)[] $keyValueArray Associative array of key and values */ public static function withQueryValues(UriInterface $uri, array $keyValueArray) : UriInterface { $result = self::getFilteredQueryString($uri, \array_keys($keyValueArray)); foreach ($keyValueArray as $key => $value) { $result[] = self::generateQueryString((string) $key, $value !== null ? (string) $value : null); } return $uri->withQuery(\implode('&', $result)); } /** * Creates a URI from a hash of `parse_url` components. * * @see https://www.php.net/manual/en/function.parse-url.php * * @throws MalformedUriException If the components do not form a valid URI. */ public static function fromParts(array $parts) : UriInterface { $uri = new self(); $uri->applyParts($parts); $uri->validateState(); return $uri; } public function getScheme() : string { return $this->scheme; } public function getAuthority() : string { $authority = $this->host; if ($this->userInfo !== '') { $authority = $this->userInfo . '@' . $authority; } if ($this->port !== null) { $authority .= ':' . $this->port; } return $authority; } public function getUserInfo() : string { return $this->userInfo; } public function getHost() : string { return $this->host; } public function getPort() : ?int { return $this->port; } public function getPath() : string { return $this->path; } public function getQuery() : string { return $this->query; } public function getFragment() : string { return $this->fragment; } public function withScheme($scheme) : UriInterface { $scheme = $this->filterScheme($scheme); if ($this->scheme === $scheme) { return $this; } $new = clone $this; $new->scheme = $scheme; $new->composedComponents = null; $new->removeDefaultPort(); $new->validateState(); return $new; } public function withUserInfo($user, $password = null) : UriInterface { $info = $this->filterUserInfoComponent($user); if ($password !== null) { $info .= ':' . $this->filterUserInfoComponent($password); } if ($this->userInfo === $info) { return $this; } $new = clone $this; $new->userInfo = $info; $new->composedComponents = null; $new->validateState(); return $new; } public function withHost($host) : UriInterface { $host = $this->filterHost($host); if ($this->host === $host) { return $this; } $new = clone $this; $new->host = $host; $new->composedComponents = null; $new->validateState(); return $new; } public function withPort($port) : UriInterface { $port = $this->filterPort($port); if ($this->port === $port) { return $this; } $new = clone $this; $new->port = $port; $new->composedComponents = null; $new->removeDefaultPort(); $new->validateState(); return $new; } public function withPath($path) : UriInterface { $path = $this->filterPath($path); if ($this->path === $path) { return $this; } $new = clone $this; $new->path = $path; $new->composedComponents = null; $new->validateState(); return $new; } public function withQuery($query) : UriInterface { $query = $this->filterQueryAndFragment($query); if ($this->query === $query) { return $this; } $new = clone $this; $new->query = $query; $new->composedComponents = null; return $new; } public function withFragment($fragment) : UriInterface { $fragment = $this->filterQueryAndFragment($fragment); if ($this->fragment === $fragment) { return $this; } $new = clone $this; $new->fragment = $fragment; $new->composedComponents = null; return $new; } public function jsonSerialize() : string { return $this->__toString(); } /** * Apply parse_url parts to a URI. * * @param array $parts Array of parse_url parts to apply. */ private function applyParts(array $parts) : void { $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : ''; $this->userInfo = isset($parts['user']) ? $this->filterUserInfoComponent($parts['user']) : ''; $this->host = isset($parts['host']) ? $this->filterHost($parts['host']) : ''; $this->port = isset($parts['port']) ? $this->filterPort($parts['port']) : null; $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : ''; $this->query = isset($parts['query']) ? $this->filterQueryAndFragment($parts['query']) : ''; $this->fragment = isset($parts['fragment']) ? $this->filterQueryAndFragment($parts['fragment']) : ''; if (isset($parts['pass'])) { $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); } $this->removeDefaultPort(); } /** * @param mixed $scheme * * @throws \InvalidArgumentException If the scheme is invalid. */ private function filterScheme($scheme) : string { if (!\is_string($scheme)) { throw new \InvalidArgumentException('Scheme must be a string'); } return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); } /** * @param mixed $component * * @throws \InvalidArgumentException If the user info is invalid. */ private function filterUserInfoComponent($component) : string { if (!\is_string($component)) { throw new \InvalidArgumentException('User info must be a string'); } return \preg_replace_callback('/(?:[^%' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ']+|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $component); } /** * @param mixed $host * * @throws \InvalidArgumentException If the host is invalid. */ private function filterHost($host) : string { if (!\is_string($host)) { throw new \InvalidArgumentException('Host must be a string'); } return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); } /** * @param mixed $port * * @throws \InvalidArgumentException If the port is invalid. */ private function filterPort($port) : ?int { if ($port === null) { return null; } $port = (int) $port; if (0 > $port || 0xffff < $port) { throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 0 and 65535', $port)); } return $port; } /** * @param (string|int)[] $keys * * @return string[] */ private static function getFilteredQueryString(UriInterface $uri, array $keys) : array { $current = $uri->getQuery(); if ($current === '') { return []; } $decodedKeys = \array_map(function ($k) : string { return \rawurldecode((string) $k); }, $keys); return \array_filter(\explode('&', $current), function ($part) use($decodedKeys) { return !\in_array(\rawurldecode(\explode('=', $part)[0]), $decodedKeys, \true); }); } private static function generateQueryString(string $key, ?string $value) : string { // Query string separators ("=", "&") within the key or value need to be encoded // (while preventing double-encoding) before setting the query string. All other // chars that need percent-encoding will be encoded by withQuery(). $queryString = \strtr($key, self::QUERY_SEPARATORS_REPLACEMENT); if ($value !== null) { $queryString .= '=' . \strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); } return $queryString; } private function removeDefaultPort() : void { if ($this->port !== null && self::isDefaultPort($this)) { $this->port = null; } } /** * Filters the path of a URI * * @param mixed $path * * @throws \InvalidArgumentException If the path is invalid. */ private function filterPath($path) : string { if (!\is_string($path)) { throw new \InvalidArgumentException('Path must be a string'); } return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\\/]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $path); } /** * Filters the query string or fragment of a URI. * * @param mixed $str * * @throws \InvalidArgumentException If the query or fragment is invalid. */ private function filterQueryAndFragment($str) : string { if (!\is_string($str)) { throw new \InvalidArgumentException('Query and fragment must be a string'); } return \preg_replace_callback('/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\\/\\?]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $str); } private function rawurlencodeMatchZero(array $match) : string { return \rawurlencode($match[0]); } private function validateState() : void { if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { $this->host = self::HTTP_DEFAULT_HOST; } if ($this->getAuthority() === '') { if (0 === \strpos($this->path, '//')) { throw new MalformedUriException('The path of a URI without an authority must not start with two slashes "//"'); } if ($this->scheme === '' && \false !== \strpos(\explode('/', $this->path, 2)[0], ':')) { throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon'); } } } } vendor_prefixed/guzzlehttp/psr7/src/StreamDecoratorTrait.php 0000644 00000006424 15174671617 0020471 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Stream decorator trait * * @property StreamInterface $stream */ trait StreamDecoratorTrait { /** * @param StreamInterface $stream Stream to decorate */ public function __construct(StreamInterface $stream) { $this->stream = $stream; } /** * Magic method used to create a new stream if streams are not added in * the constructor of a decorator (e.g., LazyOpenStream). * * @return StreamInterface */ public function __get(string $name) { if ($name === 'stream') { $this->stream = $this->createStream(); return $this->stream; } throw new \UnexpectedValueException("{$name} not found on class"); } public function __toString() : string { try { if ($this->isSeekable()) { $this->seek(0); } return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } \trigger_error(\sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR); return ''; } } public function getContents() : string { return Utils::copyToString($this); } /** * Allow decorators to implement custom methods * * @return mixed */ public function __call(string $method, array $args) { /** @var callable $callable */ $callable = [$this->stream, $method]; $result = $callable(...$args); // Always return the wrapped object if the result is a return $this return $result === $this->stream ? $this : $result; } public function close() : void { $this->stream->close(); } /** * @return mixed */ public function getMetadata($key = null) { return $this->stream->getMetadata($key); } public function detach() { return $this->stream->detach(); } public function getSize() : ?int { return $this->stream->getSize(); } public function eof() : bool { return $this->stream->eof(); } public function tell() : int { return $this->stream->tell(); } public function isReadable() : bool { return $this->stream->isReadable(); } public function isWritable() : bool { return $this->stream->isWritable(); } public function isSeekable() : bool { return $this->stream->isSeekable(); } public function rewind() : void { $this->seek(0); } public function seek($offset, $whence = \SEEK_SET) : void { $this->stream->seek($offset, $whence); } public function read($length) : string { return $this->stream->read($length); } public function write($string) : int { return $this->stream->write($string); } /** * Implement in subclasses to dynamically create streams when requested. * * @throws \BadMethodCallException */ protected function createStream() : StreamInterface { throw new \BadMethodCallException('Not implemented'); } } vendor_prefixed/guzzlehttp/psr7/src/MimeType.php 0000644 00000130253 15174671617 0016116 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; final class MimeType { private const MIME_TYPES = ['1km' => 'application/vnd.1000minds.decision-model+xml', '3dml' => 'text/vnd.in3d.3dml', '3ds' => 'image/x-3ds', '3g2' => 'video/3gpp2', '3gp' => 'video/3gp', '3gpp' => 'video/3gpp', '3mf' => 'model/3mf', '7z' => 'application/x-7z-compressed', '7zip' => 'application/x-7z-compressed', '123' => 'application/vnd.lotus-1-2-3', 'aab' => 'application/x-authorware-bin', 'aac' => 'audio/aac', 'aam' => 'application/x-authorware-map', 'aas' => 'application/x-authorware-seg', 'abw' => 'application/x-abiword', 'ac' => 'application/vnd.nokia.n-gage.ac+xml', 'ac3' => 'audio/ac3', 'acc' => 'application/vnd.americandynamics.acc', 'ace' => 'application/x-ace-compressed', 'acu' => 'application/vnd.acucobol', 'acutc' => 'application/vnd.acucorp', 'adp' => 'audio/adpcm', 'adts' => 'audio/aac', 'aep' => 'application/vnd.audiograph', 'afm' => 'application/x-font-type1', 'afp' => 'application/vnd.ibm.modcap', 'age' => 'application/vnd.age', 'ahead' => 'application/vnd.ahead.space', 'ai' => 'application/pdf', 'aif' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', 'air' => 'application/vnd.adobe.air-application-installer-package+zip', 'ait' => 'application/vnd.dvb.ait', 'ami' => 'application/vnd.amiga.ami', 'aml' => 'application/automationml-aml+xml', 'amlx' => 'application/automationml-amlx+zip', 'amr' => 'audio/amr', 'apk' => 'application/vnd.android.package-archive', 'apng' => 'image/apng', 'appcache' => 'text/cache-manifest', 'appinstaller' => 'application/appinstaller', 'application' => 'application/x-ms-application', 'appx' => 'application/appx', 'appxbundle' => 'application/appxbundle', 'apr' => 'application/vnd.lotus-approach', 'arc' => 'application/x-freearc', 'arj' => 'application/x-arj', 'asc' => 'application/pgp-signature', 'asf' => 'video/x-ms-asf', 'asm' => 'text/x-asm', 'aso' => 'application/vnd.accpac.simply.aso', 'asx' => 'video/x-ms-asf', 'atc' => 'application/vnd.acucorp', 'atom' => 'application/atom+xml', 'atomcat' => 'application/atomcat+xml', 'atomdeleted' => 'application/atomdeleted+xml', 'atomsvc' => 'application/atomsvc+xml', 'atx' => 'application/vnd.antix.game-component', 'au' => 'audio/x-au', 'avci' => 'image/avci', 'avcs' => 'image/avcs', 'avi' => 'video/x-msvideo', 'avif' => 'image/avif', 'aw' => 'application/applixware', 'azf' => 'application/vnd.airzip.filesecure.azf', 'azs' => 'application/vnd.airzip.filesecure.azs', 'azv' => 'image/vnd.airzip.accelerator.azv', 'azw' => 'application/vnd.amazon.ebook', 'b16' => 'image/vnd.pco.b16', 'bat' => 'application/x-msdownload', 'bcpio' => 'application/x-bcpio', 'bdf' => 'application/x-font-bdf', 'bdm' => 'application/vnd.syncml.dm+wbxml', 'bdoc' => 'application/x-bdoc', 'bed' => 'application/vnd.realvnc.bed', 'bh2' => 'application/vnd.fujitsu.oasysprs', 'bin' => 'application/octet-stream', 'blb' => 'application/x-blorb', 'blorb' => 'application/x-blorb', 'bmi' => 'application/vnd.bmi', 'bmml' => 'application/vnd.balsamiq.bmml+xml', 'bmp' => 'image/bmp', 'book' => 'application/vnd.framemaker', 'box' => 'application/vnd.previewsystems.box', 'boz' => 'application/x-bzip2', 'bpk' => 'application/octet-stream', 'bpmn' => 'application/octet-stream', 'bsp' => 'model/vnd.valve.source.compiled-map', 'btf' => 'image/prs.btif', 'btif' => 'image/prs.btif', 'buffer' => 'application/octet-stream', 'bz' => 'application/x-bzip', 'bz2' => 'application/x-bzip2', 'c' => 'text/x-c', 'c4d' => 'application/vnd.clonk.c4group', 'c4f' => 'application/vnd.clonk.c4group', 'c4g' => 'application/vnd.clonk.c4group', 'c4p' => 'application/vnd.clonk.c4group', 'c4u' => 'application/vnd.clonk.c4group', 'c11amc' => 'application/vnd.cluetrust.cartomobile-config', 'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg', 'cab' => 'application/vnd.ms-cab-compressed', 'caf' => 'audio/x-caf', 'cap' => 'application/vnd.tcpdump.pcap', 'car' => 'application/vnd.curl.car', 'cat' => 'application/vnd.ms-pki.seccat', 'cb7' => 'application/x-cbr', 'cba' => 'application/x-cbr', 'cbr' => 'application/x-cbr', 'cbt' => 'application/x-cbr', 'cbz' => 'application/x-cbr', 'cc' => 'text/x-c', 'cco' => 'application/x-cocoa', 'cct' => 'application/x-director', 'ccxml' => 'application/ccxml+xml', 'cdbcmsg' => 'application/vnd.contact.cmsg', 'cdf' => 'application/x-netcdf', 'cdfx' => 'application/cdfx+xml', 'cdkey' => 'application/vnd.mediastation.cdkey', 'cdmia' => 'application/cdmi-capability', 'cdmic' => 'application/cdmi-container', 'cdmid' => 'application/cdmi-domain', 'cdmio' => 'application/cdmi-object', 'cdmiq' => 'application/cdmi-queue', 'cdr' => 'application/cdr', 'cdx' => 'chemical/x-cdx', 'cdxml' => 'application/vnd.chemdraw+xml', 'cdy' => 'application/vnd.cinderella', 'cer' => 'application/pkix-cert', 'cfs' => 'application/x-cfs-compressed', 'cgm' => 'image/cgm', 'chat' => 'application/x-chat', 'chm' => 'application/vnd.ms-htmlhelp', 'chrt' => 'application/vnd.kde.kchart', 'cif' => 'chemical/x-cif', 'cii' => 'application/vnd.anser-web-certificate-issue-initiation', 'cil' => 'application/vnd.ms-artgalry', 'cjs' => 'application/node', 'cla' => 'application/vnd.claymore', 'class' => 'application/octet-stream', 'cld' => 'model/vnd.cld', 'clkk' => 'application/vnd.crick.clicker.keyboard', 'clkp' => 'application/vnd.crick.clicker.palette', 'clkt' => 'application/vnd.crick.clicker.template', 'clkw' => 'application/vnd.crick.clicker.wordbank', 'clkx' => 'application/vnd.crick.clicker', 'clp' => 'application/x-msclip', 'cmc' => 'application/vnd.cosmocaller', 'cmdf' => 'chemical/x-cmdf', 'cml' => 'chemical/x-cml', 'cmp' => 'application/vnd.yellowriver-custom-menu', 'cmx' => 'image/x-cmx', 'cod' => 'application/vnd.rim.cod', 'coffee' => 'text/coffeescript', 'com' => 'application/x-msdownload', 'conf' => 'text/plain', 'cpio' => 'application/x-cpio', 'cpl' => 'application/cpl+xml', 'cpp' => 'text/x-c', 'cpt' => 'application/mac-compactpro', 'crd' => 'application/x-mscardfile', 'crl' => 'application/pkix-crl', 'crt' => 'application/x-x509-ca-cert', 'crx' => 'application/x-chrome-extension', 'cryptonote' => 'application/vnd.rig.cryptonote', 'csh' => 'application/x-csh', 'csl' => 'application/vnd.citationstyles.style+xml', 'csml' => 'chemical/x-csml', 'csp' => 'application/vnd.commonspace', 'csr' => 'application/octet-stream', 'css' => 'text/css', 'cst' => 'application/x-director', 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'curl' => 'text/vnd.curl', 'cwl' => 'application/cwl', 'cww' => 'application/prs.cww', 'cxt' => 'application/x-director', 'cxx' => 'text/x-c', 'dae' => 'model/vnd.collada+xml', 'daf' => 'application/vnd.mobius.daf', 'dart' => 'application/vnd.dart', 'dataless' => 'application/vnd.fdsn.seed', 'davmount' => 'application/davmount+xml', 'dbf' => 'application/vnd.dbf', 'dbk' => 'application/docbook+xml', 'dcr' => 'application/x-director', 'dcurl' => 'text/vnd.curl.dcurl', 'dd2' => 'application/vnd.oma.dd2+xml', 'ddd' => 'application/vnd.fujixerox.ddd', 'ddf' => 'application/vnd.syncml.dmddf+xml', 'dds' => 'image/vnd.ms-dds', 'deb' => 'application/x-debian-package', 'def' => 'text/plain', 'deploy' => 'application/octet-stream', 'der' => 'application/x-x509-ca-cert', 'dfac' => 'application/vnd.dreamfactory', 'dgc' => 'application/x-dgc-compressed', 'dib' => 'image/bmp', 'dic' => 'text/x-c', 'dir' => 'application/x-director', 'dis' => 'application/vnd.mobius.dis', 'disposition-notification' => 'message/disposition-notification', 'dist' => 'application/octet-stream', 'distz' => 'application/octet-stream', 'djv' => 'image/vnd.djvu', 'djvu' => 'image/vnd.djvu', 'dll' => 'application/octet-stream', 'dmg' => 'application/x-apple-diskimage', 'dmn' => 'application/octet-stream', 'dmp' => 'application/vnd.tcpdump.pcap', 'dms' => 'application/octet-stream', 'dna' => 'application/vnd.dna', 'doc' => 'application/msword', 'docm' => 'application/vnd.ms-word.template.macroEnabled.12', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'dot' => 'application/msword', 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12', 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dp' => 'application/vnd.osgi.dp', 'dpg' => 'application/vnd.dpgraph', 'dpx' => 'image/dpx', 'dra' => 'audio/vnd.dra', 'drle' => 'image/dicom-rle', 'dsc' => 'text/prs.lines.tag', 'dssc' => 'application/dssc+der', 'dtb' => 'application/x-dtbook+xml', 'dtd' => 'application/xml-dtd', 'dts' => 'audio/vnd.dts', 'dtshd' => 'audio/vnd.dts.hd', 'dump' => 'application/octet-stream', 'dvb' => 'video/vnd.dvb.file', 'dvi' => 'application/x-dvi', 'dwd' => 'application/atsc-dwd+xml', 'dwf' => 'model/vnd.dwf', 'dwg' => 'image/vnd.dwg', 'dxf' => 'image/vnd.dxf', 'dxp' => 'application/vnd.spotfire.dxp', 'dxr' => 'application/x-director', 'ear' => 'application/java-archive', 'ecelp4800' => 'audio/vnd.nuera.ecelp4800', 'ecelp7470' => 'audio/vnd.nuera.ecelp7470', 'ecelp9600' => 'audio/vnd.nuera.ecelp9600', 'ecma' => 'application/ecmascript', 'edm' => 'application/vnd.novadigm.edm', 'edx' => 'application/vnd.novadigm.edx', 'efif' => 'application/vnd.picsel', 'ei6' => 'application/vnd.pg.osasli', 'elc' => 'application/octet-stream', 'emf' => 'image/emf', 'eml' => 'message/rfc822', 'emma' => 'application/emma+xml', 'emotionml' => 'application/emotionml+xml', 'emz' => 'application/x-msmetafile', 'eol' => 'audio/vnd.digital-winds', 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', 'es3' => 'application/vnd.eszigno3+xml', 'esa' => 'application/vnd.osgi.subsystem', 'esf' => 'application/vnd.epson.esf', 'et3' => 'application/vnd.eszigno3+xml', 'etx' => 'text/x-setext', 'eva' => 'application/x-eva', 'evy' => 'application/x-envoy', 'exe' => 'application/octet-stream', 'exi' => 'application/exi', 'exp' => 'application/express', 'exr' => 'image/aces', 'ext' => 'application/vnd.novadigm.ext', 'ez' => 'application/andrew-inset', 'ez2' => 'application/vnd.ezpix-album', 'ez3' => 'application/vnd.ezpix-package', 'f' => 'text/x-fortran', 'f4v' => 'video/mp4', 'f77' => 'text/x-fortran', 'f90' => 'text/x-fortran', 'fbs' => 'image/vnd.fastbidsheet', 'fcdt' => 'application/vnd.adobe.formscentral.fcdt', 'fcs' => 'application/vnd.isac.fcs', 'fdf' => 'application/vnd.fdf', 'fdt' => 'application/fdt+xml', 'fe_launch' => 'application/vnd.denovo.fcselayout-link', 'fg5' => 'application/vnd.fujitsu.oasysgp', 'fgd' => 'application/x-director', 'fh' => 'image/x-freehand', 'fh4' => 'image/x-freehand', 'fh5' => 'image/x-freehand', 'fh7' => 'image/x-freehand', 'fhc' => 'image/x-freehand', 'fig' => 'application/x-xfig', 'fits' => 'image/fits', 'flac' => 'audio/x-flac', 'fli' => 'video/x-fli', 'flo' => 'application/vnd.micrografx.flo', 'flv' => 'video/x-flv', 'flw' => 'application/vnd.kde.kivio', 'flx' => 'text/vnd.fmi.flexstor', 'fly' => 'text/vnd.fly', 'fm' => 'application/vnd.framemaker', 'fnc' => 'application/vnd.frogans.fnc', 'fo' => 'application/vnd.software602.filler.form+xml', 'for' => 'text/x-fortran', 'fpx' => 'image/vnd.fpx', 'frame' => 'application/vnd.framemaker', 'fsc' => 'application/vnd.fsc.weblaunch', 'fst' => 'image/vnd.fst', 'ftc' => 'application/vnd.fluxtime.clip', 'fti' => 'application/vnd.anser-web-funds-transfer-initiation', 'fvt' => 'video/vnd.fvt', 'fxp' => 'application/vnd.adobe.fxp', 'fxpl' => 'application/vnd.adobe.fxp', 'fzs' => 'application/vnd.fuzzysheet', 'g2w' => 'application/vnd.geoplan', 'g3' => 'image/g3fax', 'g3w' => 'application/vnd.geospace', 'gac' => 'application/vnd.groove-account', 'gam' => 'application/x-tads', 'gbr' => 'application/rpki-ghostbusters', 'gca' => 'application/x-gca-compressed', 'gdl' => 'model/vnd.gdl', 'gdoc' => 'application/vnd.google-apps.document', 'ged' => 'text/vnd.familysearch.gedcom', 'geo' => 'application/vnd.dynageo', 'geojson' => 'application/geo+json', 'gex' => 'application/vnd.geometry-explorer', 'ggb' => 'application/vnd.geogebra.file', 'ggt' => 'application/vnd.geogebra.tool', 'ghf' => 'application/vnd.groove-help', 'gif' => 'image/gif', 'gim' => 'application/vnd.groove-identity-message', 'glb' => 'model/gltf-binary', 'gltf' => 'model/gltf+json', 'gml' => 'application/gml+xml', 'gmx' => 'application/vnd.gmx', 'gnumeric' => 'application/x-gnumeric', 'gpg' => 'application/gpg-keys', 'gph' => 'application/vnd.flographit', 'gpx' => 'application/gpx+xml', 'gqf' => 'application/vnd.grafeq', 'gqs' => 'application/vnd.grafeq', 'gram' => 'application/srgs', 'gramps' => 'application/x-gramps-xml', 'gre' => 'application/vnd.geometry-explorer', 'grv' => 'application/vnd.groove-injector', 'grxml' => 'application/srgs+xml', 'gsf' => 'application/x-font-ghostscript', 'gsheet' => 'application/vnd.google-apps.spreadsheet', 'gslides' => 'application/vnd.google-apps.presentation', 'gtar' => 'application/x-gtar', 'gtm' => 'application/vnd.groove-tool-message', 'gtw' => 'model/vnd.gtw', 'gv' => 'text/vnd.graphviz', 'gxf' => 'application/gxf', 'gxt' => 'application/vnd.geonext', 'gz' => 'application/gzip', 'gzip' => 'application/gzip', 'h' => 'text/x-c', 'h261' => 'video/h261', 'h263' => 'video/h263', 'h264' => 'video/h264', 'hal' => 'application/vnd.hal+xml', 'hbci' => 'application/vnd.hbci', 'hbs' => 'text/x-handlebars-template', 'hdd' => 'application/x-virtualbox-hdd', 'hdf' => 'application/x-hdf', 'heic' => 'image/heic', 'heics' => 'image/heic-sequence', 'heif' => 'image/heif', 'heifs' => 'image/heif-sequence', 'hej2' => 'image/hej2k', 'held' => 'application/atsc-held+xml', 'hh' => 'text/x-c', 'hjson' => 'application/hjson', 'hlp' => 'application/winhlp', 'hpgl' => 'application/vnd.hp-hpgl', 'hpid' => 'application/vnd.hp-hpid', 'hps' => 'application/vnd.hp-hps', 'hqx' => 'application/mac-binhex40', 'hsj2' => 'image/hsj2', 'htc' => 'text/x-component', 'htke' => 'application/vnd.kenameaapp', 'htm' => 'text/html', 'html' => 'text/html', 'hvd' => 'application/vnd.yamaha.hv-dic', 'hvp' => 'application/vnd.yamaha.hv-voice', 'hvs' => 'application/vnd.yamaha.hv-script', 'i2g' => 'application/vnd.intergeo', 'icc' => 'application/vnd.iccprofile', 'ice' => 'x-conference/x-cooltalk', 'icm' => 'application/vnd.iccprofile', 'ico' => 'image/x-icon', 'ics' => 'text/calendar', 'ief' => 'image/ief', 'ifb' => 'text/calendar', 'ifm' => 'application/vnd.shana.informed.formdata', 'iges' => 'model/iges', 'igl' => 'application/vnd.igloader', 'igm' => 'application/vnd.insors.igm', 'igs' => 'model/iges', 'igx' => 'application/vnd.micrografx.igx', 'iif' => 'application/vnd.shana.informed.interchange', 'img' => 'application/octet-stream', 'imp' => 'application/vnd.accpac.simply.imp', 'ims' => 'application/vnd.ms-ims', 'in' => 'text/plain', 'ini' => 'text/plain', 'ink' => 'application/inkml+xml', 'inkml' => 'application/inkml+xml', 'install' => 'application/x-install-instructions', 'iota' => 'application/vnd.astraea-software.iota', 'ipfix' => 'application/ipfix', 'ipk' => 'application/vnd.shana.informed.package', 'irm' => 'application/vnd.ibm.rights-management', 'irp' => 'application/vnd.irepository.package+xml', 'iso' => 'application/x-iso9660-image', 'itp' => 'application/vnd.shana.informed.formtemplate', 'its' => 'application/its+xml', 'ivp' => 'application/vnd.immervision-ivp', 'ivu' => 'application/vnd.immervision-ivu', 'jad' => 'text/vnd.sun.j2me.app-descriptor', 'jade' => 'text/jade', 'jam' => 'application/vnd.jam', 'jar' => 'application/java-archive', 'jardiff' => 'application/x-java-archive-diff', 'java' => 'text/x-java-source', 'jhc' => 'image/jphc', 'jisp' => 'application/vnd.jisp', 'jls' => 'image/jls', 'jlt' => 'application/vnd.hp-jlyt', 'jng' => 'image/x-jng', 'jnlp' => 'application/x-java-jnlp-file', 'joda' => 'application/vnd.joost.joda-archive', 'jp2' => 'image/jp2', 'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpf' => 'image/jpx', 'jpg' => 'image/jpeg', 'jpg2' => 'image/jp2', 'jpgm' => 'video/jpm', 'jpgv' => 'video/jpeg', 'jph' => 'image/jph', 'jpm' => 'video/jpm', 'jpx' => 'image/jpx', 'js' => 'application/javascript', 'json' => 'application/json', 'json5' => 'application/json5', 'jsonld' => 'application/ld+json', 'jsonml' => 'application/jsonml+json', 'jsx' => 'text/jsx', 'jt' => 'model/jt', 'jxr' => 'image/jxr', 'jxra' => 'image/jxra', 'jxrs' => 'image/jxrs', 'jxs' => 'image/jxs', 'jxsc' => 'image/jxsc', 'jxsi' => 'image/jxsi', 'jxss' => 'image/jxss', 'kar' => 'audio/midi', 'karbon' => 'application/vnd.kde.karbon', 'kdb' => 'application/octet-stream', 'kdbx' => 'application/x-keepass2', 'key' => 'application/x-iwork-keynote-sffkey', 'kfo' => 'application/vnd.kde.kformula', 'kia' => 'application/vnd.kidspiration', 'kml' => 'application/vnd.google-earth.kml+xml', 'kmz' => 'application/vnd.google-earth.kmz', 'kne' => 'application/vnd.kinar', 'knp' => 'application/vnd.kinar', 'kon' => 'application/vnd.kde.kontour', 'kpr' => 'application/vnd.kde.kpresenter', 'kpt' => 'application/vnd.kde.kpresenter', 'kpxx' => 'application/vnd.ds-keypoint', 'ksp' => 'application/vnd.kde.kspread', 'ktr' => 'application/vnd.kahootz', 'ktx' => 'image/ktx', 'ktx2' => 'image/ktx2', 'ktz' => 'application/vnd.kahootz', 'kwd' => 'application/vnd.kde.kword', 'kwt' => 'application/vnd.kde.kword', 'lasxml' => 'application/vnd.las.las+xml', 'latex' => 'application/x-latex', 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop', 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml', 'les' => 'application/vnd.hhe.lesson-player', 'less' => 'text/less', 'lgr' => 'application/lgr+xml', 'lha' => 'application/octet-stream', 'link66' => 'application/vnd.route66.link66+xml', 'list' => 'text/plain', 'list3820' => 'application/vnd.ibm.modcap', 'listafp' => 'application/vnd.ibm.modcap', 'litcoffee' => 'text/coffeescript', 'lnk' => 'application/x-ms-shortcut', 'log' => 'text/plain', 'lostxml' => 'application/lost+xml', 'lrf' => 'application/octet-stream', 'lrm' => 'application/vnd.ms-lrm', 'ltf' => 'application/vnd.frogans.ltf', 'lua' => 'text/x-lua', 'luac' => 'application/x-lua-bytecode', 'lvp' => 'audio/vnd.lucent.voice', 'lwp' => 'application/vnd.lotus-wordpro', 'lzh' => 'application/octet-stream', 'm1v' => 'video/mpeg', 'm2a' => 'audio/mpeg', 'm2v' => 'video/mpeg', 'm3a' => 'audio/mpeg', 'm3u' => 'text/plain', 'm3u8' => 'application/vnd.apple.mpegurl', 'm4a' => 'audio/x-m4a', 'm4p' => 'application/mp4', 'm4s' => 'video/iso.segment', 'm4u' => 'application/vnd.mpegurl', 'm4v' => 'video/x-m4v', 'm13' => 'application/x-msmediaview', 'm14' => 'application/x-msmediaview', 'm21' => 'application/mp21', 'ma' => 'application/mathematica', 'mads' => 'application/mads+xml', 'maei' => 'application/mmt-aei+xml', 'mag' => 'application/vnd.ecowin.chart', 'maker' => 'application/vnd.framemaker', 'man' => 'text/troff', 'manifest' => 'text/cache-manifest', 'map' => 'application/json', 'mar' => 'application/octet-stream', 'markdown' => 'text/markdown', 'mathml' => 'application/mathml+xml', 'mb' => 'application/mathematica', 'mbk' => 'application/vnd.mobius.mbk', 'mbox' => 'application/mbox', 'mc1' => 'application/vnd.medcalcdata', 'mcd' => 'application/vnd.mcd', 'mcurl' => 'text/vnd.curl.mcurl', 'md' => 'text/markdown', 'mdb' => 'application/x-msaccess', 'mdi' => 'image/vnd.ms-modi', 'mdx' => 'text/mdx', 'me' => 'text/troff', 'mesh' => 'model/mesh', 'meta4' => 'application/metalink4+xml', 'metalink' => 'application/metalink+xml', 'mets' => 'application/mets+xml', 'mfm' => 'application/vnd.mfmp', 'mft' => 'application/rpki-manifest', 'mgp' => 'application/vnd.osgeo.mapguide.package', 'mgz' => 'application/vnd.proteus.magazine', 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mie' => 'application/x-mie', 'mif' => 'application/vnd.mif', 'mime' => 'message/rfc822', 'mj2' => 'video/mj2', 'mjp2' => 'video/mj2', 'mjs' => 'text/javascript', 'mk3d' => 'video/x-matroska', 'mka' => 'audio/x-matroska', 'mkd' => 'text/x-markdown', 'mks' => 'video/x-matroska', 'mkv' => 'video/x-matroska', 'mlp' => 'application/vnd.dolby.mlp', 'mmd' => 'application/vnd.chipnuts.karaoke-mmd', 'mmf' => 'application/vnd.smaf', 'mml' => 'text/mathml', 'mmr' => 'image/vnd.fujixerox.edmics-mmr', 'mng' => 'video/x-mng', 'mny' => 'application/x-msmoney', 'mobi' => 'application/x-mobipocket-ebook', 'mods' => 'application/mods+xml', 'mov' => 'video/quicktime', 'movie' => 'video/x-sgi-movie', 'mp2' => 'audio/mpeg', 'mp2a' => 'audio/mpeg', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mp4a' => 'audio/mp4', 'mp4s' => 'application/mp4', 'mp4v' => 'video/mp4', 'mp21' => 'application/mp21', 'mpc' => 'application/vnd.mophun.certificate', 'mpd' => 'application/dash+xml', 'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg', 'mpf' => 'application/media-policy-dataset+xml', 'mpg' => 'video/mpeg', 'mpg4' => 'video/mp4', 'mpga' => 'audio/mpeg', 'mpkg' => 'application/vnd.apple.installer+xml', 'mpm' => 'application/vnd.blueice.multipass', 'mpn' => 'application/vnd.mophun.application', 'mpp' => 'application/vnd.ms-project', 'mpt' => 'application/vnd.ms-project', 'mpy' => 'application/vnd.ibm.minipay', 'mqy' => 'application/vnd.mobius.mqy', 'mrc' => 'application/marc', 'mrcx' => 'application/marcxml+xml', 'ms' => 'text/troff', 'mscml' => 'application/mediaservercontrol+xml', 'mseed' => 'application/vnd.fdsn.mseed', 'mseq' => 'application/vnd.mseq', 'msf' => 'application/vnd.epson.msf', 'msg' => 'application/vnd.ms-outlook', 'msh' => 'model/mesh', 'msi' => 'application/x-msdownload', 'msix' => 'application/msix', 'msixbundle' => 'application/msixbundle', 'msl' => 'application/vnd.mobius.msl', 'msm' => 'application/octet-stream', 'msp' => 'application/octet-stream', 'msty' => 'application/vnd.muvee.style', 'mtl' => 'model/mtl', 'mts' => 'model/vnd.mts', 'mus' => 'application/vnd.musician', 'musd' => 'application/mmt-usd+xml', 'musicxml' => 'application/vnd.recordare.musicxml+xml', 'mvb' => 'application/x-msmediaview', 'mvt' => 'application/vnd.mapbox-vector-tile', 'mwf' => 'application/vnd.mfer', 'mxf' => 'application/mxf', 'mxl' => 'application/vnd.recordare.musicxml', 'mxmf' => 'audio/mobile-xmf', 'mxml' => 'application/xv+xml', 'mxs' => 'application/vnd.triscape.mxs', 'mxu' => 'video/vnd.mpegurl', 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install', 'n3' => 'text/n3', 'nb' => 'application/mathematica', 'nbp' => 'application/vnd.wolfram.player', 'nc' => 'application/x-netcdf', 'ncx' => 'application/x-dtbncx+xml', 'nfo' => 'text/x-nfo', 'ngdat' => 'application/vnd.nokia.n-gage.data', 'nitf' => 'application/vnd.nitf', 'nlu' => 'application/vnd.neurolanguage.nlu', 'nml' => 'application/vnd.enliven', 'nnd' => 'application/vnd.noblenet-directory', 'nns' => 'application/vnd.noblenet-sealer', 'nnw' => 'application/vnd.noblenet-web', 'npx' => 'image/vnd.net-fpx', 'nq' => 'application/n-quads', 'nsc' => 'application/x-conference', 'nsf' => 'application/vnd.lotus-notes', 'nt' => 'application/n-triples', 'ntf' => 'application/vnd.nitf', 'numbers' => 'application/x-iwork-numbers-sffnumbers', 'nzb' => 'application/x-nzb', 'oa2' => 'application/vnd.fujitsu.oasys2', 'oa3' => 'application/vnd.fujitsu.oasys3', 'oas' => 'application/vnd.fujitsu.oasys', 'obd' => 'application/x-msbinder', 'obgx' => 'application/vnd.openblox.game+xml', 'obj' => 'model/obj', 'oda' => 'application/oda', 'odb' => 'application/vnd.oasis.opendocument.database', 'odc' => 'application/vnd.oasis.opendocument.chart', 'odf' => 'application/vnd.oasis.opendocument.formula', 'odft' => 'application/vnd.oasis.opendocument.formula-template', 'odg' => 'application/vnd.oasis.opendocument.graphics', 'odi' => 'application/vnd.oasis.opendocument.image', 'odm' => 'application/vnd.oasis.opendocument.text-master', 'odp' => 'application/vnd.oasis.opendocument.presentation', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'odt' => 'application/vnd.oasis.opendocument.text', 'oga' => 'audio/ogg', 'ogex' => 'model/vnd.opengex', 'ogg' => 'audio/ogg', 'ogv' => 'video/ogg', 'ogx' => 'application/ogg', 'omdoc' => 'application/omdoc+xml', 'onepkg' => 'application/onenote', 'onetmp' => 'application/onenote', 'onetoc' => 'application/onenote', 'onetoc2' => 'application/onenote', 'opf' => 'application/oebps-package+xml', 'opml' => 'text/x-opml', 'oprc' => 'application/vnd.palm', 'opus' => 'audio/ogg', 'org' => 'text/x-org', 'osf' => 'application/vnd.yamaha.openscoreformat', 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml', 'osm' => 'application/vnd.openstreetmap.data+xml', 'otc' => 'application/vnd.oasis.opendocument.chart-template', 'otf' => 'font/otf', 'otg' => 'application/vnd.oasis.opendocument.graphics-template', 'oth' => 'application/vnd.oasis.opendocument.text-web', 'oti' => 'application/vnd.oasis.opendocument.image-template', 'otp' => 'application/vnd.oasis.opendocument.presentation-template', 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', 'ott' => 'application/vnd.oasis.opendocument.text-template', 'ova' => 'application/x-virtualbox-ova', 'ovf' => 'application/x-virtualbox-ovf', 'owl' => 'application/rdf+xml', 'oxps' => 'application/oxps', 'oxt' => 'application/vnd.openofficeorg.extension', 'p' => 'text/x-pascal', 'p7a' => 'application/x-pkcs7-signature', 'p7b' => 'application/x-pkcs7-certificates', 'p7c' => 'application/pkcs7-mime', 'p7m' => 'application/pkcs7-mime', 'p7r' => 'application/x-pkcs7-certreqresp', 'p7s' => 'application/pkcs7-signature', 'p8' => 'application/pkcs8', 'p10' => 'application/x-pkcs10', 'p12' => 'application/x-pkcs12', 'pac' => 'application/x-ns-proxy-autoconfig', 'pages' => 'application/x-iwork-pages-sffpages', 'pas' => 'text/x-pascal', 'paw' => 'application/vnd.pawaafile', 'pbd' => 'application/vnd.powerbuilder6', 'pbm' => 'image/x-portable-bitmap', 'pcap' => 'application/vnd.tcpdump.pcap', 'pcf' => 'application/x-font-pcf', 'pcl' => 'application/vnd.hp-pcl', 'pclxl' => 'application/vnd.hp-pclxl', 'pct' => 'image/x-pict', 'pcurl' => 'application/vnd.curl.pcurl', 'pcx' => 'image/x-pcx', 'pdb' => 'application/x-pilot', 'pde' => 'text/x-processing', 'pdf' => 'application/pdf', 'pem' => 'application/x-x509-user-cert', 'pfa' => 'application/x-font-type1', 'pfb' => 'application/x-font-type1', 'pfm' => 'application/x-font-type1', 'pfr' => 'application/font-tdpfr', 'pfx' => 'application/x-pkcs12', 'pgm' => 'image/x-portable-graymap', 'pgn' => 'application/x-chess-pgn', 'pgp' => 'application/pgp', 'phar' => 'application/octet-stream', 'php' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php', 'php4' => 'application/x-httpd-php', 'phps' => 'application/x-httpd-php-source', 'phtml' => 'application/x-httpd-php', 'pic' => 'image/x-pict', 'pkg' => 'application/octet-stream', 'pki' => 'application/pkixcmp', 'pkipath' => 'application/pkix-pkipath', 'pkpass' => 'application/vnd.apple.pkpass', 'pl' => 'application/x-perl', 'plb' => 'application/vnd.3gpp.pic-bw-large', 'plc' => 'application/vnd.mobius.plc', 'plf' => 'application/vnd.pocketlearn', 'pls' => 'application/pls+xml', 'pm' => 'application/x-perl', 'pml' => 'application/vnd.ctc-posml', 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'portpkg' => 'application/vnd.macports.portpkg', 'pot' => 'application/vnd.ms-powerpoint', 'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', 'ppa' => 'application/vnd.ms-powerpoint', 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'ppd' => 'application/vnd.cups-ppd', 'ppm' => 'image/x-portable-pixmap', 'pps' => 'application/vnd.ms-powerpoint', 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppt' => 'application/powerpoint', 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pqa' => 'application/vnd.palm', 'prc' => 'model/prc', 'pre' => 'application/vnd.lotus-freelance', 'prf' => 'application/pics-rules', 'provx' => 'application/provenance+xml', 'ps' => 'application/postscript', 'psb' => 'application/vnd.3gpp.pic-bw-small', 'psd' => 'application/x-photoshop', 'psf' => 'application/x-font-linux-psf', 'pskcxml' => 'application/pskc+xml', 'pti' => 'image/prs.pti', 'ptid' => 'application/vnd.pvi.ptid1', 'pub' => 'application/x-mspublisher', 'pvb' => 'application/vnd.3gpp.pic-bw-var', 'pwn' => 'application/vnd.3m.post-it-notes', 'pya' => 'audio/vnd.ms-playready.media.pya', 'pyo' => 'model/vnd.pytha.pyox', 'pyox' => 'model/vnd.pytha.pyox', 'pyv' => 'video/vnd.ms-playready.media.pyv', 'qam' => 'application/vnd.epson.quickanime', 'qbo' => 'application/vnd.intu.qbo', 'qfx' => 'application/vnd.intu.qfx', 'qps' => 'application/vnd.publishare-delta-tree', 'qt' => 'video/quicktime', 'qwd' => 'application/vnd.quark.quarkxpress', 'qwt' => 'application/vnd.quark.quarkxpress', 'qxb' => 'application/vnd.quark.quarkxpress', 'qxd' => 'application/vnd.quark.quarkxpress', 'qxl' => 'application/vnd.quark.quarkxpress', 'qxt' => 'application/vnd.quark.quarkxpress', 'ra' => 'audio/x-realaudio', 'ram' => 'audio/x-pn-realaudio', 'raml' => 'application/raml+yaml', 'rapd' => 'application/route-apd+xml', 'rar' => 'application/x-rar', 'ras' => 'image/x-cmu-raster', 'rcprofile' => 'application/vnd.ipunplugged.rcprofile', 'rdf' => 'application/rdf+xml', 'rdz' => 'application/vnd.data-vision.rdz', 'relo' => 'application/p2p-overlay+xml', 'rep' => 'application/vnd.businessobjects', 'res' => 'application/x-dtbresource+xml', 'rgb' => 'image/x-rgb', 'rif' => 'application/reginfo+xml', 'rip' => 'audio/vnd.rip', 'ris' => 'application/x-research-info-systems', 'rl' => 'application/resource-lists+xml', 'rlc' => 'image/vnd.fujixerox.edmics-rlc', 'rld' => 'application/resource-lists-diff+xml', 'rm' => 'audio/x-pn-realaudio', 'rmi' => 'audio/midi', 'rmp' => 'audio/x-pn-realaudio-plugin', 'rms' => 'application/vnd.jcp.javame.midlet-rms', 'rmvb' => 'application/vnd.rn-realmedia-vbr', 'rnc' => 'application/relax-ng-compact-syntax', 'rng' => 'application/xml', 'roa' => 'application/rpki-roa', 'roff' => 'text/troff', 'rp9' => 'application/vnd.cloanto.rp9', 'rpm' => 'audio/x-pn-realaudio-plugin', 'rpss' => 'application/vnd.nokia.radio-presets', 'rpst' => 'application/vnd.nokia.radio-preset', 'rq' => 'application/sparql-query', 'rs' => 'application/rls-services+xml', 'rsa' => 'application/x-pkcs7', 'rsat' => 'application/atsc-rsat+xml', 'rsd' => 'application/rsd+xml', 'rsheet' => 'application/urc-ressheet+xml', 'rss' => 'application/rss+xml', 'rtf' => 'text/rtf', 'rtx' => 'text/richtext', 'run' => 'application/x-makeself', 'rusd' => 'application/route-usd+xml', 'rv' => 'video/vnd.rn-realvideo', 's' => 'text/x-asm', 's3m' => 'audio/s3m', 'saf' => 'application/vnd.yamaha.smaf-audio', 'sass' => 'text/x-sass', 'sbml' => 'application/sbml+xml', 'sc' => 'application/vnd.ibm.secure-container', 'scd' => 'application/x-msschedule', 'scm' => 'application/vnd.lotus-screencam', 'scq' => 'application/scvp-cv-request', 'scs' => 'application/scvp-cv-response', 'scss' => 'text/x-scss', 'scurl' => 'text/vnd.curl.scurl', 'sda' => 'application/vnd.stardivision.draw', 'sdc' => 'application/vnd.stardivision.calc', 'sdd' => 'application/vnd.stardivision.impress', 'sdkd' => 'application/vnd.solent.sdkm+xml', 'sdkm' => 'application/vnd.solent.sdkm+xml', 'sdp' => 'application/sdp', 'sdw' => 'application/vnd.stardivision.writer', 'sea' => 'application/octet-stream', 'see' => 'application/vnd.seemail', 'seed' => 'application/vnd.fdsn.seed', 'sema' => 'application/vnd.sema', 'semd' => 'application/vnd.semd', 'semf' => 'application/vnd.semf', 'senmlx' => 'application/senml+xml', 'sensmlx' => 'application/sensml+xml', 'ser' => 'application/java-serialized-object', 'setpay' => 'application/set-payment-initiation', 'setreg' => 'application/set-registration-initiation', 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data', 'sfs' => 'application/vnd.spotfire.sfs', 'sfv' => 'text/x-sfv', 'sgi' => 'image/sgi', 'sgl' => 'application/vnd.stardivision.writer-global', 'sgm' => 'text/sgml', 'sgml' => 'text/sgml', 'sh' => 'application/x-sh', 'shar' => 'application/x-shar', 'shex' => 'text/shex', 'shf' => 'application/shf+xml', 'shtml' => 'text/html', 'sid' => 'image/x-mrsid-image', 'sieve' => 'application/sieve', 'sig' => 'application/pgp-signature', 'sil' => 'audio/silk', 'silo' => 'model/mesh', 'sis' => 'application/vnd.symbian.install', 'sisx' => 'application/vnd.symbian.install', 'sit' => 'application/x-stuffit', 'sitx' => 'application/x-stuffitx', 'siv' => 'application/sieve', 'skd' => 'application/vnd.koan', 'skm' => 'application/vnd.koan', 'skp' => 'application/vnd.koan', 'skt' => 'application/vnd.koan', 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12', 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', 'slim' => 'text/slim', 'slm' => 'text/slim', 'sls' => 'application/route-s-tsid+xml', 'slt' => 'application/vnd.epson.salt', 'sm' => 'application/vnd.stepmania.stepchart', 'smf' => 'application/vnd.stardivision.math', 'smi' => 'application/smil', 'smil' => 'application/smil', 'smv' => 'video/x-smv', 'smzip' => 'application/vnd.stepmania.package', 'snd' => 'audio/basic', 'snf' => 'application/x-font-snf', 'so' => 'application/octet-stream', 'spc' => 'application/x-pkcs7-certificates', 'spdx' => 'text/spdx', 'spf' => 'application/vnd.yamaha.smaf-phrase', 'spl' => 'application/x-futuresplash', 'spot' => 'text/vnd.in3d.spot', 'spp' => 'application/scvp-vp-response', 'spq' => 'application/scvp-vp-request', 'spx' => 'audio/ogg', 'sql' => 'application/x-sql', 'src' => 'application/x-wais-source', 'srt' => 'application/x-subrip', 'sru' => 'application/sru+xml', 'srx' => 'application/sparql-results+xml', 'ssdl' => 'application/ssdl+xml', 'sse' => 'application/vnd.kodak-descriptor', 'ssf' => 'application/vnd.epson.ssf', 'ssml' => 'application/ssml+xml', 'sst' => 'application/octet-stream', 'st' => 'application/vnd.sailingtracker.track', 'stc' => 'application/vnd.sun.xml.calc.template', 'std' => 'application/vnd.sun.xml.draw.template', 'step' => 'application/STEP', 'stf' => 'application/vnd.wt.stf', 'sti' => 'application/vnd.sun.xml.impress.template', 'stk' => 'application/hyperstudio', 'stl' => 'model/stl', 'stp' => 'application/STEP', 'stpx' => 'model/step+xml', 'stpxz' => 'model/step-xml+zip', 'stpz' => 'model/step+zip', 'str' => 'application/vnd.pg.format', 'stw' => 'application/vnd.sun.xml.writer.template', 'styl' => 'text/stylus', 'stylus' => 'text/stylus', 'sub' => 'text/vnd.dvb.subtitle', 'sus' => 'application/vnd.sus-calendar', 'susp' => 'application/vnd.sus-calendar', 'sv4cpio' => 'application/x-sv4cpio', 'sv4crc' => 'application/x-sv4crc', 'svc' => 'application/vnd.dvb.service', 'svd' => 'application/vnd.svd', 'svg' => 'image/svg+xml', 'svgz' => 'image/svg+xml', 'swa' => 'application/x-director', 'swf' => 'application/x-shockwave-flash', 'swi' => 'application/vnd.aristanetworks.swi', 'swidtag' => 'application/swid+xml', 'sxc' => 'application/vnd.sun.xml.calc', 'sxd' => 'application/vnd.sun.xml.draw', 'sxg' => 'application/vnd.sun.xml.writer.global', 'sxi' => 'application/vnd.sun.xml.impress', 'sxm' => 'application/vnd.sun.xml.math', 'sxw' => 'application/vnd.sun.xml.writer', 't' => 'text/troff', 't3' => 'application/x-t3vm-image', 't38' => 'image/t38', 'taglet' => 'application/vnd.mynfc', 'tao' => 'application/vnd.tao.intent-module-archive', 'tap' => 'image/vnd.tencent.tap', 'tar' => 'application/x-tar', 'tcap' => 'application/vnd.3gpp2.tcap', 'tcl' => 'application/x-tcl', 'td' => 'application/urc-targetdesc+xml', 'teacher' => 'application/vnd.smart.teacher', 'tei' => 'application/tei+xml', 'teicorpus' => 'application/tei+xml', 'tex' => 'application/x-tex', 'texi' => 'application/x-texinfo', 'texinfo' => 'application/x-texinfo', 'text' => 'text/plain', 'tfi' => 'application/thraud+xml', 'tfm' => 'application/x-tex-tfm', 'tfx' => 'image/tiff-fx', 'tga' => 'image/x-tga', 'tgz' => 'application/x-tar', 'thmx' => 'application/vnd.ms-officetheme', 'tif' => 'image/tiff', 'tiff' => 'image/tiff', 'tk' => 'application/x-tcl', 'tmo' => 'application/vnd.tmobile-livetv', 'toml' => 'application/toml', 'torrent' => 'application/x-bittorrent', 'tpl' => 'application/vnd.groove-tool-template', 'tpt' => 'application/vnd.trid.tpt', 'tr' => 'text/troff', 'tra' => 'application/vnd.trueapp', 'trig' => 'application/trig', 'trm' => 'application/x-msterminal', 'ts' => 'video/mp2t', 'tsd' => 'application/timestamped-data', 'tsv' => 'text/tab-separated-values', 'ttc' => 'font/collection', 'ttf' => 'font/ttf', 'ttl' => 'text/turtle', 'ttml' => 'application/ttml+xml', 'twd' => 'application/vnd.simtech-mindmapper', 'twds' => 'application/vnd.simtech-mindmapper', 'txd' => 'application/vnd.genomatix.tuxedo', 'txf' => 'application/vnd.mobius.txf', 'txt' => 'text/plain', 'u3d' => 'model/u3d', 'u8dsn' => 'message/global-delivery-status', 'u8hdr' => 'message/global-headers', 'u8mdn' => 'message/global-disposition-notification', 'u8msg' => 'message/global', 'u32' => 'application/x-authorware-bin', 'ubj' => 'application/ubjson', 'udeb' => 'application/x-debian-package', 'ufd' => 'application/vnd.ufdl', 'ufdl' => 'application/vnd.ufdl', 'ulx' => 'application/x-glulx', 'umj' => 'application/vnd.umajin', 'unityweb' => 'application/vnd.unity', 'uo' => 'application/vnd.uoml+xml', 'uoml' => 'application/vnd.uoml+xml', 'uri' => 'text/uri-list', 'uris' => 'text/uri-list', 'urls' => 'text/uri-list', 'usda' => 'model/vnd.usda', 'usdz' => 'model/vnd.usdz+zip', 'ustar' => 'application/x-ustar', 'utz' => 'application/vnd.uiq.theme', 'uu' => 'text/x-uuencode', 'uva' => 'audio/vnd.dece.audio', 'uvd' => 'application/vnd.dece.data', 'uvf' => 'application/vnd.dece.data', 'uvg' => 'image/vnd.dece.graphic', 'uvh' => 'video/vnd.dece.hd', 'uvi' => 'image/vnd.dece.graphic', 'uvm' => 'video/vnd.dece.mobile', 'uvp' => 'video/vnd.dece.pd', 'uvs' => 'video/vnd.dece.sd', 'uvt' => 'application/vnd.dece.ttml+xml', 'uvu' => 'video/vnd.uvvu.mp4', 'uvv' => 'video/vnd.dece.video', 'uvva' => 'audio/vnd.dece.audio', 'uvvd' => 'application/vnd.dece.data', 'uvvf' => 'application/vnd.dece.data', 'uvvg' => 'image/vnd.dece.graphic', 'uvvh' => 'video/vnd.dece.hd', 'uvvi' => 'image/vnd.dece.graphic', 'uvvm' => 'video/vnd.dece.mobile', 'uvvp' => 'video/vnd.dece.pd', 'uvvs' => 'video/vnd.dece.sd', 'uvvt' => 'application/vnd.dece.ttml+xml', 'uvvu' => 'video/vnd.uvvu.mp4', 'uvvv' => 'video/vnd.dece.video', 'uvvx' => 'application/vnd.dece.unspecified', 'uvvz' => 'application/vnd.dece.zip', 'uvx' => 'application/vnd.dece.unspecified', 'uvz' => 'application/vnd.dece.zip', 'vbox' => 'application/x-virtualbox-vbox', 'vbox-extpack' => 'application/x-virtualbox-vbox-extpack', 'vcard' => 'text/vcard', 'vcd' => 'application/x-cdlink', 'vcf' => 'text/x-vcard', 'vcg' => 'application/vnd.groove-vcard', 'vcs' => 'text/x-vcalendar', 'vcx' => 'application/vnd.vcx', 'vdi' => 'application/x-virtualbox-vdi', 'vds' => 'model/vnd.sap.vds', 'vhd' => 'application/x-virtualbox-vhd', 'vis' => 'application/vnd.visionary', 'viv' => 'video/vnd.vivo', 'vlc' => 'application/videolan', 'vmdk' => 'application/x-virtualbox-vmdk', 'vob' => 'video/x-ms-vob', 'vor' => 'application/vnd.stardivision.writer', 'vox' => 'application/x-authorware-bin', 'vrml' => 'model/vrml', 'vsd' => 'application/vnd.visio', 'vsf' => 'application/vnd.vsf', 'vss' => 'application/vnd.visio', 'vst' => 'application/vnd.visio', 'vsw' => 'application/vnd.visio', 'vtf' => 'image/vnd.valve.source.texture', 'vtt' => 'text/vtt', 'vtu' => 'model/vnd.vtu', 'vxml' => 'application/voicexml+xml', 'w3d' => 'application/x-director', 'wad' => 'application/x-doom', 'wadl' => 'application/vnd.sun.wadl+xml', 'war' => 'application/java-archive', 'wasm' => 'application/wasm', 'wav' => 'audio/x-wav', 'wax' => 'audio/x-ms-wax', 'wbmp' => 'image/vnd.wap.wbmp', 'wbs' => 'application/vnd.criticaltools.wbs+xml', 'wbxml' => 'application/wbxml', 'wcm' => 'application/vnd.ms-works', 'wdb' => 'application/vnd.ms-works', 'wdp' => 'image/vnd.ms-photo', 'weba' => 'audio/webm', 'webapp' => 'application/x-web-app-manifest+json', 'webm' => 'video/webm', 'webmanifest' => 'application/manifest+json', 'webp' => 'image/webp', 'wg' => 'application/vnd.pmi.widget', 'wgsl' => 'text/wgsl', 'wgt' => 'application/widget', 'wif' => 'application/watcherinfo+xml', 'wks' => 'application/vnd.ms-works', 'wm' => 'video/x-ms-wm', 'wma' => 'audio/x-ms-wma', 'wmd' => 'application/x-ms-wmd', 'wmf' => 'image/wmf', 'wml' => 'text/vnd.wap.wml', 'wmlc' => 'application/wmlc', 'wmls' => 'text/vnd.wap.wmlscript', 'wmlsc' => 'application/vnd.wap.wmlscriptc', 'wmv' => 'video/x-ms-wmv', 'wmx' => 'video/x-ms-wmx', 'wmz' => 'application/x-msmetafile', 'woff' => 'font/woff', 'woff2' => 'font/woff2', 'word' => 'application/msword', 'wpd' => 'application/vnd.wordperfect', 'wpl' => 'application/vnd.ms-wpl', 'wps' => 'application/vnd.ms-works', 'wqd' => 'application/vnd.wqd', 'wri' => 'application/x-mswrite', 'wrl' => 'model/vrml', 'wsc' => 'message/vnd.wfa.wsc', 'wsdl' => 'application/wsdl+xml', 'wspolicy' => 'application/wspolicy+xml', 'wtb' => 'application/vnd.webturbo', 'wvx' => 'video/x-ms-wvx', 'x3d' => 'model/x3d+xml', 'x3db' => 'model/x3d+fastinfoset', 'x3dbz' => 'model/x3d+binary', 'x3dv' => 'model/x3d-vrml', 'x3dvz' => 'model/x3d+vrml', 'x3dz' => 'model/x3d+xml', 'x32' => 'application/x-authorware-bin', 'x_b' => 'model/vnd.parasolid.transmit.binary', 'x_t' => 'model/vnd.parasolid.transmit.text', 'xaml' => 'application/xaml+xml', 'xap' => 'application/x-silverlight-app', 'xar' => 'application/vnd.xara', 'xav' => 'application/xcap-att+xml', 'xbap' => 'application/x-ms-xbap', 'xbd' => 'application/vnd.fujixerox.docuworks.binder', 'xbm' => 'image/x-xbitmap', 'xca' => 'application/xcap-caps+xml', 'xcs' => 'application/calendar+xml', 'xdf' => 'application/xcap-diff+xml', 'xdm' => 'application/vnd.syncml.dm+xml', 'xdp' => 'application/vnd.adobe.xdp+xml', 'xdssc' => 'application/dssc+xml', 'xdw' => 'application/vnd.fujixerox.docuworks', 'xel' => 'application/xcap-el+xml', 'xenc' => 'application/xenc+xml', 'xer' => 'application/patch-ops-error+xml', 'xfdf' => 'application/xfdf', 'xfdl' => 'application/vnd.xfdl', 'xht' => 'application/xhtml+xml', 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', 'xhtml' => 'application/xhtml+xml', 'xhvml' => 'application/xv+xml', 'xif' => 'image/vnd.xiff', 'xl' => 'application/excel', 'xla' => 'application/vnd.ms-excel', 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', 'xlc' => 'application/vnd.ms-excel', 'xlf' => 'application/xliff+xml', 'xlm' => 'application/vnd.ms-excel', 'xls' => 'application/vnd.ms-excel', 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlt' => 'application/vnd.ms-excel', 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xlw' => 'application/vnd.ms-excel', 'xm' => 'audio/xm', 'xml' => 'application/xml', 'xns' => 'application/xcap-ns+xml', 'xo' => 'application/vnd.olpc-sugar', 'xop' => 'application/xop+xml', 'xpi' => 'application/x-xpinstall', 'xpl' => 'application/xproc+xml', 'xpm' => 'image/x-xpixmap', 'xpr' => 'application/vnd.is-xpr', 'xps' => 'application/vnd.ms-xpsdocument', 'xpw' => 'application/vnd.intercon.formnet', 'xpx' => 'application/vnd.intercon.formnet', 'xsd' => 'application/xml', 'xsf' => 'application/prs.xsf+xml', 'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml', 'xsm' => 'application/vnd.syncml+xml', 'xspf' => 'application/xspf+xml', 'xul' => 'application/vnd.mozilla.xul+xml', 'xvm' => 'application/xv+xml', 'xvml' => 'application/xv+xml', 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', 'xz' => 'application/x-xz', 'yaml' => 'text/yaml', 'yang' => 'application/yang', 'yin' => 'application/yin+xml', 'yml' => 'text/yaml', 'ymp' => 'text/x-suse-ymp', 'z' => 'application/x-compress', 'z1' => 'application/x-zmachine', 'z2' => 'application/x-zmachine', 'z3' => 'application/x-zmachine', 'z4' => 'application/x-zmachine', 'z5' => 'application/x-zmachine', 'z6' => 'application/x-zmachine', 'z7' => 'application/x-zmachine', 'z8' => 'application/x-zmachine', 'zaz' => 'application/vnd.zzazz.deck+xml', 'zip' => 'application/zip', 'zir' => 'application/vnd.zul', 'zirz' => 'application/vnd.zul', 'zmm' => 'application/vnd.handheld-entertainment+xml', 'zsh' => 'text/x-scriptzsh']; /** * Determines the mimetype of a file by looking at its extension. * * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromFilename(string $filename) : ?string { return self::fromExtension(\pathinfo($filename, \PATHINFO_EXTENSION)); } /** * Maps a file extensions to a mimetype. * * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromExtension(string $extension) : ?string { return self::MIME_TYPES[\strtolower($extension)] ?? null; } } vendor_prefixed/guzzlehttp/psr7/src/LazyOpenStream.php 0000644 00000002136 15174671617 0017300 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Lazily reads or writes to a file that is opened only after an IO operation * take place on the stream. */ final class LazyOpenStream implements StreamInterface { use StreamDecoratorTrait; /** @var string */ private $filename; /** @var string */ private $mode; /** * @var StreamInterface */ private $stream; /** * @param string $filename File to lazily open * @param string $mode fopen mode to use when opening the stream */ public function __construct(string $filename, string $mode) { $this->filename = $filename; $this->mode = $mode; // unsetting the property forces the first access to go through // __get(). unset($this->stream); } /** * Creates the underlying stream lazily when required. */ protected function createStream() : StreamInterface { return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode)); } } vendor_prefixed/guzzlehttp/psr7/src/UploadedFile.php 0000644 00000011355 15174671617 0016723 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use InvalidArgumentException; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UploadedFileInterface; use RuntimeException; class UploadedFile implements UploadedFileInterface { private const ERROR_MAP = [\UPLOAD_ERR_OK => 'UPLOAD_ERR_OK', \UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE', \UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE', \UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL', \UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE', \UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR', \UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE', \UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION']; /** * @var string|null */ private $clientFilename; /** * @var string|null */ private $clientMediaType; /** * @var int */ private $error; /** * @var string|null */ private $file; /** * @var bool */ private $moved = \false; /** * @var int|null */ private $size; /** * @var StreamInterface|null */ private $stream; /** * @param StreamInterface|string|resource $streamOrFile */ public function __construct($streamOrFile, ?int $size, int $errorStatus, ?string $clientFilename = null, ?string $clientMediaType = null) { $this->setError($errorStatus); $this->size = $size; $this->clientFilename = $clientFilename; $this->clientMediaType = $clientMediaType; if ($this->isOk()) { $this->setStreamOrFile($streamOrFile); } } /** * Depending on the value set file or stream variable * * @param StreamInterface|string|resource $streamOrFile * * @throws InvalidArgumentException */ private function setStreamOrFile($streamOrFile) : void { if (\is_string($streamOrFile)) { $this->file = $streamOrFile; } elseif (\is_resource($streamOrFile)) { $this->stream = new Stream($streamOrFile); } elseif ($streamOrFile instanceof StreamInterface) { $this->stream = $streamOrFile; } else { throw new InvalidArgumentException('Invalid stream or file provided for UploadedFile'); } } /** * @throws InvalidArgumentException */ private function setError(int $error) : void { if (!isset(UploadedFile::ERROR_MAP[$error])) { throw new InvalidArgumentException('Invalid error status for UploadedFile'); } $this->error = $error; } private static function isStringNotEmpty($param) : bool { return \is_string($param) && \false === empty($param); } /** * Return true if there is no upload error */ private function isOk() : bool { return $this->error === \UPLOAD_ERR_OK; } public function isMoved() : bool { return $this->moved; } /** * @throws RuntimeException if is moved or not ok */ private function validateActive() : void { if (\false === $this->isOk()) { throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error])); } if ($this->isMoved()) { throw new RuntimeException('Cannot retrieve stream after it has already been moved'); } } public function getStream() : StreamInterface { $this->validateActive(); if ($this->stream instanceof StreamInterface) { return $this->stream; } /** @var string $file */ $file = $this->file; return new LazyOpenStream($file, 'r+'); } public function moveTo($targetPath) : void { $this->validateActive(); if (\false === self::isStringNotEmpty($targetPath)) { throw new InvalidArgumentException('Invalid path provided for move operation; must be a non-empty string'); } if ($this->file) { $this->moved = \PHP_SAPI === 'cli' ? \rename($this->file, $targetPath) : \move_uploaded_file($this->file, $targetPath); } else { Utils::copyToStream($this->getStream(), new LazyOpenStream($targetPath, 'w')); $this->moved = \true; } if (\false === $this->moved) { throw new RuntimeException(\sprintf('Uploaded file could not be moved to %s', $targetPath)); } } public function getSize() : ?int { return $this->size; } public function getError() : int { return $this->error; } public function getClientFilename() : ?string { return $this->clientFilename; } public function getClientMediaType() : ?string { return $this->clientMediaType; } } vendor_prefixed/guzzlehttp/psr7/src/Request.php 0000644 00000007471 15174671617 0016022 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use InvalidArgumentException; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * PSR-7 request implementation. */ class Request implements RequestInterface { use MessageTrait; /** @var string */ private $method; /** @var string|null */ private $requestTarget; /** @var UriInterface */ private $uri; /** * @param string $method HTTP method * @param string|UriInterface $uri URI * @param (string|string[])[] $headers Request headers * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version */ public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1') { $this->assertMethod($method); if (!$uri instanceof UriInterface) { $uri = new Uri($uri); } $this->method = \strtoupper($method); $this->uri = $uri; $this->setHeaders($headers); $this->protocol = $version; if (!isset($this->headerNames['host'])) { $this->updateHostFromUri(); } if ($body !== '' && $body !== null) { $this->stream = Utils::streamFor($body); } } public function getRequestTarget() : string { if ($this->requestTarget !== null) { return $this->requestTarget; } $target = $this->uri->getPath(); if ($target === '') { $target = '/'; } if ($this->uri->getQuery() != '') { $target .= '?' . $this->uri->getQuery(); } return $target; } public function withRequestTarget($requestTarget) : RequestInterface { if (\preg_match('#\\s#', $requestTarget)) { throw new InvalidArgumentException('Invalid request target provided; cannot contain whitespace'); } $new = clone $this; $new->requestTarget = $requestTarget; return $new; } public function getMethod() : string { return $this->method; } public function withMethod($method) : RequestInterface { $this->assertMethod($method); $new = clone $this; $new->method = \strtoupper($method); return $new; } public function getUri() : UriInterface { return $this->uri; } public function withUri(UriInterface $uri, $preserveHost = \false) : RequestInterface { if ($uri === $this->uri) { return $this; } $new = clone $this; $new->uri = $uri; if (!$preserveHost || !isset($this->headerNames['host'])) { $new->updateHostFromUri(); } return $new; } private function updateHostFromUri() : void { $host = $this->uri->getHost(); if ($host == '') { return; } if (($port = $this->uri->getPort()) !== null) { $host .= ':' . $port; } if (isset($this->headerNames['host'])) { $header = $this->headerNames['host']; } else { $header = 'Host'; $this->headerNames['host'] = 'Host'; } // Ensure Host is the first header. // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 $this->headers = [$header => [$host]] + $this->headers; } /** * @param mixed $method */ private function assertMethod($method) : void { if (!\is_string($method) || $method === '') { throw new InvalidArgumentException('Method must be a non-empty string.'); } } } vendor_prefixed/guzzlehttp/psr7/src/CachingStream.php 0000644 00000010736 15174671617 0017100 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Stream decorator that can cache previously read bytes from a sequentially * read stream. */ final class CachingStream implements StreamInterface { use StreamDecoratorTrait; /** @var StreamInterface Stream being wrapped */ private $remoteStream; /** @var int Number of bytes to skip reading due to a write on the buffer */ private $skipReadBytes = 0; /** * @var StreamInterface */ private $stream; /** * We will treat the buffer object as the body of the stream * * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream. * @param StreamInterface $target Optionally specify where data is cached */ public function __construct(StreamInterface $stream, ?StreamInterface $target = null) { $this->remoteStream = $stream; $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); } public function getSize() : ?int { $remoteSize = $this->remoteStream->getSize(); if (null === $remoteSize) { return null; } return \max($this->stream->getSize(), $remoteSize); } public function rewind() : void { $this->seek(0); } public function seek($offset, $whence = \SEEK_SET) : void { if ($whence === \SEEK_SET) { $byte = $offset; } elseif ($whence === \SEEK_CUR) { $byte = $offset + $this->tell(); } elseif ($whence === \SEEK_END) { $size = $this->remoteStream->getSize(); if ($size === null) { $size = $this->cacheEntireStream(); } $byte = $size + $offset; } else { throw new \InvalidArgumentException('Invalid whence'); } $diff = $byte - $this->stream->getSize(); if ($diff > 0) { // Read the remoteStream until we have read in at least the amount // of bytes requested, or we reach the end of the file. while ($diff > 0 && !$this->remoteStream->eof()) { $this->read($diff); $diff = $byte - $this->stream->getSize(); } } else { // We can just do a normal seek since we've already seen this byte. $this->stream->seek($byte); } } public function read($length) : string { // Perform a regular read on any previously read data from the buffer $data = $this->stream->read($length); $remaining = $length - \strlen($data); // More data was requested so read from the remote stream if ($remaining) { // If data was written to the buffer in a position that would have // been filled from the remote stream, then we must skip bytes on // the remote stream to emulate overwriting bytes from that // position. This mimics the behavior of other PHP stream wrappers. $remoteData = $this->remoteStream->read($remaining + $this->skipReadBytes); if ($this->skipReadBytes) { $len = \strlen($remoteData); $remoteData = \substr($remoteData, $this->skipReadBytes); $this->skipReadBytes = \max(0, $this->skipReadBytes - $len); } $data .= $remoteData; $this->stream->write($remoteData); } return $data; } public function write($string) : int { // When appending to the end of the currently read stream, you'll want // to skip bytes from being read from the remote stream to emulate // other stream wrappers. Basically replacing bytes of data of a fixed // length. $overflow = \strlen($string) + $this->tell() - $this->remoteStream->tell(); if ($overflow > 0) { $this->skipReadBytes += $overflow; } return $this->stream->write($string); } public function eof() : bool { return $this->stream->eof() && $this->remoteStream->eof(); } /** * Close both the remote stream and buffer stream */ public function close() : void { $this->remoteStream->close(); $this->stream->close(); } private function cacheEntireStream() : int { $target = new FnStream(['write' => 'strlen']); Utils::copyToStream($this, $target); return $this->tell(); } } vendor_prefixed/guzzlehttp/psr7/src/Query.php 0000644 00000010025 15174671617 0015464 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; final class Query { /** * Parse a query string into an associative array. * * If multiple values are found for the same key, the value of that key * value pair will become an array. This function does not parse nested * PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` * will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`. * * @param string $str Query string to parse * @param int|bool $urlEncoding How the query string is encoded */ public static function parse(string $str, $urlEncoding = \true) : array { $result = []; if ($str === '') { return $result; } if ($urlEncoding === \true) { $decoder = function ($value) { return \rawurldecode(\str_replace('+', ' ', (string) $value)); }; } elseif ($urlEncoding === \PHP_QUERY_RFC3986) { $decoder = 'rawurldecode'; } elseif ($urlEncoding === \PHP_QUERY_RFC1738) { $decoder = 'urldecode'; } else { $decoder = function ($str) { return $str; }; } foreach (\explode('&', $str) as $kvp) { $parts = \explode('=', $kvp, 2); $key = $decoder($parts[0]); $value = isset($parts[1]) ? $decoder($parts[1]) : null; if (!\array_key_exists($key, $result)) { $result[$key] = $value; } else { if (!\is_array($result[$key])) { $result[$key] = [$result[$key]]; } $result[$key][] = $value; } } return $result; } /** * Build a query string from an array of key value pairs. * * This function can use the return value of `parse()` to build a query * string. This function does not modify the provided keys when an array is * encountered (like `http_build_query()` would). * * @param array $params Query string parameters. * @param int|false $encoding Set to false to not encode, * PHP_QUERY_RFC3986 to encode using * RFC3986, or PHP_QUERY_RFC1738 to * encode using RFC1738. * @param bool $treatBoolsAsInts Set to true to encode as 0/1, and * false as false/true. */ public static function build(array $params, $encoding = \PHP_QUERY_RFC3986, bool $treatBoolsAsInts = \true) : string { if (!$params) { return ''; } if ($encoding === \false) { $encoder = function (string $str) : string { return $str; }; } elseif ($encoding === \PHP_QUERY_RFC3986) { $encoder = 'rawurlencode'; } elseif ($encoding === \PHP_QUERY_RFC1738) { $encoder = 'urlencode'; } else { throw new \InvalidArgumentException('Invalid type'); } $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; $qs = ''; foreach ($params as $k => $v) { $k = $encoder((string) $k); if (!\is_array($v)) { $qs .= $k; $v = \is_bool($v) ? $castBool($v) : $v; if ($v !== null) { $qs .= '=' . $encoder((string) $v); } $qs .= '&'; } else { foreach ($v as $vv) { $qs .= $k; $vv = \is_bool($vv) ? $castBool($vv) : $vv; if ($vv !== null) { $qs .= '=' . $encoder((string) $vv); } $qs .= '&'; } } } return $qs ? (string) \substr($qs, 0, -1) : ''; } } vendor_prefixed/guzzlehttp/psr7/src/AppendStream.php 0000644 00000013453 15174671617 0016752 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Reads from multiple streams, one after the other. * * This is a read-only stream decorator. */ final class AppendStream implements StreamInterface { /** @var StreamInterface[] Streams being decorated */ private $streams = []; /** @var bool */ private $seekable = \true; /** @var int */ private $current = 0; /** @var int */ private $pos = 0; /** * @param StreamInterface[] $streams Streams to decorate. Each stream must * be readable. */ public function __construct(array $streams = []) { foreach ($streams as $stream) { $this->addStream($stream); } } public function __toString() : string { try { $this->rewind(); return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } \trigger_error(\sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR); return ''; } } /** * Add a stream to the AppendStream * * @param StreamInterface $stream Stream to append. Must be readable. * * @throws \InvalidArgumentException if the stream is not readable */ public function addStream(StreamInterface $stream) : void { if (!$stream->isReadable()) { throw new \InvalidArgumentException('Each stream must be readable'); } // The stream is only seekable if all streams are seekable if (!$stream->isSeekable()) { $this->seekable = \false; } $this->streams[] = $stream; } public function getContents() : string { return Utils::copyToString($this); } /** * Closes each attached stream. */ public function close() : void { $this->pos = $this->current = 0; $this->seekable = \true; foreach ($this->streams as $stream) { $stream->close(); } $this->streams = []; } /** * Detaches each attached stream. * * Returns null as it's not clear which underlying stream resource to return. */ public function detach() { $this->pos = $this->current = 0; $this->seekable = \true; foreach ($this->streams as $stream) { $stream->detach(); } $this->streams = []; return null; } public function tell() : int { return $this->pos; } /** * Tries to calculate the size by adding the size of each stream. * * If any of the streams do not return a valid number, then the size of the * append stream cannot be determined and null is returned. */ public function getSize() : ?int { $size = 0; foreach ($this->streams as $stream) { $s = $stream->getSize(); if ($s === null) { return null; } $size += $s; } return $size; } public function eof() : bool { return !$this->streams || $this->current >= \count($this->streams) - 1 && $this->streams[$this->current]->eof(); } public function rewind() : void { $this->seek(0); } /** * Attempts to seek to the given position. Only supports SEEK_SET. */ public function seek($offset, $whence = \SEEK_SET) : void { if (!$this->seekable) { throw new \RuntimeException('This AppendStream is not seekable'); } elseif ($whence !== \SEEK_SET) { throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); } $this->pos = $this->current = 0; // Rewind each stream foreach ($this->streams as $i => $stream) { try { $stream->rewind(); } catch (\Exception $e) { throw new \RuntimeException('Unable to seek stream ' . $i . ' of the AppendStream', 0, $e); } } // Seek to the actual position by reading from each stream while ($this->pos < $offset && !$this->eof()) { $result = $this->read(\min(8096, $offset - $this->pos)); if ($result === '') { break; } } } /** * Reads from all of the appended streams until the length is met or EOF. */ public function read($length) : string { $buffer = ''; $total = \count($this->streams) - 1; $remaining = $length; $progressToNext = \false; while ($remaining > 0) { // Progress to the next stream if needed. if ($progressToNext || $this->streams[$this->current]->eof()) { $progressToNext = \false; if ($this->current === $total) { break; } ++$this->current; } $result = $this->streams[$this->current]->read($remaining); if ($result === '') { $progressToNext = \true; continue; } $buffer .= $result; $remaining = $length - \strlen($buffer); } $this->pos += \strlen($buffer); return $buffer; } public function isReadable() : bool { return \true; } public function isWritable() : bool { return \false; } public function isSeekable() : bool { return $this->seekable; } public function write($string) : int { throw new \RuntimeException('Cannot write to an AppendStream'); } /** * @return mixed */ public function getMetadata($key = null) { return $key ? null : []; } } vendor_prefixed/guzzlehttp/psr7/src/MessageTrait.php 0000644 00000016520 15174671617 0016755 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\MessageInterface; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Trait implementing functionality common to requests and responses. */ trait MessageTrait { /** @var string[][] Map of all registered headers, as original name => array of values */ private $headers = []; /** @var string[] Map of lowercase header name => original name at registration */ private $headerNames = []; /** @var string */ private $protocol = '1.1'; /** @var StreamInterface|null */ private $stream; public function getProtocolVersion() : string { return $this->protocol; } public function withProtocolVersion($version) : MessageInterface { if ($this->protocol === $version) { return $this; } $new = clone $this; $new->protocol = $version; return $new; } public function getHeaders() : array { return $this->headers; } public function hasHeader($header) : bool { return isset($this->headerNames[\strtolower($header)]); } public function getHeader($header) : array { $header = \strtolower($header); if (!isset($this->headerNames[$header])) { return []; } $header = $this->headerNames[$header]; return $this->headers[$header]; } public function getHeaderLine($header) : string { return \implode(', ', $this->getHeader($header)); } public function withHeader($header, $value) : MessageInterface { $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); $normalized = \strtolower($header); $new = clone $this; if (isset($new->headerNames[$normalized])) { unset($new->headers[$new->headerNames[$normalized]]); } $new->headerNames[$normalized] = $header; $new->headers[$header] = $value; return $new; } public function withAddedHeader($header, $value) : MessageInterface { $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); $normalized = \strtolower($header); $new = clone $this; if (isset($new->headerNames[$normalized])) { $header = $this->headerNames[$normalized]; $new->headers[$header] = \array_merge($this->headers[$header], $value); } else { $new->headerNames[$normalized] = $header; $new->headers[$header] = $value; } return $new; } public function withoutHeader($header) : MessageInterface { $normalized = \strtolower($header); if (!isset($this->headerNames[$normalized])) { return $this; } $header = $this->headerNames[$normalized]; $new = clone $this; unset($new->headers[$header], $new->headerNames[$normalized]); return $new; } public function getBody() : StreamInterface { if (!$this->stream) { $this->stream = Utils::streamFor(''); } return $this->stream; } public function withBody(StreamInterface $body) : MessageInterface { if ($body === $this->stream) { return $this; } $new = clone $this; $new->stream = $body; return $new; } /** * @param (string|string[])[] $headers */ private function setHeaders(array $headers) : void { $this->headerNames = $this->headers = []; foreach ($headers as $header => $value) { // Numeric array keys are converted to int by PHP. $header = (string) $header; $this->assertHeader($header); $value = $this->normalizeHeaderValue($value); $normalized = \strtolower($header); if (isset($this->headerNames[$normalized])) { $header = $this->headerNames[$normalized]; $this->headers[$header] = \array_merge($this->headers[$header], $value); } else { $this->headerNames[$normalized] = $header; $this->headers[$header] = $value; } } } /** * @param mixed $value * * @return string[] */ private function normalizeHeaderValue($value) : array { if (!\is_array($value)) { return $this->trimAndValidateHeaderValues([$value]); } return $this->trimAndValidateHeaderValues($value); } /** * Trims whitespace from the header values. * * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. * * header-field = field-name ":" OWS field-value OWS * OWS = *( SP / HTAB ) * * @param mixed[] $values Header values * * @return string[] Trimmed header values * * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4 */ private function trimAndValidateHeaderValues(array $values) : array { return \array_map(function ($value) { if (!\is_scalar($value) && null !== $value) { throw new \InvalidArgumentException(\sprintf('Header value must be scalar or null but %s provided.', \is_object($value) ? \get_class($value) : \gettype($value))); } $trimmed = \trim((string) $value, " \t"); $this->assertValue($trimmed); return $trimmed; }, \array_values($values)); } /** * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 * * @param mixed $header */ private function assertHeader($header) : void { if (!\is_string($header)) { throw new \InvalidArgumentException(\sprintf('Header name must be a string but %s provided.', \is_object($header) ? \get_class($header) : \gettype($header))); } if (!\preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { throw new \InvalidArgumentException(\sprintf('"%s" is not valid header name.', $header)); } } /** * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 * * field-value = *( field-content / obs-fold ) * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] * field-vchar = VCHAR / obs-text * VCHAR = %x21-7E * obs-text = %x80-FF * obs-fold = CRLF 1*( SP / HTAB ) */ private function assertValue(string $value) : void { // The regular expression intentionally does not support the obs-fold production, because as // per RFC 7230#3.2.4: // // A sender MUST NOT generate a message that includes // line folding (i.e., that has any field-value that contains a match to // the obs-fold rule) unless the message is intended for packaging // within the message/http media type. // // Clients must not send a request with line folding and a server sending folded headers is // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting // folding is not likely to break any legitimate use case. if (!\preg_match('/^[\\x20\\x09\\x21-\\x7E\\x80-\\xFF]*$/D', $value)) { throw new \InvalidArgumentException(\sprintf('"%s" is not valid header value.', $value)); } } } vendor_prefixed/guzzlehttp/psr7/src/PumpStream.php 0000644 00000011026 15174671617 0016456 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Provides a read only stream that pumps data from a PHP callable. * * When invoking the provided callable, the PumpStream will pass the amount of * data requested to read to the callable. The callable can choose to ignore * this value and return fewer or more bytes than requested. Any extra data * returned by the provided callable is buffered internally until drained using * the read() function of the PumpStream. The provided callable MUST return * false when there is no more data to read. */ final class PumpStream implements StreamInterface { /** @var callable(int): (string|false|null)|null */ private $source; /** @var int|null */ private $size; /** @var int */ private $tellPos = 0; /** @var array */ private $metadata; /** @var BufferStream */ private $buffer; /** * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY * accept an integer argument used to control the * amount of data to return. The callable MUST * return a string when called, or false|null on error * or EOF. * @param array{size?: int, metadata?: array} $options Stream options: * - metadata: Hash of metadata to use with stream. * - size: Size of the stream, if known. */ public function __construct(callable $source, array $options = []) { $this->source = $source; $this->size = $options['size'] ?? null; $this->metadata = $options['metadata'] ?? []; $this->buffer = new BufferStream(); } public function __toString() : string { try { return Utils::copyToString($this); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } \trigger_error(\sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR); return ''; } } public function close() : void { $this->detach(); } public function detach() { $this->tellPos = 0; $this->source = null; return null; } public function getSize() : ?int { return $this->size; } public function tell() : int { return $this->tellPos; } public function eof() : bool { return $this->source === null; } public function isSeekable() : bool { return \false; } public function rewind() : void { $this->seek(0); } public function seek($offset, $whence = \SEEK_SET) : void { throw new \RuntimeException('Cannot seek a PumpStream'); } public function isWritable() : bool { return \false; } public function write($string) : int { throw new \RuntimeException('Cannot write to a PumpStream'); } public function isReadable() : bool { return \true; } public function read($length) : string { $data = $this->buffer->read($length); $readLen = \strlen($data); $this->tellPos += $readLen; $remaining = $length - $readLen; if ($remaining) { $this->pump($remaining); $data .= $this->buffer->read($remaining); $this->tellPos += \strlen($data) - $readLen; } return $data; } public function getContents() : string { $result = ''; while (!$this->eof()) { $result .= $this->read(1000000); } return $result; } /** * @return mixed */ public function getMetadata($key = null) { if (!$key) { return $this->metadata; } return $this->metadata[$key] ?? null; } private function pump(int $length) : void { if ($this->source !== null) { do { $data = ($this->source)($length); if ($data === \false || $data === null) { $this->source = null; return; } $this->buffer->write($data); $length -= \strlen($data); } while ($length > 0); } } } vendor_prefixed/guzzlehttp/psr7/src/Header.php 0000644 00000007563 15174671617 0015564 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; final class Header { /** * Parse an array of header values containing ";" separated data into an * array of associative arrays representing the header key value pair data * of the header. When a parameter does not contain a value, but just * contains a key, this function will inject a key with a '' string value. * * @param string|array $header Header to parse into components. */ public static function parse($header) : array { static $trimmed = "\"' \n\t\r"; $params = $matches = []; foreach ((array) $header as $value) { foreach (self::splitList($value) as $val) { $part = []; foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) { if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { $m = $matches[0]; if (isset($m[1])) { $part[\trim($m[0], $trimmed)] = \trim($m[1], $trimmed); } else { $part[] = \trim($m[0], $trimmed); } } } if ($part) { $params[] = $part; } } } return $params; } /** * Converts an array of header values that may contain comma separated * headers into an array of headers with no comma separated values. * * @param string|array $header Header to normalize. * * @deprecated Use self::splitList() instead. */ public static function normalize($header) : array { $result = []; foreach ((array) $header as $value) { foreach (self::splitList($value) as $parsed) { $result[] = $parsed; } } return $result; } /** * Splits a HTTP header defined to contain a comma-separated list into * each individual value. Empty values will be removed. * * Example headers include 'accept', 'cache-control' and 'if-none-match'. * * This method must not be used to parse headers that are not defined as * a list, such as 'user-agent' or 'set-cookie'. * * @param string|string[] $values Header value as returned by MessageInterface::getHeader() * * @return string[] */ public static function splitList($values) : array { if (!\is_array($values)) { $values = [$values]; } $result = []; foreach ($values as $value) { if (!\is_string($value)) { throw new \TypeError('$header must either be a string or an array containing strings.'); } $v = ''; $isQuoted = \false; $isEscaped = \false; for ($i = 0, $max = \strlen($value); $i < $max; ++$i) { if ($isEscaped) { $v .= $value[$i]; $isEscaped = \false; continue; } if (!$isQuoted && $value[$i] === ',') { $v = \trim($v); if ($v !== '') { $result[] = $v; } $v = ''; continue; } if ($isQuoted && $value[$i] === '\\') { $isEscaped = \true; $v .= $value[$i]; continue; } if ($value[$i] === '"') { $isQuoted = !$isQuoted; $v .= $value[$i]; continue; } $v .= $value[$i]; } $v = \trim($v); if ($v !== '') { $result[] = $v; } } return $result; } } vendor_prefixed/guzzlehttp/psr7/src/Rfc7230.php 0000644 00000001234 15174671617 0015407 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; /** * @internal */ final class Rfc7230 { /** * Header related regular expressions (based on amphp/http package) * * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons. * * @see https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 * * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE */ public const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\\]?={}\x01- ]++):[ \t]*+((?:[ \t]*+[!-~\x80-\xff]++)*+)[ \t]*+\r?\n)m"; public const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; } vendor_prefixed/guzzlehttp/psr7/src/FnStream.php 0000644 00000010316 15174671617 0016101 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * Compose stream implementations based on a hash of functions. * * Allows for easy testing and extension of a provided stream without needing * to create a concrete class for a simple extension point. */ #[\AllowDynamicProperties] final class FnStream implements StreamInterface { private const SLOTS = ['__toString', 'close', 'detach', 'rewind', 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write', 'isReadable', 'read', 'getContents', 'getMetadata']; /** @var array<string, callable> */ private $methods; /** * @param array<string, callable> $methods Hash of method name to a callable. */ public function __construct(array $methods) { $this->methods = $methods; // Create the functions on the class foreach ($methods as $name => $fn) { $this->{'_fn_' . $name} = $fn; } } /** * Lazily determine which methods are not implemented. * * @throws \BadMethodCallException */ public function __get(string $name) : void { throw new \BadMethodCallException(\str_replace('_fn_', '', $name) . '() is not implemented in the FnStream'); } /** * The close method is called on the underlying stream only if possible. */ public function __destruct() { if (isset($this->_fn_close)) { ($this->_fn_close)(); } } /** * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. * * @throws \LogicException */ public function __wakeup() : void { throw new \LogicException('FnStream should never be unserialized'); } /** * Adds custom functionality to an underlying stream by intercepting * specific method calls. * * @param StreamInterface $stream Stream to decorate * @param array<string, callable> $methods Hash of method name to a closure * * @return FnStream */ public static function decorate(StreamInterface $stream, array $methods) { // If any of the required methods were not provided, then simply // proxy to the decorated stream. foreach (\array_diff(self::SLOTS, \array_keys($methods)) as $diff) { /** @var callable $callable */ $callable = [$stream, $diff]; $methods[$diff] = $callable; } return new self($methods); } public function __toString() : string { try { /** @var string */ return ($this->_fn___toString)(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } \trigger_error(\sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR); return ''; } } public function close() : void { ($this->_fn_close)(); } public function detach() { return ($this->_fn_detach)(); } public function getSize() : ?int { return ($this->_fn_getSize)(); } public function tell() : int { return ($this->_fn_tell)(); } public function eof() : bool { return ($this->_fn_eof)(); } public function isSeekable() : bool { return ($this->_fn_isSeekable)(); } public function rewind() : void { ($this->_fn_rewind)(); } public function seek($offset, $whence = \SEEK_SET) : void { ($this->_fn_seek)($offset, $whence); } public function isWritable() : bool { return ($this->_fn_isWritable)(); } public function write($string) : int { return ($this->_fn_write)($string); } public function isReadable() : bool { return ($this->_fn_isReadable)(); } public function read($length) : string { return ($this->_fn_read)($length); } public function getContents() : string { return ($this->_fn_getContents)(); } /** * @return mixed */ public function getMetadata($key = null) { return ($this->_fn_getMetadata)($key); } } vendor_prefixed/guzzlehttp/psr7/src/UriComparator.php 0000644 00000002240 15174671617 0017146 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * Provides methods to determine if a modified URL should be considered cross-origin. * * @author Graham Campbell */ final class UriComparator { /** * Determines if a modified URL should be considered cross-origin with * respect to an original URL. */ public static function isCrossOrigin(UriInterface $original, UriInterface $modified) : bool { if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) { return \true; } if ($original->getScheme() !== $modified->getScheme()) { return \true; } if (self::computePort($original) !== self::computePort($modified)) { return \true; } return \false; } private static function computePort(UriInterface $uri) : int { $port = $uri->getPort(); if (null !== $port) { return $port; } return 'https' === $uri->getScheme() ? 443 : 80; } private function __construct() { // cannot be instantiated } } vendor_prefixed/guzzlehttp/psr7/src/Stream.php 0000644 00000016367 15174671617 0015631 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\Psr\Http\Message\StreamInterface; /** * PHP stream implementation. */ class Stream implements StreamInterface { /** * @see https://www.php.net/manual/en/function.fopen.php * @see https://www.php.net/manual/en/function.gzopen.php */ private const READABLE_MODES = '/r|a\\+|ab\\+|w\\+|wb\\+|x\\+|xb\\+|c\\+|cb\\+/'; private const WRITABLE_MODES = '/a|w|r\\+|rb\\+|rw|x|c/'; /** @var resource */ private $stream; /** @var int|null */ private $size; /** @var bool */ private $seekable; /** @var bool */ private $readable; /** @var bool */ private $writable; /** @var string|null */ private $uri; /** @var mixed[] */ private $customMetadata; /** * This constructor accepts an associative array of options. * * - size: (int) If a read stream would otherwise have an indeterminate * size, but the size is known due to foreknowledge, then you can * provide that size, in bytes. * - metadata: (array) Any additional metadata to return when the metadata * of the stream is accessed. * * @param resource $stream Stream resource to wrap. * @param array{size?: int, metadata?: array} $options Associative array of options. * * @throws \InvalidArgumentException if the stream is not a stream resource */ public function __construct($stream, array $options = []) { if (!\is_resource($stream)) { throw new \InvalidArgumentException('Stream must be a resource'); } if (isset($options['size'])) { $this->size = $options['size']; } $this->customMetadata = $options['metadata'] ?? []; $this->stream = $stream; $meta = \stream_get_meta_data($this->stream); $this->seekable = $meta['seekable']; $this->readable = (bool) \preg_match(self::READABLE_MODES, $meta['mode']); $this->writable = (bool) \preg_match(self::WRITABLE_MODES, $meta['mode']); $this->uri = $this->getMetadata('uri'); } /** * Closes the stream when the destructed */ public function __destruct() { $this->close(); } public function __toString() : string { try { if ($this->isSeekable()) { $this->seek(0); } return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } \trigger_error(\sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR); return ''; } } public function getContents() : string { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } if (!$this->readable) { throw new \RuntimeException('Cannot read from non-readable stream'); } return Utils::tryGetContents($this->stream); } public function close() : void { if (isset($this->stream)) { if (\is_resource($this->stream)) { \fclose($this->stream); } $this->detach(); } } public function detach() { if (!isset($this->stream)) { return null; } $result = $this->stream; unset($this->stream); $this->size = $this->uri = null; $this->readable = $this->writable = $this->seekable = \false; return $result; } public function getSize() : ?int { if ($this->size !== null) { return $this->size; } if (!isset($this->stream)) { return null; } // Clear the stat cache if the stream has a URI if ($this->uri) { \clearstatcache(\true, $this->uri); } $stats = \fstat($this->stream); if (\is_array($stats) && isset($stats['size'])) { $this->size = $stats['size']; return $this->size; } return null; } public function isReadable() : bool { return $this->readable; } public function isWritable() : bool { return $this->writable; } public function isSeekable() : bool { return $this->seekable; } public function eof() : bool { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } return \feof($this->stream); } public function tell() : int { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } $result = \ftell($this->stream); if ($result === \false) { throw new \RuntimeException('Unable to determine stream position'); } return $result; } public function rewind() : void { $this->seek(0); } public function seek($offset, $whence = \SEEK_SET) : void { $whence = (int) $whence; if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } if (!$this->seekable) { throw new \RuntimeException('Stream is not seekable'); } if (\fseek($this->stream, $offset, $whence) === -1) { throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . \var_export($whence, \true)); } } public function read($length) : string { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } if (!$this->readable) { throw new \RuntimeException('Cannot read from non-readable stream'); } if ($length < 0) { throw new \RuntimeException('Length parameter cannot be negative'); } if (0 === $length) { return ''; } try { $string = \fread($this->stream, $length); } catch (\Exception $e) { throw new \RuntimeException('Unable to read from stream', 0, $e); } if (\false === $string) { throw new \RuntimeException('Unable to read from stream'); } return $string; } public function write($string) : int { if (!isset($this->stream)) { throw new \RuntimeException('Stream is detached'); } if (!$this->writable) { throw new \RuntimeException('Cannot write to a non-writable stream'); } // We can't know the size after writing anything $this->size = null; $result = \fwrite($this->stream, $string); if ($result === \false) { throw new \RuntimeException('Unable to write to stream'); } return $result; } /** * @return mixed */ public function getMetadata($key = null) { if (!isset($this->stream)) { return $key ? null : []; } elseif (!$key) { return $this->customMetadata + \stream_get_meta_data($this->stream); } elseif (isset($this->customMetadata[$key])) { return $this->customMetadata[$key]; } $meta = \stream_get_meta_data($this->stream); return $meta[$key] ?? null; } } vendor_prefixed/symfony/deprecation-contracts/LICENSE 0000644 00000002054 15174671617 0016753 0 ustar 00 Copyright (c) 2020-present 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. vendor_prefixed/symfony/deprecation-contracts/function.php 0000644 00000001760 15174671617 0020307 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ if (!function_exists('trigger_deprecation')) { /** * Triggers a silenced deprecation notice. * * @param string $package The name of the Composer package that is triggering the deprecation * @param string $version The version of the package that introduced the deprecation * @param string $message The message of the deprecation * @param mixed ...$args Values to insert in the message using printf() formatting * * @author Nicolas Grekas <p@tchwork.com> */ function trigger_deprecation(string $package, string $version, string $message, ...$args): void { @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); } } vendor_prefixed/symfony/polyfill-intl-idn/Info.php 0000644 00000001001 15174671617 0016414 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> and Trevor Rowbotham <trevor.rowbotham@pm.me> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn; /** * @internal */ class Info { public $bidiDomain = \false; public $errors = 0; public $validBidiDomain = \true; public $transitionalDifferent = \false; } vendor_prefixed/symfony/polyfill-intl-idn/LICENSE 0000644 00000002132 15174671617 0016023 0 ustar 00 Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me> 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_prefixed/symfony/polyfill-intl-idn/bootstrap.php 0000644 00000011043 15174671617 0017545 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn as p; if (extension_loaded('intl')) { return; } if (\PHP_VERSION_ID >= 80000) { return require __DIR__.'/bootstrap80.php'; } if (!defined('U_IDNA_PROHIBITED_ERROR')) { define('U_IDNA_PROHIBITED_ERROR', 66560); } if (!defined('U_IDNA_ERROR_START')) { define('U_IDNA_ERROR_START', 66560); } if (!defined('U_IDNA_UNASSIGNED_ERROR')) { define('U_IDNA_UNASSIGNED_ERROR', 66561); } if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { define('U_IDNA_CHECK_BIDI_ERROR', 66562); } if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); } if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { define('U_IDNA_ACE_PREFIX_ERROR', 66564); } if (!defined('U_IDNA_VERIFICATION_ERROR')) { define('U_IDNA_VERIFICATION_ERROR', 66565); } if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); } if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); } if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); } if (!defined('U_IDNA_ERROR_LIMIT')) { define('U_IDNA_ERROR_LIMIT', 66569); } if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { define('U_STRINGPREP_PROHIBITED_ERROR', 66560); } if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); } if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); } if (!defined('IDNA_DEFAULT')) { define('IDNA_DEFAULT', 0); } if (!defined('IDNA_ALLOW_UNASSIGNED')) { define('IDNA_ALLOW_UNASSIGNED', 1); } if (!defined('IDNA_USE_STD3_RULES')) { define('IDNA_USE_STD3_RULES', 2); } if (!defined('IDNA_CHECK_BIDI')) { define('IDNA_CHECK_BIDI', 4); } if (!defined('IDNA_CHECK_CONTEXTJ')) { define('IDNA_CHECK_CONTEXTJ', 8); } if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); } if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); } if (!defined('INTL_IDNA_VARIANT_2003')) { define('INTL_IDNA_VARIANT_2003', 0); } if (!defined('INTL_IDNA_VARIANT_UTS46')) { define('INTL_IDNA_VARIANT_UTS46', 1); } if (!defined('IDNA_ERROR_EMPTY_LABEL')) { define('IDNA_ERROR_EMPTY_LABEL', 1); } if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { define('IDNA_ERROR_LABEL_TOO_LONG', 2); } if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); } if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { define('IDNA_ERROR_LEADING_HYPHEN', 8); } if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { define('IDNA_ERROR_TRAILING_HYPHEN', 16); } if (!defined('IDNA_ERROR_HYPHEN_3_4')) { define('IDNA_ERROR_HYPHEN_3_4', 32); } if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); } if (!defined('IDNA_ERROR_DISALLOWED')) { define('IDNA_ERROR_DISALLOWED', 128); } if (!defined('IDNA_ERROR_PUNYCODE')) { define('IDNA_ERROR_PUNYCODE', 256); } if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { define('IDNA_ERROR_LABEL_HAS_DOT', 512); } if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); } if (!defined('IDNA_ERROR_BIDI')) { define('IDNA_ERROR_BIDI', 2048); } if (!defined('IDNA_ERROR_CONTEXTJ')) { define('IDNA_ERROR_CONTEXTJ', 4096); } if (\PHP_VERSION_ID < 70400) { if (!function_exists('idn_to_ascii')) { function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } } if (!function_exists('idn_to_utf8')) { function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } } } else { if (!function_exists('idn_to_ascii')) { function idn_to_ascii($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_ascii($domain, $flags, $variant, $idna_info); } } if (!function_exists('idn_to_utf8')) { function idn_to_utf8($domain, $flags = 0, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = null) { return p\Idn::idn_to_utf8($domain, $flags, $variant, $idna_info); } } } vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_valid.php 0000644 00000001633 15174671617 0025236 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(0 => \true, 1 => \true, 2 => \true, 3 => \true, 4 => \true, 5 => \true, 6 => \true, 7 => \true, 8 => \true, 9 => \true, 10 => \true, 11 => \true, 12 => \true, 13 => \true, 14 => \true, 15 => \true, 16 => \true, 17 => \true, 18 => \true, 19 => \true, 20 => \true, 21 => \true, 22 => \true, 23 => \true, 24 => \true, 25 => \true, 26 => \true, 27 => \true, 28 => \true, 29 => \true, 30 => \true, 31 => \true, 32 => \true, 33 => \true, 34 => \true, 35 => \true, 36 => \true, 37 => \true, 38 => \true, 39 => \true, 40 => \true, 41 => \true, 42 => \true, 43 => \true, 44 => \true, 47 => \true, 58 => \true, 59 => \true, 60 => \true, 61 => \true, 62 => \true, 63 => \true, 64 => \true, 91 => \true, 92 => \true, 93 => \true, 94 => \true, 95 => \true, 96 => \true, 123 => \true, 124 => \true, 125 => \true, 126 => \true, 127 => \true, 8800 => \true, 8814 => \true, 8815 => \true); vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/disallowed_STD3_mapped.php 0000644 00000011374 15174671617 0025410 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(160 => ' ', 168 => ' ̈', 175 => ' ̄', 180 => ' ́', 184 => ' ̧', 728 => ' ̆', 729 => ' ̇', 730 => ' ̊', 731 => ' ̨', 732 => ' ̃', 733 => ' ̋', 890 => ' ι', 894 => ';', 900 => ' ́', 901 => ' ̈́', 8125 => ' ̓', 8127 => ' ̓', 8128 => ' ͂', 8129 => ' ̈͂', 8141 => ' ̓̀', 8142 => ' ̓́', 8143 => ' ̓͂', 8157 => ' ̔̀', 8158 => ' ̔́', 8159 => ' ̔͂', 8173 => ' ̈̀', 8174 => ' ̈́', 8175 => '`', 8189 => ' ́', 8190 => ' ̔', 8192 => ' ', 8193 => ' ', 8194 => ' ', 8195 => ' ', 8196 => ' ', 8197 => ' ', 8198 => ' ', 8199 => ' ', 8200 => ' ', 8201 => ' ', 8202 => ' ', 8215 => ' ̳', 8239 => ' ', 8252 => '!!', 8254 => ' ̅', 8263 => '??', 8264 => '?!', 8265 => '!?', 8287 => ' ', 8314 => '+', 8316 => '=', 8317 => '(', 8318 => ')', 8330 => '+', 8332 => '=', 8333 => '(', 8334 => ')', 8448 => 'a/c', 8449 => 'a/s', 8453 => 'c/o', 8454 => 'c/u', 9332 => '(1)', 9333 => '(2)', 9334 => '(3)', 9335 => '(4)', 9336 => '(5)', 9337 => '(6)', 9338 => '(7)', 9339 => '(8)', 9340 => '(9)', 9341 => '(10)', 9342 => '(11)', 9343 => '(12)', 9344 => '(13)', 9345 => '(14)', 9346 => '(15)', 9347 => '(16)', 9348 => '(17)', 9349 => '(18)', 9350 => '(19)', 9351 => '(20)', 9372 => '(a)', 9373 => '(b)', 9374 => '(c)', 9375 => '(d)', 9376 => '(e)', 9377 => '(f)', 9378 => '(g)', 9379 => '(h)', 9380 => '(i)', 9381 => '(j)', 9382 => '(k)', 9383 => '(l)', 9384 => '(m)', 9385 => '(n)', 9386 => '(o)', 9387 => '(p)', 9388 => '(q)', 9389 => '(r)', 9390 => '(s)', 9391 => '(t)', 9392 => '(u)', 9393 => '(v)', 9394 => '(w)', 9395 => '(x)', 9396 => '(y)', 9397 => '(z)', 10868 => '::=', 10869 => '==', 10870 => '===', 12288 => ' ', 12443 => ' ゙', 12444 => ' ゚', 12800 => '(ᄀ)', 12801 => '(ᄂ)', 12802 => '(ᄃ)', 12803 => '(ᄅ)', 12804 => '(ᄆ)', 12805 => '(ᄇ)', 12806 => '(ᄉ)', 12807 => '(ᄋ)', 12808 => '(ᄌ)', 12809 => '(ᄎ)', 12810 => '(ᄏ)', 12811 => '(ᄐ)', 12812 => '(ᄑ)', 12813 => '(ᄒ)', 12814 => '(가)', 12815 => '(나)', 12816 => '(다)', 12817 => '(라)', 12818 => '(마)', 12819 => '(바)', 12820 => '(사)', 12821 => '(아)', 12822 => '(자)', 12823 => '(차)', 12824 => '(카)', 12825 => '(타)', 12826 => '(파)', 12827 => '(하)', 12828 => '(주)', 12829 => '(오전)', 12830 => '(오후)', 12832 => '(一)', 12833 => '(二)', 12834 => '(三)', 12835 => '(四)', 12836 => '(五)', 12837 => '(六)', 12838 => '(七)', 12839 => '(八)', 12840 => '(九)', 12841 => '(十)', 12842 => '(月)', 12843 => '(火)', 12844 => '(水)', 12845 => '(木)', 12846 => '(金)', 12847 => '(土)', 12848 => '(日)', 12849 => '(株)', 12850 => '(有)', 12851 => '(社)', 12852 => '(名)', 12853 => '(特)', 12854 => '(財)', 12855 => '(祝)', 12856 => '(労)', 12857 => '(代)', 12858 => '(呼)', 12859 => '(学)', 12860 => '(監)', 12861 => '(企)', 12862 => '(資)', 12863 => '(協)', 12864 => '(祭)', 12865 => '(休)', 12866 => '(自)', 12867 => '(至)', 64297 => '+', 64606 => ' ٌّ', 64607 => ' ٍّ', 64608 => ' َّ', 64609 => ' ُّ', 64610 => ' ِّ', 64611 => ' ّٰ', 65018 => 'صلى الله عليه وسلم', 65019 => 'جل جلاله', 65040 => ',', 65043 => ':', 65044 => ';', 65045 => '!', 65046 => '?', 65075 => '_', 65076 => '_', 65077 => '(', 65078 => ')', 65079 => '{', 65080 => '}', 65095 => '[', 65096 => ']', 65097 => ' ̅', 65098 => ' ̅', 65099 => ' ̅', 65100 => ' ̅', 65101 => '_', 65102 => '_', 65103 => '_', 65104 => ',', 65108 => ';', 65109 => ':', 65110 => '?', 65111 => '!', 65113 => '(', 65114 => ')', 65115 => '{', 65116 => '}', 65119 => '#', 65120 => '&', 65121 => '*', 65122 => '+', 65124 => '<', 65125 => '>', 65126 => '=', 65128 => '\\', 65129 => '$', 65130 => '%', 65131 => '@', 65136 => ' ً', 65138 => ' ٌ', 65140 => ' ٍ', 65142 => ' َ', 65144 => ' ُ', 65146 => ' ِ', 65148 => ' ّ', 65150 => ' ْ', 65281 => '!', 65282 => '"', 65283 => '#', 65284 => '$', 65285 => '%', 65286 => '&', 65287 => '\'', 65288 => '(', 65289 => ')', 65290 => '*', 65291 => '+', 65292 => ',', 65295 => '/', 65306 => ':', 65307 => ';', 65308 => '<', 65309 => '=', 65310 => '>', 65311 => '?', 65312 => '@', 65339 => '[', 65340 => '\\', 65341 => ']', 65342 => '^', 65343 => '_', 65344 => '`', 65371 => '{', 65372 => '|', 65373 => '}', 65374 => '~', 65507 => ' ̄', 127233 => '0,', 127234 => '1,', 127235 => '2,', 127236 => '3,', 127237 => '4,', 127238 => '5,', 127239 => '6,', 127240 => '7,', 127241 => '8,', 127242 => '9,', 127248 => '(a)', 127249 => '(b)', 127250 => '(c)', 127251 => '(d)', 127252 => '(e)', 127253 => '(f)', 127254 => '(g)', 127255 => '(h)', 127256 => '(i)', 127257 => '(j)', 127258 => '(k)', 127259 => '(l)', 127260 => '(m)', 127261 => '(n)', 127262 => '(o)', 127263 => '(p)', 127264 => '(q)', 127265 => '(r)', 127266 => '(s)', 127267 => '(t)', 127268 => '(u)', 127269 => '(v)', 127270 => '(w)', 127271 => '(x)', 127272 => '(y)', 127273 => '(z)'); vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/virama.php 0000644 00000001365 15174671617 0022414 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(2381 => 9, 2509 => 9, 2637 => 9, 2765 => 9, 2893 => 9, 3021 => 9, 3149 => 9, 3277 => 9, 3387 => 9, 3388 => 9, 3405 => 9, 3530 => 9, 3642 => 9, 3770 => 9, 3972 => 9, 4153 => 9, 4154 => 9, 5908 => 9, 5940 => 9, 6098 => 9, 6752 => 9, 6980 => 9, 7082 => 9, 7083 => 9, 7154 => 9, 7155 => 9, 11647 => 9, 43014 => 9, 43052 => 9, 43204 => 9, 43347 => 9, 43456 => 9, 43766 => 9, 44013 => 9, 68159 => 9, 69702 => 9, 69759 => 9, 69817 => 9, 69939 => 9, 69940 => 9, 70080 => 9, 70197 => 9, 70378 => 9, 70477 => 9, 70722 => 9, 70850 => 9, 71103 => 9, 71231 => 9, 71350 => 9, 71467 => 9, 71737 => 9, 71997 => 9, 71998 => 9, 72160 => 9, 72244 => 9, 72263 => 9, 72345 => 9, 72767 => 9, 73028 => 9, 73029 => 9, 73111 => 9); vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/mapped.php 0000644 00000263111 15174671617 0022402 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(65 => 'a', 66 => 'b', 67 => 'c', 68 => 'd', 69 => 'e', 70 => 'f', 71 => 'g', 72 => 'h', 73 => 'i', 74 => 'j', 75 => 'k', 76 => 'l', 77 => 'm', 78 => 'n', 79 => 'o', 80 => 'p', 81 => 'q', 82 => 'r', 83 => 's', 84 => 't', 85 => 'u', 86 => 'v', 87 => 'w', 88 => 'x', 89 => 'y', 90 => 'z', 170 => 'a', 178 => '2', 179 => '3', 181 => 'μ', 185 => '1', 186 => 'o', 188 => '1⁄4', 189 => '1⁄2', 190 => '3⁄4', 192 => 'à', 193 => 'á', 194 => 'â', 195 => 'ã', 196 => 'ä', 197 => 'å', 198 => 'æ', 199 => 'ç', 200 => 'è', 201 => 'é', 202 => 'ê', 203 => 'ë', 204 => 'ì', 205 => 'í', 206 => 'î', 207 => 'ï', 208 => 'ð', 209 => 'ñ', 210 => 'ò', 211 => 'ó', 212 => 'ô', 213 => 'õ', 214 => 'ö', 216 => 'ø', 217 => 'ù', 218 => 'ú', 219 => 'û', 220 => 'ü', 221 => 'ý', 222 => 'þ', 256 => 'ā', 258 => 'ă', 260 => 'ą', 262 => 'ć', 264 => 'ĉ', 266 => 'ċ', 268 => 'č', 270 => 'ď', 272 => 'đ', 274 => 'ē', 276 => 'ĕ', 278 => 'ė', 280 => 'ę', 282 => 'ě', 284 => 'ĝ', 286 => 'ğ', 288 => 'ġ', 290 => 'ģ', 292 => 'ĥ', 294 => 'ħ', 296 => 'ĩ', 298 => 'ī', 300 => 'ĭ', 302 => 'į', 304 => 'i̇', 306 => 'ij', 307 => 'ij', 308 => 'ĵ', 310 => 'ķ', 313 => 'ĺ', 315 => 'ļ', 317 => 'ľ', 319 => 'l·', 320 => 'l·', 321 => 'ł', 323 => 'ń', 325 => 'ņ', 327 => 'ň', 329 => 'ʼn', 330 => 'ŋ', 332 => 'ō', 334 => 'ŏ', 336 => 'ő', 338 => 'œ', 340 => 'ŕ', 342 => 'ŗ', 344 => 'ř', 346 => 'ś', 348 => 'ŝ', 350 => 'ş', 352 => 'š', 354 => 'ţ', 356 => 'ť', 358 => 'ŧ', 360 => 'ũ', 362 => 'ū', 364 => 'ŭ', 366 => 'ů', 368 => 'ű', 370 => 'ų', 372 => 'ŵ', 374 => 'ŷ', 376 => 'ÿ', 377 => 'ź', 379 => 'ż', 381 => 'ž', 383 => 's', 385 => 'ɓ', 386 => 'ƃ', 388 => 'ƅ', 390 => 'ɔ', 391 => 'ƈ', 393 => 'ɖ', 394 => 'ɗ', 395 => 'ƌ', 398 => 'ǝ', 399 => 'ə', 400 => 'ɛ', 401 => 'ƒ', 403 => 'ɠ', 404 => 'ɣ', 406 => 'ɩ', 407 => 'ɨ', 408 => 'ƙ', 412 => 'ɯ', 413 => 'ɲ', 415 => 'ɵ', 416 => 'ơ', 418 => 'ƣ', 420 => 'ƥ', 422 => 'ʀ', 423 => 'ƨ', 425 => 'ʃ', 428 => 'ƭ', 430 => 'ʈ', 431 => 'ư', 433 => 'ʊ', 434 => 'ʋ', 435 => 'ƴ', 437 => 'ƶ', 439 => 'ʒ', 440 => 'ƹ', 444 => 'ƽ', 452 => 'dž', 453 => 'dž', 454 => 'dž', 455 => 'lj', 456 => 'lj', 457 => 'lj', 458 => 'nj', 459 => 'nj', 460 => 'nj', 461 => 'ǎ', 463 => 'ǐ', 465 => 'ǒ', 467 => 'ǔ', 469 => 'ǖ', 471 => 'ǘ', 473 => 'ǚ', 475 => 'ǜ', 478 => 'ǟ', 480 => 'ǡ', 482 => 'ǣ', 484 => 'ǥ', 486 => 'ǧ', 488 => 'ǩ', 490 => 'ǫ', 492 => 'ǭ', 494 => 'ǯ', 497 => 'dz', 498 => 'dz', 499 => 'dz', 500 => 'ǵ', 502 => 'ƕ', 503 => 'ƿ', 504 => 'ǹ', 506 => 'ǻ', 508 => 'ǽ', 510 => 'ǿ', 512 => 'ȁ', 514 => 'ȃ', 516 => 'ȅ', 518 => 'ȇ', 520 => 'ȉ', 522 => 'ȋ', 524 => 'ȍ', 526 => 'ȏ', 528 => 'ȑ', 530 => 'ȓ', 532 => 'ȕ', 534 => 'ȗ', 536 => 'ș', 538 => 'ț', 540 => 'ȝ', 542 => 'ȟ', 544 => 'ƞ', 546 => 'ȣ', 548 => 'ȥ', 550 => 'ȧ', 552 => 'ȩ', 554 => 'ȫ', 556 => 'ȭ', 558 => 'ȯ', 560 => 'ȱ', 562 => 'ȳ', 570 => 'ⱥ', 571 => 'ȼ', 573 => 'ƚ', 574 => 'ⱦ', 577 => 'ɂ', 579 => 'ƀ', 580 => 'ʉ', 581 => 'ʌ', 582 => 'ɇ', 584 => 'ɉ', 586 => 'ɋ', 588 => 'ɍ', 590 => 'ɏ', 688 => 'h', 689 => 'ɦ', 690 => 'j', 691 => 'r', 692 => 'ɹ', 693 => 'ɻ', 694 => 'ʁ', 695 => 'w', 696 => 'y', 736 => 'ɣ', 737 => 'l', 738 => 's', 739 => 'x', 740 => 'ʕ', 832 => '̀', 833 => '́', 835 => '̓', 836 => '̈́', 837 => 'ι', 880 => 'ͱ', 882 => 'ͳ', 884 => 'ʹ', 886 => 'ͷ', 895 => 'ϳ', 902 => 'ά', 903 => '·', 904 => 'έ', 905 => 'ή', 906 => 'ί', 908 => 'ό', 910 => 'ύ', 911 => 'ώ', 913 => 'α', 914 => 'β', 915 => 'γ', 916 => 'δ', 917 => 'ε', 918 => 'ζ', 919 => 'η', 920 => 'θ', 921 => 'ι', 922 => 'κ', 923 => 'λ', 924 => 'μ', 925 => 'ν', 926 => 'ξ', 927 => 'ο', 928 => 'π', 929 => 'ρ', 931 => 'σ', 932 => 'τ', 933 => 'υ', 934 => 'φ', 935 => 'χ', 936 => 'ψ', 937 => 'ω', 938 => 'ϊ', 939 => 'ϋ', 975 => 'ϗ', 976 => 'β', 977 => 'θ', 978 => 'υ', 979 => 'ύ', 980 => 'ϋ', 981 => 'φ', 982 => 'π', 984 => 'ϙ', 986 => 'ϛ', 988 => 'ϝ', 990 => 'ϟ', 992 => 'ϡ', 994 => 'ϣ', 996 => 'ϥ', 998 => 'ϧ', 1000 => 'ϩ', 1002 => 'ϫ', 1004 => 'ϭ', 1006 => 'ϯ', 1008 => 'κ', 1009 => 'ρ', 1010 => 'σ', 1012 => 'θ', 1013 => 'ε', 1015 => 'ϸ', 1017 => 'σ', 1018 => 'ϻ', 1021 => 'ͻ', 1022 => 'ͼ', 1023 => 'ͽ', 1024 => 'ѐ', 1025 => 'ё', 1026 => 'ђ', 1027 => 'ѓ', 1028 => 'є', 1029 => 'ѕ', 1030 => 'і', 1031 => 'ї', 1032 => 'ј', 1033 => 'љ', 1034 => 'њ', 1035 => 'ћ', 1036 => 'ќ', 1037 => 'ѝ', 1038 => 'ў', 1039 => 'џ', 1040 => 'а', 1041 => 'б', 1042 => 'в', 1043 => 'г', 1044 => 'д', 1045 => 'е', 1046 => 'ж', 1047 => 'з', 1048 => 'и', 1049 => 'й', 1050 => 'к', 1051 => 'л', 1052 => 'м', 1053 => 'н', 1054 => 'о', 1055 => 'п', 1056 => 'р', 1057 => 'с', 1058 => 'т', 1059 => 'у', 1060 => 'ф', 1061 => 'х', 1062 => 'ц', 1063 => 'ч', 1064 => 'ш', 1065 => 'щ', 1066 => 'ъ', 1067 => 'ы', 1068 => 'ь', 1069 => 'э', 1070 => 'ю', 1071 => 'я', 1120 => 'ѡ', 1122 => 'ѣ', 1124 => 'ѥ', 1126 => 'ѧ', 1128 => 'ѩ', 1130 => 'ѫ', 1132 => 'ѭ', 1134 => 'ѯ', 1136 => 'ѱ', 1138 => 'ѳ', 1140 => 'ѵ', 1142 => 'ѷ', 1144 => 'ѹ', 1146 => 'ѻ', 1148 => 'ѽ', 1150 => 'ѿ', 1152 => 'ҁ', 1162 => 'ҋ', 1164 => 'ҍ', 1166 => 'ҏ', 1168 => 'ґ', 1170 => 'ғ', 1172 => 'ҕ', 1174 => 'җ', 1176 => 'ҙ', 1178 => 'қ', 1180 => 'ҝ', 1182 => 'ҟ', 1184 => 'ҡ', 1186 => 'ң', 1188 => 'ҥ', 1190 => 'ҧ', 1192 => 'ҩ', 1194 => 'ҫ', 1196 => 'ҭ', 1198 => 'ү', 1200 => 'ұ', 1202 => 'ҳ', 1204 => 'ҵ', 1206 => 'ҷ', 1208 => 'ҹ', 1210 => 'һ', 1212 => 'ҽ', 1214 => 'ҿ', 1217 => 'ӂ', 1219 => 'ӄ', 1221 => 'ӆ', 1223 => 'ӈ', 1225 => 'ӊ', 1227 => 'ӌ', 1229 => 'ӎ', 1232 => 'ӑ', 1234 => 'ӓ', 1236 => 'ӕ', 1238 => 'ӗ', 1240 => 'ә', 1242 => 'ӛ', 1244 => 'ӝ', 1246 => 'ӟ', 1248 => 'ӡ', 1250 => 'ӣ', 1252 => 'ӥ', 1254 => 'ӧ', 1256 => 'ө', 1258 => 'ӫ', 1260 => 'ӭ', 1262 => 'ӯ', 1264 => 'ӱ', 1266 => 'ӳ', 1268 => 'ӵ', 1270 => 'ӷ', 1272 => 'ӹ', 1274 => 'ӻ', 1276 => 'ӽ', 1278 => 'ӿ', 1280 => 'ԁ', 1282 => 'ԃ', 1284 => 'ԅ', 1286 => 'ԇ', 1288 => 'ԉ', 1290 => 'ԋ', 1292 => 'ԍ', 1294 => 'ԏ', 1296 => 'ԑ', 1298 => 'ԓ', 1300 => 'ԕ', 1302 => 'ԗ', 1304 => 'ԙ', 1306 => 'ԛ', 1308 => 'ԝ', 1310 => 'ԟ', 1312 => 'ԡ', 1314 => 'ԣ', 1316 => 'ԥ', 1318 => 'ԧ', 1320 => 'ԩ', 1322 => 'ԫ', 1324 => 'ԭ', 1326 => 'ԯ', 1329 => 'ա', 1330 => 'բ', 1331 => 'գ', 1332 => 'դ', 1333 => 'ե', 1334 => 'զ', 1335 => 'է', 1336 => 'ը', 1337 => 'թ', 1338 => 'ժ', 1339 => 'ի', 1340 => 'լ', 1341 => 'խ', 1342 => 'ծ', 1343 => 'կ', 1344 => 'հ', 1345 => 'ձ', 1346 => 'ղ', 1347 => 'ճ', 1348 => 'մ', 1349 => 'յ', 1350 => 'ն', 1351 => 'շ', 1352 => 'ո', 1353 => 'չ', 1354 => 'պ', 1355 => 'ջ', 1356 => 'ռ', 1357 => 'ս', 1358 => 'վ', 1359 => 'տ', 1360 => 'ր', 1361 => 'ց', 1362 => 'ւ', 1363 => 'փ', 1364 => 'ք', 1365 => 'օ', 1366 => 'ֆ', 1415 => 'եւ', 1653 => 'اٴ', 1654 => 'وٴ', 1655 => 'ۇٴ', 1656 => 'يٴ', 2392 => 'क़', 2393 => 'ख़', 2394 => 'ग़', 2395 => 'ज़', 2396 => 'ड़', 2397 => 'ढ़', 2398 => 'फ़', 2399 => 'य़', 2524 => 'ড়', 2525 => 'ঢ়', 2527 => 'য়', 2611 => 'ਲ਼', 2614 => 'ਸ਼', 2649 => 'ਖ਼', 2650 => 'ਗ਼', 2651 => 'ਜ਼', 2654 => 'ਫ਼', 2908 => 'ଡ଼', 2909 => 'ଢ଼', 3635 => 'ํา', 3763 => 'ໍາ', 3804 => 'ຫນ', 3805 => 'ຫມ', 3852 => '་', 3907 => 'གྷ', 3917 => 'ཌྷ', 3922 => 'དྷ', 3927 => 'བྷ', 3932 => 'ཛྷ', 3945 => 'ཀྵ', 3955 => 'ཱི', 3957 => 'ཱུ', 3958 => 'ྲྀ', 3959 => 'ྲཱྀ', 3960 => 'ླྀ', 3961 => 'ླཱྀ', 3969 => 'ཱྀ', 3987 => 'ྒྷ', 3997 => 'ྜྷ', 4002 => 'ྡྷ', 4007 => 'ྦྷ', 4012 => 'ྫྷ', 4025 => 'ྐྵ', 4295 => 'ⴧ', 4301 => 'ⴭ', 4348 => 'ნ', 5112 => 'Ᏸ', 5113 => 'Ᏹ', 5114 => 'Ᏺ', 5115 => 'Ᏻ', 5116 => 'Ᏼ', 5117 => 'Ᏽ', 7296 => 'в', 7297 => 'д', 7298 => 'о', 7299 => 'с', 7300 => 'т', 7301 => 'т', 7302 => 'ъ', 7303 => 'ѣ', 7304 => 'ꙋ', 7312 => 'ა', 7313 => 'ბ', 7314 => 'გ', 7315 => 'დ', 7316 => 'ე', 7317 => 'ვ', 7318 => 'ზ', 7319 => 'თ', 7320 => 'ი', 7321 => 'კ', 7322 => 'ლ', 7323 => 'მ', 7324 => 'ნ', 7325 => 'ო', 7326 => 'პ', 7327 => 'ჟ', 7328 => 'რ', 7329 => 'ს', 7330 => 'ტ', 7331 => 'უ', 7332 => 'ფ', 7333 => 'ქ', 7334 => 'ღ', 7335 => 'ყ', 7336 => 'შ', 7337 => 'ჩ', 7338 => 'ც', 7339 => 'ძ', 7340 => 'წ', 7341 => 'ჭ', 7342 => 'ხ', 7343 => 'ჯ', 7344 => 'ჰ', 7345 => 'ჱ', 7346 => 'ჲ', 7347 => 'ჳ', 7348 => 'ჴ', 7349 => 'ჵ', 7350 => 'ჶ', 7351 => 'ჷ', 7352 => 'ჸ', 7353 => 'ჹ', 7354 => 'ჺ', 7357 => 'ჽ', 7358 => 'ჾ', 7359 => 'ჿ', 7468 => 'a', 7469 => 'æ', 7470 => 'b', 7472 => 'd', 7473 => 'e', 7474 => 'ǝ', 7475 => 'g', 7476 => 'h', 7477 => 'i', 7478 => 'j', 7479 => 'k', 7480 => 'l', 7481 => 'm', 7482 => 'n', 7484 => 'o', 7485 => 'ȣ', 7486 => 'p', 7487 => 'r', 7488 => 't', 7489 => 'u', 7490 => 'w', 7491 => 'a', 7492 => 'ɐ', 7493 => 'ɑ', 7494 => 'ᴂ', 7495 => 'b', 7496 => 'd', 7497 => 'e', 7498 => 'ə', 7499 => 'ɛ', 7500 => 'ɜ', 7501 => 'g', 7503 => 'k', 7504 => 'm', 7505 => 'ŋ', 7506 => 'o', 7507 => 'ɔ', 7508 => 'ᴖ', 7509 => 'ᴗ', 7510 => 'p', 7511 => 't', 7512 => 'u', 7513 => 'ᴝ', 7514 => 'ɯ', 7515 => 'v', 7516 => 'ᴥ', 7517 => 'β', 7518 => 'γ', 7519 => 'δ', 7520 => 'φ', 7521 => 'χ', 7522 => 'i', 7523 => 'r', 7524 => 'u', 7525 => 'v', 7526 => 'β', 7527 => 'γ', 7528 => 'ρ', 7529 => 'φ', 7530 => 'χ', 7544 => 'н', 7579 => 'ɒ', 7580 => 'c', 7581 => 'ɕ', 7582 => 'ð', 7583 => 'ɜ', 7584 => 'f', 7585 => 'ɟ', 7586 => 'ɡ', 7587 => 'ɥ', 7588 => 'ɨ', 7589 => 'ɩ', 7590 => 'ɪ', 7591 => 'ᵻ', 7592 => 'ʝ', 7593 => 'ɭ', 7594 => 'ᶅ', 7595 => 'ʟ', 7596 => 'ɱ', 7597 => 'ɰ', 7598 => 'ɲ', 7599 => 'ɳ', 7600 => 'ɴ', 7601 => 'ɵ', 7602 => 'ɸ', 7603 => 'ʂ', 7604 => 'ʃ', 7605 => 'ƫ', 7606 => 'ʉ', 7607 => 'ʊ', 7608 => 'ᴜ', 7609 => 'ʋ', 7610 => 'ʌ', 7611 => 'z', 7612 => 'ʐ', 7613 => 'ʑ', 7614 => 'ʒ', 7615 => 'θ', 7680 => 'ḁ', 7682 => 'ḃ', 7684 => 'ḅ', 7686 => 'ḇ', 7688 => 'ḉ', 7690 => 'ḋ', 7692 => 'ḍ', 7694 => 'ḏ', 7696 => 'ḑ', 7698 => 'ḓ', 7700 => 'ḕ', 7702 => 'ḗ', 7704 => 'ḙ', 7706 => 'ḛ', 7708 => 'ḝ', 7710 => 'ḟ', 7712 => 'ḡ', 7714 => 'ḣ', 7716 => 'ḥ', 7718 => 'ḧ', 7720 => 'ḩ', 7722 => 'ḫ', 7724 => 'ḭ', 7726 => 'ḯ', 7728 => 'ḱ', 7730 => 'ḳ', 7732 => 'ḵ', 7734 => 'ḷ', 7736 => 'ḹ', 7738 => 'ḻ', 7740 => 'ḽ', 7742 => 'ḿ', 7744 => 'ṁ', 7746 => 'ṃ', 7748 => 'ṅ', 7750 => 'ṇ', 7752 => 'ṉ', 7754 => 'ṋ', 7756 => 'ṍ', 7758 => 'ṏ', 7760 => 'ṑ', 7762 => 'ṓ', 7764 => 'ṕ', 7766 => 'ṗ', 7768 => 'ṙ', 7770 => 'ṛ', 7772 => 'ṝ', 7774 => 'ṟ', 7776 => 'ṡ', 7778 => 'ṣ', 7780 => 'ṥ', 7782 => 'ṧ', 7784 => 'ṩ', 7786 => 'ṫ', 7788 => 'ṭ', 7790 => 'ṯ', 7792 => 'ṱ', 7794 => 'ṳ', 7796 => 'ṵ', 7798 => 'ṷ', 7800 => 'ṹ', 7802 => 'ṻ', 7804 => 'ṽ', 7806 => 'ṿ', 7808 => 'ẁ', 7810 => 'ẃ', 7812 => 'ẅ', 7814 => 'ẇ', 7816 => 'ẉ', 7818 => 'ẋ', 7820 => 'ẍ', 7822 => 'ẏ', 7824 => 'ẑ', 7826 => 'ẓ', 7828 => 'ẕ', 7834 => 'aʾ', 7835 => 'ṡ', 7838 => 'ss', 7840 => 'ạ', 7842 => 'ả', 7844 => 'ấ', 7846 => 'ầ', 7848 => 'ẩ', 7850 => 'ẫ', 7852 => 'ậ', 7854 => 'ắ', 7856 => 'ằ', 7858 => 'ẳ', 7860 => 'ẵ', 7862 => 'ặ', 7864 => 'ẹ', 7866 => 'ẻ', 7868 => 'ẽ', 7870 => 'ế', 7872 => 'ề', 7874 => 'ể', 7876 => 'ễ', 7878 => 'ệ', 7880 => 'ỉ', 7882 => 'ị', 7884 => 'ọ', 7886 => 'ỏ', 7888 => 'ố', 7890 => 'ồ', 7892 => 'ổ', 7894 => 'ỗ', 7896 => 'ộ', 7898 => 'ớ', 7900 => 'ờ', 7902 => 'ở', 7904 => 'ỡ', 7906 => 'ợ', 7908 => 'ụ', 7910 => 'ủ', 7912 => 'ứ', 7914 => 'ừ', 7916 => 'ử', 7918 => 'ữ', 7920 => 'ự', 7922 => 'ỳ', 7924 => 'ỵ', 7926 => 'ỷ', 7928 => 'ỹ', 7930 => 'ỻ', 7932 => 'ỽ', 7934 => 'ỿ', 7944 => 'ἀ', 7945 => 'ἁ', 7946 => 'ἂ', 7947 => 'ἃ', 7948 => 'ἄ', 7949 => 'ἅ', 7950 => 'ἆ', 7951 => 'ἇ', 7960 => 'ἐ', 7961 => 'ἑ', 7962 => 'ἒ', 7963 => 'ἓ', 7964 => 'ἔ', 7965 => 'ἕ', 7976 => 'ἠ', 7977 => 'ἡ', 7978 => 'ἢ', 7979 => 'ἣ', 7980 => 'ἤ', 7981 => 'ἥ', 7982 => 'ἦ', 7983 => 'ἧ', 7992 => 'ἰ', 7993 => 'ἱ', 7994 => 'ἲ', 7995 => 'ἳ', 7996 => 'ἴ', 7997 => 'ἵ', 7998 => 'ἶ', 7999 => 'ἷ', 8008 => 'ὀ', 8009 => 'ὁ', 8010 => 'ὂ', 8011 => 'ὃ', 8012 => 'ὄ', 8013 => 'ὅ', 8025 => 'ὑ', 8027 => 'ὓ', 8029 => 'ὕ', 8031 => 'ὗ', 8040 => 'ὠ', 8041 => 'ὡ', 8042 => 'ὢ', 8043 => 'ὣ', 8044 => 'ὤ', 8045 => 'ὥ', 8046 => 'ὦ', 8047 => 'ὧ', 8049 => 'ά', 8051 => 'έ', 8053 => 'ή', 8055 => 'ί', 8057 => 'ό', 8059 => 'ύ', 8061 => 'ώ', 8064 => 'ἀι', 8065 => 'ἁι', 8066 => 'ἂι', 8067 => 'ἃι', 8068 => 'ἄι', 8069 => 'ἅι', 8070 => 'ἆι', 8071 => 'ἇι', 8072 => 'ἀι', 8073 => 'ἁι', 8074 => 'ἂι', 8075 => 'ἃι', 8076 => 'ἄι', 8077 => 'ἅι', 8078 => 'ἆι', 8079 => 'ἇι', 8080 => 'ἠι', 8081 => 'ἡι', 8082 => 'ἢι', 8083 => 'ἣι', 8084 => 'ἤι', 8085 => 'ἥι', 8086 => 'ἦι', 8087 => 'ἧι', 8088 => 'ἠι', 8089 => 'ἡι', 8090 => 'ἢι', 8091 => 'ἣι', 8092 => 'ἤι', 8093 => 'ἥι', 8094 => 'ἦι', 8095 => 'ἧι', 8096 => 'ὠι', 8097 => 'ὡι', 8098 => 'ὢι', 8099 => 'ὣι', 8100 => 'ὤι', 8101 => 'ὥι', 8102 => 'ὦι', 8103 => 'ὧι', 8104 => 'ὠι', 8105 => 'ὡι', 8106 => 'ὢι', 8107 => 'ὣι', 8108 => 'ὤι', 8109 => 'ὥι', 8110 => 'ὦι', 8111 => 'ὧι', 8114 => 'ὰι', 8115 => 'αι', 8116 => 'άι', 8119 => 'ᾶι', 8120 => 'ᾰ', 8121 => 'ᾱ', 8122 => 'ὰ', 8123 => 'ά', 8124 => 'αι', 8126 => 'ι', 8130 => 'ὴι', 8131 => 'ηι', 8132 => 'ήι', 8135 => 'ῆι', 8136 => 'ὲ', 8137 => 'έ', 8138 => 'ὴ', 8139 => 'ή', 8140 => 'ηι', 8147 => 'ΐ', 8152 => 'ῐ', 8153 => 'ῑ', 8154 => 'ὶ', 8155 => 'ί', 8163 => 'ΰ', 8168 => 'ῠ', 8169 => 'ῡ', 8170 => 'ὺ', 8171 => 'ύ', 8172 => 'ῥ', 8178 => 'ὼι', 8179 => 'ωι', 8180 => 'ώι', 8183 => 'ῶι', 8184 => 'ὸ', 8185 => 'ό', 8186 => 'ὼ', 8187 => 'ώ', 8188 => 'ωι', 8209 => '‐', 8243 => '′′', 8244 => '′′′', 8246 => '‵‵', 8247 => '‵‵‵', 8279 => '′′′′', 8304 => '0', 8305 => 'i', 8308 => '4', 8309 => '5', 8310 => '6', 8311 => '7', 8312 => '8', 8313 => '9', 8315 => '−', 8319 => 'n', 8320 => '0', 8321 => '1', 8322 => '2', 8323 => '3', 8324 => '4', 8325 => '5', 8326 => '6', 8327 => '7', 8328 => '8', 8329 => '9', 8331 => '−', 8336 => 'a', 8337 => 'e', 8338 => 'o', 8339 => 'x', 8340 => 'ə', 8341 => 'h', 8342 => 'k', 8343 => 'l', 8344 => 'm', 8345 => 'n', 8346 => 'p', 8347 => 's', 8348 => 't', 8360 => 'rs', 8450 => 'c', 8451 => '°c', 8455 => 'ɛ', 8457 => '°f', 8458 => 'g', 8459 => 'h', 8460 => 'h', 8461 => 'h', 8462 => 'h', 8463 => 'ħ', 8464 => 'i', 8465 => 'i', 8466 => 'l', 8467 => 'l', 8469 => 'n', 8470 => 'no', 8473 => 'p', 8474 => 'q', 8475 => 'r', 8476 => 'r', 8477 => 'r', 8480 => 'sm', 8481 => 'tel', 8482 => 'tm', 8484 => 'z', 8486 => 'ω', 8488 => 'z', 8490 => 'k', 8491 => 'å', 8492 => 'b', 8493 => 'c', 8495 => 'e', 8496 => 'e', 8497 => 'f', 8499 => 'm', 8500 => 'o', 8501 => 'א', 8502 => 'ב', 8503 => 'ג', 8504 => 'ד', 8505 => 'i', 8507 => 'fax', 8508 => 'π', 8509 => 'γ', 8510 => 'γ', 8511 => 'π', 8512 => '∑', 8517 => 'd', 8518 => 'd', 8519 => 'e', 8520 => 'i', 8521 => 'j', 8528 => '1⁄7', 8529 => '1⁄9', 8530 => '1⁄10', 8531 => '1⁄3', 8532 => '2⁄3', 8533 => '1⁄5', 8534 => '2⁄5', 8535 => '3⁄5', 8536 => '4⁄5', 8537 => '1⁄6', 8538 => '5⁄6', 8539 => '1⁄8', 8540 => '3⁄8', 8541 => '5⁄8', 8542 => '7⁄8', 8543 => '1⁄', 8544 => 'i', 8545 => 'ii', 8546 => 'iii', 8547 => 'iv', 8548 => 'v', 8549 => 'vi', 8550 => 'vii', 8551 => 'viii', 8552 => 'ix', 8553 => 'x', 8554 => 'xi', 8555 => 'xii', 8556 => 'l', 8557 => 'c', 8558 => 'd', 8559 => 'm', 8560 => 'i', 8561 => 'ii', 8562 => 'iii', 8563 => 'iv', 8564 => 'v', 8565 => 'vi', 8566 => 'vii', 8567 => 'viii', 8568 => 'ix', 8569 => 'x', 8570 => 'xi', 8571 => 'xii', 8572 => 'l', 8573 => 'c', 8574 => 'd', 8575 => 'm', 8585 => '0⁄3', 8748 => '∫∫', 8749 => '∫∫∫', 8751 => '∮∮', 8752 => '∮∮∮', 9001 => '〈', 9002 => '〉', 9312 => '1', 9313 => '2', 9314 => '3', 9315 => '4', 9316 => '5', 9317 => '6', 9318 => '7', 9319 => '8', 9320 => '9', 9321 => '10', 9322 => '11', 9323 => '12', 9324 => '13', 9325 => '14', 9326 => '15', 9327 => '16', 9328 => '17', 9329 => '18', 9330 => '19', 9331 => '20', 9398 => 'a', 9399 => 'b', 9400 => 'c', 9401 => 'd', 9402 => 'e', 9403 => 'f', 9404 => 'g', 9405 => 'h', 9406 => 'i', 9407 => 'j', 9408 => 'k', 9409 => 'l', 9410 => 'm', 9411 => 'n', 9412 => 'o', 9413 => 'p', 9414 => 'q', 9415 => 'r', 9416 => 's', 9417 => 't', 9418 => 'u', 9419 => 'v', 9420 => 'w', 9421 => 'x', 9422 => 'y', 9423 => 'z', 9424 => 'a', 9425 => 'b', 9426 => 'c', 9427 => 'd', 9428 => 'e', 9429 => 'f', 9430 => 'g', 9431 => 'h', 9432 => 'i', 9433 => 'j', 9434 => 'k', 9435 => 'l', 9436 => 'm', 9437 => 'n', 9438 => 'o', 9439 => 'p', 9440 => 'q', 9441 => 'r', 9442 => 's', 9443 => 't', 9444 => 'u', 9445 => 'v', 9446 => 'w', 9447 => 'x', 9448 => 'y', 9449 => 'z', 9450 => '0', 10764 => '∫∫∫∫', 10972 => '⫝̸', 11264 => 'ⰰ', 11265 => 'ⰱ', 11266 => 'ⰲ', 11267 => 'ⰳ', 11268 => 'ⰴ', 11269 => 'ⰵ', 11270 => 'ⰶ', 11271 => 'ⰷ', 11272 => 'ⰸ', 11273 => 'ⰹ', 11274 => 'ⰺ', 11275 => 'ⰻ', 11276 => 'ⰼ', 11277 => 'ⰽ', 11278 => 'ⰾ', 11279 => 'ⰿ', 11280 => 'ⱀ', 11281 => 'ⱁ', 11282 => 'ⱂ', 11283 => 'ⱃ', 11284 => 'ⱄ', 11285 => 'ⱅ', 11286 => 'ⱆ', 11287 => 'ⱇ', 11288 => 'ⱈ', 11289 => 'ⱉ', 11290 => 'ⱊ', 11291 => 'ⱋ', 11292 => 'ⱌ', 11293 => 'ⱍ', 11294 => 'ⱎ', 11295 => 'ⱏ', 11296 => 'ⱐ', 11297 => 'ⱑ', 11298 => 'ⱒ', 11299 => 'ⱓ', 11300 => 'ⱔ', 11301 => 'ⱕ', 11302 => 'ⱖ', 11303 => 'ⱗ', 11304 => 'ⱘ', 11305 => 'ⱙ', 11306 => 'ⱚ', 11307 => 'ⱛ', 11308 => 'ⱜ', 11309 => 'ⱝ', 11310 => 'ⱞ', 11360 => 'ⱡ', 11362 => 'ɫ', 11363 => 'ᵽ', 11364 => 'ɽ', 11367 => 'ⱨ', 11369 => 'ⱪ', 11371 => 'ⱬ', 11373 => 'ɑ', 11374 => 'ɱ', 11375 => 'ɐ', 11376 => 'ɒ', 11378 => 'ⱳ', 11381 => 'ⱶ', 11388 => 'j', 11389 => 'v', 11390 => 'ȿ', 11391 => 'ɀ', 11392 => 'ⲁ', 11394 => 'ⲃ', 11396 => 'ⲅ', 11398 => 'ⲇ', 11400 => 'ⲉ', 11402 => 'ⲋ', 11404 => 'ⲍ', 11406 => 'ⲏ', 11408 => 'ⲑ', 11410 => 'ⲓ', 11412 => 'ⲕ', 11414 => 'ⲗ', 11416 => 'ⲙ', 11418 => 'ⲛ', 11420 => 'ⲝ', 11422 => 'ⲟ', 11424 => 'ⲡ', 11426 => 'ⲣ', 11428 => 'ⲥ', 11430 => 'ⲧ', 11432 => 'ⲩ', 11434 => 'ⲫ', 11436 => 'ⲭ', 11438 => 'ⲯ', 11440 => 'ⲱ', 11442 => 'ⲳ', 11444 => 'ⲵ', 11446 => 'ⲷ', 11448 => 'ⲹ', 11450 => 'ⲻ', 11452 => 'ⲽ', 11454 => 'ⲿ', 11456 => 'ⳁ', 11458 => 'ⳃ', 11460 => 'ⳅ', 11462 => 'ⳇ', 11464 => 'ⳉ', 11466 => 'ⳋ', 11468 => 'ⳍ', 11470 => 'ⳏ', 11472 => 'ⳑ', 11474 => 'ⳓ', 11476 => 'ⳕ', 11478 => 'ⳗ', 11480 => 'ⳙ', 11482 => 'ⳛ', 11484 => 'ⳝ', 11486 => 'ⳟ', 11488 => 'ⳡ', 11490 => 'ⳣ', 11499 => 'ⳬ', 11501 => 'ⳮ', 11506 => 'ⳳ', 11631 => 'ⵡ', 11935 => '母', 12019 => '龟', 12032 => '一', 12033 => '丨', 12034 => '丶', 12035 => '丿', 12036 => '乙', 12037 => '亅', 12038 => '二', 12039 => '亠', 12040 => '人', 12041 => '儿', 12042 => '入', 12043 => '八', 12044 => '冂', 12045 => '冖', 12046 => '冫', 12047 => '几', 12048 => '凵', 12049 => '刀', 12050 => '力', 12051 => '勹', 12052 => '匕', 12053 => '匚', 12054 => '匸', 12055 => '十', 12056 => '卜', 12057 => '卩', 12058 => '厂', 12059 => '厶', 12060 => '又', 12061 => '口', 12062 => '囗', 12063 => '土', 12064 => '士', 12065 => '夂', 12066 => '夊', 12067 => '夕', 12068 => '大', 12069 => '女', 12070 => '子', 12071 => '宀', 12072 => '寸', 12073 => '小', 12074 => '尢', 12075 => '尸', 12076 => '屮', 12077 => '山', 12078 => '巛', 12079 => '工', 12080 => '己', 12081 => '巾', 12082 => '干', 12083 => '幺', 12084 => '广', 12085 => '廴', 12086 => '廾', 12087 => '弋', 12088 => '弓', 12089 => '彐', 12090 => '彡', 12091 => '彳', 12092 => '心', 12093 => '戈', 12094 => '戶', 12095 => '手', 12096 => '支', 12097 => '攴', 12098 => '文', 12099 => '斗', 12100 => '斤', 12101 => '方', 12102 => '无', 12103 => '日', 12104 => '曰', 12105 => '月', 12106 => '木', 12107 => '欠', 12108 => '止', 12109 => '歹', 12110 => '殳', 12111 => '毋', 12112 => '比', 12113 => '毛', 12114 => '氏', 12115 => '气', 12116 => '水', 12117 => '火', 12118 => '爪', 12119 => '父', 12120 => '爻', 12121 => '爿', 12122 => '片', 12123 => '牙', 12124 => '牛', 12125 => '犬', 12126 => '玄', 12127 => '玉', 12128 => '瓜', 12129 => '瓦', 12130 => '甘', 12131 => '生', 12132 => '用', 12133 => '田', 12134 => '疋', 12135 => '疒', 12136 => '癶', 12137 => '白', 12138 => '皮', 12139 => '皿', 12140 => '目', 12141 => '矛', 12142 => '矢', 12143 => '石', 12144 => '示', 12145 => '禸', 12146 => '禾', 12147 => '穴', 12148 => '立', 12149 => '竹', 12150 => '米', 12151 => '糸', 12152 => '缶', 12153 => '网', 12154 => '羊', 12155 => '羽', 12156 => '老', 12157 => '而', 12158 => '耒', 12159 => '耳', 12160 => '聿', 12161 => '肉', 12162 => '臣', 12163 => '自', 12164 => '至', 12165 => '臼', 12166 => '舌', 12167 => '舛', 12168 => '舟', 12169 => '艮', 12170 => '色', 12171 => '艸', 12172 => '虍', 12173 => '虫', 12174 => '血', 12175 => '行', 12176 => '衣', 12177 => '襾', 12178 => '見', 12179 => '角', 12180 => '言', 12181 => '谷', 12182 => '豆', 12183 => '豕', 12184 => '豸', 12185 => '貝', 12186 => '赤', 12187 => '走', 12188 => '足', 12189 => '身', 12190 => '車', 12191 => '辛', 12192 => '辰', 12193 => '辵', 12194 => '邑', 12195 => '酉', 12196 => '釆', 12197 => '里', 12198 => '金', 12199 => '長', 12200 => '門', 12201 => '阜', 12202 => '隶', 12203 => '隹', 12204 => '雨', 12205 => '靑', 12206 => '非', 12207 => '面', 12208 => '革', 12209 => '韋', 12210 => '韭', 12211 => '音', 12212 => '頁', 12213 => '風', 12214 => '飛', 12215 => '食', 12216 => '首', 12217 => '香', 12218 => '馬', 12219 => '骨', 12220 => '高', 12221 => '髟', 12222 => '鬥', 12223 => '鬯', 12224 => '鬲', 12225 => '鬼', 12226 => '魚', 12227 => '鳥', 12228 => '鹵', 12229 => '鹿', 12230 => '麥', 12231 => '麻', 12232 => '黃', 12233 => '黍', 12234 => '黑', 12235 => '黹', 12236 => '黽', 12237 => '鼎', 12238 => '鼓', 12239 => '鼠', 12240 => '鼻', 12241 => '齊', 12242 => '齒', 12243 => '龍', 12244 => '龜', 12245 => '龠', 12290 => '.', 12342 => '〒', 12344 => '十', 12345 => '卄', 12346 => '卅', 12447 => 'より', 12543 => 'コト', 12593 => 'ᄀ', 12594 => 'ᄁ', 12595 => 'ᆪ', 12596 => 'ᄂ', 12597 => 'ᆬ', 12598 => 'ᆭ', 12599 => 'ᄃ', 12600 => 'ᄄ', 12601 => 'ᄅ', 12602 => 'ᆰ', 12603 => 'ᆱ', 12604 => 'ᆲ', 12605 => 'ᆳ', 12606 => 'ᆴ', 12607 => 'ᆵ', 12608 => 'ᄚ', 12609 => 'ᄆ', 12610 => 'ᄇ', 12611 => 'ᄈ', 12612 => 'ᄡ', 12613 => 'ᄉ', 12614 => 'ᄊ', 12615 => 'ᄋ', 12616 => 'ᄌ', 12617 => 'ᄍ', 12618 => 'ᄎ', 12619 => 'ᄏ', 12620 => 'ᄐ', 12621 => 'ᄑ', 12622 => 'ᄒ', 12623 => 'ᅡ', 12624 => 'ᅢ', 12625 => 'ᅣ', 12626 => 'ᅤ', 12627 => 'ᅥ', 12628 => 'ᅦ', 12629 => 'ᅧ', 12630 => 'ᅨ', 12631 => 'ᅩ', 12632 => 'ᅪ', 12633 => 'ᅫ', 12634 => 'ᅬ', 12635 => 'ᅭ', 12636 => 'ᅮ', 12637 => 'ᅯ', 12638 => 'ᅰ', 12639 => 'ᅱ', 12640 => 'ᅲ', 12641 => 'ᅳ', 12642 => 'ᅴ', 12643 => 'ᅵ', 12645 => 'ᄔ', 12646 => 'ᄕ', 12647 => 'ᇇ', 12648 => 'ᇈ', 12649 => 'ᇌ', 12650 => 'ᇎ', 12651 => 'ᇓ', 12652 => 'ᇗ', 12653 => 'ᇙ', 12654 => 'ᄜ', 12655 => 'ᇝ', 12656 => 'ᇟ', 12657 => 'ᄝ', 12658 => 'ᄞ', 12659 => 'ᄠ', 12660 => 'ᄢ', 12661 => 'ᄣ', 12662 => 'ᄧ', 12663 => 'ᄩ', 12664 => 'ᄫ', 12665 => 'ᄬ', 12666 => 'ᄭ', 12667 => 'ᄮ', 12668 => 'ᄯ', 12669 => 'ᄲ', 12670 => 'ᄶ', 12671 => 'ᅀ', 12672 => 'ᅇ', 12673 => 'ᅌ', 12674 => 'ᇱ', 12675 => 'ᇲ', 12676 => 'ᅗ', 12677 => 'ᅘ', 12678 => 'ᅙ', 12679 => 'ᆄ', 12680 => 'ᆅ', 12681 => 'ᆈ', 12682 => 'ᆑ', 12683 => 'ᆒ', 12684 => 'ᆔ', 12685 => 'ᆞ', 12686 => 'ᆡ', 12690 => '一', 12691 => '二', 12692 => '三', 12693 => '四', 12694 => '上', 12695 => '中', 12696 => '下', 12697 => '甲', 12698 => '乙', 12699 => '丙', 12700 => '丁', 12701 => '天', 12702 => '地', 12703 => '人', 12868 => '問', 12869 => '幼', 12870 => '文', 12871 => '箏', 12880 => 'pte', 12881 => '21', 12882 => '22', 12883 => '23', 12884 => '24', 12885 => '25', 12886 => '26', 12887 => '27', 12888 => '28', 12889 => '29', 12890 => '30', 12891 => '31', 12892 => '32', 12893 => '33', 12894 => '34', 12895 => '35', 12896 => 'ᄀ', 12897 => 'ᄂ', 12898 => 'ᄃ', 12899 => 'ᄅ', 12900 => 'ᄆ', 12901 => 'ᄇ', 12902 => 'ᄉ', 12903 => 'ᄋ', 12904 => 'ᄌ', 12905 => 'ᄎ', 12906 => 'ᄏ', 12907 => 'ᄐ', 12908 => 'ᄑ', 12909 => 'ᄒ', 12910 => '가', 12911 => '나', 12912 => '다', 12913 => '라', 12914 => '마', 12915 => '바', 12916 => '사', 12917 => '아', 12918 => '자', 12919 => '차', 12920 => '카', 12921 => '타', 12922 => '파', 12923 => '하', 12924 => '참고', 12925 => '주의', 12926 => '우', 12928 => '一', 12929 => '二', 12930 => '三', 12931 => '四', 12932 => '五', 12933 => '六', 12934 => '七', 12935 => '八', 12936 => '九', 12937 => '十', 12938 => '月', 12939 => '火', 12940 => '水', 12941 => '木', 12942 => '金', 12943 => '土', 12944 => '日', 12945 => '株', 12946 => '有', 12947 => '社', 12948 => '名', 12949 => '特', 12950 => '財', 12951 => '祝', 12952 => '労', 12953 => '秘', 12954 => '男', 12955 => '女', 12956 => '適', 12957 => '優', 12958 => '印', 12959 => '注', 12960 => '項', 12961 => '休', 12962 => '写', 12963 => '正', 12964 => '上', 12965 => '中', 12966 => '下', 12967 => '左', 12968 => '右', 12969 => '医', 12970 => '宗', 12971 => '学', 12972 => '監', 12973 => '企', 12974 => '資', 12975 => '協', 12976 => '夜', 12977 => '36', 12978 => '37', 12979 => '38', 12980 => '39', 12981 => '40', 12982 => '41', 12983 => '42', 12984 => '43', 12985 => '44', 12986 => '45', 12987 => '46', 12988 => '47', 12989 => '48', 12990 => '49', 12991 => '50', 12992 => '1月', 12993 => '2月', 12994 => '3月', 12995 => '4月', 12996 => '5月', 12997 => '6月', 12998 => '7月', 12999 => '8月', 13000 => '9月', 13001 => '10月', 13002 => '11月', 13003 => '12月', 13004 => 'hg', 13005 => 'erg', 13006 => 'ev', 13007 => 'ltd', 13008 => 'ア', 13009 => 'イ', 13010 => 'ウ', 13011 => 'エ', 13012 => 'オ', 13013 => 'カ', 13014 => 'キ', 13015 => 'ク', 13016 => 'ケ', 13017 => 'コ', 13018 => 'サ', 13019 => 'シ', 13020 => 'ス', 13021 => 'セ', 13022 => 'ソ', 13023 => 'タ', 13024 => 'チ', 13025 => 'ツ', 13026 => 'テ', 13027 => 'ト', 13028 => 'ナ', 13029 => 'ニ', 13030 => 'ヌ', 13031 => 'ネ', 13032 => 'ノ', 13033 => 'ハ', 13034 => 'ヒ', 13035 => 'フ', 13036 => 'ヘ', 13037 => 'ホ', 13038 => 'マ', 13039 => 'ミ', 13040 => 'ム', 13041 => 'メ', 13042 => 'モ', 13043 => 'ヤ', 13044 => 'ユ', 13045 => 'ヨ', 13046 => 'ラ', 13047 => 'リ', 13048 => 'ル', 13049 => 'レ', 13050 => 'ロ', 13051 => 'ワ', 13052 => 'ヰ', 13053 => 'ヱ', 13054 => 'ヲ', 13055 => '令和', 13056 => 'アパート', 13057 => 'アルファ', 13058 => 'アンペア', 13059 => 'アール', 13060 => 'イニング', 13061 => 'インチ', 13062 => 'ウォン', 13063 => 'エスクード', 13064 => 'エーカー', 13065 => 'オンス', 13066 => 'オーム', 13067 => 'カイリ', 13068 => 'カラット', 13069 => 'カロリー', 13070 => 'ガロン', 13071 => 'ガンマ', 13072 => 'ギガ', 13073 => 'ギニー', 13074 => 'キュリー', 13075 => 'ギルダー', 13076 => 'キロ', 13077 => 'キログラム', 13078 => 'キロメートル', 13079 => 'キロワット', 13080 => 'グラム', 13081 => 'グラムトン', 13082 => 'クルゼイロ', 13083 => 'クローネ', 13084 => 'ケース', 13085 => 'コルナ', 13086 => 'コーポ', 13087 => 'サイクル', 13088 => 'サンチーム', 13089 => 'シリング', 13090 => 'センチ', 13091 => 'セント', 13092 => 'ダース', 13093 => 'デシ', 13094 => 'ドル', 13095 => 'トン', 13096 => 'ナノ', 13097 => 'ノット', 13098 => 'ハイツ', 13099 => 'パーセント', 13100 => 'パーツ', 13101 => 'バーレル', 13102 => 'ピアストル', 13103 => 'ピクル', 13104 => 'ピコ', 13105 => 'ビル', 13106 => 'ファラッド', 13107 => 'フィート', 13108 => 'ブッシェル', 13109 => 'フラン', 13110 => 'ヘクタール', 13111 => 'ペソ', 13112 => 'ペニヒ', 13113 => 'ヘルツ', 13114 => 'ペンス', 13115 => 'ページ', 13116 => 'ベータ', 13117 => 'ポイント', 13118 => 'ボルト', 13119 => 'ホン', 13120 => 'ポンド', 13121 => 'ホール', 13122 => 'ホーン', 13123 => 'マイクロ', 13124 => 'マイル', 13125 => 'マッハ', 13126 => 'マルク', 13127 => 'マンション', 13128 => 'ミクロン', 13129 => 'ミリ', 13130 => 'ミリバール', 13131 => 'メガ', 13132 => 'メガトン', 13133 => 'メートル', 13134 => 'ヤード', 13135 => 'ヤール', 13136 => 'ユアン', 13137 => 'リットル', 13138 => 'リラ', 13139 => 'ルピー', 13140 => 'ルーブル', 13141 => 'レム', 13142 => 'レントゲン', 13143 => 'ワット', 13144 => '0点', 13145 => '1点', 13146 => '2点', 13147 => '3点', 13148 => '4点', 13149 => '5点', 13150 => '6点', 13151 => '7点', 13152 => '8点', 13153 => '9点', 13154 => '10点', 13155 => '11点', 13156 => '12点', 13157 => '13点', 13158 => '14点', 13159 => '15点', 13160 => '16点', 13161 => '17点', 13162 => '18点', 13163 => '19点', 13164 => '20点', 13165 => '21点', 13166 => '22点', 13167 => '23点', 13168 => '24点', 13169 => 'hpa', 13170 => 'da', 13171 => 'au', 13172 => 'bar', 13173 => 'ov', 13174 => 'pc', 13175 => 'dm', 13176 => 'dm2', 13177 => 'dm3', 13178 => 'iu', 13179 => '平成', 13180 => '昭和', 13181 => '大正', 13182 => '明治', 13183 => '株式会社', 13184 => 'pa', 13185 => 'na', 13186 => 'μa', 13187 => 'ma', 13188 => 'ka', 13189 => 'kb', 13190 => 'mb', 13191 => 'gb', 13192 => 'cal', 13193 => 'kcal', 13194 => 'pf', 13195 => 'nf', 13196 => 'μf', 13197 => 'μg', 13198 => 'mg', 13199 => 'kg', 13200 => 'hz', 13201 => 'khz', 13202 => 'mhz', 13203 => 'ghz', 13204 => 'thz', 13205 => 'μl', 13206 => 'ml', 13207 => 'dl', 13208 => 'kl', 13209 => 'fm', 13210 => 'nm', 13211 => 'μm', 13212 => 'mm', 13213 => 'cm', 13214 => 'km', 13215 => 'mm2', 13216 => 'cm2', 13217 => 'm2', 13218 => 'km2', 13219 => 'mm3', 13220 => 'cm3', 13221 => 'm3', 13222 => 'km3', 13223 => 'm∕s', 13224 => 'm∕s2', 13225 => 'pa', 13226 => 'kpa', 13227 => 'mpa', 13228 => 'gpa', 13229 => 'rad', 13230 => 'rad∕s', 13231 => 'rad∕s2', 13232 => 'ps', 13233 => 'ns', 13234 => 'μs', 13235 => 'ms', 13236 => 'pv', 13237 => 'nv', 13238 => 'μv', 13239 => 'mv', 13240 => 'kv', 13241 => 'mv', 13242 => 'pw', 13243 => 'nw', 13244 => 'μw', 13245 => 'mw', 13246 => 'kw', 13247 => 'mw', 13248 => 'kω', 13249 => 'mω', 13251 => 'bq', 13252 => 'cc', 13253 => 'cd', 13254 => 'c∕kg', 13256 => 'db', 13257 => 'gy', 13258 => 'ha', 13259 => 'hp', 13260 => 'in', 13261 => 'kk', 13262 => 'km', 13263 => 'kt', 13264 => 'lm', 13265 => 'ln', 13266 => 'log', 13267 => 'lx', 13268 => 'mb', 13269 => 'mil', 13270 => 'mol', 13271 => 'ph', 13273 => 'ppm', 13274 => 'pr', 13275 => 'sr', 13276 => 'sv', 13277 => 'wb', 13278 => 'v∕m', 13279 => 'a∕m', 13280 => '1日', 13281 => '2日', 13282 => '3日', 13283 => '4日', 13284 => '5日', 13285 => '6日', 13286 => '7日', 13287 => '8日', 13288 => '9日', 13289 => '10日', 13290 => '11日', 13291 => '12日', 13292 => '13日', 13293 => '14日', 13294 => '15日', 13295 => '16日', 13296 => '17日', 13297 => '18日', 13298 => '19日', 13299 => '20日', 13300 => '21日', 13301 => '22日', 13302 => '23日', 13303 => '24日', 13304 => '25日', 13305 => '26日', 13306 => '27日', 13307 => '28日', 13308 => '29日', 13309 => '30日', 13310 => '31日', 13311 => 'gal', 42560 => 'ꙁ', 42562 => 'ꙃ', 42564 => 'ꙅ', 42566 => 'ꙇ', 42568 => 'ꙉ', 42570 => 'ꙋ', 42572 => 'ꙍ', 42574 => 'ꙏ', 42576 => 'ꙑ', 42578 => 'ꙓ', 42580 => 'ꙕ', 42582 => 'ꙗ', 42584 => 'ꙙ', 42586 => 'ꙛ', 42588 => 'ꙝ', 42590 => 'ꙟ', 42592 => 'ꙡ', 42594 => 'ꙣ', 42596 => 'ꙥ', 42598 => 'ꙧ', 42600 => 'ꙩ', 42602 => 'ꙫ', 42604 => 'ꙭ', 42624 => 'ꚁ', 42626 => 'ꚃ', 42628 => 'ꚅ', 42630 => 'ꚇ', 42632 => 'ꚉ', 42634 => 'ꚋ', 42636 => 'ꚍ', 42638 => 'ꚏ', 42640 => 'ꚑ', 42642 => 'ꚓ', 42644 => 'ꚕ', 42646 => 'ꚗ', 42648 => 'ꚙ', 42650 => 'ꚛ', 42652 => 'ъ', 42653 => 'ь', 42786 => 'ꜣ', 42788 => 'ꜥ', 42790 => 'ꜧ', 42792 => 'ꜩ', 42794 => 'ꜫ', 42796 => 'ꜭ', 42798 => 'ꜯ', 42802 => 'ꜳ', 42804 => 'ꜵ', 42806 => 'ꜷ', 42808 => 'ꜹ', 42810 => 'ꜻ', 42812 => 'ꜽ', 42814 => 'ꜿ', 42816 => 'ꝁ', 42818 => 'ꝃ', 42820 => 'ꝅ', 42822 => 'ꝇ', 42824 => 'ꝉ', 42826 => 'ꝋ', 42828 => 'ꝍ', 42830 => 'ꝏ', 42832 => 'ꝑ', 42834 => 'ꝓ', 42836 => 'ꝕ', 42838 => 'ꝗ', 42840 => 'ꝙ', 42842 => 'ꝛ', 42844 => 'ꝝ', 42846 => 'ꝟ', 42848 => 'ꝡ', 42850 => 'ꝣ', 42852 => 'ꝥ', 42854 => 'ꝧ', 42856 => 'ꝩ', 42858 => 'ꝫ', 42860 => 'ꝭ', 42862 => 'ꝯ', 42864 => 'ꝯ', 42873 => 'ꝺ', 42875 => 'ꝼ', 42877 => 'ᵹ', 42878 => 'ꝿ', 42880 => 'ꞁ', 42882 => 'ꞃ', 42884 => 'ꞅ', 42886 => 'ꞇ', 42891 => 'ꞌ', 42893 => 'ɥ', 42896 => 'ꞑ', 42898 => 'ꞓ', 42902 => 'ꞗ', 42904 => 'ꞙ', 42906 => 'ꞛ', 42908 => 'ꞝ', 42910 => 'ꞟ', 42912 => 'ꞡ', 42914 => 'ꞣ', 42916 => 'ꞥ', 42918 => 'ꞧ', 42920 => 'ꞩ', 42922 => 'ɦ', 42923 => 'ɜ', 42924 => 'ɡ', 42925 => 'ɬ', 42926 => 'ɪ', 42928 => 'ʞ', 42929 => 'ʇ', 42930 => 'ʝ', 42931 => 'ꭓ', 42932 => 'ꞵ', 42934 => 'ꞷ', 42936 => 'ꞹ', 42938 => 'ꞻ', 42940 => 'ꞽ', 42942 => 'ꞿ', 42946 => 'ꟃ', 42948 => 'ꞔ', 42949 => 'ʂ', 42950 => 'ᶎ', 42951 => 'ꟈ', 42953 => 'ꟊ', 42997 => 'ꟶ', 43000 => 'ħ', 43001 => 'œ', 43868 => 'ꜧ', 43869 => 'ꬷ', 43870 => 'ɫ', 43871 => 'ꭒ', 43881 => 'ʍ', 43888 => 'Ꭰ', 43889 => 'Ꭱ', 43890 => 'Ꭲ', 43891 => 'Ꭳ', 43892 => 'Ꭴ', 43893 => 'Ꭵ', 43894 => 'Ꭶ', 43895 => 'Ꭷ', 43896 => 'Ꭸ', 43897 => 'Ꭹ', 43898 => 'Ꭺ', 43899 => 'Ꭻ', 43900 => 'Ꭼ', 43901 => 'Ꭽ', 43902 => 'Ꭾ', 43903 => 'Ꭿ', 43904 => 'Ꮀ', 43905 => 'Ꮁ', 43906 => 'Ꮂ', 43907 => 'Ꮃ', 43908 => 'Ꮄ', 43909 => 'Ꮅ', 43910 => 'Ꮆ', 43911 => 'Ꮇ', 43912 => 'Ꮈ', 43913 => 'Ꮉ', 43914 => 'Ꮊ', 43915 => 'Ꮋ', 43916 => 'Ꮌ', 43917 => 'Ꮍ', 43918 => 'Ꮎ', 43919 => 'Ꮏ', 43920 => 'Ꮐ', 43921 => 'Ꮑ', 43922 => 'Ꮒ', 43923 => 'Ꮓ', 43924 => 'Ꮔ', 43925 => 'Ꮕ', 43926 => 'Ꮖ', 43927 => 'Ꮗ', 43928 => 'Ꮘ', 43929 => 'Ꮙ', 43930 => 'Ꮚ', 43931 => 'Ꮛ', 43932 => 'Ꮜ', 43933 => 'Ꮝ', 43934 => 'Ꮞ', 43935 => 'Ꮟ', 43936 => 'Ꮠ', 43937 => 'Ꮡ', 43938 => 'Ꮢ', 43939 => 'Ꮣ', 43940 => 'Ꮤ', 43941 => 'Ꮥ', 43942 => 'Ꮦ', 43943 => 'Ꮧ', 43944 => 'Ꮨ', 43945 => 'Ꮩ', 43946 => 'Ꮪ', 43947 => 'Ꮫ', 43948 => 'Ꮬ', 43949 => 'Ꮭ', 43950 => 'Ꮮ', 43951 => 'Ꮯ', 43952 => 'Ꮰ', 43953 => 'Ꮱ', 43954 => 'Ꮲ', 43955 => 'Ꮳ', 43956 => 'Ꮴ', 43957 => 'Ꮵ', 43958 => 'Ꮶ', 43959 => 'Ꮷ', 43960 => 'Ꮸ', 43961 => 'Ꮹ', 43962 => 'Ꮺ', 43963 => 'Ꮻ', 43964 => 'Ꮼ', 43965 => 'Ꮽ', 43966 => 'Ꮾ', 43967 => 'Ꮿ', 63744 => '豈', 63745 => '更', 63746 => '車', 63747 => '賈', 63748 => '滑', 63749 => '串', 63750 => '句', 63751 => '龜', 63752 => '龜', 63753 => '契', 63754 => '金', 63755 => '喇', 63756 => '奈', 63757 => '懶', 63758 => '癩', 63759 => '羅', 63760 => '蘿', 63761 => '螺', 63762 => '裸', 63763 => '邏', 63764 => '樂', 63765 => '洛', 63766 => '烙', 63767 => '珞', 63768 => '落', 63769 => '酪', 63770 => '駱', 63771 => '亂', 63772 => '卵', 63773 => '欄', 63774 => '爛', 63775 => '蘭', 63776 => '鸞', 63777 => '嵐', 63778 => '濫', 63779 => '藍', 63780 => '襤', 63781 => '拉', 63782 => '臘', 63783 => '蠟', 63784 => '廊', 63785 => '朗', 63786 => '浪', 63787 => '狼', 63788 => '郎', 63789 => '來', 63790 => '冷', 63791 => '勞', 63792 => '擄', 63793 => '櫓', 63794 => '爐', 63795 => '盧', 63796 => '老', 63797 => '蘆', 63798 => '虜', 63799 => '路', 63800 => '露', 63801 => '魯', 63802 => '鷺', 63803 => '碌', 63804 => '祿', 63805 => '綠', 63806 => '菉', 63807 => '錄', 63808 => '鹿', 63809 => '論', 63810 => '壟', 63811 => '弄', 63812 => '籠', 63813 => '聾', 63814 => '牢', 63815 => '磊', 63816 => '賂', 63817 => '雷', 63818 => '壘', 63819 => '屢', 63820 => '樓', 63821 => '淚', 63822 => '漏', 63823 => '累', 63824 => '縷', 63825 => '陋', 63826 => '勒', 63827 => '肋', 63828 => '凜', 63829 => '凌', 63830 => '稜', 63831 => '綾', 63832 => '菱', 63833 => '陵', 63834 => '讀', 63835 => '拏', 63836 => '樂', 63837 => '諾', 63838 => '丹', 63839 => '寧', 63840 => '怒', 63841 => '率', 63842 => '異', 63843 => '北', 63844 => '磻', 63845 => '便', 63846 => '復', 63847 => '不', 63848 => '泌', 63849 => '數', 63850 => '索', 63851 => '參', 63852 => '塞', 63853 => '省', 63854 => '葉', 63855 => '說', 63856 => '殺', 63857 => '辰', 63858 => '沈', 63859 => '拾', 63860 => '若', 63861 => '掠', 63862 => '略', 63863 => '亮', 63864 => '兩', 63865 => '凉', 63866 => '梁', 63867 => '糧', 63868 => '良', 63869 => '諒', 63870 => '量', 63871 => '勵', 63872 => '呂', 63873 => '女', 63874 => '廬', 63875 => '旅', 63876 => '濾', 63877 => '礪', 63878 => '閭', 63879 => '驪', 63880 => '麗', 63881 => '黎', 63882 => '力', 63883 => '曆', 63884 => '歷', 63885 => '轢', 63886 => '年', 63887 => '憐', 63888 => '戀', 63889 => '撚', 63890 => '漣', 63891 => '煉', 63892 => '璉', 63893 => '秊', 63894 => '練', 63895 => '聯', 63896 => '輦', 63897 => '蓮', 63898 => '連', 63899 => '鍊', 63900 => '列', 63901 => '劣', 63902 => '咽', 63903 => '烈', 63904 => '裂', 63905 => '說', 63906 => '廉', 63907 => '念', 63908 => '捻', 63909 => '殮', 63910 => '簾', 63911 => '獵', 63912 => '令', 63913 => '囹', 63914 => '寧', 63915 => '嶺', 63916 => '怜', 63917 => '玲', 63918 => '瑩', 63919 => '羚', 63920 => '聆', 63921 => '鈴', 63922 => '零', 63923 => '靈', 63924 => '領', 63925 => '例', 63926 => '禮', 63927 => '醴', 63928 => '隸', 63929 => '惡', 63930 => '了', 63931 => '僚', 63932 => '寮', 63933 => '尿', 63934 => '料', 63935 => '樂', 63936 => '燎', 63937 => '療', 63938 => '蓼', 63939 => '遼', 63940 => '龍', 63941 => '暈', 63942 => '阮', 63943 => '劉', 63944 => '杻', 63945 => '柳', 63946 => '流', 63947 => '溜', 63948 => '琉', 63949 => '留', 63950 => '硫', 63951 => '紐', 63952 => '類', 63953 => '六', 63954 => '戮', 63955 => '陸', 63956 => '倫', 63957 => '崙', 63958 => '淪', 63959 => '輪', 63960 => '律', 63961 => '慄', 63962 => '栗', 63963 => '率', 63964 => '隆', 63965 => '利', 63966 => '吏', 63967 => '履', 63968 => '易', 63969 => '李', 63970 => '梨', 63971 => '泥', 63972 => '理', 63973 => '痢', 63974 => '罹', 63975 => '裏', 63976 => '裡', 63977 => '里', 63978 => '離', 63979 => '匿', 63980 => '溺', 63981 => '吝', 63982 => '燐', 63983 => '璘', 63984 => '藺', 63985 => '隣', 63986 => '鱗', 63987 => '麟', 63988 => '林', 63989 => '淋', 63990 => '臨', 63991 => '立', 63992 => '笠', 63993 => '粒', 63994 => '狀', 63995 => '炙', 63996 => '識', 63997 => '什', 63998 => '茶', 63999 => '刺', 64000 => '切', 64001 => '度', 64002 => '拓', 64003 => '糖', 64004 => '宅', 64005 => '洞', 64006 => '暴', 64007 => '輻', 64008 => '行', 64009 => '降', 64010 => '見', 64011 => '廓', 64012 => '兀', 64013 => '嗀', 64016 => '塚', 64018 => '晴', 64021 => '凞', 64022 => '猪', 64023 => '益', 64024 => '礼', 64025 => '神', 64026 => '祥', 64027 => '福', 64028 => '靖', 64029 => '精', 64030 => '羽', 64032 => '蘒', 64034 => '諸', 64037 => '逸', 64038 => '都', 64042 => '飯', 64043 => '飼', 64044 => '館', 64045 => '鶴', 64046 => '郞', 64047 => '隷', 64048 => '侮', 64049 => '僧', 64050 => '免', 64051 => '勉', 64052 => '勤', 64053 => '卑', 64054 => '喝', 64055 => '嘆', 64056 => '器', 64057 => '塀', 64058 => '墨', 64059 => '層', 64060 => '屮', 64061 => '悔', 64062 => '慨', 64063 => '憎', 64064 => '懲', 64065 => '敏', 64066 => '既', 64067 => '暑', 64068 => '梅', 64069 => '海', 64070 => '渚', 64071 => '漢', 64072 => '煮', 64073 => '爫', 64074 => '琢', 64075 => '碑', 64076 => '社', 64077 => '祉', 64078 => '祈', 64079 => '祐', 64080 => '祖', 64081 => '祝', 64082 => '禍', 64083 => '禎', 64084 => '穀', 64085 => '突', 64086 => '節', 64087 => '練', 64088 => '縉', 64089 => '繁', 64090 => '署', 64091 => '者', 64092 => '臭', 64093 => '艹', 64094 => '艹', 64095 => '著', 64096 => '褐', 64097 => '視', 64098 => '謁', 64099 => '謹', 64100 => '賓', 64101 => '贈', 64102 => '辶', 64103 => '逸', 64104 => '難', 64105 => '響', 64106 => '頻', 64107 => '恵', 64108 => '𤋮', 64109 => '舘', 64112 => '並', 64113 => '况', 64114 => '全', 64115 => '侀', 64116 => '充', 64117 => '冀', 64118 => '勇', 64119 => '勺', 64120 => '喝', 64121 => '啕', 64122 => '喙', 64123 => '嗢', 64124 => '塚', 64125 => '墳', 64126 => '奄', 64127 => '奔', 64128 => '婢', 64129 => '嬨', 64130 => '廒', 64131 => '廙', 64132 => '彩', 64133 => '徭', 64134 => '惘', 64135 => '慎', 64136 => '愈', 64137 => '憎', 64138 => '慠', 64139 => '懲', 64140 => '戴', 64141 => '揄', 64142 => '搜', 64143 => '摒', 64144 => '敖', 64145 => '晴', 64146 => '朗', 64147 => '望', 64148 => '杖', 64149 => '歹', 64150 => '殺', 64151 => '流', 64152 => '滛', 64153 => '滋', 64154 => '漢', 64155 => '瀞', 64156 => '煮', 64157 => '瞧', 64158 => '爵', 64159 => '犯', 64160 => '猪', 64161 => '瑱', 64162 => '甆', 64163 => '画', 64164 => '瘝', 64165 => '瘟', 64166 => '益', 64167 => '盛', 64168 => '直', 64169 => '睊', 64170 => '着', 64171 => '磌', 64172 => '窱', 64173 => '節', 64174 => '类', 64175 => '絛', 64176 => '練', 64177 => '缾', 64178 => '者', 64179 => '荒', 64180 => '華', 64181 => '蝹', 64182 => '襁', 64183 => '覆', 64184 => '視', 64185 => '調', 64186 => '諸', 64187 => '請', 64188 => '謁', 64189 => '諾', 64190 => '諭', 64191 => '謹', 64192 => '變', 64193 => '贈', 64194 => '輸', 64195 => '遲', 64196 => '醙', 64197 => '鉶', 64198 => '陼', 64199 => '難', 64200 => '靖', 64201 => '韛', 64202 => '響', 64203 => '頋', 64204 => '頻', 64205 => '鬒', 64206 => '龜', 64207 => '𢡊', 64208 => '𢡄', 64209 => '𣏕', 64210 => '㮝', 64211 => '䀘', 64212 => '䀹', 64213 => '𥉉', 64214 => '𥳐', 64215 => '𧻓', 64216 => '齃', 64217 => '龎', 64256 => 'ff', 64257 => 'fi', 64258 => 'fl', 64259 => 'ffi', 64260 => 'ffl', 64261 => 'st', 64262 => 'st', 64275 => 'մն', 64276 => 'մե', 64277 => 'մի', 64278 => 'վն', 64279 => 'մխ', 64285 => 'יִ', 64287 => 'ײַ', 64288 => 'ע', 64289 => 'א', 64290 => 'ד', 64291 => 'ה', 64292 => 'כ', 64293 => 'ל', 64294 => 'ם', 64295 => 'ר', 64296 => 'ת', 64298 => 'שׁ', 64299 => 'שׂ', 64300 => 'שּׁ', 64301 => 'שּׂ', 64302 => 'אַ', 64303 => 'אָ', 64304 => 'אּ', 64305 => 'בּ', 64306 => 'גּ', 64307 => 'דּ', 64308 => 'הּ', 64309 => 'וּ', 64310 => 'זּ', 64312 => 'טּ', 64313 => 'יּ', 64314 => 'ךּ', 64315 => 'כּ', 64316 => 'לּ', 64318 => 'מּ', 64320 => 'נּ', 64321 => 'סּ', 64323 => 'ףּ', 64324 => 'פּ', 64326 => 'צּ', 64327 => 'קּ', 64328 => 'רּ', 64329 => 'שּ', 64330 => 'תּ', 64331 => 'וֹ', 64332 => 'בֿ', 64333 => 'כֿ', 64334 => 'פֿ', 64335 => 'אל', 64336 => 'ٱ', 64337 => 'ٱ', 64338 => 'ٻ', 64339 => 'ٻ', 64340 => 'ٻ', 64341 => 'ٻ', 64342 => 'پ', 64343 => 'پ', 64344 => 'پ', 64345 => 'پ', 64346 => 'ڀ', 64347 => 'ڀ', 64348 => 'ڀ', 64349 => 'ڀ', 64350 => 'ٺ', 64351 => 'ٺ', 64352 => 'ٺ', 64353 => 'ٺ', 64354 => 'ٿ', 64355 => 'ٿ', 64356 => 'ٿ', 64357 => 'ٿ', 64358 => 'ٹ', 64359 => 'ٹ', 64360 => 'ٹ', 64361 => 'ٹ', 64362 => 'ڤ', 64363 => 'ڤ', 64364 => 'ڤ', 64365 => 'ڤ', 64366 => 'ڦ', 64367 => 'ڦ', 64368 => 'ڦ', 64369 => 'ڦ', 64370 => 'ڄ', 64371 => 'ڄ', 64372 => 'ڄ', 64373 => 'ڄ', 64374 => 'ڃ', 64375 => 'ڃ', 64376 => 'ڃ', 64377 => 'ڃ', 64378 => 'چ', 64379 => 'چ', 64380 => 'چ', 64381 => 'چ', 64382 => 'ڇ', 64383 => 'ڇ', 64384 => 'ڇ', 64385 => 'ڇ', 64386 => 'ڍ', 64387 => 'ڍ', 64388 => 'ڌ', 64389 => 'ڌ', 64390 => 'ڎ', 64391 => 'ڎ', 64392 => 'ڈ', 64393 => 'ڈ', 64394 => 'ژ', 64395 => 'ژ', 64396 => 'ڑ', 64397 => 'ڑ', 64398 => 'ک', 64399 => 'ک', 64400 => 'ک', 64401 => 'ک', 64402 => 'گ', 64403 => 'گ', 64404 => 'گ', 64405 => 'گ', 64406 => 'ڳ', 64407 => 'ڳ', 64408 => 'ڳ', 64409 => 'ڳ', 64410 => 'ڱ', 64411 => 'ڱ', 64412 => 'ڱ', 64413 => 'ڱ', 64414 => 'ں', 64415 => 'ں', 64416 => 'ڻ', 64417 => 'ڻ', 64418 => 'ڻ', 64419 => 'ڻ', 64420 => 'ۀ', 64421 => 'ۀ', 64422 => 'ہ', 64423 => 'ہ', 64424 => 'ہ', 64425 => 'ہ', 64426 => 'ھ', 64427 => 'ھ', 64428 => 'ھ', 64429 => 'ھ', 64430 => 'ے', 64431 => 'ے', 64432 => 'ۓ', 64433 => 'ۓ', 64467 => 'ڭ', 64468 => 'ڭ', 64469 => 'ڭ', 64470 => 'ڭ', 64471 => 'ۇ', 64472 => 'ۇ', 64473 => 'ۆ', 64474 => 'ۆ', 64475 => 'ۈ', 64476 => 'ۈ', 64477 => 'ۇٴ', 64478 => 'ۋ', 64479 => 'ۋ', 64480 => 'ۅ', 64481 => 'ۅ', 64482 => 'ۉ', 64483 => 'ۉ', 64484 => 'ې', 64485 => 'ې', 64486 => 'ې', 64487 => 'ې', 64488 => 'ى', 64489 => 'ى', 64490 => 'ئا', 64491 => 'ئا', 64492 => 'ئە', 64493 => 'ئە', 64494 => 'ئو', 64495 => 'ئو', 64496 => 'ئۇ', 64497 => 'ئۇ', 64498 => 'ئۆ', 64499 => 'ئۆ', 64500 => 'ئۈ', 64501 => 'ئۈ', 64502 => 'ئې', 64503 => 'ئې', 64504 => 'ئې', 64505 => 'ئى', 64506 => 'ئى', 64507 => 'ئى', 64508 => 'ی', 64509 => 'ی', 64510 => 'ی', 64511 => 'ی', 64512 => 'ئج', 64513 => 'ئح', 64514 => 'ئم', 64515 => 'ئى', 64516 => 'ئي', 64517 => 'بج', 64518 => 'بح', 64519 => 'بخ', 64520 => 'بم', 64521 => 'بى', 64522 => 'بي', 64523 => 'تج', 64524 => 'تح', 64525 => 'تخ', 64526 => 'تم', 64527 => 'تى', 64528 => 'تي', 64529 => 'ثج', 64530 => 'ثم', 64531 => 'ثى', 64532 => 'ثي', 64533 => 'جح', 64534 => 'جم', 64535 => 'حج', 64536 => 'حم', 64537 => 'خج', 64538 => 'خح', 64539 => 'خم', 64540 => 'سج', 64541 => 'سح', 64542 => 'سخ', 64543 => 'سم', 64544 => 'صح', 64545 => 'صم', 64546 => 'ضج', 64547 => 'ضح', 64548 => 'ضخ', 64549 => 'ضم', 64550 => 'طح', 64551 => 'طم', 64552 => 'ظم', 64553 => 'عج', 64554 => 'عم', 64555 => 'غج', 64556 => 'غم', 64557 => 'فج', 64558 => 'فح', 64559 => 'فخ', 64560 => 'فم', 64561 => 'فى', 64562 => 'في', 64563 => 'قح', 64564 => 'قم', 64565 => 'قى', 64566 => 'قي', 64567 => 'كا', 64568 => 'كج', 64569 => 'كح', 64570 => 'كخ', 64571 => 'كل', 64572 => 'كم', 64573 => 'كى', 64574 => 'كي', 64575 => 'لج', 64576 => 'لح', 64577 => 'لخ', 64578 => 'لم', 64579 => 'لى', 64580 => 'لي', 64581 => 'مج', 64582 => 'مح', 64583 => 'مخ', 64584 => 'مم', 64585 => 'مى', 64586 => 'مي', 64587 => 'نج', 64588 => 'نح', 64589 => 'نخ', 64590 => 'نم', 64591 => 'نى', 64592 => 'ني', 64593 => 'هج', 64594 => 'هم', 64595 => 'هى', 64596 => 'هي', 64597 => 'يج', 64598 => 'يح', 64599 => 'يخ', 64600 => 'يم', 64601 => 'يى', 64602 => 'يي', 64603 => 'ذٰ', 64604 => 'رٰ', 64605 => 'ىٰ', 64612 => 'ئر', 64613 => 'ئز', 64614 => 'ئم', 64615 => 'ئن', 64616 => 'ئى', 64617 => 'ئي', 64618 => 'بر', 64619 => 'بز', 64620 => 'بم', 64621 => 'بن', 64622 => 'بى', 64623 => 'بي', 64624 => 'تر', 64625 => 'تز', 64626 => 'تم', 64627 => 'تن', 64628 => 'تى', 64629 => 'تي', 64630 => 'ثر', 64631 => 'ثز', 64632 => 'ثم', 64633 => 'ثن', 64634 => 'ثى', 64635 => 'ثي', 64636 => 'فى', 64637 => 'في', 64638 => 'قى', 64639 => 'قي', 64640 => 'كا', 64641 => 'كل', 64642 => 'كم', 64643 => 'كى', 64644 => 'كي', 64645 => 'لم', 64646 => 'لى', 64647 => 'لي', 64648 => 'ما', 64649 => 'مم', 64650 => 'نر', 64651 => 'نز', 64652 => 'نم', 64653 => 'نن', 64654 => 'نى', 64655 => 'ني', 64656 => 'ىٰ', 64657 => 'ير', 64658 => 'يز', 64659 => 'يم', 64660 => 'ين', 64661 => 'يى', 64662 => 'يي', 64663 => 'ئج', 64664 => 'ئح', 64665 => 'ئخ', 64666 => 'ئم', 64667 => 'ئه', 64668 => 'بج', 64669 => 'بح', 64670 => 'بخ', 64671 => 'بم', 64672 => 'به', 64673 => 'تج', 64674 => 'تح', 64675 => 'تخ', 64676 => 'تم', 64677 => 'ته', 64678 => 'ثم', 64679 => 'جح', 64680 => 'جم', 64681 => 'حج', 64682 => 'حم', 64683 => 'خج', 64684 => 'خم', 64685 => 'سج', 64686 => 'سح', 64687 => 'سخ', 64688 => 'سم', 64689 => 'صح', 64690 => 'صخ', 64691 => 'صم', 64692 => 'ضج', 64693 => 'ضح', 64694 => 'ضخ', 64695 => 'ضم', 64696 => 'طح', 64697 => 'ظم', 64698 => 'عج', 64699 => 'عم', 64700 => 'غج', 64701 => 'غم', 64702 => 'فج', 64703 => 'فح', 64704 => 'فخ', 64705 => 'فم', 64706 => 'قح', 64707 => 'قم', 64708 => 'كج', 64709 => 'كح', 64710 => 'كخ', 64711 => 'كل', 64712 => 'كم', 64713 => 'لج', 64714 => 'لح', 64715 => 'لخ', 64716 => 'لم', 64717 => 'له', 64718 => 'مج', 64719 => 'مح', 64720 => 'مخ', 64721 => 'مم', 64722 => 'نج', 64723 => 'نح', 64724 => 'نخ', 64725 => 'نم', 64726 => 'نه', 64727 => 'هج', 64728 => 'هم', 64729 => 'هٰ', 64730 => 'يج', 64731 => 'يح', 64732 => 'يخ', 64733 => 'يم', 64734 => 'يه', 64735 => 'ئم', 64736 => 'ئه', 64737 => 'بم', 64738 => 'به', 64739 => 'تم', 64740 => 'ته', 64741 => 'ثم', 64742 => 'ثه', 64743 => 'سم', 64744 => 'سه', 64745 => 'شم', 64746 => 'شه', 64747 => 'كل', 64748 => 'كم', 64749 => 'لم', 64750 => 'نم', 64751 => 'نه', 64752 => 'يم', 64753 => 'يه', 64754 => 'ـَّ', 64755 => 'ـُّ', 64756 => 'ـِّ', 64757 => 'طى', 64758 => 'طي', 64759 => 'عى', 64760 => 'عي', 64761 => 'غى', 64762 => 'غي', 64763 => 'سى', 64764 => 'سي', 64765 => 'شى', 64766 => 'شي', 64767 => 'حى', 64768 => 'حي', 64769 => 'جى', 64770 => 'جي', 64771 => 'خى', 64772 => 'خي', 64773 => 'صى', 64774 => 'صي', 64775 => 'ضى', 64776 => 'ضي', 64777 => 'شج', 64778 => 'شح', 64779 => 'شخ', 64780 => 'شم', 64781 => 'شر', 64782 => 'سر', 64783 => 'صر', 64784 => 'ضر', 64785 => 'طى', 64786 => 'طي', 64787 => 'عى', 64788 => 'عي', 64789 => 'غى', 64790 => 'غي', 64791 => 'سى', 64792 => 'سي', 64793 => 'شى', 64794 => 'شي', 64795 => 'حى', 64796 => 'حي', 64797 => 'جى', 64798 => 'جي', 64799 => 'خى', 64800 => 'خي', 64801 => 'صى', 64802 => 'صي', 64803 => 'ضى', 64804 => 'ضي', 64805 => 'شج', 64806 => 'شح', 64807 => 'شخ', 64808 => 'شم', 64809 => 'شر', 64810 => 'سر', 64811 => 'صر', 64812 => 'ضر', 64813 => 'شج', 64814 => 'شح', 64815 => 'شخ', 64816 => 'شم', 64817 => 'سه', 64818 => 'شه', 64819 => 'طم', 64820 => 'سج', 64821 => 'سح', 64822 => 'سخ', 64823 => 'شج', 64824 => 'شح', 64825 => 'شخ', 64826 => 'طم', 64827 => 'ظم', 64828 => 'اً', 64829 => 'اً', 64848 => 'تجم', 64849 => 'تحج', 64850 => 'تحج', 64851 => 'تحم', 64852 => 'تخم', 64853 => 'تمج', 64854 => 'تمح', 64855 => 'تمخ', 64856 => 'جمح', 64857 => 'جمح', 64858 => 'حمي', 64859 => 'حمى', 64860 => 'سحج', 64861 => 'سجح', 64862 => 'سجى', 64863 => 'سمح', 64864 => 'سمح', 64865 => 'سمج', 64866 => 'سمم', 64867 => 'سمم', 64868 => 'صحح', 64869 => 'صحح', 64870 => 'صمم', 64871 => 'شحم', 64872 => 'شحم', 64873 => 'شجي', 64874 => 'شمخ', 64875 => 'شمخ', 64876 => 'شمم', 64877 => 'شمم', 64878 => 'ضحى', 64879 => 'ضخم', 64880 => 'ضخم', 64881 => 'طمح', 64882 => 'طمح', 64883 => 'طمم', 64884 => 'طمي', 64885 => 'عجم', 64886 => 'عمم', 64887 => 'عمم', 64888 => 'عمى', 64889 => 'غمم', 64890 => 'غمي', 64891 => 'غمى', 64892 => 'فخم', 64893 => 'فخم', 64894 => 'قمح', 64895 => 'قمم', 64896 => 'لحم', 64897 => 'لحي', 64898 => 'لحى', 64899 => 'لجج', 64900 => 'لجج', 64901 => 'لخم', 64902 => 'لخم', 64903 => 'لمح', 64904 => 'لمح', 64905 => 'محج', 64906 => 'محم', 64907 => 'محي', 64908 => 'مجح', 64909 => 'مجم', 64910 => 'مخج', 64911 => 'مخم', 64914 => 'مجخ', 64915 => 'همج', 64916 => 'همم', 64917 => 'نحم', 64918 => 'نحى', 64919 => 'نجم', 64920 => 'نجم', 64921 => 'نجى', 64922 => 'نمي', 64923 => 'نمى', 64924 => 'يمم', 64925 => 'يمم', 64926 => 'بخي', 64927 => 'تجي', 64928 => 'تجى', 64929 => 'تخي', 64930 => 'تخى', 64931 => 'تمي', 64932 => 'تمى', 64933 => 'جمي', 64934 => 'جحى', 64935 => 'جمى', 64936 => 'سخى', 64937 => 'صحي', 64938 => 'شحي', 64939 => 'ضحي', 64940 => 'لجي', 64941 => 'لمي', 64942 => 'يحي', 64943 => 'يجي', 64944 => 'يمي', 64945 => 'ممي', 64946 => 'قمي', 64947 => 'نحي', 64948 => 'قمح', 64949 => 'لحم', 64950 => 'عمي', 64951 => 'كمي', 64952 => 'نجح', 64953 => 'مخي', 64954 => 'لجم', 64955 => 'كمم', 64956 => 'لجم', 64957 => 'نجح', 64958 => 'جحي', 64959 => 'حجي', 64960 => 'مجي', 64961 => 'فمي', 64962 => 'بحي', 64963 => 'كمم', 64964 => 'عجم', 64965 => 'صمم', 64966 => 'سخي', 64967 => 'نجي', 65008 => 'صلے', 65009 => 'قلے', 65010 => 'الله', 65011 => 'اكبر', 65012 => 'محمد', 65013 => 'صلعم', 65014 => 'رسول', 65015 => 'عليه', 65016 => 'وسلم', 65017 => 'صلى', 65020 => 'ریال', 65041 => '、', 65047 => '〖', 65048 => '〗', 65073 => '—', 65074 => '–', 65081 => '〔', 65082 => '〕', 65083 => '【', 65084 => '】', 65085 => '《', 65086 => '》', 65087 => '〈', 65088 => '〉', 65089 => '「', 65090 => '」', 65091 => '『', 65092 => '』', 65105 => '、', 65112 => '—', 65117 => '〔', 65118 => '〕', 65123 => '-', 65137 => 'ـً', 65143 => 'ـَ', 65145 => 'ـُ', 65147 => 'ـِ', 65149 => 'ـّ', 65151 => 'ـْ', 65152 => 'ء', 65153 => 'آ', 65154 => 'آ', 65155 => 'أ', 65156 => 'أ', 65157 => 'ؤ', 65158 => 'ؤ', 65159 => 'إ', 65160 => 'إ', 65161 => 'ئ', 65162 => 'ئ', 65163 => 'ئ', 65164 => 'ئ', 65165 => 'ا', 65166 => 'ا', 65167 => 'ب', 65168 => 'ب', 65169 => 'ب', 65170 => 'ب', 65171 => 'ة', 65172 => 'ة', 65173 => 'ت', 65174 => 'ت', 65175 => 'ت', 65176 => 'ت', 65177 => 'ث', 65178 => 'ث', 65179 => 'ث', 65180 => 'ث', 65181 => 'ج', 65182 => 'ج', 65183 => 'ج', 65184 => 'ج', 65185 => 'ح', 65186 => 'ح', 65187 => 'ح', 65188 => 'ح', 65189 => 'خ', 65190 => 'خ', 65191 => 'خ', 65192 => 'خ', 65193 => 'د', 65194 => 'د', 65195 => 'ذ', 65196 => 'ذ', 65197 => 'ر', 65198 => 'ر', 65199 => 'ز', 65200 => 'ز', 65201 => 'س', 65202 => 'س', 65203 => 'س', 65204 => 'س', 65205 => 'ش', 65206 => 'ش', 65207 => 'ش', 65208 => 'ش', 65209 => 'ص', 65210 => 'ص', 65211 => 'ص', 65212 => 'ص', 65213 => 'ض', 65214 => 'ض', 65215 => 'ض', 65216 => 'ض', 65217 => 'ط', 65218 => 'ط', 65219 => 'ط', 65220 => 'ط', 65221 => 'ظ', 65222 => 'ظ', 65223 => 'ظ', 65224 => 'ظ', 65225 => 'ع', 65226 => 'ع', 65227 => 'ع', 65228 => 'ع', 65229 => 'غ', 65230 => 'غ', 65231 => 'غ', 65232 => 'غ', 65233 => 'ف', 65234 => 'ف', 65235 => 'ف', 65236 => 'ف', 65237 => 'ق', 65238 => 'ق', 65239 => 'ق', 65240 => 'ق', 65241 => 'ك', 65242 => 'ك', 65243 => 'ك', 65244 => 'ك', 65245 => 'ل', 65246 => 'ل', 65247 => 'ل', 65248 => 'ل', 65249 => 'م', 65250 => 'م', 65251 => 'م', 65252 => 'م', 65253 => 'ن', 65254 => 'ن', 65255 => 'ن', 65256 => 'ن', 65257 => 'ه', 65258 => 'ه', 65259 => 'ه', 65260 => 'ه', 65261 => 'و', 65262 => 'و', 65263 => 'ى', 65264 => 'ى', 65265 => 'ي', 65266 => 'ي', 65267 => 'ي', 65268 => 'ي', 65269 => 'لآ', 65270 => 'لآ', 65271 => 'لأ', 65272 => 'لأ', 65273 => 'لإ', 65274 => 'لإ', 65275 => 'لا', 65276 => 'لا', 65293 => '-', 65294 => '.', 65296 => '0', 65297 => '1', 65298 => '2', 65299 => '3', 65300 => '4', 65301 => '5', 65302 => '6', 65303 => '7', 65304 => '8', 65305 => '9', 65313 => 'a', 65314 => 'b', 65315 => 'c', 65316 => 'd', 65317 => 'e', 65318 => 'f', 65319 => 'g', 65320 => 'h', 65321 => 'i', 65322 => 'j', 65323 => 'k', 65324 => 'l', 65325 => 'm', 65326 => 'n', 65327 => 'o', 65328 => 'p', 65329 => 'q', 65330 => 'r', 65331 => 's', 65332 => 't', 65333 => 'u', 65334 => 'v', 65335 => 'w', 65336 => 'x', 65337 => 'y', 65338 => 'z', 65345 => 'a', 65346 => 'b', 65347 => 'c', 65348 => 'd', 65349 => 'e', 65350 => 'f', 65351 => 'g', 65352 => 'h', 65353 => 'i', 65354 => 'j', 65355 => 'k', 65356 => 'l', 65357 => 'm', 65358 => 'n', 65359 => 'o', 65360 => 'p', 65361 => 'q', 65362 => 'r', 65363 => 's', 65364 => 't', 65365 => 'u', 65366 => 'v', 65367 => 'w', 65368 => 'x', 65369 => 'y', 65370 => 'z', 65375 => '⦅', 65376 => '⦆', 65377 => '.', 65378 => '「', 65379 => '」', 65380 => '、', 65381 => '・', 65382 => 'ヲ', 65383 => 'ァ', 65384 => 'ィ', 65385 => 'ゥ', 65386 => 'ェ', 65387 => 'ォ', 65388 => 'ャ', 65389 => 'ュ', 65390 => 'ョ', 65391 => 'ッ', 65392 => 'ー', 65393 => 'ア', 65394 => 'イ', 65395 => 'ウ', 65396 => 'エ', 65397 => 'オ', 65398 => 'カ', 65399 => 'キ', 65400 => 'ク', 65401 => 'ケ', 65402 => 'コ', 65403 => 'サ', 65404 => 'シ', 65405 => 'ス', 65406 => 'セ', 65407 => 'ソ', 65408 => 'タ', 65409 => 'チ', 65410 => 'ツ', 65411 => 'テ', 65412 => 'ト', 65413 => 'ナ', 65414 => 'ニ', 65415 => 'ヌ', 65416 => 'ネ', 65417 => 'ノ', 65418 => 'ハ', 65419 => 'ヒ', 65420 => 'フ', 65421 => 'ヘ', 65422 => 'ホ', 65423 => 'マ', 65424 => 'ミ', 65425 => 'ム', 65426 => 'メ', 65427 => 'モ', 65428 => 'ヤ', 65429 => 'ユ', 65430 => 'ヨ', 65431 => 'ラ', 65432 => 'リ', 65433 => 'ル', 65434 => 'レ', 65435 => 'ロ', 65436 => 'ワ', 65437 => 'ン', 65438 => '゙', 65439 => '゚', 65441 => 'ᄀ', 65442 => 'ᄁ', 65443 => 'ᆪ', 65444 => 'ᄂ', 65445 => 'ᆬ', 65446 => 'ᆭ', 65447 => 'ᄃ', 65448 => 'ᄄ', 65449 => 'ᄅ', 65450 => 'ᆰ', 65451 => 'ᆱ', 65452 => 'ᆲ', 65453 => 'ᆳ', 65454 => 'ᆴ', 65455 => 'ᆵ', 65456 => 'ᄚ', 65457 => 'ᄆ', 65458 => 'ᄇ', 65459 => 'ᄈ', 65460 => 'ᄡ', 65461 => 'ᄉ', 65462 => 'ᄊ', 65463 => 'ᄋ', 65464 => 'ᄌ', 65465 => 'ᄍ', 65466 => 'ᄎ', 65467 => 'ᄏ', 65468 => 'ᄐ', 65469 => 'ᄑ', 65470 => 'ᄒ', 65474 => 'ᅡ', 65475 => 'ᅢ', 65476 => 'ᅣ', 65477 => 'ᅤ', 65478 => 'ᅥ', 65479 => 'ᅦ', 65482 => 'ᅧ', 65483 => 'ᅨ', 65484 => 'ᅩ', 65485 => 'ᅪ', 65486 => 'ᅫ', 65487 => 'ᅬ', 65490 => 'ᅭ', 65491 => 'ᅮ', 65492 => 'ᅯ', 65493 => 'ᅰ', 65494 => 'ᅱ', 65495 => 'ᅲ', 65498 => 'ᅳ', 65499 => 'ᅴ', 65500 => 'ᅵ', 65504 => '¢', 65505 => '£', 65506 => '¬', 65508 => '¦', 65509 => '¥', 65510 => '₩', 65512 => '│', 65513 => '←', 65514 => '↑', 65515 => '→', 65516 => '↓', 65517 => '■', 65518 => '○', 66560 => '𐐨', 66561 => '𐐩', 66562 => '𐐪', 66563 => '𐐫', 66564 => '𐐬', 66565 => '𐐭', 66566 => '𐐮', 66567 => '𐐯', 66568 => '𐐰', 66569 => '𐐱', 66570 => '𐐲', 66571 => '𐐳', 66572 => '𐐴', 66573 => '𐐵', 66574 => '𐐶', 66575 => '𐐷', 66576 => '𐐸', 66577 => '𐐹', 66578 => '𐐺', 66579 => '𐐻', 66580 => '𐐼', 66581 => '𐐽', 66582 => '𐐾', 66583 => '𐐿', 66584 => '𐑀', 66585 => '𐑁', 66586 => '𐑂', 66587 => '𐑃', 66588 => '𐑄', 66589 => '𐑅', 66590 => '𐑆', 66591 => '𐑇', 66592 => '𐑈', 66593 => '𐑉', 66594 => '𐑊', 66595 => '𐑋', 66596 => '𐑌', 66597 => '𐑍', 66598 => '𐑎', 66599 => '𐑏', 66736 => '𐓘', 66737 => '𐓙', 66738 => '𐓚', 66739 => '𐓛', 66740 => '𐓜', 66741 => '𐓝', 66742 => '𐓞', 66743 => '𐓟', 66744 => '𐓠', 66745 => '𐓡', 66746 => '𐓢', 66747 => '𐓣', 66748 => '𐓤', 66749 => '𐓥', 66750 => '𐓦', 66751 => '𐓧', 66752 => '𐓨', 66753 => '𐓩', 66754 => '𐓪', 66755 => '𐓫', 66756 => '𐓬', 66757 => '𐓭', 66758 => '𐓮', 66759 => '𐓯', 66760 => '𐓰', 66761 => '𐓱', 66762 => '𐓲', 66763 => '𐓳', 66764 => '𐓴', 66765 => '𐓵', 66766 => '𐓶', 66767 => '𐓷', 66768 => '𐓸', 66769 => '𐓹', 66770 => '𐓺', 66771 => '𐓻', 68736 => '𐳀', 68737 => '𐳁', 68738 => '𐳂', 68739 => '𐳃', 68740 => '𐳄', 68741 => '𐳅', 68742 => '𐳆', 68743 => '𐳇', 68744 => '𐳈', 68745 => '𐳉', 68746 => '𐳊', 68747 => '𐳋', 68748 => '𐳌', 68749 => '𐳍', 68750 => '𐳎', 68751 => '𐳏', 68752 => '𐳐', 68753 => '𐳑', 68754 => '𐳒', 68755 => '𐳓', 68756 => '𐳔', 68757 => '𐳕', 68758 => '𐳖', 68759 => '𐳗', 68760 => '𐳘', 68761 => '𐳙', 68762 => '𐳚', 68763 => '𐳛', 68764 => '𐳜', 68765 => '𐳝', 68766 => '𐳞', 68767 => '𐳟', 68768 => '𐳠', 68769 => '𐳡', 68770 => '𐳢', 68771 => '𐳣', 68772 => '𐳤', 68773 => '𐳥', 68774 => '𐳦', 68775 => '𐳧', 68776 => '𐳨', 68777 => '𐳩', 68778 => '𐳪', 68779 => '𐳫', 68780 => '𐳬', 68781 => '𐳭', 68782 => '𐳮', 68783 => '𐳯', 68784 => '𐳰', 68785 => '𐳱', 68786 => '𐳲', 71840 => '𑣀', 71841 => '𑣁', 71842 => '𑣂', 71843 => '𑣃', 71844 => '𑣄', 71845 => '𑣅', 71846 => '𑣆', 71847 => '𑣇', 71848 => '𑣈', 71849 => '𑣉', 71850 => '𑣊', 71851 => '𑣋', 71852 => '𑣌', 71853 => '𑣍', 71854 => '𑣎', 71855 => '𑣏', 71856 => '𑣐', 71857 => '𑣑', 71858 => '𑣒', 71859 => '𑣓', 71860 => '𑣔', 71861 => '𑣕', 71862 => '𑣖', 71863 => '𑣗', 71864 => '𑣘', 71865 => '𑣙', 71866 => '𑣚', 71867 => '𑣛', 71868 => '𑣜', 71869 => '𑣝', 71870 => '𑣞', 71871 => '𑣟', 93760 => '𖹠', 93761 => '𖹡', 93762 => '𖹢', 93763 => '𖹣', 93764 => '𖹤', 93765 => '𖹥', 93766 => '𖹦', 93767 => '𖹧', 93768 => '𖹨', 93769 => '𖹩', 93770 => '𖹪', 93771 => '𖹫', 93772 => '𖹬', 93773 => '𖹭', 93774 => '𖹮', 93775 => '𖹯', 93776 => '𖹰', 93777 => '𖹱', 93778 => '𖹲', 93779 => '𖹳', 93780 => '𖹴', 93781 => '𖹵', 93782 => '𖹶', 93783 => '𖹷', 93784 => '𖹸', 93785 => '𖹹', 93786 => '𖹺', 93787 => '𖹻', 93788 => '𖹼', 93789 => '𖹽', 93790 => '𖹾', 93791 => '𖹿', 119134 => '𝅗𝅥', 119135 => '𝅘𝅥', 119136 => '𝅘𝅥𝅮', 119137 => '𝅘𝅥𝅯', 119138 => '𝅘𝅥𝅰', 119139 => '𝅘𝅥𝅱', 119140 => '𝅘𝅥𝅲', 119227 => '𝆹𝅥', 119228 => '𝆺𝅥', 119229 => '𝆹𝅥𝅮', 119230 => '𝆺𝅥𝅮', 119231 => '𝆹𝅥𝅯', 119232 => '𝆺𝅥𝅯', 119808 => 'a', 119809 => 'b', 119810 => 'c', 119811 => 'd', 119812 => 'e', 119813 => 'f', 119814 => 'g', 119815 => 'h', 119816 => 'i', 119817 => 'j', 119818 => 'k', 119819 => 'l', 119820 => 'm', 119821 => 'n', 119822 => 'o', 119823 => 'p', 119824 => 'q', 119825 => 'r', 119826 => 's', 119827 => 't', 119828 => 'u', 119829 => 'v', 119830 => 'w', 119831 => 'x', 119832 => 'y', 119833 => 'z', 119834 => 'a', 119835 => 'b', 119836 => 'c', 119837 => 'd', 119838 => 'e', 119839 => 'f', 119840 => 'g', 119841 => 'h', 119842 => 'i', 119843 => 'j', 119844 => 'k', 119845 => 'l', 119846 => 'm', 119847 => 'n', 119848 => 'o', 119849 => 'p', 119850 => 'q', 119851 => 'r', 119852 => 's', 119853 => 't', 119854 => 'u', 119855 => 'v', 119856 => 'w', 119857 => 'x', 119858 => 'y', 119859 => 'z', 119860 => 'a', 119861 => 'b', 119862 => 'c', 119863 => 'd', 119864 => 'e', 119865 => 'f', 119866 => 'g', 119867 => 'h', 119868 => 'i', 119869 => 'j', 119870 => 'k', 119871 => 'l', 119872 => 'm', 119873 => 'n', 119874 => 'o', 119875 => 'p', 119876 => 'q', 119877 => 'r', 119878 => 's', 119879 => 't', 119880 => 'u', 119881 => 'v', 119882 => 'w', 119883 => 'x', 119884 => 'y', 119885 => 'z', 119886 => 'a', 119887 => 'b', 119888 => 'c', 119889 => 'd', 119890 => 'e', 119891 => 'f', 119892 => 'g', 119894 => 'i', 119895 => 'j', 119896 => 'k', 119897 => 'l', 119898 => 'm', 119899 => 'n', 119900 => 'o', 119901 => 'p', 119902 => 'q', 119903 => 'r', 119904 => 's', 119905 => 't', 119906 => 'u', 119907 => 'v', 119908 => 'w', 119909 => 'x', 119910 => 'y', 119911 => 'z', 119912 => 'a', 119913 => 'b', 119914 => 'c', 119915 => 'd', 119916 => 'e', 119917 => 'f', 119918 => 'g', 119919 => 'h', 119920 => 'i', 119921 => 'j', 119922 => 'k', 119923 => 'l', 119924 => 'm', 119925 => 'n', 119926 => 'o', 119927 => 'p', 119928 => 'q', 119929 => 'r', 119930 => 's', 119931 => 't', 119932 => 'u', 119933 => 'v', 119934 => 'w', 119935 => 'x', 119936 => 'y', 119937 => 'z', 119938 => 'a', 119939 => 'b', 119940 => 'c', 119941 => 'd', 119942 => 'e', 119943 => 'f', 119944 => 'g', 119945 => 'h', 119946 => 'i', 119947 => 'j', 119948 => 'k', 119949 => 'l', 119950 => 'm', 119951 => 'n', 119952 => 'o', 119953 => 'p', 119954 => 'q', 119955 => 'r', 119956 => 's', 119957 => 't', 119958 => 'u', 119959 => 'v', 119960 => 'w', 119961 => 'x', 119962 => 'y', 119963 => 'z', 119964 => 'a', 119966 => 'c', 119967 => 'd', 119970 => 'g', 119973 => 'j', 119974 => 'k', 119977 => 'n', 119978 => 'o', 119979 => 'p', 119980 => 'q', 119982 => 's', 119983 => 't', 119984 => 'u', 119985 => 'v', 119986 => 'w', 119987 => 'x', 119988 => 'y', 119989 => 'z', 119990 => 'a', 119991 => 'b', 119992 => 'c', 119993 => 'd', 119995 => 'f', 119997 => 'h', 119998 => 'i', 119999 => 'j', 120000 => 'k', 120001 => 'l', 120002 => 'm', 120003 => 'n', 120005 => 'p', 120006 => 'q', 120007 => 'r', 120008 => 's', 120009 => 't', 120010 => 'u', 120011 => 'v', 120012 => 'w', 120013 => 'x', 120014 => 'y', 120015 => 'z', 120016 => 'a', 120017 => 'b', 120018 => 'c', 120019 => 'd', 120020 => 'e', 120021 => 'f', 120022 => 'g', 120023 => 'h', 120024 => 'i', 120025 => 'j', 120026 => 'k', 120027 => 'l', 120028 => 'm', 120029 => 'n', 120030 => 'o', 120031 => 'p', 120032 => 'q', 120033 => 'r', 120034 => 's', 120035 => 't', 120036 => 'u', 120037 => 'v', 120038 => 'w', 120039 => 'x', 120040 => 'y', 120041 => 'z', 120042 => 'a', 120043 => 'b', 120044 => 'c', 120045 => 'd', 120046 => 'e', 120047 => 'f', 120048 => 'g', 120049 => 'h', 120050 => 'i', 120051 => 'j', 120052 => 'k', 120053 => 'l', 120054 => 'm', 120055 => 'n', 120056 => 'o', 120057 => 'p', 120058 => 'q', 120059 => 'r', 120060 => 's', 120061 => 't', 120062 => 'u', 120063 => 'v', 120064 => 'w', 120065 => 'x', 120066 => 'y', 120067 => 'z', 120068 => 'a', 120069 => 'b', 120071 => 'd', 120072 => 'e', 120073 => 'f', 120074 => 'g', 120077 => 'j', 120078 => 'k', 120079 => 'l', 120080 => 'm', 120081 => 'n', 120082 => 'o', 120083 => 'p', 120084 => 'q', 120086 => 's', 120087 => 't', 120088 => 'u', 120089 => 'v', 120090 => 'w', 120091 => 'x', 120092 => 'y', 120094 => 'a', 120095 => 'b', 120096 => 'c', 120097 => 'd', 120098 => 'e', 120099 => 'f', 120100 => 'g', 120101 => 'h', 120102 => 'i', 120103 => 'j', 120104 => 'k', 120105 => 'l', 120106 => 'm', 120107 => 'n', 120108 => 'o', 120109 => 'p', 120110 => 'q', 120111 => 'r', 120112 => 's', 120113 => 't', 120114 => 'u', 120115 => 'v', 120116 => 'w', 120117 => 'x', 120118 => 'y', 120119 => 'z', 120120 => 'a', 120121 => 'b', 120123 => 'd', 120124 => 'e', 120125 => 'f', 120126 => 'g', 120128 => 'i', 120129 => 'j', 120130 => 'k', 120131 => 'l', 120132 => 'm', 120134 => 'o', 120138 => 's', 120139 => 't', 120140 => 'u', 120141 => 'v', 120142 => 'w', 120143 => 'x', 120144 => 'y', 120146 => 'a', 120147 => 'b', 120148 => 'c', 120149 => 'd', 120150 => 'e', 120151 => 'f', 120152 => 'g', 120153 => 'h', 120154 => 'i', 120155 => 'j', 120156 => 'k', 120157 => 'l', 120158 => 'm', 120159 => 'n', 120160 => 'o', 120161 => 'p', 120162 => 'q', 120163 => 'r', 120164 => 's', 120165 => 't', 120166 => 'u', 120167 => 'v', 120168 => 'w', 120169 => 'x', 120170 => 'y', 120171 => 'z', 120172 => 'a', 120173 => 'b', 120174 => 'c', 120175 => 'd', 120176 => 'e', 120177 => 'f', 120178 => 'g', 120179 => 'h', 120180 => 'i', 120181 => 'j', 120182 => 'k', 120183 => 'l', 120184 => 'm', 120185 => 'n', 120186 => 'o', 120187 => 'p', 120188 => 'q', 120189 => 'r', 120190 => 's', 120191 => 't', 120192 => 'u', 120193 => 'v', 120194 => 'w', 120195 => 'x', 120196 => 'y', 120197 => 'z', 120198 => 'a', 120199 => 'b', 120200 => 'c', 120201 => 'd', 120202 => 'e', 120203 => 'f', 120204 => 'g', 120205 => 'h', 120206 => 'i', 120207 => 'j', 120208 => 'k', 120209 => 'l', 120210 => 'm', 120211 => 'n', 120212 => 'o', 120213 => 'p', 120214 => 'q', 120215 => 'r', 120216 => 's', 120217 => 't', 120218 => 'u', 120219 => 'v', 120220 => 'w', 120221 => 'x', 120222 => 'y', 120223 => 'z', 120224 => 'a', 120225 => 'b', 120226 => 'c', 120227 => 'd', 120228 => 'e', 120229 => 'f', 120230 => 'g', 120231 => 'h', 120232 => 'i', 120233 => 'j', 120234 => 'k', 120235 => 'l', 120236 => 'm', 120237 => 'n', 120238 => 'o', 120239 => 'p', 120240 => 'q', 120241 => 'r', 120242 => 's', 120243 => 't', 120244 => 'u', 120245 => 'v', 120246 => 'w', 120247 => 'x', 120248 => 'y', 120249 => 'z', 120250 => 'a', 120251 => 'b', 120252 => 'c', 120253 => 'd', 120254 => 'e', 120255 => 'f', 120256 => 'g', 120257 => 'h', 120258 => 'i', 120259 => 'j', 120260 => 'k', 120261 => 'l', 120262 => 'm', 120263 => 'n', 120264 => 'o', 120265 => 'p', 120266 => 'q', 120267 => 'r', 120268 => 's', 120269 => 't', 120270 => 'u', 120271 => 'v', 120272 => 'w', 120273 => 'x', 120274 => 'y', 120275 => 'z', 120276 => 'a', 120277 => 'b', 120278 => 'c', 120279 => 'd', 120280 => 'e', 120281 => 'f', 120282 => 'g', 120283 => 'h', 120284 => 'i', 120285 => 'j', 120286 => 'k', 120287 => 'l', 120288 => 'm', 120289 => 'n', 120290 => 'o', 120291 => 'p', 120292 => 'q', 120293 => 'r', 120294 => 's', 120295 => 't', 120296 => 'u', 120297 => 'v', 120298 => 'w', 120299 => 'x', 120300 => 'y', 120301 => 'z', 120302 => 'a', 120303 => 'b', 120304 => 'c', 120305 => 'd', 120306 => 'e', 120307 => 'f', 120308 => 'g', 120309 => 'h', 120310 => 'i', 120311 => 'j', 120312 => 'k', 120313 => 'l', 120314 => 'm', 120315 => 'n', 120316 => 'o', 120317 => 'p', 120318 => 'q', 120319 => 'r', 120320 => 's', 120321 => 't', 120322 => 'u', 120323 => 'v', 120324 => 'w', 120325 => 'x', 120326 => 'y', 120327 => 'z', 120328 => 'a', 120329 => 'b', 120330 => 'c', 120331 => 'd', 120332 => 'e', 120333 => 'f', 120334 => 'g', 120335 => 'h', 120336 => 'i', 120337 => 'j', 120338 => 'k', 120339 => 'l', 120340 => 'm', 120341 => 'n', 120342 => 'o', 120343 => 'p', 120344 => 'q', 120345 => 'r', 120346 => 's', 120347 => 't', 120348 => 'u', 120349 => 'v', 120350 => 'w', 120351 => 'x', 120352 => 'y', 120353 => 'z', 120354 => 'a', 120355 => 'b', 120356 => 'c', 120357 => 'd', 120358 => 'e', 120359 => 'f', 120360 => 'g', 120361 => 'h', 120362 => 'i', 120363 => 'j', 120364 => 'k', 120365 => 'l', 120366 => 'm', 120367 => 'n', 120368 => 'o', 120369 => 'p', 120370 => 'q', 120371 => 'r', 120372 => 's', 120373 => 't', 120374 => 'u', 120375 => 'v', 120376 => 'w', 120377 => 'x', 120378 => 'y', 120379 => 'z', 120380 => 'a', 120381 => 'b', 120382 => 'c', 120383 => 'd', 120384 => 'e', 120385 => 'f', 120386 => 'g', 120387 => 'h', 120388 => 'i', 120389 => 'j', 120390 => 'k', 120391 => 'l', 120392 => 'm', 120393 => 'n', 120394 => 'o', 120395 => 'p', 120396 => 'q', 120397 => 'r', 120398 => 's', 120399 => 't', 120400 => 'u', 120401 => 'v', 120402 => 'w', 120403 => 'x', 120404 => 'y', 120405 => 'z', 120406 => 'a', 120407 => 'b', 120408 => 'c', 120409 => 'd', 120410 => 'e', 120411 => 'f', 120412 => 'g', 120413 => 'h', 120414 => 'i', 120415 => 'j', 120416 => 'k', 120417 => 'l', 120418 => 'm', 120419 => 'n', 120420 => 'o', 120421 => 'p', 120422 => 'q', 120423 => 'r', 120424 => 's', 120425 => 't', 120426 => 'u', 120427 => 'v', 120428 => 'w', 120429 => 'x', 120430 => 'y', 120431 => 'z', 120432 => 'a', 120433 => 'b', 120434 => 'c', 120435 => 'd', 120436 => 'e', 120437 => 'f', 120438 => 'g', 120439 => 'h', 120440 => 'i', 120441 => 'j', 120442 => 'k', 120443 => 'l', 120444 => 'm', 120445 => 'n', 120446 => 'o', 120447 => 'p', 120448 => 'q', 120449 => 'r', 120450 => 's', 120451 => 't', 120452 => 'u', 120453 => 'v', 120454 => 'w', 120455 => 'x', 120456 => 'y', 120457 => 'z', 120458 => 'a', 120459 => 'b', 120460 => 'c', 120461 => 'd', 120462 => 'e', 120463 => 'f', 120464 => 'g', 120465 => 'h', 120466 => 'i', 120467 => 'j', 120468 => 'k', 120469 => 'l', 120470 => 'm', 120471 => 'n', 120472 => 'o', 120473 => 'p', 120474 => 'q', 120475 => 'r', 120476 => 's', 120477 => 't', 120478 => 'u', 120479 => 'v', 120480 => 'w', 120481 => 'x', 120482 => 'y', 120483 => 'z', 120484 => 'ı', 120485 => 'ȷ', 120488 => 'α', 120489 => 'β', 120490 => 'γ', 120491 => 'δ', 120492 => 'ε', 120493 => 'ζ', 120494 => 'η', 120495 => 'θ', 120496 => 'ι', 120497 => 'κ', 120498 => 'λ', 120499 => 'μ', 120500 => 'ν', 120501 => 'ξ', 120502 => 'ο', 120503 => 'π', 120504 => 'ρ', 120505 => 'θ', 120506 => 'σ', 120507 => 'τ', 120508 => 'υ', 120509 => 'φ', 120510 => 'χ', 120511 => 'ψ', 120512 => 'ω', 120513 => '∇', 120514 => 'α', 120515 => 'β', 120516 => 'γ', 120517 => 'δ', 120518 => 'ε', 120519 => 'ζ', 120520 => 'η', 120521 => 'θ', 120522 => 'ι', 120523 => 'κ', 120524 => 'λ', 120525 => 'μ', 120526 => 'ν', 120527 => 'ξ', 120528 => 'ο', 120529 => 'π', 120530 => 'ρ', 120531 => 'σ', 120532 => 'σ', 120533 => 'τ', 120534 => 'υ', 120535 => 'φ', 120536 => 'χ', 120537 => 'ψ', 120538 => 'ω', 120539 => '∂', 120540 => 'ε', 120541 => 'θ', 120542 => 'κ', 120543 => 'φ', 120544 => 'ρ', 120545 => 'π', 120546 => 'α', 120547 => 'β', 120548 => 'γ', 120549 => 'δ', 120550 => 'ε', 120551 => 'ζ', 120552 => 'η', 120553 => 'θ', 120554 => 'ι', 120555 => 'κ', 120556 => 'λ', 120557 => 'μ', 120558 => 'ν', 120559 => 'ξ', 120560 => 'ο', 120561 => 'π', 120562 => 'ρ', 120563 => 'θ', 120564 => 'σ', 120565 => 'τ', 120566 => 'υ', 120567 => 'φ', 120568 => 'χ', 120569 => 'ψ', 120570 => 'ω', 120571 => '∇', 120572 => 'α', 120573 => 'β', 120574 => 'γ', 120575 => 'δ', 120576 => 'ε', 120577 => 'ζ', 120578 => 'η', 120579 => 'θ', 120580 => 'ι', 120581 => 'κ', 120582 => 'λ', 120583 => 'μ', 120584 => 'ν', 120585 => 'ξ', 120586 => 'ο', 120587 => 'π', 120588 => 'ρ', 120589 => 'σ', 120590 => 'σ', 120591 => 'τ', 120592 => 'υ', 120593 => 'φ', 120594 => 'χ', 120595 => 'ψ', 120596 => 'ω', 120597 => '∂', 120598 => 'ε', 120599 => 'θ', 120600 => 'κ', 120601 => 'φ', 120602 => 'ρ', 120603 => 'π', 120604 => 'α', 120605 => 'β', 120606 => 'γ', 120607 => 'δ', 120608 => 'ε', 120609 => 'ζ', 120610 => 'η', 120611 => 'θ', 120612 => 'ι', 120613 => 'κ', 120614 => 'λ', 120615 => 'μ', 120616 => 'ν', 120617 => 'ξ', 120618 => 'ο', 120619 => 'π', 120620 => 'ρ', 120621 => 'θ', 120622 => 'σ', 120623 => 'τ', 120624 => 'υ', 120625 => 'φ', 120626 => 'χ', 120627 => 'ψ', 120628 => 'ω', 120629 => '∇', 120630 => 'α', 120631 => 'β', 120632 => 'γ', 120633 => 'δ', 120634 => 'ε', 120635 => 'ζ', 120636 => 'η', 120637 => 'θ', 120638 => 'ι', 120639 => 'κ', 120640 => 'λ', 120641 => 'μ', 120642 => 'ν', 120643 => 'ξ', 120644 => 'ο', 120645 => 'π', 120646 => 'ρ', 120647 => 'σ', 120648 => 'σ', 120649 => 'τ', 120650 => 'υ', 120651 => 'φ', 120652 => 'χ', 120653 => 'ψ', 120654 => 'ω', 120655 => '∂', 120656 => 'ε', 120657 => 'θ', 120658 => 'κ', 120659 => 'φ', 120660 => 'ρ', 120661 => 'π', 120662 => 'α', 120663 => 'β', 120664 => 'γ', 120665 => 'δ', 120666 => 'ε', 120667 => 'ζ', 120668 => 'η', 120669 => 'θ', 120670 => 'ι', 120671 => 'κ', 120672 => 'λ', 120673 => 'μ', 120674 => 'ν', 120675 => 'ξ', 120676 => 'ο', 120677 => 'π', 120678 => 'ρ', 120679 => 'θ', 120680 => 'σ', 120681 => 'τ', 120682 => 'υ', 120683 => 'φ', 120684 => 'χ', 120685 => 'ψ', 120686 => 'ω', 120687 => '∇', 120688 => 'α', 120689 => 'β', 120690 => 'γ', 120691 => 'δ', 120692 => 'ε', 120693 => 'ζ', 120694 => 'η', 120695 => 'θ', 120696 => 'ι', 120697 => 'κ', 120698 => 'λ', 120699 => 'μ', 120700 => 'ν', 120701 => 'ξ', 120702 => 'ο', 120703 => 'π', 120704 => 'ρ', 120705 => 'σ', 120706 => 'σ', 120707 => 'τ', 120708 => 'υ', 120709 => 'φ', 120710 => 'χ', 120711 => 'ψ', 120712 => 'ω', 120713 => '∂', 120714 => 'ε', 120715 => 'θ', 120716 => 'κ', 120717 => 'φ', 120718 => 'ρ', 120719 => 'π', 120720 => 'α', 120721 => 'β', 120722 => 'γ', 120723 => 'δ', 120724 => 'ε', 120725 => 'ζ', 120726 => 'η', 120727 => 'θ', 120728 => 'ι', 120729 => 'κ', 120730 => 'λ', 120731 => 'μ', 120732 => 'ν', 120733 => 'ξ', 120734 => 'ο', 120735 => 'π', 120736 => 'ρ', 120737 => 'θ', 120738 => 'σ', 120739 => 'τ', 120740 => 'υ', 120741 => 'φ', 120742 => 'χ', 120743 => 'ψ', 120744 => 'ω', 120745 => '∇', 120746 => 'α', 120747 => 'β', 120748 => 'γ', 120749 => 'δ', 120750 => 'ε', 120751 => 'ζ', 120752 => 'η', 120753 => 'θ', 120754 => 'ι', 120755 => 'κ', 120756 => 'λ', 120757 => 'μ', 120758 => 'ν', 120759 => 'ξ', 120760 => 'ο', 120761 => 'π', 120762 => 'ρ', 120763 => 'σ', 120764 => 'σ', 120765 => 'τ', 120766 => 'υ', 120767 => 'φ', 120768 => 'χ', 120769 => 'ψ', 120770 => 'ω', 120771 => '∂', 120772 => 'ε', 120773 => 'θ', 120774 => 'κ', 120775 => 'φ', 120776 => 'ρ', 120777 => 'π', 120778 => 'ϝ', 120779 => 'ϝ', 120782 => '0', 120783 => '1', 120784 => '2', 120785 => '3', 120786 => '4', 120787 => '5', 120788 => '6', 120789 => '7', 120790 => '8', 120791 => '9', 120792 => '0', 120793 => '1', 120794 => '2', 120795 => '3', 120796 => '4', 120797 => '5', 120798 => '6', 120799 => '7', 120800 => '8', 120801 => '9', 120802 => '0', 120803 => '1', 120804 => '2', 120805 => '3', 120806 => '4', 120807 => '5', 120808 => '6', 120809 => '7', 120810 => '8', 120811 => '9', 120812 => '0', 120813 => '1', 120814 => '2', 120815 => '3', 120816 => '4', 120817 => '5', 120818 => '6', 120819 => '7', 120820 => '8', 120821 => '9', 120822 => '0', 120823 => '1', 120824 => '2', 120825 => '3', 120826 => '4', 120827 => '5', 120828 => '6', 120829 => '7', 120830 => '8', 120831 => '9', 125184 => '𞤢', 125185 => '𞤣', 125186 => '𞤤', 125187 => '𞤥', 125188 => '𞤦', 125189 => '𞤧', 125190 => '𞤨', 125191 => '𞤩', 125192 => '𞤪', 125193 => '𞤫', 125194 => '𞤬', 125195 => '𞤭', 125196 => '𞤮', 125197 => '𞤯', 125198 => '𞤰', 125199 => '𞤱', 125200 => '𞤲', 125201 => '𞤳', 125202 => '𞤴', 125203 => '𞤵', 125204 => '𞤶', 125205 => '𞤷', 125206 => '𞤸', 125207 => '𞤹', 125208 => '𞤺', 125209 => '𞤻', 125210 => '𞤼', 125211 => '𞤽', 125212 => '𞤾', 125213 => '𞤿', 125214 => '𞥀', 125215 => '𞥁', 125216 => '𞥂', 125217 => '𞥃', 126464 => 'ا', 126465 => 'ب', 126466 => 'ج', 126467 => 'د', 126469 => 'و', 126470 => 'ز', 126471 => 'ح', 126472 => 'ط', 126473 => 'ي', 126474 => 'ك', 126475 => 'ل', 126476 => 'م', 126477 => 'ن', 126478 => 'س', 126479 => 'ع', 126480 => 'ف', 126481 => 'ص', 126482 => 'ق', 126483 => 'ر', 126484 => 'ش', 126485 => 'ت', 126486 => 'ث', 126487 => 'خ', 126488 => 'ذ', 126489 => 'ض', 126490 => 'ظ', 126491 => 'غ', 126492 => 'ٮ', 126493 => 'ں', 126494 => 'ڡ', 126495 => 'ٯ', 126497 => 'ب', 126498 => 'ج', 126500 => 'ه', 126503 => 'ح', 126505 => 'ي', 126506 => 'ك', 126507 => 'ل', 126508 => 'م', 126509 => 'ن', 126510 => 'س', 126511 => 'ع', 126512 => 'ف', 126513 => 'ص', 126514 => 'ق', 126516 => 'ش', 126517 => 'ت', 126518 => 'ث', 126519 => 'خ', 126521 => 'ض', 126523 => 'غ', 126530 => 'ج', 126535 => 'ح', 126537 => 'ي', 126539 => 'ل', 126541 => 'ن', 126542 => 'س', 126543 => 'ع', 126545 => 'ص', 126546 => 'ق', 126548 => 'ش', 126551 => 'خ', 126553 => 'ض', 126555 => 'غ', 126557 => 'ں', 126559 => 'ٯ', 126561 => 'ب', 126562 => 'ج', 126564 => 'ه', 126567 => 'ح', 126568 => 'ط', 126569 => 'ي', 126570 => 'ك', 126572 => 'م', 126573 => 'ن', 126574 => 'س', 126575 => 'ع', 126576 => 'ف', 126577 => 'ص', 126578 => 'ق', 126580 => 'ش', 126581 => 'ت', 126582 => 'ث', 126583 => 'خ', 126585 => 'ض', 126586 => 'ظ', 126587 => 'غ', 126588 => 'ٮ', 126590 => 'ڡ', 126592 => 'ا', 126593 => 'ب', 126594 => 'ج', 126595 => 'د', 126596 => 'ه', 126597 => 'و', 126598 => 'ز', 126599 => 'ح', 126600 => 'ط', 126601 => 'ي', 126603 => 'ل', 126604 => 'م', 126605 => 'ن', 126606 => 'س', 126607 => 'ع', 126608 => 'ف', 126609 => 'ص', 126610 => 'ق', 126611 => 'ر', 126612 => 'ش', 126613 => 'ت', 126614 => 'ث', 126615 => 'خ', 126616 => 'ذ', 126617 => 'ض', 126618 => 'ظ', 126619 => 'غ', 126625 => 'ب', 126626 => 'ج', 126627 => 'د', 126629 => 'و', 126630 => 'ز', 126631 => 'ح', 126632 => 'ط', 126633 => 'ي', 126635 => 'ل', 126636 => 'م', 126637 => 'ن', 126638 => 'س', 126639 => 'ع', 126640 => 'ف', 126641 => 'ص', 126642 => 'ق', 126643 => 'ر', 126644 => 'ش', 126645 => 'ت', 126646 => 'ث', 126647 => 'خ', 126648 => 'ذ', 126649 => 'ض', 126650 => 'ظ', 126651 => 'غ', 127274 => '〔s〕', 127275 => 'c', 127276 => 'r', 127277 => 'cd', 127278 => 'wz', 127280 => 'a', 127281 => 'b', 127282 => 'c', 127283 => 'd', 127284 => 'e', 127285 => 'f', 127286 => 'g', 127287 => 'h', 127288 => 'i', 127289 => 'j', 127290 => 'k', 127291 => 'l', 127292 => 'm', 127293 => 'n', 127294 => 'o', 127295 => 'p', 127296 => 'q', 127297 => 'r', 127298 => 's', 127299 => 't', 127300 => 'u', 127301 => 'v', 127302 => 'w', 127303 => 'x', 127304 => 'y', 127305 => 'z', 127306 => 'hv', 127307 => 'mv', 127308 => 'sd', 127309 => 'ss', 127310 => 'ppv', 127311 => 'wc', 127338 => 'mc', 127339 => 'md', 127340 => 'mr', 127376 => 'dj', 127488 => 'ほか', 127489 => 'ココ', 127490 => 'サ', 127504 => '手', 127505 => '字', 127506 => '双', 127507 => 'デ', 127508 => '二', 127509 => '多', 127510 => '解', 127511 => '天', 127512 => '交', 127513 => '映', 127514 => '無', 127515 => '料', 127516 => '前', 127517 => '後', 127518 => '再', 127519 => '新', 127520 => '初', 127521 => '終', 127522 => '生', 127523 => '販', 127524 => '声', 127525 => '吹', 127526 => '演', 127527 => '投', 127528 => '捕', 127529 => '一', 127530 => '三', 127531 => '遊', 127532 => '左', 127533 => '中', 127534 => '右', 127535 => '指', 127536 => '走', 127537 => '打', 127538 => '禁', 127539 => '空', 127540 => '合', 127541 => '満', 127542 => '有', 127543 => '月', 127544 => '申', 127545 => '割', 127546 => '営', 127547 => '配', 127552 => '〔本〕', 127553 => '〔三〕', 127554 => '〔二〕', 127555 => '〔安〕', 127556 => '〔点〕', 127557 => '〔打〕', 127558 => '〔盗〕', 127559 => '〔勝〕', 127560 => '〔敗〕', 127568 => '得', 127569 => '可', 130032 => '0', 130033 => '1', 130034 => '2', 130035 => '3', 130036 => '4', 130037 => '5', 130038 => '6', 130039 => '7', 130040 => '8', 130041 => '9', 194560 => '丽', 194561 => '丸', 194562 => '乁', 194563 => '𠄢', 194564 => '你', 194565 => '侮', 194566 => '侻', 194567 => '倂', 194568 => '偺', 194569 => '備', 194570 => '僧', 194571 => '像', 194572 => '㒞', 194573 => '𠘺', 194574 => '免', 194575 => '兔', 194576 => '兤', 194577 => '具', 194578 => '𠔜', 194579 => '㒹', 194580 => '內', 194581 => '再', 194582 => '𠕋', 194583 => '冗', 194584 => '冤', 194585 => '仌', 194586 => '冬', 194587 => '况', 194588 => '𩇟', 194589 => '凵', 194590 => '刃', 194591 => '㓟', 194592 => '刻', 194593 => '剆', 194594 => '割', 194595 => '剷', 194596 => '㔕', 194597 => '勇', 194598 => '勉', 194599 => '勤', 194600 => '勺', 194601 => '包', 194602 => '匆', 194603 => '北', 194604 => '卉', 194605 => '卑', 194606 => '博', 194607 => '即', 194608 => '卽', 194609 => '卿', 194610 => '卿', 194611 => '卿', 194612 => '𠨬', 194613 => '灰', 194614 => '及', 194615 => '叟', 194616 => '𠭣', 194617 => '叫', 194618 => '叱', 194619 => '吆', 194620 => '咞', 194621 => '吸', 194622 => '呈', 194623 => '周', 194624 => '咢', 194625 => '哶', 194626 => '唐', 194627 => '啓', 194628 => '啣', 194629 => '善', 194630 => '善', 194631 => '喙', 194632 => '喫', 194633 => '喳', 194634 => '嗂', 194635 => '圖', 194636 => '嘆', 194637 => '圗', 194638 => '噑', 194639 => '噴', 194640 => '切', 194641 => '壮', 194642 => '城', 194643 => '埴', 194644 => '堍', 194645 => '型', 194646 => '堲', 194647 => '報', 194648 => '墬', 194649 => '𡓤', 194650 => '売', 194651 => '壷', 194652 => '夆', 194653 => '多', 194654 => '夢', 194655 => '奢', 194656 => '𡚨', 194657 => '𡛪', 194658 => '姬', 194659 => '娛', 194660 => '娧', 194661 => '姘', 194662 => '婦', 194663 => '㛮', 194665 => '嬈', 194666 => '嬾', 194667 => '嬾', 194668 => '𡧈', 194669 => '寃', 194670 => '寘', 194671 => '寧', 194672 => '寳', 194673 => '𡬘', 194674 => '寿', 194675 => '将', 194677 => '尢', 194678 => '㞁', 194679 => '屠', 194680 => '屮', 194681 => '峀', 194682 => '岍', 194683 => '𡷤', 194684 => '嵃', 194685 => '𡷦', 194686 => '嵮', 194687 => '嵫', 194688 => '嵼', 194689 => '巡', 194690 => '巢', 194691 => '㠯', 194692 => '巽', 194693 => '帨', 194694 => '帽', 194695 => '幩', 194696 => '㡢', 194697 => '𢆃', 194698 => '㡼', 194699 => '庰', 194700 => '庳', 194701 => '庶', 194702 => '廊', 194703 => '𪎒', 194704 => '廾', 194705 => '𢌱', 194706 => '𢌱', 194707 => '舁', 194708 => '弢', 194709 => '弢', 194710 => '㣇', 194711 => '𣊸', 194712 => '𦇚', 194713 => '形', 194714 => '彫', 194715 => '㣣', 194716 => '徚', 194717 => '忍', 194718 => '志', 194719 => '忹', 194720 => '悁', 194721 => '㤺', 194722 => '㤜', 194723 => '悔', 194724 => '𢛔', 194725 => '惇', 194726 => '慈', 194727 => '慌', 194728 => '慎', 194729 => '慌', 194730 => '慺', 194731 => '憎', 194732 => '憲', 194733 => '憤', 194734 => '憯', 194735 => '懞', 194736 => '懲', 194737 => '懶', 194738 => '成', 194739 => '戛', 194740 => '扝', 194741 => '抱', 194742 => '拔', 194743 => '捐', 194744 => '𢬌', 194745 => '挽', 194746 => '拼', 194747 => '捨', 194748 => '掃', 194749 => '揤', 194750 => '𢯱', 194751 => '搢', 194752 => '揅', 194753 => '掩', 194754 => '㨮', 194755 => '摩', 194756 => '摾', 194757 => '撝', 194758 => '摷', 194759 => '㩬', 194760 => '敏', 194761 => '敬', 194762 => '𣀊', 194763 => '旣', 194764 => '書', 194765 => '晉', 194766 => '㬙', 194767 => '暑', 194768 => '㬈', 194769 => '㫤', 194770 => '冒', 194771 => '冕', 194772 => '最', 194773 => '暜', 194774 => '肭', 194775 => '䏙', 194776 => '朗', 194777 => '望', 194778 => '朡', 194779 => '杞', 194780 => '杓', 194781 => '𣏃', 194782 => '㭉', 194783 => '柺', 194784 => '枅', 194785 => '桒', 194786 => '梅', 194787 => '𣑭', 194788 => '梎', 194789 => '栟', 194790 => '椔', 194791 => '㮝', 194792 => '楂', 194793 => '榣', 194794 => '槪', 194795 => '檨', 194796 => '𣚣', 194797 => '櫛', 194798 => '㰘', 194799 => '次', 194800 => '𣢧', 194801 => '歔', 194802 => '㱎', 194803 => '歲', 194804 => '殟', 194805 => '殺', 194806 => '殻', 194807 => '𣪍', 194808 => '𡴋', 194809 => '𣫺', 194810 => '汎', 194811 => '𣲼', 194812 => '沿', 194813 => '泍', 194814 => '汧', 194815 => '洖', 194816 => '派', 194817 => '海', 194818 => '流', 194819 => '浩', 194820 => '浸', 194821 => '涅', 194822 => '𣴞', 194823 => '洴', 194824 => '港', 194825 => '湮', 194826 => '㴳', 194827 => '滋', 194828 => '滇', 194829 => '𣻑', 194830 => '淹', 194831 => '潮', 194832 => '𣽞', 194833 => '𣾎', 194834 => '濆', 194835 => '瀹', 194836 => '瀞', 194837 => '瀛', 194838 => '㶖', 194839 => '灊', 194840 => '災', 194841 => '灷', 194842 => '炭', 194843 => '𠔥', 194844 => '煅', 194845 => '𤉣', 194846 => '熜', 194848 => '爨', 194849 => '爵', 194850 => '牐', 194851 => '𤘈', 194852 => '犀', 194853 => '犕', 194854 => '𤜵', 194855 => '𤠔', 194856 => '獺', 194857 => '王', 194858 => '㺬', 194859 => '玥', 194860 => '㺸', 194861 => '㺸', 194862 => '瑇', 194863 => '瑜', 194864 => '瑱', 194865 => '璅', 194866 => '瓊', 194867 => '㼛', 194868 => '甤', 194869 => '𤰶', 194870 => '甾', 194871 => '𤲒', 194872 => '異', 194873 => '𢆟', 194874 => '瘐', 194875 => '𤾡', 194876 => '𤾸', 194877 => '𥁄', 194878 => '㿼', 194879 => '䀈', 194880 => '直', 194881 => '𥃳', 194882 => '𥃲', 194883 => '𥄙', 194884 => '𥄳', 194885 => '眞', 194886 => '真', 194887 => '真', 194888 => '睊', 194889 => '䀹', 194890 => '瞋', 194891 => '䁆', 194892 => '䂖', 194893 => '𥐝', 194894 => '硎', 194895 => '碌', 194896 => '磌', 194897 => '䃣', 194898 => '𥘦', 194899 => '祖', 194900 => '𥚚', 194901 => '𥛅', 194902 => '福', 194903 => '秫', 194904 => '䄯', 194905 => '穀', 194906 => '穊', 194907 => '穏', 194908 => '𥥼', 194909 => '𥪧', 194910 => '𥪧', 194912 => '䈂', 194913 => '𥮫', 194914 => '篆', 194915 => '築', 194916 => '䈧', 194917 => '𥲀', 194918 => '糒', 194919 => '䊠', 194920 => '糨', 194921 => '糣', 194922 => '紀', 194923 => '𥾆', 194924 => '絣', 194925 => '䌁', 194926 => '緇', 194927 => '縂', 194928 => '繅', 194929 => '䌴', 194930 => '𦈨', 194931 => '𦉇', 194932 => '䍙', 194933 => '𦋙', 194934 => '罺', 194935 => '𦌾', 194936 => '羕', 194937 => '翺', 194938 => '者', 194939 => '𦓚', 194940 => '𦔣', 194941 => '聠', 194942 => '𦖨', 194943 => '聰', 194944 => '𣍟', 194945 => '䏕', 194946 => '育', 194947 => '脃', 194948 => '䐋', 194949 => '脾', 194950 => '媵', 194951 => '𦞧', 194952 => '𦞵', 194953 => '𣎓', 194954 => '𣎜', 194955 => '舁', 194956 => '舄', 194957 => '辞', 194958 => '䑫', 194959 => '芑', 194960 => '芋', 194961 => '芝', 194962 => '劳', 194963 => '花', 194964 => '芳', 194965 => '芽', 194966 => '苦', 194967 => '𦬼', 194968 => '若', 194969 => '茝', 194970 => '荣', 194971 => '莭', 194972 => '茣', 194973 => '莽', 194974 => '菧', 194975 => '著', 194976 => '荓', 194977 => '菊', 194978 => '菌', 194979 => '菜', 194980 => '𦰶', 194981 => '𦵫', 194982 => '𦳕', 194983 => '䔫', 194984 => '蓱', 194985 => '蓳', 194986 => '蔖', 194987 => '𧏊', 194988 => '蕤', 194989 => '𦼬', 194990 => '䕝', 194991 => '䕡', 194992 => '𦾱', 194993 => '𧃒', 194994 => '䕫', 194995 => '虐', 194996 => '虜', 194997 => '虧', 194998 => '虩', 194999 => '蚩', 195000 => '蚈', 195001 => '蜎', 195002 => '蛢', 195003 => '蝹', 195004 => '蜨', 195005 => '蝫', 195006 => '螆', 195008 => '蟡', 195009 => '蠁', 195010 => '䗹', 195011 => '衠', 195012 => '衣', 195013 => '𧙧', 195014 => '裗', 195015 => '裞', 195016 => '䘵', 195017 => '裺', 195018 => '㒻', 195019 => '𧢮', 195020 => '𧥦', 195021 => '䚾', 195022 => '䛇', 195023 => '誠', 195024 => '諭', 195025 => '變', 195026 => '豕', 195027 => '𧲨', 195028 => '貫', 195029 => '賁', 195030 => '贛', 195031 => '起', 195032 => '𧼯', 195033 => '𠠄', 195034 => '跋', 195035 => '趼', 195036 => '跰', 195037 => '𠣞', 195038 => '軔', 195039 => '輸', 195040 => '𨗒', 195041 => '𨗭', 195042 => '邔', 195043 => '郱', 195044 => '鄑', 195045 => '𨜮', 195046 => '鄛', 195047 => '鈸', 195048 => '鋗', 195049 => '鋘', 195050 => '鉼', 195051 => '鏹', 195052 => '鐕', 195053 => '𨯺', 195054 => '開', 195055 => '䦕', 195056 => '閷', 195057 => '𨵷', 195058 => '䧦', 195059 => '雃', 195060 => '嶲', 195061 => '霣', 195062 => '𩅅', 195063 => '𩈚', 195064 => '䩮', 195065 => '䩶', 195066 => '韠', 195067 => '𩐊', 195068 => '䪲', 195069 => '𩒖', 195070 => '頋', 195071 => '頋', 195072 => '頩', 195073 => '𩖶', 195074 => '飢', 195075 => '䬳', 195076 => '餩', 195077 => '馧', 195078 => '駂', 195079 => '駾', 195080 => '䯎', 195081 => '𩬰', 195082 => '鬒', 195083 => '鱀', 195084 => '鳽', 195085 => '䳎', 195086 => '䳭', 195087 => '鵧', 195088 => '𪃎', 195089 => '䳸', 195090 => '𪄅', 195091 => '𪈎', 195092 => '𪊑', 195093 => '麻', 195094 => '䵖', 195095 => '黹', 195096 => '黾', 195097 => '鼅', 195098 => '鼏', 195099 => '鼖', 195100 => '鼻', 195101 => '𪘀'); vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/Regex.php 0000644 00000332520 15174671617 0022207 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata; /** * @internal */ final class Regex { const COMBINING_MARK = '/^[\\x{0300}-\\x{036F}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{0591}-\\x{05BD}\\x{05BF}\\x{05C1}-\\x{05C2}\\x{05C4}-\\x{05C5}\\x{05C7}\\x{0610}-\\x{061A}\\x{064B}-\\x{065F}\\x{0670}\\x{06D6}-\\x{06DC}\\x{06DF}-\\x{06E4}\\x{06E7}-\\x{06E8}\\x{06EA}-\\x{06ED}\\x{0711}\\x{0730}-\\x{074A}\\x{07A6}-\\x{07B0}\\x{07EB}-\\x{07F3}\\x{07FD}\\x{0816}-\\x{0819}\\x{081B}-\\x{0823}\\x{0825}-\\x{0827}\\x{0829}-\\x{082D}\\x{0859}-\\x{085B}\\x{08D3}-\\x{08E1}\\x{08E3}-\\x{0902}\\x{0903}\\x{093A}\\x{093B}\\x{093C}\\x{093E}-\\x{0940}\\x{0941}-\\x{0948}\\x{0949}-\\x{094C}\\x{094D}\\x{094E}-\\x{094F}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{0982}-\\x{0983}\\x{09BC}\\x{09BE}-\\x{09C0}\\x{09C1}-\\x{09C4}\\x{09C7}-\\x{09C8}\\x{09CB}-\\x{09CC}\\x{09CD}\\x{09D7}\\x{09E2}-\\x{09E3}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A03}\\x{0A3C}\\x{0A3E}-\\x{0A40}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0A83}\\x{0ABC}\\x{0ABE}-\\x{0AC0}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0AC9}\\x{0ACB}-\\x{0ACC}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B02}-\\x{0B03}\\x{0B3C}\\x{0B3E}\\x{0B3F}\\x{0B40}\\x{0B41}-\\x{0B44}\\x{0B47}-\\x{0B48}\\x{0B4B}-\\x{0B4C}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B57}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BBE}-\\x{0BBF}\\x{0BC0}\\x{0BC1}-\\x{0BC2}\\x{0BC6}-\\x{0BC8}\\x{0BCA}-\\x{0BCC}\\x{0BCD}\\x{0BD7}\\x{0C00}\\x{0C01}-\\x{0C03}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C41}-\\x{0C44}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C81}\\x{0C82}-\\x{0C83}\\x{0CBC}\\x{0CBE}\\x{0CBF}\\x{0CC0}-\\x{0CC4}\\x{0CC6}\\x{0CC7}-\\x{0CC8}\\x{0CCA}-\\x{0CCB}\\x{0CCC}-\\x{0CCD}\\x{0CD5}-\\x{0CD6}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D02}-\\x{0D03}\\x{0D3B}-\\x{0D3C}\\x{0D3E}-\\x{0D40}\\x{0D41}-\\x{0D44}\\x{0D46}-\\x{0D48}\\x{0D4A}-\\x{0D4C}\\x{0D4D}\\x{0D57}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0D82}-\\x{0D83}\\x{0DCA}\\x{0DCF}-\\x{0DD1}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0DD8}-\\x{0DDF}\\x{0DF2}-\\x{0DF3}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F3E}-\\x{0F3F}\\x{0F71}-\\x{0F7E}\\x{0F7F}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102B}-\\x{102C}\\x{102D}-\\x{1030}\\x{1031}\\x{1032}-\\x{1037}\\x{1038}\\x{1039}-\\x{103A}\\x{103B}-\\x{103C}\\x{103D}-\\x{103E}\\x{1056}-\\x{1057}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1062}-\\x{1064}\\x{1067}-\\x{106D}\\x{1071}-\\x{1074}\\x{1082}\\x{1083}-\\x{1084}\\x{1085}-\\x{1086}\\x{1087}-\\x{108C}\\x{108D}\\x{108F}\\x{109A}-\\x{109C}\\x{109D}\\x{135D}-\\x{135F}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B6}\\x{17B7}-\\x{17BD}\\x{17BE}-\\x{17C5}\\x{17C6}\\x{17C7}-\\x{17C8}\\x{17C9}-\\x{17D3}\\x{17DD}\\x{180B}-\\x{180D}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1923}-\\x{1926}\\x{1927}-\\x{1928}\\x{1929}-\\x{192B}\\x{1930}-\\x{1931}\\x{1932}\\x{1933}-\\x{1938}\\x{1939}-\\x{193B}\\x{1A17}-\\x{1A18}\\x{1A19}-\\x{1A1A}\\x{1A1B}\\x{1A55}\\x{1A56}\\x{1A57}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A61}\\x{1A62}\\x{1A63}-\\x{1A64}\\x{1A65}-\\x{1A6C}\\x{1A6D}-\\x{1A72}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B04}\\x{1B34}\\x{1B35}\\x{1B36}-\\x{1B3A}\\x{1B3B}\\x{1B3C}\\x{1B3D}-\\x{1B41}\\x{1B42}\\x{1B43}-\\x{1B44}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1B82}\\x{1BA1}\\x{1BA2}-\\x{1BA5}\\x{1BA6}-\\x{1BA7}\\x{1BA8}-\\x{1BA9}\\x{1BAA}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE7}\\x{1BE8}-\\x{1BE9}\\x{1BEA}-\\x{1BEC}\\x{1BED}\\x{1BEE}\\x{1BEF}-\\x{1BF1}\\x{1BF2}-\\x{1BF3}\\x{1C24}-\\x{1C2B}\\x{1C2C}-\\x{1C33}\\x{1C34}-\\x{1C35}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE1}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF7}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2CEF}-\\x{2CF1}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{302A}-\\x{302D}\\x{302E}-\\x{302F}\\x{3099}-\\x{309A}\\x{A66F}\\x{A670}-\\x{A672}\\x{A674}-\\x{A67D}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A802}\\x{A806}\\x{A80B}\\x{A823}-\\x{A824}\\x{A825}-\\x{A826}\\x{A827}\\x{A82C}\\x{A880}-\\x{A881}\\x{A8B4}-\\x{A8C3}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A952}-\\x{A953}\\x{A980}-\\x{A982}\\x{A983}\\x{A9B3}\\x{A9B4}-\\x{A9B5}\\x{A9B6}-\\x{A9B9}\\x{A9BA}-\\x{A9BB}\\x{A9BC}-\\x{A9BD}\\x{A9BE}-\\x{A9C0}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA2F}-\\x{AA30}\\x{AA31}-\\x{AA32}\\x{AA33}-\\x{AA34}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA4D}\\x{AA7B}\\x{AA7C}\\x{AA7D}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEB}\\x{AAEC}-\\x{AAED}\\x{AAEE}-\\x{AAEF}\\x{AAF5}\\x{AAF6}\\x{ABE3}-\\x{ABE4}\\x{ABE5}\\x{ABE6}-\\x{ABE7}\\x{ABE8}\\x{ABE9}-\\x{ABEA}\\x{ABEC}\\x{ABED}\\x{FB1E}\\x{FE00}-\\x{FE0F}\\x{FE20}-\\x{FE2F}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10A01}-\\x{10A03}\\x{10A05}-\\x{10A06}\\x{10A0C}-\\x{10A0F}\\x{10A38}-\\x{10A3A}\\x{10A3F}\\x{10AE5}-\\x{10AE6}\\x{10D24}-\\x{10D27}\\x{10EAB}-\\x{10EAC}\\x{10F46}-\\x{10F50}\\x{11000}\\x{11001}\\x{11002}\\x{11038}-\\x{11046}\\x{1107F}-\\x{11081}\\x{11082}\\x{110B0}-\\x{110B2}\\x{110B3}-\\x{110B6}\\x{110B7}-\\x{110B8}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112C}\\x{1112D}-\\x{11134}\\x{11145}-\\x{11146}\\x{11173}\\x{11180}-\\x{11181}\\x{11182}\\x{111B3}-\\x{111B5}\\x{111B6}-\\x{111BE}\\x{111BF}-\\x{111C0}\\x{111C9}-\\x{111CC}\\x{111CE}\\x{111CF}\\x{1122C}-\\x{1122E}\\x{1122F}-\\x{11231}\\x{11232}-\\x{11233}\\x{11234}\\x{11235}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E0}-\\x{112E2}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{11302}-\\x{11303}\\x{1133B}-\\x{1133C}\\x{1133E}-\\x{1133F}\\x{11340}\\x{11341}-\\x{11344}\\x{11347}-\\x{11348}\\x{1134B}-\\x{1134D}\\x{11357}\\x{11362}-\\x{11363}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11435}-\\x{11437}\\x{11438}-\\x{1143F}\\x{11440}-\\x{11441}\\x{11442}-\\x{11444}\\x{11445}\\x{11446}\\x{1145E}\\x{114B0}-\\x{114B2}\\x{114B3}-\\x{114B8}\\x{114B9}\\x{114BA}\\x{114BB}-\\x{114BE}\\x{114BF}-\\x{114C0}\\x{114C1}\\x{114C2}-\\x{114C3}\\x{115AF}-\\x{115B1}\\x{115B2}-\\x{115B5}\\x{115B8}-\\x{115BB}\\x{115BC}-\\x{115BD}\\x{115BE}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11630}-\\x{11632}\\x{11633}-\\x{1163A}\\x{1163B}-\\x{1163C}\\x{1163D}\\x{1163E}\\x{1163F}-\\x{11640}\\x{116AB}\\x{116AC}\\x{116AD}\\x{116AE}-\\x{116AF}\\x{116B0}-\\x{116B5}\\x{116B6}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11720}-\\x{11721}\\x{11722}-\\x{11725}\\x{11726}\\x{11727}-\\x{1172B}\\x{1182C}-\\x{1182E}\\x{1182F}-\\x{11837}\\x{11838}\\x{11839}-\\x{1183A}\\x{11930}-\\x{11935}\\x{11937}-\\x{11938}\\x{1193B}-\\x{1193C}\\x{1193D}\\x{1193E}\\x{11940}\\x{11942}\\x{11943}\\x{119D1}-\\x{119D3}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119DC}-\\x{119DF}\\x{119E0}\\x{119E4}\\x{11A01}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A39}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A57}-\\x{11A58}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A97}\\x{11A98}-\\x{11A99}\\x{11C2F}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C3E}\\x{11C3F}\\x{11C92}-\\x{11CA7}\\x{11CA9}\\x{11CAA}-\\x{11CB0}\\x{11CB1}\\x{11CB2}-\\x{11CB3}\\x{11CB4}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D8A}-\\x{11D8E}\\x{11D90}-\\x{11D91}\\x{11D93}-\\x{11D94}\\x{11D95}\\x{11D96}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{11EF5}-\\x{11EF6}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F51}-\\x{16F87}\\x{16F8F}-\\x{16F92}\\x{16FE4}\\x{16FF0}-\\x{16FF1}\\x{1BC9D}-\\x{1BC9E}\\x{1D165}-\\x{1D166}\\x{1D167}-\\x{1D169}\\x{1D16D}-\\x{1D172}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D242}-\\x{1D244}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E8D0}-\\x{1E8D6}\\x{1E944}-\\x{1E94A}\\x{E0100}-\\x{E01EF}]/u'; const RTL_LABEL = '/[\\x{0590}\\x{05BE}\\x{05C0}\\x{05C3}\\x{05C6}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0600}-\\x{0605}\\x{0608}\\x{060B}\\x{060D}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{0660}-\\x{0669}\\x{066B}-\\x{066C}\\x{066D}\\x{066E}-\\x{066F}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06DD}\\x{06E5}-\\x{06E6}\\x{06EE}-\\x{06EF}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0712}-\\x{072F}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07F4}-\\x{07F5}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{081A}\\x{0824}\\x{0828}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{08E2}\\x{200F}\\x{FB1D}\\x{FB1F}-\\x{FB28}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFE}-\\x{FDFF}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A04}\\x{10A07}-\\x{10A0B}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A3B}-\\x{10A3E}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D28}-\\x{10D2F}\\x{10D30}-\\x{10D39}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E60}-\\x{10E7E}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}]/u'; const BIDI_STEP_1_LTR = '/^[^\\x{0000}-\\x{0008}\\x{0009}\\x{000A}\\x{000B}\\x{000C}\\x{000D}\\x{000E}-\\x{001B}\\x{001C}-\\x{001E}\\x{001F}\\x{0020}\\x{0021}-\\x{0022}\\x{0023}\\x{0024}\\x{0025}\\x{0026}-\\x{0027}\\x{0028}\\x{0029}\\x{002A}\\x{002B}\\x{002C}\\x{002D}\\x{002E}-\\x{002F}\\x{0030}-\\x{0039}\\x{003A}\\x{003B}\\x{003C}-\\x{003E}\\x{003F}-\\x{0040}\\x{005B}\\x{005C}\\x{005D}\\x{005E}\\x{005F}\\x{0060}\\x{007B}\\x{007C}\\x{007D}\\x{007E}\\x{007F}-\\x{0084}\\x{0085}\\x{0086}-\\x{009F}\\x{00A0}\\x{00A1}\\x{00A2}-\\x{00A5}\\x{00A6}\\x{00A7}\\x{00A8}\\x{00A9}\\x{00AB}\\x{00AC}\\x{00AD}\\x{00AE}\\x{00AF}\\x{00B0}\\x{00B1}\\x{00B2}-\\x{00B3}\\x{00B4}\\x{00B6}-\\x{00B7}\\x{00B8}\\x{00B9}\\x{00BB}\\x{00BC}-\\x{00BE}\\x{00BF}\\x{00D7}\\x{00F7}\\x{02B9}-\\x{02BA}\\x{02C2}-\\x{02C5}\\x{02C6}-\\x{02CF}\\x{02D2}-\\x{02DF}\\x{02E5}-\\x{02EB}\\x{02EC}\\x{02ED}\\x{02EF}-\\x{02FF}\\x{0300}-\\x{036F}\\x{0374}\\x{0375}\\x{037E}\\x{0384}-\\x{0385}\\x{0387}\\x{03F6}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{058A}\\x{058D}-\\x{058E}\\x{058F}\\x{0590}\\x{0591}-\\x{05BD}\\x{05BE}\\x{05BF}\\x{05C0}\\x{05C1}-\\x{05C2}\\x{05C3}\\x{05C4}-\\x{05C5}\\x{05C6}\\x{05C7}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0600}-\\x{0605}\\x{0606}-\\x{0607}\\x{0608}\\x{0609}-\\x{060A}\\x{060B}\\x{060C}\\x{060D}\\x{060E}-\\x{060F}\\x{0610}-\\x{061A}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{064B}-\\x{065F}\\x{0660}-\\x{0669}\\x{066A}\\x{066B}-\\x{066C}\\x{066D}\\x{066E}-\\x{066F}\\x{0670}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06D6}-\\x{06DC}\\x{06DD}\\x{06DE}\\x{06DF}-\\x{06E4}\\x{06E5}-\\x{06E6}\\x{06E7}-\\x{06E8}\\x{06E9}\\x{06EA}-\\x{06ED}\\x{06EE}-\\x{06EF}\\x{06F0}-\\x{06F9}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0711}\\x{0712}-\\x{072F}\\x{0730}-\\x{074A}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07A6}-\\x{07B0}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07EB}-\\x{07F3}\\x{07F4}-\\x{07F5}\\x{07F6}\\x{07F7}-\\x{07F9}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FD}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{0816}-\\x{0819}\\x{081A}\\x{081B}-\\x{0823}\\x{0824}\\x{0825}-\\x{0827}\\x{0828}\\x{0829}-\\x{082D}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{0859}-\\x{085B}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{08D3}-\\x{08E1}\\x{08E2}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09F2}-\\x{09F3}\\x{09FB}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AF1}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0BF3}-\\x{0BF8}\\x{0BF9}\\x{0BFA}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C78}-\\x{0C7E}\\x{0C81}\\x{0CBC}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E3F}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F3A}\\x{0F3B}\\x{0F3C}\\x{0F3D}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1390}-\\x{1399}\\x{1400}\\x{1680}\\x{169B}\\x{169C}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DB}\\x{17DD}\\x{17F0}-\\x{17F9}\\x{1800}-\\x{1805}\\x{1806}\\x{1807}-\\x{180A}\\x{180B}-\\x{180D}\\x{180E}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1940}\\x{1944}-\\x{1945}\\x{19DE}-\\x{19FF}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{1FBD}\\x{1FBF}-\\x{1FC1}\\x{1FCD}-\\x{1FCF}\\x{1FDD}-\\x{1FDF}\\x{1FED}-\\x{1FEF}\\x{1FFD}-\\x{1FFE}\\x{2000}-\\x{200A}\\x{200B}-\\x{200D}\\x{200F}\\x{2010}-\\x{2015}\\x{2016}-\\x{2017}\\x{2018}\\x{2019}\\x{201A}\\x{201B}-\\x{201C}\\x{201D}\\x{201E}\\x{201F}\\x{2020}-\\x{2027}\\x{2028}\\x{2029}\\x{202A}\\x{202B}\\x{202C}\\x{202D}\\x{202E}\\x{202F}\\x{2030}-\\x{2034}\\x{2035}-\\x{2038}\\x{2039}\\x{203A}\\x{203B}-\\x{203E}\\x{203F}-\\x{2040}\\x{2041}-\\x{2043}\\x{2044}\\x{2045}\\x{2046}\\x{2047}-\\x{2051}\\x{2052}\\x{2053}\\x{2054}\\x{2055}-\\x{205E}\\x{205F}\\x{2060}-\\x{2064}\\x{2065}\\x{2066}\\x{2067}\\x{2068}\\x{2069}\\x{206A}-\\x{206F}\\x{2070}\\x{2074}-\\x{2079}\\x{207A}-\\x{207B}\\x{207C}\\x{207D}\\x{207E}\\x{2080}-\\x{2089}\\x{208A}-\\x{208B}\\x{208C}\\x{208D}\\x{208E}\\x{20A0}-\\x{20BF}\\x{20C0}-\\x{20CF}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2100}-\\x{2101}\\x{2103}-\\x{2106}\\x{2108}-\\x{2109}\\x{2114}\\x{2116}-\\x{2117}\\x{2118}\\x{211E}-\\x{2123}\\x{2125}\\x{2127}\\x{2129}\\x{212E}\\x{213A}-\\x{213B}\\x{2140}-\\x{2144}\\x{214A}\\x{214B}\\x{214C}-\\x{214D}\\x{2150}-\\x{215F}\\x{2189}\\x{218A}-\\x{218B}\\x{2190}-\\x{2194}\\x{2195}-\\x{2199}\\x{219A}-\\x{219B}\\x{219C}-\\x{219F}\\x{21A0}\\x{21A1}-\\x{21A2}\\x{21A3}\\x{21A4}-\\x{21A5}\\x{21A6}\\x{21A7}-\\x{21AD}\\x{21AE}\\x{21AF}-\\x{21CD}\\x{21CE}-\\x{21CF}\\x{21D0}-\\x{21D1}\\x{21D2}\\x{21D3}\\x{21D4}\\x{21D5}-\\x{21F3}\\x{21F4}-\\x{2211}\\x{2212}\\x{2213}\\x{2214}-\\x{22FF}\\x{2300}-\\x{2307}\\x{2308}\\x{2309}\\x{230A}\\x{230B}\\x{230C}-\\x{231F}\\x{2320}-\\x{2321}\\x{2322}-\\x{2328}\\x{2329}\\x{232A}\\x{232B}-\\x{2335}\\x{237B}\\x{237C}\\x{237D}-\\x{2394}\\x{2396}-\\x{239A}\\x{239B}-\\x{23B3}\\x{23B4}-\\x{23DB}\\x{23DC}-\\x{23E1}\\x{23E2}-\\x{2426}\\x{2440}-\\x{244A}\\x{2460}-\\x{2487}\\x{2488}-\\x{249B}\\x{24EA}-\\x{24FF}\\x{2500}-\\x{25B6}\\x{25B7}\\x{25B8}-\\x{25C0}\\x{25C1}\\x{25C2}-\\x{25F7}\\x{25F8}-\\x{25FF}\\x{2600}-\\x{266E}\\x{266F}\\x{2670}-\\x{26AB}\\x{26AD}-\\x{2767}\\x{2768}\\x{2769}\\x{276A}\\x{276B}\\x{276C}\\x{276D}\\x{276E}\\x{276F}\\x{2770}\\x{2771}\\x{2772}\\x{2773}\\x{2774}\\x{2775}\\x{2776}-\\x{2793}\\x{2794}-\\x{27BF}\\x{27C0}-\\x{27C4}\\x{27C5}\\x{27C6}\\x{27C7}-\\x{27E5}\\x{27E6}\\x{27E7}\\x{27E8}\\x{27E9}\\x{27EA}\\x{27EB}\\x{27EC}\\x{27ED}\\x{27EE}\\x{27EF}\\x{27F0}-\\x{27FF}\\x{2900}-\\x{2982}\\x{2983}\\x{2984}\\x{2985}\\x{2986}\\x{2987}\\x{2988}\\x{2989}\\x{298A}\\x{298B}\\x{298C}\\x{298D}\\x{298E}\\x{298F}\\x{2990}\\x{2991}\\x{2992}\\x{2993}\\x{2994}\\x{2995}\\x{2996}\\x{2997}\\x{2998}\\x{2999}-\\x{29D7}\\x{29D8}\\x{29D9}\\x{29DA}\\x{29DB}\\x{29DC}-\\x{29FB}\\x{29FC}\\x{29FD}\\x{29FE}-\\x{2AFF}\\x{2B00}-\\x{2B2F}\\x{2B30}-\\x{2B44}\\x{2B45}-\\x{2B46}\\x{2B47}-\\x{2B4C}\\x{2B4D}-\\x{2B73}\\x{2B76}-\\x{2B95}\\x{2B97}-\\x{2BFF}\\x{2CE5}-\\x{2CEA}\\x{2CEF}-\\x{2CF1}\\x{2CF9}-\\x{2CFC}\\x{2CFD}\\x{2CFE}-\\x{2CFF}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{2E00}-\\x{2E01}\\x{2E02}\\x{2E03}\\x{2E04}\\x{2E05}\\x{2E06}-\\x{2E08}\\x{2E09}\\x{2E0A}\\x{2E0B}\\x{2E0C}\\x{2E0D}\\x{2E0E}-\\x{2E16}\\x{2E17}\\x{2E18}-\\x{2E19}\\x{2E1A}\\x{2E1B}\\x{2E1C}\\x{2E1D}\\x{2E1E}-\\x{2E1F}\\x{2E20}\\x{2E21}\\x{2E22}\\x{2E23}\\x{2E24}\\x{2E25}\\x{2E26}\\x{2E27}\\x{2E28}\\x{2E29}\\x{2E2A}-\\x{2E2E}\\x{2E2F}\\x{2E30}-\\x{2E39}\\x{2E3A}-\\x{2E3B}\\x{2E3C}-\\x{2E3F}\\x{2E40}\\x{2E41}\\x{2E42}\\x{2E43}-\\x{2E4F}\\x{2E50}-\\x{2E51}\\x{2E52}\\x{2E80}-\\x{2E99}\\x{2E9B}-\\x{2EF3}\\x{2F00}-\\x{2FD5}\\x{2FF0}-\\x{2FFB}\\x{3000}\\x{3001}-\\x{3003}\\x{3004}\\x{3008}\\x{3009}\\x{300A}\\x{300B}\\x{300C}\\x{300D}\\x{300E}\\x{300F}\\x{3010}\\x{3011}\\x{3012}-\\x{3013}\\x{3014}\\x{3015}\\x{3016}\\x{3017}\\x{3018}\\x{3019}\\x{301A}\\x{301B}\\x{301C}\\x{301D}\\x{301E}-\\x{301F}\\x{3020}\\x{302A}-\\x{302D}\\x{3030}\\x{3036}-\\x{3037}\\x{303D}\\x{303E}-\\x{303F}\\x{3099}-\\x{309A}\\x{309B}-\\x{309C}\\x{30A0}\\x{30FB}\\x{31C0}-\\x{31E3}\\x{321D}-\\x{321E}\\x{3250}\\x{3251}-\\x{325F}\\x{327C}-\\x{327E}\\x{32B1}-\\x{32BF}\\x{32CC}-\\x{32CF}\\x{3377}-\\x{337A}\\x{33DE}-\\x{33DF}\\x{33FF}\\x{4DC0}-\\x{4DFF}\\x{A490}-\\x{A4C6}\\x{A60D}-\\x{A60F}\\x{A66F}\\x{A670}-\\x{A672}\\x{A673}\\x{A674}-\\x{A67D}\\x{A67E}\\x{A67F}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A700}-\\x{A716}\\x{A717}-\\x{A71F}\\x{A720}-\\x{A721}\\x{A788}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A828}-\\x{A82B}\\x{A82C}\\x{A838}\\x{A839}\\x{A874}-\\x{A877}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{AB6A}-\\x{AB6B}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1D}\\x{FB1E}\\x{FB1F}-\\x{FB28}\\x{FB29}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD3E}\\x{FD3F}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDD0}-\\x{FDEF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFD}\\x{FDFE}-\\x{FDFF}\\x{FE00}-\\x{FE0F}\\x{FE10}-\\x{FE16}\\x{FE17}\\x{FE18}\\x{FE19}\\x{FE20}-\\x{FE2F}\\x{FE30}\\x{FE31}-\\x{FE32}\\x{FE33}-\\x{FE34}\\x{FE35}\\x{FE36}\\x{FE37}\\x{FE38}\\x{FE39}\\x{FE3A}\\x{FE3B}\\x{FE3C}\\x{FE3D}\\x{FE3E}\\x{FE3F}\\x{FE40}\\x{FE41}\\x{FE42}\\x{FE43}\\x{FE44}\\x{FE45}-\\x{FE46}\\x{FE47}\\x{FE48}\\x{FE49}-\\x{FE4C}\\x{FE4D}-\\x{FE4F}\\x{FE50}\\x{FE51}\\x{FE52}\\x{FE54}\\x{FE55}\\x{FE56}-\\x{FE57}\\x{FE58}\\x{FE59}\\x{FE5A}\\x{FE5B}\\x{FE5C}\\x{FE5D}\\x{FE5E}\\x{FE5F}\\x{FE60}-\\x{FE61}\\x{FE62}\\x{FE63}\\x{FE64}-\\x{FE66}\\x{FE68}\\x{FE69}\\x{FE6A}\\x{FE6B}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{FEFF}\\x{FF01}-\\x{FF02}\\x{FF03}\\x{FF04}\\x{FF05}\\x{FF06}-\\x{FF07}\\x{FF08}\\x{FF09}\\x{FF0A}\\x{FF0B}\\x{FF0C}\\x{FF0D}\\x{FF0E}-\\x{FF0F}\\x{FF10}-\\x{FF19}\\x{FF1A}\\x{FF1B}\\x{FF1C}-\\x{FF1E}\\x{FF1F}-\\x{FF20}\\x{FF3B}\\x{FF3C}\\x{FF3D}\\x{FF3E}\\x{FF3F}\\x{FF40}\\x{FF5B}\\x{FF5C}\\x{FF5D}\\x{FF5E}\\x{FF5F}\\x{FF60}\\x{FF61}\\x{FF62}\\x{FF63}\\x{FF64}-\\x{FF65}\\x{FFE0}-\\x{FFE1}\\x{FFE2}\\x{FFE3}\\x{FFE4}\\x{FFE5}-\\x{FFE6}\\x{FFE8}\\x{FFE9}-\\x{FFEC}\\x{FFED}-\\x{FFEE}\\x{FFF0}-\\x{FFF8}\\x{FFF9}-\\x{FFFB}\\x{FFFC}-\\x{FFFD}\\x{FFFE}-\\x{FFFF}\\x{10101}\\x{10140}-\\x{10174}\\x{10175}-\\x{10178}\\x{10179}-\\x{10189}\\x{1018A}-\\x{1018B}\\x{1018C}\\x{10190}-\\x{1019C}\\x{101A0}\\x{101FD}\\x{102E0}\\x{102E1}-\\x{102FB}\\x{10376}-\\x{1037A}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{1091F}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A01}-\\x{10A03}\\x{10A04}\\x{10A05}-\\x{10A06}\\x{10A07}-\\x{10A0B}\\x{10A0C}-\\x{10A0F}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A38}-\\x{10A3A}\\x{10A3B}-\\x{10A3E}\\x{10A3F}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE5}-\\x{10AE6}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B39}-\\x{10B3F}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D24}-\\x{10D27}\\x{10D28}-\\x{10D2F}\\x{10D30}-\\x{10D39}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E60}-\\x{10E7E}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAB}-\\x{10EAC}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F46}-\\x{10F50}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{11001}\\x{11038}-\\x{11046}\\x{11052}-\\x{11065}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{11660}-\\x{1166C}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A06}\\x{11A09}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{11FD5}-\\x{11FDC}\\x{11FDD}-\\x{11FE0}\\x{11FE1}-\\x{11FF1}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE2}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1BCA0}-\\x{1BCA3}\\x{1D167}-\\x{1D169}\\x{1D173}-\\x{1D17A}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D200}-\\x{1D241}\\x{1D242}-\\x{1D244}\\x{1D245}\\x{1D300}-\\x{1D356}\\x{1D6DB}\\x{1D715}\\x{1D74F}\\x{1D789}\\x{1D7C3}\\x{1D7CE}-\\x{1D7FF}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E2FF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D0}-\\x{1E8D6}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E944}-\\x{1E94A}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF0}-\\x{1EEF1}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}\\x{1F000}-\\x{1F02B}\\x{1F030}-\\x{1F093}\\x{1F0A0}-\\x{1F0AE}\\x{1F0B1}-\\x{1F0BF}\\x{1F0C1}-\\x{1F0CF}\\x{1F0D1}-\\x{1F0F5}\\x{1F100}-\\x{1F10A}\\x{1F10B}-\\x{1F10C}\\x{1F10D}-\\x{1F10F}\\x{1F12F}\\x{1F16A}-\\x{1F16F}\\x{1F1AD}\\x{1F260}-\\x{1F265}\\x{1F300}-\\x{1F3FA}\\x{1F3FB}-\\x{1F3FF}\\x{1F400}-\\x{1F6D7}\\x{1F6E0}-\\x{1F6EC}\\x{1F6F0}-\\x{1F6FC}\\x{1F700}-\\x{1F773}\\x{1F780}-\\x{1F7D8}\\x{1F7E0}-\\x{1F7EB}\\x{1F800}-\\x{1F80B}\\x{1F810}-\\x{1F847}\\x{1F850}-\\x{1F859}\\x{1F860}-\\x{1F887}\\x{1F890}-\\x{1F8AD}\\x{1F8B0}-\\x{1F8B1}\\x{1F900}-\\x{1F978}\\x{1F97A}-\\x{1F9CB}\\x{1F9CD}-\\x{1FA53}\\x{1FA60}-\\x{1FA6D}\\x{1FA70}-\\x{1FA74}\\x{1FA78}-\\x{1FA7A}\\x{1FA80}-\\x{1FA86}\\x{1FA90}-\\x{1FAA8}\\x{1FAB0}-\\x{1FAB6}\\x{1FAC0}-\\x{1FAC2}\\x{1FAD0}-\\x{1FAD6}\\x{1FB00}-\\x{1FB92}\\x{1FB94}-\\x{1FBCA}\\x{1FBF0}-\\x{1FBF9}\\x{1FFFE}-\\x{1FFFF}\\x{2FFFE}-\\x{2FFFF}\\x{3FFFE}-\\x{3FFFF}\\x{4FFFE}-\\x{4FFFF}\\x{5FFFE}-\\x{5FFFF}\\x{6FFFE}-\\x{6FFFF}\\x{7FFFE}-\\x{7FFFF}\\x{8FFFE}-\\x{8FFFF}\\x{9FFFE}-\\x{9FFFF}\\x{AFFFE}-\\x{AFFFF}\\x{BFFFE}-\\x{BFFFF}\\x{CFFFE}-\\x{CFFFF}\\x{DFFFE}-\\x{E0000}\\x{E0001}\\x{E0002}-\\x{E001F}\\x{E0020}-\\x{E007F}\\x{E0080}-\\x{E00FF}\\x{E0100}-\\x{E01EF}\\x{E01F0}-\\x{E0FFF}\\x{EFFFE}-\\x{EFFFF}\\x{FFFFE}-\\x{FFFFF}\\x{10FFFE}-\\x{10FFFF}]/u'; const BIDI_STEP_1_RTL = '/^[\\x{0590}\\x{05BE}\\x{05C0}\\x{05C3}\\x{05C6}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0608}\\x{060B}\\x{060D}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{066D}\\x{066E}-\\x{066F}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06E5}-\\x{06E6}\\x{06EE}-\\x{06EF}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0712}-\\x{072F}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07F4}-\\x{07F5}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{081A}\\x{0824}\\x{0828}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{200F}\\x{FB1D}\\x{FB1F}-\\x{FB28}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFE}-\\x{FDFF}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A04}\\x{10A07}-\\x{10A0B}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A3B}-\\x{10A3E}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D28}-\\x{10D2F}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}]/u'; const BIDI_STEP_2 = '/[^\\x{0000}-\\x{0008}\\x{000E}-\\x{001B}\\x{0021}-\\x{0022}\\x{0023}\\x{0024}\\x{0025}\\x{0026}-\\x{0027}\\x{0028}\\x{0029}\\x{002A}\\x{002B}\\x{002C}\\x{002D}\\x{002E}-\\x{002F}\\x{0030}-\\x{0039}\\x{003A}\\x{003B}\\x{003C}-\\x{003E}\\x{003F}-\\x{0040}\\x{005B}\\x{005C}\\x{005D}\\x{005E}\\x{005F}\\x{0060}\\x{007B}\\x{007C}\\x{007D}\\x{007E}\\x{007F}-\\x{0084}\\x{0086}-\\x{009F}\\x{00A0}\\x{00A1}\\x{00A2}-\\x{00A5}\\x{00A6}\\x{00A7}\\x{00A8}\\x{00A9}\\x{00AB}\\x{00AC}\\x{00AD}\\x{00AE}\\x{00AF}\\x{00B0}\\x{00B1}\\x{00B2}-\\x{00B3}\\x{00B4}\\x{00B6}-\\x{00B7}\\x{00B8}\\x{00B9}\\x{00BB}\\x{00BC}-\\x{00BE}\\x{00BF}\\x{00D7}\\x{00F7}\\x{02B9}-\\x{02BA}\\x{02C2}-\\x{02C5}\\x{02C6}-\\x{02CF}\\x{02D2}-\\x{02DF}\\x{02E5}-\\x{02EB}\\x{02EC}\\x{02ED}\\x{02EF}-\\x{02FF}\\x{0300}-\\x{036F}\\x{0374}\\x{0375}\\x{037E}\\x{0384}-\\x{0385}\\x{0387}\\x{03F6}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{058A}\\x{058D}-\\x{058E}\\x{058F}\\x{0590}\\x{0591}-\\x{05BD}\\x{05BE}\\x{05BF}\\x{05C0}\\x{05C1}-\\x{05C2}\\x{05C3}\\x{05C4}-\\x{05C5}\\x{05C6}\\x{05C7}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0600}-\\x{0605}\\x{0606}-\\x{0607}\\x{0608}\\x{0609}-\\x{060A}\\x{060B}\\x{060C}\\x{060D}\\x{060E}-\\x{060F}\\x{0610}-\\x{061A}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{064B}-\\x{065F}\\x{0660}-\\x{0669}\\x{066A}\\x{066B}-\\x{066C}\\x{066D}\\x{066E}-\\x{066F}\\x{0670}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06D6}-\\x{06DC}\\x{06DD}\\x{06DE}\\x{06DF}-\\x{06E4}\\x{06E5}-\\x{06E6}\\x{06E7}-\\x{06E8}\\x{06E9}\\x{06EA}-\\x{06ED}\\x{06EE}-\\x{06EF}\\x{06F0}-\\x{06F9}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0711}\\x{0712}-\\x{072F}\\x{0730}-\\x{074A}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07A6}-\\x{07B0}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07EB}-\\x{07F3}\\x{07F4}-\\x{07F5}\\x{07F6}\\x{07F7}-\\x{07F9}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FD}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{0816}-\\x{0819}\\x{081A}\\x{081B}-\\x{0823}\\x{0824}\\x{0825}-\\x{0827}\\x{0828}\\x{0829}-\\x{082D}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{0859}-\\x{085B}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{08D3}-\\x{08E1}\\x{08E2}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09F2}-\\x{09F3}\\x{09FB}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AF1}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0BF3}-\\x{0BF8}\\x{0BF9}\\x{0BFA}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C78}-\\x{0C7E}\\x{0C81}\\x{0CBC}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E3F}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F3A}\\x{0F3B}\\x{0F3C}\\x{0F3D}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1390}-\\x{1399}\\x{1400}\\x{169B}\\x{169C}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DB}\\x{17DD}\\x{17F0}-\\x{17F9}\\x{1800}-\\x{1805}\\x{1806}\\x{1807}-\\x{180A}\\x{180B}-\\x{180D}\\x{180E}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1940}\\x{1944}-\\x{1945}\\x{19DE}-\\x{19FF}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{1FBD}\\x{1FBF}-\\x{1FC1}\\x{1FCD}-\\x{1FCF}\\x{1FDD}-\\x{1FDF}\\x{1FED}-\\x{1FEF}\\x{1FFD}-\\x{1FFE}\\x{200B}-\\x{200D}\\x{200F}\\x{2010}-\\x{2015}\\x{2016}-\\x{2017}\\x{2018}\\x{2019}\\x{201A}\\x{201B}-\\x{201C}\\x{201D}\\x{201E}\\x{201F}\\x{2020}-\\x{2027}\\x{202F}\\x{2030}-\\x{2034}\\x{2035}-\\x{2038}\\x{2039}\\x{203A}\\x{203B}-\\x{203E}\\x{203F}-\\x{2040}\\x{2041}-\\x{2043}\\x{2044}\\x{2045}\\x{2046}\\x{2047}-\\x{2051}\\x{2052}\\x{2053}\\x{2054}\\x{2055}-\\x{205E}\\x{2060}-\\x{2064}\\x{2065}\\x{206A}-\\x{206F}\\x{2070}\\x{2074}-\\x{2079}\\x{207A}-\\x{207B}\\x{207C}\\x{207D}\\x{207E}\\x{2080}-\\x{2089}\\x{208A}-\\x{208B}\\x{208C}\\x{208D}\\x{208E}\\x{20A0}-\\x{20BF}\\x{20C0}-\\x{20CF}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2100}-\\x{2101}\\x{2103}-\\x{2106}\\x{2108}-\\x{2109}\\x{2114}\\x{2116}-\\x{2117}\\x{2118}\\x{211E}-\\x{2123}\\x{2125}\\x{2127}\\x{2129}\\x{212E}\\x{213A}-\\x{213B}\\x{2140}-\\x{2144}\\x{214A}\\x{214B}\\x{214C}-\\x{214D}\\x{2150}-\\x{215F}\\x{2189}\\x{218A}-\\x{218B}\\x{2190}-\\x{2194}\\x{2195}-\\x{2199}\\x{219A}-\\x{219B}\\x{219C}-\\x{219F}\\x{21A0}\\x{21A1}-\\x{21A2}\\x{21A3}\\x{21A4}-\\x{21A5}\\x{21A6}\\x{21A7}-\\x{21AD}\\x{21AE}\\x{21AF}-\\x{21CD}\\x{21CE}-\\x{21CF}\\x{21D0}-\\x{21D1}\\x{21D2}\\x{21D3}\\x{21D4}\\x{21D5}-\\x{21F3}\\x{21F4}-\\x{2211}\\x{2212}\\x{2213}\\x{2214}-\\x{22FF}\\x{2300}-\\x{2307}\\x{2308}\\x{2309}\\x{230A}\\x{230B}\\x{230C}-\\x{231F}\\x{2320}-\\x{2321}\\x{2322}-\\x{2328}\\x{2329}\\x{232A}\\x{232B}-\\x{2335}\\x{237B}\\x{237C}\\x{237D}-\\x{2394}\\x{2396}-\\x{239A}\\x{239B}-\\x{23B3}\\x{23B4}-\\x{23DB}\\x{23DC}-\\x{23E1}\\x{23E2}-\\x{2426}\\x{2440}-\\x{244A}\\x{2460}-\\x{2487}\\x{2488}-\\x{249B}\\x{24EA}-\\x{24FF}\\x{2500}-\\x{25B6}\\x{25B7}\\x{25B8}-\\x{25C0}\\x{25C1}\\x{25C2}-\\x{25F7}\\x{25F8}-\\x{25FF}\\x{2600}-\\x{266E}\\x{266F}\\x{2670}-\\x{26AB}\\x{26AD}-\\x{2767}\\x{2768}\\x{2769}\\x{276A}\\x{276B}\\x{276C}\\x{276D}\\x{276E}\\x{276F}\\x{2770}\\x{2771}\\x{2772}\\x{2773}\\x{2774}\\x{2775}\\x{2776}-\\x{2793}\\x{2794}-\\x{27BF}\\x{27C0}-\\x{27C4}\\x{27C5}\\x{27C6}\\x{27C7}-\\x{27E5}\\x{27E6}\\x{27E7}\\x{27E8}\\x{27E9}\\x{27EA}\\x{27EB}\\x{27EC}\\x{27ED}\\x{27EE}\\x{27EF}\\x{27F0}-\\x{27FF}\\x{2900}-\\x{2982}\\x{2983}\\x{2984}\\x{2985}\\x{2986}\\x{2987}\\x{2988}\\x{2989}\\x{298A}\\x{298B}\\x{298C}\\x{298D}\\x{298E}\\x{298F}\\x{2990}\\x{2991}\\x{2992}\\x{2993}\\x{2994}\\x{2995}\\x{2996}\\x{2997}\\x{2998}\\x{2999}-\\x{29D7}\\x{29D8}\\x{29D9}\\x{29DA}\\x{29DB}\\x{29DC}-\\x{29FB}\\x{29FC}\\x{29FD}\\x{29FE}-\\x{2AFF}\\x{2B00}-\\x{2B2F}\\x{2B30}-\\x{2B44}\\x{2B45}-\\x{2B46}\\x{2B47}-\\x{2B4C}\\x{2B4D}-\\x{2B73}\\x{2B76}-\\x{2B95}\\x{2B97}-\\x{2BFF}\\x{2CE5}-\\x{2CEA}\\x{2CEF}-\\x{2CF1}\\x{2CF9}-\\x{2CFC}\\x{2CFD}\\x{2CFE}-\\x{2CFF}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{2E00}-\\x{2E01}\\x{2E02}\\x{2E03}\\x{2E04}\\x{2E05}\\x{2E06}-\\x{2E08}\\x{2E09}\\x{2E0A}\\x{2E0B}\\x{2E0C}\\x{2E0D}\\x{2E0E}-\\x{2E16}\\x{2E17}\\x{2E18}-\\x{2E19}\\x{2E1A}\\x{2E1B}\\x{2E1C}\\x{2E1D}\\x{2E1E}-\\x{2E1F}\\x{2E20}\\x{2E21}\\x{2E22}\\x{2E23}\\x{2E24}\\x{2E25}\\x{2E26}\\x{2E27}\\x{2E28}\\x{2E29}\\x{2E2A}-\\x{2E2E}\\x{2E2F}\\x{2E30}-\\x{2E39}\\x{2E3A}-\\x{2E3B}\\x{2E3C}-\\x{2E3F}\\x{2E40}\\x{2E41}\\x{2E42}\\x{2E43}-\\x{2E4F}\\x{2E50}-\\x{2E51}\\x{2E52}\\x{2E80}-\\x{2E99}\\x{2E9B}-\\x{2EF3}\\x{2F00}-\\x{2FD5}\\x{2FF0}-\\x{2FFB}\\x{3001}-\\x{3003}\\x{3004}\\x{3008}\\x{3009}\\x{300A}\\x{300B}\\x{300C}\\x{300D}\\x{300E}\\x{300F}\\x{3010}\\x{3011}\\x{3012}-\\x{3013}\\x{3014}\\x{3015}\\x{3016}\\x{3017}\\x{3018}\\x{3019}\\x{301A}\\x{301B}\\x{301C}\\x{301D}\\x{301E}-\\x{301F}\\x{3020}\\x{302A}-\\x{302D}\\x{3030}\\x{3036}-\\x{3037}\\x{303D}\\x{303E}-\\x{303F}\\x{3099}-\\x{309A}\\x{309B}-\\x{309C}\\x{30A0}\\x{30FB}\\x{31C0}-\\x{31E3}\\x{321D}-\\x{321E}\\x{3250}\\x{3251}-\\x{325F}\\x{327C}-\\x{327E}\\x{32B1}-\\x{32BF}\\x{32CC}-\\x{32CF}\\x{3377}-\\x{337A}\\x{33DE}-\\x{33DF}\\x{33FF}\\x{4DC0}-\\x{4DFF}\\x{A490}-\\x{A4C6}\\x{A60D}-\\x{A60F}\\x{A66F}\\x{A670}-\\x{A672}\\x{A673}\\x{A674}-\\x{A67D}\\x{A67E}\\x{A67F}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A700}-\\x{A716}\\x{A717}-\\x{A71F}\\x{A720}-\\x{A721}\\x{A788}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A828}-\\x{A82B}\\x{A82C}\\x{A838}\\x{A839}\\x{A874}-\\x{A877}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{AB6A}-\\x{AB6B}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1D}\\x{FB1E}\\x{FB1F}-\\x{FB28}\\x{FB29}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD3E}\\x{FD3F}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDD0}-\\x{FDEF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFD}\\x{FDFE}-\\x{FDFF}\\x{FE00}-\\x{FE0F}\\x{FE10}-\\x{FE16}\\x{FE17}\\x{FE18}\\x{FE19}\\x{FE20}-\\x{FE2F}\\x{FE30}\\x{FE31}-\\x{FE32}\\x{FE33}-\\x{FE34}\\x{FE35}\\x{FE36}\\x{FE37}\\x{FE38}\\x{FE39}\\x{FE3A}\\x{FE3B}\\x{FE3C}\\x{FE3D}\\x{FE3E}\\x{FE3F}\\x{FE40}\\x{FE41}\\x{FE42}\\x{FE43}\\x{FE44}\\x{FE45}-\\x{FE46}\\x{FE47}\\x{FE48}\\x{FE49}-\\x{FE4C}\\x{FE4D}-\\x{FE4F}\\x{FE50}\\x{FE51}\\x{FE52}\\x{FE54}\\x{FE55}\\x{FE56}-\\x{FE57}\\x{FE58}\\x{FE59}\\x{FE5A}\\x{FE5B}\\x{FE5C}\\x{FE5D}\\x{FE5E}\\x{FE5F}\\x{FE60}-\\x{FE61}\\x{FE62}\\x{FE63}\\x{FE64}-\\x{FE66}\\x{FE68}\\x{FE69}\\x{FE6A}\\x{FE6B}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{FEFF}\\x{FF01}-\\x{FF02}\\x{FF03}\\x{FF04}\\x{FF05}\\x{FF06}-\\x{FF07}\\x{FF08}\\x{FF09}\\x{FF0A}\\x{FF0B}\\x{FF0C}\\x{FF0D}\\x{FF0E}-\\x{FF0F}\\x{FF10}-\\x{FF19}\\x{FF1A}\\x{FF1B}\\x{FF1C}-\\x{FF1E}\\x{FF1F}-\\x{FF20}\\x{FF3B}\\x{FF3C}\\x{FF3D}\\x{FF3E}\\x{FF3F}\\x{FF40}\\x{FF5B}\\x{FF5C}\\x{FF5D}\\x{FF5E}\\x{FF5F}\\x{FF60}\\x{FF61}\\x{FF62}\\x{FF63}\\x{FF64}-\\x{FF65}\\x{FFE0}-\\x{FFE1}\\x{FFE2}\\x{FFE3}\\x{FFE4}\\x{FFE5}-\\x{FFE6}\\x{FFE8}\\x{FFE9}-\\x{FFEC}\\x{FFED}-\\x{FFEE}\\x{FFF0}-\\x{FFF8}\\x{FFF9}-\\x{FFFB}\\x{FFFC}-\\x{FFFD}\\x{FFFE}-\\x{FFFF}\\x{10101}\\x{10140}-\\x{10174}\\x{10175}-\\x{10178}\\x{10179}-\\x{10189}\\x{1018A}-\\x{1018B}\\x{1018C}\\x{10190}-\\x{1019C}\\x{101A0}\\x{101FD}\\x{102E0}\\x{102E1}-\\x{102FB}\\x{10376}-\\x{1037A}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{1091F}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A01}-\\x{10A03}\\x{10A04}\\x{10A05}-\\x{10A06}\\x{10A07}-\\x{10A0B}\\x{10A0C}-\\x{10A0F}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A38}-\\x{10A3A}\\x{10A3B}-\\x{10A3E}\\x{10A3F}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE5}-\\x{10AE6}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B39}-\\x{10B3F}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D24}-\\x{10D27}\\x{10D28}-\\x{10D2F}\\x{10D30}-\\x{10D39}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E60}-\\x{10E7E}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAB}-\\x{10EAC}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F46}-\\x{10F50}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{11001}\\x{11038}-\\x{11046}\\x{11052}-\\x{11065}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{11660}-\\x{1166C}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A06}\\x{11A09}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{11FD5}-\\x{11FDC}\\x{11FDD}-\\x{11FE0}\\x{11FE1}-\\x{11FF1}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE2}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1BCA0}-\\x{1BCA3}\\x{1D167}-\\x{1D169}\\x{1D173}-\\x{1D17A}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D200}-\\x{1D241}\\x{1D242}-\\x{1D244}\\x{1D245}\\x{1D300}-\\x{1D356}\\x{1D6DB}\\x{1D715}\\x{1D74F}\\x{1D789}\\x{1D7C3}\\x{1D7CE}-\\x{1D7FF}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E2FF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D0}-\\x{1E8D6}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E944}-\\x{1E94A}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF0}-\\x{1EEF1}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}\\x{1F000}-\\x{1F02B}\\x{1F030}-\\x{1F093}\\x{1F0A0}-\\x{1F0AE}\\x{1F0B1}-\\x{1F0BF}\\x{1F0C1}-\\x{1F0CF}\\x{1F0D1}-\\x{1F0F5}\\x{1F100}-\\x{1F10A}\\x{1F10B}-\\x{1F10C}\\x{1F10D}-\\x{1F10F}\\x{1F12F}\\x{1F16A}-\\x{1F16F}\\x{1F1AD}\\x{1F260}-\\x{1F265}\\x{1F300}-\\x{1F3FA}\\x{1F3FB}-\\x{1F3FF}\\x{1F400}-\\x{1F6D7}\\x{1F6E0}-\\x{1F6EC}\\x{1F6F0}-\\x{1F6FC}\\x{1F700}-\\x{1F773}\\x{1F780}-\\x{1F7D8}\\x{1F7E0}-\\x{1F7EB}\\x{1F800}-\\x{1F80B}\\x{1F810}-\\x{1F847}\\x{1F850}-\\x{1F859}\\x{1F860}-\\x{1F887}\\x{1F890}-\\x{1F8AD}\\x{1F8B0}-\\x{1F8B1}\\x{1F900}-\\x{1F978}\\x{1F97A}-\\x{1F9CB}\\x{1F9CD}-\\x{1FA53}\\x{1FA60}-\\x{1FA6D}\\x{1FA70}-\\x{1FA74}\\x{1FA78}-\\x{1FA7A}\\x{1FA80}-\\x{1FA86}\\x{1FA90}-\\x{1FAA8}\\x{1FAB0}-\\x{1FAB6}\\x{1FAC0}-\\x{1FAC2}\\x{1FAD0}-\\x{1FAD6}\\x{1FB00}-\\x{1FB92}\\x{1FB94}-\\x{1FBCA}\\x{1FBF0}-\\x{1FBF9}\\x{1FFFE}-\\x{1FFFF}\\x{2FFFE}-\\x{2FFFF}\\x{3FFFE}-\\x{3FFFF}\\x{4FFFE}-\\x{4FFFF}\\x{5FFFE}-\\x{5FFFF}\\x{6FFFE}-\\x{6FFFF}\\x{7FFFE}-\\x{7FFFF}\\x{8FFFE}-\\x{8FFFF}\\x{9FFFE}-\\x{9FFFF}\\x{AFFFE}-\\x{AFFFF}\\x{BFFFE}-\\x{BFFFF}\\x{CFFFE}-\\x{CFFFF}\\x{DFFFE}-\\x{E0000}\\x{E0001}\\x{E0002}-\\x{E001F}\\x{E0020}-\\x{E007F}\\x{E0080}-\\x{E00FF}\\x{E0100}-\\x{E01EF}\\x{E01F0}-\\x{E0FFF}\\x{EFFFE}-\\x{EFFFF}\\x{FFFFE}-\\x{FFFFF}\\x{10FFFE}-\\x{10FFFF}]/u'; const BIDI_STEP_3 = '/[\\x{0030}-\\x{0039}\\x{00B2}-\\x{00B3}\\x{00B9}\\x{0590}\\x{05BE}\\x{05C0}\\x{05C3}\\x{05C6}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0600}-\\x{0605}\\x{0608}\\x{060B}\\x{060D}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{0660}-\\x{0669}\\x{066B}-\\x{066C}\\x{066D}\\x{066E}-\\x{066F}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06DD}\\x{06E5}-\\x{06E6}\\x{06EE}-\\x{06EF}\\x{06F0}-\\x{06F9}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0712}-\\x{072F}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07F4}-\\x{07F5}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{081A}\\x{0824}\\x{0828}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{08E2}\\x{200F}\\x{2070}\\x{2074}-\\x{2079}\\x{2080}-\\x{2089}\\x{2488}-\\x{249B}\\x{FB1D}\\x{FB1F}-\\x{FB28}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFE}-\\x{FDFF}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{FF10}-\\x{FF19}\\x{102E1}-\\x{102FB}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A04}\\x{10A07}-\\x{10A0B}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A3B}-\\x{10A3E}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D28}-\\x{10D2F}\\x{10D30}-\\x{10D39}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E60}-\\x{10E7E}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{1D7CE}-\\x{1D7FF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}\\x{1F100}-\\x{1F10A}\\x{1FBF0}-\\x{1FBF9}][\\x{0300}-\\x{036F}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{0591}-\\x{05BD}\\x{05BF}\\x{05C1}-\\x{05C2}\\x{05C4}-\\x{05C5}\\x{05C7}\\x{0610}-\\x{061A}\\x{064B}-\\x{065F}\\x{0670}\\x{06D6}-\\x{06DC}\\x{06DF}-\\x{06E4}\\x{06E7}-\\x{06E8}\\x{06EA}-\\x{06ED}\\x{0711}\\x{0730}-\\x{074A}\\x{07A6}-\\x{07B0}\\x{07EB}-\\x{07F3}\\x{07FD}\\x{0816}-\\x{0819}\\x{081B}-\\x{0823}\\x{0825}-\\x{0827}\\x{0829}-\\x{082D}\\x{0859}-\\x{085B}\\x{08D3}-\\x{08E1}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C81}\\x{0CBC}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DD}\\x{180B}-\\x{180D}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2CEF}-\\x{2CF1}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{302A}-\\x{302D}\\x{3099}-\\x{309A}\\x{A66F}\\x{A670}-\\x{A672}\\x{A674}-\\x{A67D}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A82C}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1E}\\x{FE00}-\\x{FE0F}\\x{FE20}-\\x{FE2F}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10A01}-\\x{10A03}\\x{10A05}-\\x{10A06}\\x{10A0C}-\\x{10A0F}\\x{10A38}-\\x{10A3A}\\x{10A3F}\\x{10AE5}-\\x{10AE6}\\x{10D24}-\\x{10D27}\\x{10EAB}-\\x{10EAC}\\x{10F46}-\\x{10F50}\\x{11001}\\x{11038}-\\x{11046}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A06}\\x{11A09}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1D167}-\\x{1D169}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D242}-\\x{1D244}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E8D0}-\\x{1E8D6}\\x{1E944}-\\x{1E94A}\\x{E0100}-\\x{E01EF}]*$/u'; const BIDI_STEP_4_AN = '/[\\x{0600}-\\x{0605}\\x{0660}-\\x{0669}\\x{066B}-\\x{066C}\\x{06DD}\\x{08E2}\\x{10D30}-\\x{10D39}\\x{10E60}-\\x{10E7E}]/u'; const BIDI_STEP_4_EN = '/[\\x{0030}-\\x{0039}\\x{00B2}-\\x{00B3}\\x{00B9}\\x{06F0}-\\x{06F9}\\x{2070}\\x{2074}-\\x{2079}\\x{2080}-\\x{2089}\\x{2488}-\\x{249B}\\x{FF10}-\\x{FF19}\\x{102E1}-\\x{102FB}\\x{1D7CE}-\\x{1D7FF}\\x{1F100}-\\x{1F10A}\\x{1FBF0}-\\x{1FBF9}]/u'; const BIDI_STEP_5 = '/[\\x{0009}\\x{000A}\\x{000B}\\x{000C}\\x{000D}\\x{001C}-\\x{001E}\\x{001F}\\x{0020}\\x{0085}\\x{0590}\\x{05BE}\\x{05C0}\\x{05C3}\\x{05C6}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0600}-\\x{0605}\\x{0608}\\x{060B}\\x{060D}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{0660}-\\x{0669}\\x{066B}-\\x{066C}\\x{066D}\\x{066E}-\\x{066F}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06DD}\\x{06E5}-\\x{06E6}\\x{06EE}-\\x{06EF}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0712}-\\x{072F}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07F4}-\\x{07F5}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{081A}\\x{0824}\\x{0828}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{08E2}\\x{1680}\\x{2000}-\\x{200A}\\x{200F}\\x{2028}\\x{2029}\\x{202A}\\x{202B}\\x{202C}\\x{202D}\\x{202E}\\x{205F}\\x{2066}\\x{2067}\\x{2068}\\x{2069}\\x{3000}\\x{FB1D}\\x{FB1F}-\\x{FB28}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFE}-\\x{FDFF}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A04}\\x{10A07}-\\x{10A0B}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A3B}-\\x{10A3E}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D28}-\\x{10D2F}\\x{10D30}-\\x{10D39}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E60}-\\x{10E7E}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}]/u'; const BIDI_STEP_6 = '/[^\\x{0000}-\\x{0008}\\x{0009}\\x{000A}\\x{000B}\\x{000C}\\x{000D}\\x{000E}-\\x{001B}\\x{001C}-\\x{001E}\\x{001F}\\x{0020}\\x{0021}-\\x{0022}\\x{0023}\\x{0024}\\x{0025}\\x{0026}-\\x{0027}\\x{0028}\\x{0029}\\x{002A}\\x{002B}\\x{002C}\\x{002D}\\x{002E}-\\x{002F}\\x{003A}\\x{003B}\\x{003C}-\\x{003E}\\x{003F}-\\x{0040}\\x{005B}\\x{005C}\\x{005D}\\x{005E}\\x{005F}\\x{0060}\\x{007B}\\x{007C}\\x{007D}\\x{007E}\\x{007F}-\\x{0084}\\x{0085}\\x{0086}-\\x{009F}\\x{00A0}\\x{00A1}\\x{00A2}-\\x{00A5}\\x{00A6}\\x{00A7}\\x{00A8}\\x{00A9}\\x{00AB}\\x{00AC}\\x{00AD}\\x{00AE}\\x{00AF}\\x{00B0}\\x{00B1}\\x{00B4}\\x{00B6}-\\x{00B7}\\x{00B8}\\x{00BB}\\x{00BC}-\\x{00BE}\\x{00BF}\\x{00D7}\\x{00F7}\\x{02B9}-\\x{02BA}\\x{02C2}-\\x{02C5}\\x{02C6}-\\x{02CF}\\x{02D2}-\\x{02DF}\\x{02E5}-\\x{02EB}\\x{02EC}\\x{02ED}\\x{02EF}-\\x{02FF}\\x{0300}-\\x{036F}\\x{0374}\\x{0375}\\x{037E}\\x{0384}-\\x{0385}\\x{0387}\\x{03F6}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{058A}\\x{058D}-\\x{058E}\\x{058F}\\x{0590}\\x{0591}-\\x{05BD}\\x{05BE}\\x{05BF}\\x{05C0}\\x{05C1}-\\x{05C2}\\x{05C3}\\x{05C4}-\\x{05C5}\\x{05C6}\\x{05C7}\\x{05C8}-\\x{05CF}\\x{05D0}-\\x{05EA}\\x{05EB}-\\x{05EE}\\x{05EF}-\\x{05F2}\\x{05F3}-\\x{05F4}\\x{05F5}-\\x{05FF}\\x{0600}-\\x{0605}\\x{0606}-\\x{0607}\\x{0608}\\x{0609}-\\x{060A}\\x{060B}\\x{060C}\\x{060D}\\x{060E}-\\x{060F}\\x{0610}-\\x{061A}\\x{061B}\\x{061C}\\x{061D}\\x{061E}-\\x{061F}\\x{0620}-\\x{063F}\\x{0640}\\x{0641}-\\x{064A}\\x{064B}-\\x{065F}\\x{0660}-\\x{0669}\\x{066A}\\x{066B}-\\x{066C}\\x{066D}\\x{066E}-\\x{066F}\\x{0670}\\x{0671}-\\x{06D3}\\x{06D4}\\x{06D5}\\x{06D6}-\\x{06DC}\\x{06DD}\\x{06DE}\\x{06DF}-\\x{06E4}\\x{06E5}-\\x{06E6}\\x{06E7}-\\x{06E8}\\x{06E9}\\x{06EA}-\\x{06ED}\\x{06EE}-\\x{06EF}\\x{06FA}-\\x{06FC}\\x{06FD}-\\x{06FE}\\x{06FF}\\x{0700}-\\x{070D}\\x{070E}\\x{070F}\\x{0710}\\x{0711}\\x{0712}-\\x{072F}\\x{0730}-\\x{074A}\\x{074B}-\\x{074C}\\x{074D}-\\x{07A5}\\x{07A6}-\\x{07B0}\\x{07B1}\\x{07B2}-\\x{07BF}\\x{07C0}-\\x{07C9}\\x{07CA}-\\x{07EA}\\x{07EB}-\\x{07F3}\\x{07F4}-\\x{07F5}\\x{07F6}\\x{07F7}-\\x{07F9}\\x{07FA}\\x{07FB}-\\x{07FC}\\x{07FD}\\x{07FE}-\\x{07FF}\\x{0800}-\\x{0815}\\x{0816}-\\x{0819}\\x{081A}\\x{081B}-\\x{0823}\\x{0824}\\x{0825}-\\x{0827}\\x{0828}\\x{0829}-\\x{082D}\\x{082E}-\\x{082F}\\x{0830}-\\x{083E}\\x{083F}\\x{0840}-\\x{0858}\\x{0859}-\\x{085B}\\x{085C}-\\x{085D}\\x{085E}\\x{085F}\\x{0860}-\\x{086A}\\x{086B}-\\x{086F}\\x{0870}-\\x{089F}\\x{08A0}-\\x{08B4}\\x{08B5}\\x{08B6}-\\x{08C7}\\x{08C8}-\\x{08D2}\\x{08D3}-\\x{08E1}\\x{08E2}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09F2}-\\x{09F3}\\x{09FB}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AF1}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0BF3}-\\x{0BF8}\\x{0BF9}\\x{0BFA}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C78}-\\x{0C7E}\\x{0C81}\\x{0CBC}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E3F}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F3A}\\x{0F3B}\\x{0F3C}\\x{0F3D}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1390}-\\x{1399}\\x{1400}\\x{1680}\\x{169B}\\x{169C}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DB}\\x{17DD}\\x{17F0}-\\x{17F9}\\x{1800}-\\x{1805}\\x{1806}\\x{1807}-\\x{180A}\\x{180B}-\\x{180D}\\x{180E}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1940}\\x{1944}-\\x{1945}\\x{19DE}-\\x{19FF}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{1FBD}\\x{1FBF}-\\x{1FC1}\\x{1FCD}-\\x{1FCF}\\x{1FDD}-\\x{1FDF}\\x{1FED}-\\x{1FEF}\\x{1FFD}-\\x{1FFE}\\x{2000}-\\x{200A}\\x{200B}-\\x{200D}\\x{200F}\\x{2010}-\\x{2015}\\x{2016}-\\x{2017}\\x{2018}\\x{2019}\\x{201A}\\x{201B}-\\x{201C}\\x{201D}\\x{201E}\\x{201F}\\x{2020}-\\x{2027}\\x{2028}\\x{2029}\\x{202A}\\x{202B}\\x{202C}\\x{202D}\\x{202E}\\x{202F}\\x{2030}-\\x{2034}\\x{2035}-\\x{2038}\\x{2039}\\x{203A}\\x{203B}-\\x{203E}\\x{203F}-\\x{2040}\\x{2041}-\\x{2043}\\x{2044}\\x{2045}\\x{2046}\\x{2047}-\\x{2051}\\x{2052}\\x{2053}\\x{2054}\\x{2055}-\\x{205E}\\x{205F}\\x{2060}-\\x{2064}\\x{2065}\\x{2066}\\x{2067}\\x{2068}\\x{2069}\\x{206A}-\\x{206F}\\x{207A}-\\x{207B}\\x{207C}\\x{207D}\\x{207E}\\x{208A}-\\x{208B}\\x{208C}\\x{208D}\\x{208E}\\x{20A0}-\\x{20BF}\\x{20C0}-\\x{20CF}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2100}-\\x{2101}\\x{2103}-\\x{2106}\\x{2108}-\\x{2109}\\x{2114}\\x{2116}-\\x{2117}\\x{2118}\\x{211E}-\\x{2123}\\x{2125}\\x{2127}\\x{2129}\\x{212E}\\x{213A}-\\x{213B}\\x{2140}-\\x{2144}\\x{214A}\\x{214B}\\x{214C}-\\x{214D}\\x{2150}-\\x{215F}\\x{2189}\\x{218A}-\\x{218B}\\x{2190}-\\x{2194}\\x{2195}-\\x{2199}\\x{219A}-\\x{219B}\\x{219C}-\\x{219F}\\x{21A0}\\x{21A1}-\\x{21A2}\\x{21A3}\\x{21A4}-\\x{21A5}\\x{21A6}\\x{21A7}-\\x{21AD}\\x{21AE}\\x{21AF}-\\x{21CD}\\x{21CE}-\\x{21CF}\\x{21D0}-\\x{21D1}\\x{21D2}\\x{21D3}\\x{21D4}\\x{21D5}-\\x{21F3}\\x{21F4}-\\x{2211}\\x{2212}\\x{2213}\\x{2214}-\\x{22FF}\\x{2300}-\\x{2307}\\x{2308}\\x{2309}\\x{230A}\\x{230B}\\x{230C}-\\x{231F}\\x{2320}-\\x{2321}\\x{2322}-\\x{2328}\\x{2329}\\x{232A}\\x{232B}-\\x{2335}\\x{237B}\\x{237C}\\x{237D}-\\x{2394}\\x{2396}-\\x{239A}\\x{239B}-\\x{23B3}\\x{23B4}-\\x{23DB}\\x{23DC}-\\x{23E1}\\x{23E2}-\\x{2426}\\x{2440}-\\x{244A}\\x{2460}-\\x{2487}\\x{24EA}-\\x{24FF}\\x{2500}-\\x{25B6}\\x{25B7}\\x{25B8}-\\x{25C0}\\x{25C1}\\x{25C2}-\\x{25F7}\\x{25F8}-\\x{25FF}\\x{2600}-\\x{266E}\\x{266F}\\x{2670}-\\x{26AB}\\x{26AD}-\\x{2767}\\x{2768}\\x{2769}\\x{276A}\\x{276B}\\x{276C}\\x{276D}\\x{276E}\\x{276F}\\x{2770}\\x{2771}\\x{2772}\\x{2773}\\x{2774}\\x{2775}\\x{2776}-\\x{2793}\\x{2794}-\\x{27BF}\\x{27C0}-\\x{27C4}\\x{27C5}\\x{27C6}\\x{27C7}-\\x{27E5}\\x{27E6}\\x{27E7}\\x{27E8}\\x{27E9}\\x{27EA}\\x{27EB}\\x{27EC}\\x{27ED}\\x{27EE}\\x{27EF}\\x{27F0}-\\x{27FF}\\x{2900}-\\x{2982}\\x{2983}\\x{2984}\\x{2985}\\x{2986}\\x{2987}\\x{2988}\\x{2989}\\x{298A}\\x{298B}\\x{298C}\\x{298D}\\x{298E}\\x{298F}\\x{2990}\\x{2991}\\x{2992}\\x{2993}\\x{2994}\\x{2995}\\x{2996}\\x{2997}\\x{2998}\\x{2999}-\\x{29D7}\\x{29D8}\\x{29D9}\\x{29DA}\\x{29DB}\\x{29DC}-\\x{29FB}\\x{29FC}\\x{29FD}\\x{29FE}-\\x{2AFF}\\x{2B00}-\\x{2B2F}\\x{2B30}-\\x{2B44}\\x{2B45}-\\x{2B46}\\x{2B47}-\\x{2B4C}\\x{2B4D}-\\x{2B73}\\x{2B76}-\\x{2B95}\\x{2B97}-\\x{2BFF}\\x{2CE5}-\\x{2CEA}\\x{2CEF}-\\x{2CF1}\\x{2CF9}-\\x{2CFC}\\x{2CFD}\\x{2CFE}-\\x{2CFF}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{2E00}-\\x{2E01}\\x{2E02}\\x{2E03}\\x{2E04}\\x{2E05}\\x{2E06}-\\x{2E08}\\x{2E09}\\x{2E0A}\\x{2E0B}\\x{2E0C}\\x{2E0D}\\x{2E0E}-\\x{2E16}\\x{2E17}\\x{2E18}-\\x{2E19}\\x{2E1A}\\x{2E1B}\\x{2E1C}\\x{2E1D}\\x{2E1E}-\\x{2E1F}\\x{2E20}\\x{2E21}\\x{2E22}\\x{2E23}\\x{2E24}\\x{2E25}\\x{2E26}\\x{2E27}\\x{2E28}\\x{2E29}\\x{2E2A}-\\x{2E2E}\\x{2E2F}\\x{2E30}-\\x{2E39}\\x{2E3A}-\\x{2E3B}\\x{2E3C}-\\x{2E3F}\\x{2E40}\\x{2E41}\\x{2E42}\\x{2E43}-\\x{2E4F}\\x{2E50}-\\x{2E51}\\x{2E52}\\x{2E80}-\\x{2E99}\\x{2E9B}-\\x{2EF3}\\x{2F00}-\\x{2FD5}\\x{2FF0}-\\x{2FFB}\\x{3000}\\x{3001}-\\x{3003}\\x{3004}\\x{3008}\\x{3009}\\x{300A}\\x{300B}\\x{300C}\\x{300D}\\x{300E}\\x{300F}\\x{3010}\\x{3011}\\x{3012}-\\x{3013}\\x{3014}\\x{3015}\\x{3016}\\x{3017}\\x{3018}\\x{3019}\\x{301A}\\x{301B}\\x{301C}\\x{301D}\\x{301E}-\\x{301F}\\x{3020}\\x{302A}-\\x{302D}\\x{3030}\\x{3036}-\\x{3037}\\x{303D}\\x{303E}-\\x{303F}\\x{3099}-\\x{309A}\\x{309B}-\\x{309C}\\x{30A0}\\x{30FB}\\x{31C0}-\\x{31E3}\\x{321D}-\\x{321E}\\x{3250}\\x{3251}-\\x{325F}\\x{327C}-\\x{327E}\\x{32B1}-\\x{32BF}\\x{32CC}-\\x{32CF}\\x{3377}-\\x{337A}\\x{33DE}-\\x{33DF}\\x{33FF}\\x{4DC0}-\\x{4DFF}\\x{A490}-\\x{A4C6}\\x{A60D}-\\x{A60F}\\x{A66F}\\x{A670}-\\x{A672}\\x{A673}\\x{A674}-\\x{A67D}\\x{A67E}\\x{A67F}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A700}-\\x{A716}\\x{A717}-\\x{A71F}\\x{A720}-\\x{A721}\\x{A788}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A828}-\\x{A82B}\\x{A82C}\\x{A838}\\x{A839}\\x{A874}-\\x{A877}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{AB6A}-\\x{AB6B}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1D}\\x{FB1E}\\x{FB1F}-\\x{FB28}\\x{FB29}\\x{FB2A}-\\x{FB36}\\x{FB37}\\x{FB38}-\\x{FB3C}\\x{FB3D}\\x{FB3E}\\x{FB3F}\\x{FB40}-\\x{FB41}\\x{FB42}\\x{FB43}-\\x{FB44}\\x{FB45}\\x{FB46}-\\x{FB4F}\\x{FB50}-\\x{FBB1}\\x{FBB2}-\\x{FBC1}\\x{FBC2}-\\x{FBD2}\\x{FBD3}-\\x{FD3D}\\x{FD3E}\\x{FD3F}\\x{FD40}-\\x{FD4F}\\x{FD50}-\\x{FD8F}\\x{FD90}-\\x{FD91}\\x{FD92}-\\x{FDC7}\\x{FDC8}-\\x{FDCF}\\x{FDD0}-\\x{FDEF}\\x{FDF0}-\\x{FDFB}\\x{FDFC}\\x{FDFD}\\x{FDFE}-\\x{FDFF}\\x{FE00}-\\x{FE0F}\\x{FE10}-\\x{FE16}\\x{FE17}\\x{FE18}\\x{FE19}\\x{FE20}-\\x{FE2F}\\x{FE30}\\x{FE31}-\\x{FE32}\\x{FE33}-\\x{FE34}\\x{FE35}\\x{FE36}\\x{FE37}\\x{FE38}\\x{FE39}\\x{FE3A}\\x{FE3B}\\x{FE3C}\\x{FE3D}\\x{FE3E}\\x{FE3F}\\x{FE40}\\x{FE41}\\x{FE42}\\x{FE43}\\x{FE44}\\x{FE45}-\\x{FE46}\\x{FE47}\\x{FE48}\\x{FE49}-\\x{FE4C}\\x{FE4D}-\\x{FE4F}\\x{FE50}\\x{FE51}\\x{FE52}\\x{FE54}\\x{FE55}\\x{FE56}-\\x{FE57}\\x{FE58}\\x{FE59}\\x{FE5A}\\x{FE5B}\\x{FE5C}\\x{FE5D}\\x{FE5E}\\x{FE5F}\\x{FE60}-\\x{FE61}\\x{FE62}\\x{FE63}\\x{FE64}-\\x{FE66}\\x{FE68}\\x{FE69}\\x{FE6A}\\x{FE6B}\\x{FE70}-\\x{FE74}\\x{FE75}\\x{FE76}-\\x{FEFC}\\x{FEFD}-\\x{FEFE}\\x{FEFF}\\x{FF01}-\\x{FF02}\\x{FF03}\\x{FF04}\\x{FF05}\\x{FF06}-\\x{FF07}\\x{FF08}\\x{FF09}\\x{FF0A}\\x{FF0B}\\x{FF0C}\\x{FF0D}\\x{FF0E}-\\x{FF0F}\\x{FF1A}\\x{FF1B}\\x{FF1C}-\\x{FF1E}\\x{FF1F}-\\x{FF20}\\x{FF3B}\\x{FF3C}\\x{FF3D}\\x{FF3E}\\x{FF3F}\\x{FF40}\\x{FF5B}\\x{FF5C}\\x{FF5D}\\x{FF5E}\\x{FF5F}\\x{FF60}\\x{FF61}\\x{FF62}\\x{FF63}\\x{FF64}-\\x{FF65}\\x{FFE0}-\\x{FFE1}\\x{FFE2}\\x{FFE3}\\x{FFE4}\\x{FFE5}-\\x{FFE6}\\x{FFE8}\\x{FFE9}-\\x{FFEC}\\x{FFED}-\\x{FFEE}\\x{FFF0}-\\x{FFF8}\\x{FFF9}-\\x{FFFB}\\x{FFFC}-\\x{FFFD}\\x{FFFE}-\\x{FFFF}\\x{10101}\\x{10140}-\\x{10174}\\x{10175}-\\x{10178}\\x{10179}-\\x{10189}\\x{1018A}-\\x{1018B}\\x{1018C}\\x{10190}-\\x{1019C}\\x{101A0}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10800}-\\x{10805}\\x{10806}-\\x{10807}\\x{10808}\\x{10809}\\x{1080A}-\\x{10835}\\x{10836}\\x{10837}-\\x{10838}\\x{10839}-\\x{1083B}\\x{1083C}\\x{1083D}-\\x{1083E}\\x{1083F}-\\x{10855}\\x{10856}\\x{10857}\\x{10858}-\\x{1085F}\\x{10860}-\\x{10876}\\x{10877}-\\x{10878}\\x{10879}-\\x{1087F}\\x{10880}-\\x{1089E}\\x{1089F}-\\x{108A6}\\x{108A7}-\\x{108AF}\\x{108B0}-\\x{108DF}\\x{108E0}-\\x{108F2}\\x{108F3}\\x{108F4}-\\x{108F5}\\x{108F6}-\\x{108FA}\\x{108FB}-\\x{108FF}\\x{10900}-\\x{10915}\\x{10916}-\\x{1091B}\\x{1091C}-\\x{1091E}\\x{1091F}\\x{10920}-\\x{10939}\\x{1093A}-\\x{1093E}\\x{1093F}\\x{10940}-\\x{1097F}\\x{10980}-\\x{109B7}\\x{109B8}-\\x{109BB}\\x{109BC}-\\x{109BD}\\x{109BE}-\\x{109BF}\\x{109C0}-\\x{109CF}\\x{109D0}-\\x{109D1}\\x{109D2}-\\x{109FF}\\x{10A00}\\x{10A01}-\\x{10A03}\\x{10A04}\\x{10A05}-\\x{10A06}\\x{10A07}-\\x{10A0B}\\x{10A0C}-\\x{10A0F}\\x{10A10}-\\x{10A13}\\x{10A14}\\x{10A15}-\\x{10A17}\\x{10A18}\\x{10A19}-\\x{10A35}\\x{10A36}-\\x{10A37}\\x{10A38}-\\x{10A3A}\\x{10A3B}-\\x{10A3E}\\x{10A3F}\\x{10A40}-\\x{10A48}\\x{10A49}-\\x{10A4F}\\x{10A50}-\\x{10A58}\\x{10A59}-\\x{10A5F}\\x{10A60}-\\x{10A7C}\\x{10A7D}-\\x{10A7E}\\x{10A7F}\\x{10A80}-\\x{10A9C}\\x{10A9D}-\\x{10A9F}\\x{10AA0}-\\x{10ABF}\\x{10AC0}-\\x{10AC7}\\x{10AC8}\\x{10AC9}-\\x{10AE4}\\x{10AE5}-\\x{10AE6}\\x{10AE7}-\\x{10AEA}\\x{10AEB}-\\x{10AEF}\\x{10AF0}-\\x{10AF6}\\x{10AF7}-\\x{10AFF}\\x{10B00}-\\x{10B35}\\x{10B36}-\\x{10B38}\\x{10B39}-\\x{10B3F}\\x{10B40}-\\x{10B55}\\x{10B56}-\\x{10B57}\\x{10B58}-\\x{10B5F}\\x{10B60}-\\x{10B72}\\x{10B73}-\\x{10B77}\\x{10B78}-\\x{10B7F}\\x{10B80}-\\x{10B91}\\x{10B92}-\\x{10B98}\\x{10B99}-\\x{10B9C}\\x{10B9D}-\\x{10BA8}\\x{10BA9}-\\x{10BAF}\\x{10BB0}-\\x{10BFF}\\x{10C00}-\\x{10C48}\\x{10C49}-\\x{10C7F}\\x{10C80}-\\x{10CB2}\\x{10CB3}-\\x{10CBF}\\x{10CC0}-\\x{10CF2}\\x{10CF3}-\\x{10CF9}\\x{10CFA}-\\x{10CFF}\\x{10D00}-\\x{10D23}\\x{10D24}-\\x{10D27}\\x{10D28}-\\x{10D2F}\\x{10D30}-\\x{10D39}\\x{10D3A}-\\x{10D3F}\\x{10D40}-\\x{10E5F}\\x{10E60}-\\x{10E7E}\\x{10E7F}\\x{10E80}-\\x{10EA9}\\x{10EAA}\\x{10EAB}-\\x{10EAC}\\x{10EAD}\\x{10EAE}-\\x{10EAF}\\x{10EB0}-\\x{10EB1}\\x{10EB2}-\\x{10EFF}\\x{10F00}-\\x{10F1C}\\x{10F1D}-\\x{10F26}\\x{10F27}\\x{10F28}-\\x{10F2F}\\x{10F30}-\\x{10F45}\\x{10F46}-\\x{10F50}\\x{10F51}-\\x{10F54}\\x{10F55}-\\x{10F59}\\x{10F5A}-\\x{10F6F}\\x{10F70}-\\x{10FAF}\\x{10FB0}-\\x{10FC4}\\x{10FC5}-\\x{10FCB}\\x{10FCC}-\\x{10FDF}\\x{10FE0}-\\x{10FF6}\\x{10FF7}-\\x{10FFF}\\x{11001}\\x{11038}-\\x{11046}\\x{11052}-\\x{11065}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{11660}-\\x{1166C}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A06}\\x{11A09}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{11FD5}-\\x{11FDC}\\x{11FDD}-\\x{11FE0}\\x{11FE1}-\\x{11FF1}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE2}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1BCA0}-\\x{1BCA3}\\x{1D167}-\\x{1D169}\\x{1D173}-\\x{1D17A}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D200}-\\x{1D241}\\x{1D242}-\\x{1D244}\\x{1D245}\\x{1D300}-\\x{1D356}\\x{1D6DB}\\x{1D715}\\x{1D74F}\\x{1D789}\\x{1D7C3}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E2FF}\\x{1E800}-\\x{1E8C4}\\x{1E8C5}-\\x{1E8C6}\\x{1E8C7}-\\x{1E8CF}\\x{1E8D0}-\\x{1E8D6}\\x{1E8D7}-\\x{1E8FF}\\x{1E900}-\\x{1E943}\\x{1E944}-\\x{1E94A}\\x{1E94B}\\x{1E94C}-\\x{1E94F}\\x{1E950}-\\x{1E959}\\x{1E95A}-\\x{1E95D}\\x{1E95E}-\\x{1E95F}\\x{1E960}-\\x{1EC6F}\\x{1EC70}\\x{1EC71}-\\x{1ECAB}\\x{1ECAC}\\x{1ECAD}-\\x{1ECAF}\\x{1ECB0}\\x{1ECB1}-\\x{1ECB4}\\x{1ECB5}-\\x{1ECBF}\\x{1ECC0}-\\x{1ECFF}\\x{1ED00}\\x{1ED01}-\\x{1ED2D}\\x{1ED2E}\\x{1ED2F}-\\x{1ED3D}\\x{1ED3E}-\\x{1ED4F}\\x{1ED50}-\\x{1EDFF}\\x{1EE00}-\\x{1EE03}\\x{1EE04}\\x{1EE05}-\\x{1EE1F}\\x{1EE20}\\x{1EE21}-\\x{1EE22}\\x{1EE23}\\x{1EE24}\\x{1EE25}-\\x{1EE26}\\x{1EE27}\\x{1EE28}\\x{1EE29}-\\x{1EE32}\\x{1EE33}\\x{1EE34}-\\x{1EE37}\\x{1EE38}\\x{1EE39}\\x{1EE3A}\\x{1EE3B}\\x{1EE3C}-\\x{1EE41}\\x{1EE42}\\x{1EE43}-\\x{1EE46}\\x{1EE47}\\x{1EE48}\\x{1EE49}\\x{1EE4A}\\x{1EE4B}\\x{1EE4C}\\x{1EE4D}-\\x{1EE4F}\\x{1EE50}\\x{1EE51}-\\x{1EE52}\\x{1EE53}\\x{1EE54}\\x{1EE55}-\\x{1EE56}\\x{1EE57}\\x{1EE58}\\x{1EE59}\\x{1EE5A}\\x{1EE5B}\\x{1EE5C}\\x{1EE5D}\\x{1EE5E}\\x{1EE5F}\\x{1EE60}\\x{1EE61}-\\x{1EE62}\\x{1EE63}\\x{1EE64}\\x{1EE65}-\\x{1EE66}\\x{1EE67}-\\x{1EE6A}\\x{1EE6B}\\x{1EE6C}-\\x{1EE72}\\x{1EE73}\\x{1EE74}-\\x{1EE77}\\x{1EE78}\\x{1EE79}-\\x{1EE7C}\\x{1EE7D}\\x{1EE7E}\\x{1EE7F}\\x{1EE80}-\\x{1EE89}\\x{1EE8A}\\x{1EE8B}-\\x{1EE9B}\\x{1EE9C}-\\x{1EEA0}\\x{1EEA1}-\\x{1EEA3}\\x{1EEA4}\\x{1EEA5}-\\x{1EEA9}\\x{1EEAA}\\x{1EEAB}-\\x{1EEBB}\\x{1EEBC}-\\x{1EEEF}\\x{1EEF0}-\\x{1EEF1}\\x{1EEF2}-\\x{1EEFF}\\x{1EF00}-\\x{1EFFF}\\x{1F000}-\\x{1F02B}\\x{1F030}-\\x{1F093}\\x{1F0A0}-\\x{1F0AE}\\x{1F0B1}-\\x{1F0BF}\\x{1F0C1}-\\x{1F0CF}\\x{1F0D1}-\\x{1F0F5}\\x{1F10B}-\\x{1F10C}\\x{1F10D}-\\x{1F10F}\\x{1F12F}\\x{1F16A}-\\x{1F16F}\\x{1F1AD}\\x{1F260}-\\x{1F265}\\x{1F300}-\\x{1F3FA}\\x{1F3FB}-\\x{1F3FF}\\x{1F400}-\\x{1F6D7}\\x{1F6E0}-\\x{1F6EC}\\x{1F6F0}-\\x{1F6FC}\\x{1F700}-\\x{1F773}\\x{1F780}-\\x{1F7D8}\\x{1F7E0}-\\x{1F7EB}\\x{1F800}-\\x{1F80B}\\x{1F810}-\\x{1F847}\\x{1F850}-\\x{1F859}\\x{1F860}-\\x{1F887}\\x{1F890}-\\x{1F8AD}\\x{1F8B0}-\\x{1F8B1}\\x{1F900}-\\x{1F978}\\x{1F97A}-\\x{1F9CB}\\x{1F9CD}-\\x{1FA53}\\x{1FA60}-\\x{1FA6D}\\x{1FA70}-\\x{1FA74}\\x{1FA78}-\\x{1FA7A}\\x{1FA80}-\\x{1FA86}\\x{1FA90}-\\x{1FAA8}\\x{1FAB0}-\\x{1FAB6}\\x{1FAC0}-\\x{1FAC2}\\x{1FAD0}-\\x{1FAD6}\\x{1FB00}-\\x{1FB92}\\x{1FB94}-\\x{1FBCA}\\x{1FFFE}-\\x{1FFFF}\\x{2FFFE}-\\x{2FFFF}\\x{3FFFE}-\\x{3FFFF}\\x{4FFFE}-\\x{4FFFF}\\x{5FFFE}-\\x{5FFFF}\\x{6FFFE}-\\x{6FFFF}\\x{7FFFE}-\\x{7FFFF}\\x{8FFFE}-\\x{8FFFF}\\x{9FFFE}-\\x{9FFFF}\\x{AFFFE}-\\x{AFFFF}\\x{BFFFE}-\\x{BFFFF}\\x{CFFFE}-\\x{CFFFF}\\x{DFFFE}-\\x{E0000}\\x{E0001}\\x{E0002}-\\x{E001F}\\x{E0020}-\\x{E007F}\\x{E0080}-\\x{E00FF}\\x{E0100}-\\x{E01EF}\\x{E01F0}-\\x{E0FFF}\\x{EFFFE}-\\x{EFFFF}\\x{FFFFE}-\\x{FFFFF}\\x{10FFFE}-\\x{10FFFF}][\\x{0300}-\\x{036F}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{0591}-\\x{05BD}\\x{05BF}\\x{05C1}-\\x{05C2}\\x{05C4}-\\x{05C5}\\x{05C7}\\x{0610}-\\x{061A}\\x{064B}-\\x{065F}\\x{0670}\\x{06D6}-\\x{06DC}\\x{06DF}-\\x{06E4}\\x{06E7}-\\x{06E8}\\x{06EA}-\\x{06ED}\\x{0711}\\x{0730}-\\x{074A}\\x{07A6}-\\x{07B0}\\x{07EB}-\\x{07F3}\\x{07FD}\\x{0816}-\\x{0819}\\x{081B}-\\x{0823}\\x{0825}-\\x{0827}\\x{0829}-\\x{082D}\\x{0859}-\\x{085B}\\x{08D3}-\\x{08E1}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C81}\\x{0CBC}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DD}\\x{180B}-\\x{180D}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2CEF}-\\x{2CF1}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{302A}-\\x{302D}\\x{3099}-\\x{309A}\\x{A66F}\\x{A670}-\\x{A672}\\x{A674}-\\x{A67D}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A82C}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1E}\\x{FE00}-\\x{FE0F}\\x{FE20}-\\x{FE2F}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10A01}-\\x{10A03}\\x{10A05}-\\x{10A06}\\x{10A0C}-\\x{10A0F}\\x{10A38}-\\x{10A3A}\\x{10A3F}\\x{10AE5}-\\x{10AE6}\\x{10D24}-\\x{10D27}\\x{10EAB}-\\x{10EAC}\\x{10F46}-\\x{10F50}\\x{11001}\\x{11038}-\\x{11046}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A06}\\x{11A09}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1D167}-\\x{1D169}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D242}-\\x{1D244}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E8D0}-\\x{1E8D6}\\x{1E944}-\\x{1E94A}\\x{E0100}-\\x{E01EF}]*$/u'; const ZWNJ = '/([\\x{A872}\\x{10ACD}\\x{10AD7}\\x{10D00}\\x{10FCB}\\x{0620}\\x{0626}\\x{0628}\\x{062A}-\\x{062E}\\x{0633}-\\x{063F}\\x{0641}-\\x{0647}\\x{0649}-\\x{064A}\\x{066E}-\\x{066F}\\x{0678}-\\x{0687}\\x{069A}-\\x{06BF}\\x{06C1}-\\x{06C2}\\x{06CC}\\x{06CE}\\x{06D0}-\\x{06D1}\\x{06FA}-\\x{06FC}\\x{06FF}\\x{0712}-\\x{0714}\\x{071A}-\\x{071D}\\x{071F}-\\x{0727}\\x{0729}\\x{072B}\\x{072D}-\\x{072E}\\x{074E}-\\x{0758}\\x{075C}-\\x{076A}\\x{076D}-\\x{0770}\\x{0772}\\x{0775}-\\x{0777}\\x{077A}-\\x{077F}\\x{07CA}-\\x{07EA}\\x{0841}-\\x{0845}\\x{0848}\\x{084A}-\\x{0853}\\x{0855}\\x{0860}\\x{0862}-\\x{0865}\\x{0868}\\x{08A0}-\\x{08A9}\\x{08AF}-\\x{08B0}\\x{08B3}-\\x{08B4}\\x{08B6}-\\x{08B8}\\x{08BA}-\\x{08C7}\\x{1807}\\x{1820}-\\x{1842}\\x{1843}\\x{1844}-\\x{1878}\\x{1887}-\\x{18A8}\\x{18AA}\\x{A840}-\\x{A871}\\x{10AC0}-\\x{10AC4}\\x{10AD3}-\\x{10AD6}\\x{10AD8}-\\x{10ADC}\\x{10ADE}-\\x{10AE0}\\x{10AEB}-\\x{10AEE}\\x{10B80}\\x{10B82}\\x{10B86}-\\x{10B88}\\x{10B8A}-\\x{10B8B}\\x{10B8D}\\x{10B90}\\x{10BAD}-\\x{10BAE}\\x{10D01}-\\x{10D21}\\x{10D23}\\x{10F30}-\\x{10F32}\\x{10F34}-\\x{10F44}\\x{10F51}-\\x{10F53}\\x{10FB0}\\x{10FB2}-\\x{10FB3}\\x{10FB8}\\x{10FBB}-\\x{10FBC}\\x{10FBE}-\\x{10FBF}\\x{10FC1}\\x{10FC4}\\x{10FCA}\\x{1E900}-\\x{1E943}][\\x{00AD}\\x{0300}-\\x{036F}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{0591}-\\x{05BD}\\x{05BF}\\x{05C1}-\\x{05C2}\\x{05C4}-\\x{05C5}\\x{05C7}\\x{0610}-\\x{061A}\\x{061C}\\x{064B}-\\x{065F}\\x{0670}\\x{06D6}-\\x{06DC}\\x{06DF}-\\x{06E4}\\x{06E7}-\\x{06E8}\\x{06EA}-\\x{06ED}\\x{070F}\\x{0711}\\x{0730}-\\x{074A}\\x{07A6}-\\x{07B0}\\x{07EB}-\\x{07F3}\\x{07FD}\\x{0816}-\\x{0819}\\x{081B}-\\x{0823}\\x{0825}-\\x{0827}\\x{0829}-\\x{082D}\\x{0859}-\\x{085B}\\x{08D3}-\\x{08E1}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C81}\\x{0CBC}\\x{0CBF}\\x{0CC6}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DD}\\x{180B}-\\x{180D}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{200B}\\x{200E}-\\x{200F}\\x{202A}-\\x{202E}\\x{2060}-\\x{2064}\\x{206A}-\\x{206F}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2CEF}-\\x{2CF1}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{302A}-\\x{302D}\\x{3099}-\\x{309A}\\x{A66F}\\x{A670}-\\x{A672}\\x{A674}-\\x{A67D}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A82C}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1E}\\x{FE00}-\\x{FE0F}\\x{FE20}-\\x{FE2F}\\x{FEFF}\\x{FFF9}-\\x{FFFB}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10A01}-\\x{10A03}\\x{10A05}-\\x{10A06}\\x{10A0C}-\\x{10A0F}\\x{10A38}-\\x{10A3A}\\x{10A3F}\\x{10AE5}-\\x{10AE6}\\x{10D24}-\\x{10D27}\\x{10EAB}-\\x{10EAC}\\x{10F46}-\\x{10F50}\\x{11001}\\x{11038}-\\x{11046}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C3F}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{13430}-\\x{13438}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1BCA0}-\\x{1BCA3}\\x{1D167}-\\x{1D169}\\x{1D173}-\\x{1D17A}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D242}-\\x{1D244}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E8D0}-\\x{1E8D6}\\x{1E944}-\\x{1E94A}\\x{1E94B}\\x{E0001}\\x{E0020}-\\x{E007F}\\x{E0100}-\\x{E01EF}]*\\x{200C}[\\x{00AD}\\x{0300}-\\x{036F}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{0591}-\\x{05BD}\\x{05BF}\\x{05C1}-\\x{05C2}\\x{05C4}-\\x{05C5}\\x{05C7}\\x{0610}-\\x{061A}\\x{061C}\\x{064B}-\\x{065F}\\x{0670}\\x{06D6}-\\x{06DC}\\x{06DF}-\\x{06E4}\\x{06E7}-\\x{06E8}\\x{06EA}-\\x{06ED}\\x{070F}\\x{0711}\\x{0730}-\\x{074A}\\x{07A6}-\\x{07B0}\\x{07EB}-\\x{07F3}\\x{07FD}\\x{0816}-\\x{0819}\\x{081B}-\\x{0823}\\x{0825}-\\x{0827}\\x{0829}-\\x{082D}\\x{0859}-\\x{085B}\\x{08D3}-\\x{08E1}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B55}-\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C81}\\x{0CBC}\\x{0CBF}\\x{0CC6}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0D81}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EBC}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{135D}-\\x{135F}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17DD}\\x{180B}-\\x{180D}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1ABF}-\\x{1AC0}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{200B}\\x{200E}-\\x{200F}\\x{202A}-\\x{202E}\\x{2060}-\\x{2064}\\x{206A}-\\x{206F}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2CEF}-\\x{2CF1}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{302A}-\\x{302D}\\x{3099}-\\x{309A}\\x{A66F}\\x{A670}-\\x{A672}\\x{A674}-\\x{A67D}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A82C}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}-\\x{A9BD}\\x{A9E5}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AAEC}-\\x{AAED}\\x{AAF6}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1E}\\x{FE00}-\\x{FE0F}\\x{FE20}-\\x{FE2F}\\x{FEFF}\\x{FFF9}-\\x{FFFB}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10A01}-\\x{10A03}\\x{10A05}-\\x{10A06}\\x{10A0C}-\\x{10A0F}\\x{10A38}-\\x{10A3A}\\x{10A3F}\\x{10AE5}-\\x{10AE6}\\x{10D24}-\\x{10D27}\\x{10EAB}-\\x{10EAC}\\x{10F46}-\\x{10F50}\\x{11001}\\x{11038}-\\x{11046}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{111CF}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{1193B}-\\x{1193C}\\x{1193E}\\x{11943}\\x{119D4}-\\x{119D7}\\x{119DA}-\\x{119DB}\\x{119E0}\\x{11A01}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C3F}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{13430}-\\x{13438}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16F4F}\\x{16F8F}-\\x{16F92}\\x{16FE4}\\x{1BC9D}-\\x{1BC9E}\\x{1BCA0}-\\x{1BCA3}\\x{1D167}-\\x{1D169}\\x{1D173}-\\x{1D17A}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D242}-\\x{1D244}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E130}-\\x{1E136}\\x{1E2EC}-\\x{1E2EF}\\x{1E8D0}-\\x{1E8D6}\\x{1E944}-\\x{1E94A}\\x{1E94B}\\x{E0001}\\x{E0020}-\\x{E007F}\\x{E0100}-\\x{E01EF}]*)[\\x{0622}-\\x{0625}\\x{0627}\\x{0629}\\x{062F}-\\x{0632}\\x{0648}\\x{0671}-\\x{0673}\\x{0675}-\\x{0677}\\x{0688}-\\x{0699}\\x{06C0}\\x{06C3}-\\x{06CB}\\x{06CD}\\x{06CF}\\x{06D2}-\\x{06D3}\\x{06D5}\\x{06EE}-\\x{06EF}\\x{0710}\\x{0715}-\\x{0719}\\x{071E}\\x{0728}\\x{072A}\\x{072C}\\x{072F}\\x{074D}\\x{0759}-\\x{075B}\\x{076B}-\\x{076C}\\x{0771}\\x{0773}-\\x{0774}\\x{0778}-\\x{0779}\\x{0840}\\x{0846}-\\x{0847}\\x{0849}\\x{0854}\\x{0856}-\\x{0858}\\x{0867}\\x{0869}-\\x{086A}\\x{08AA}-\\x{08AC}\\x{08AE}\\x{08B1}-\\x{08B2}\\x{08B9}\\x{10AC5}\\x{10AC7}\\x{10AC9}-\\x{10ACA}\\x{10ACE}-\\x{10AD2}\\x{10ADD}\\x{10AE1}\\x{10AE4}\\x{10AEF}\\x{10B81}\\x{10B83}-\\x{10B85}\\x{10B89}\\x{10B8C}\\x{10B8E}-\\x{10B8F}\\x{10B91}\\x{10BA9}-\\x{10BAC}\\x{10D22}\\x{10F33}\\x{10F54}\\x{10FB4}-\\x{10FB6}\\x{10FB9}-\\x{10FBA}\\x{10FBD}\\x{10FC2}-\\x{10FC3}\\x{10FC9}\\x{0620}\\x{0626}\\x{0628}\\x{062A}-\\x{062E}\\x{0633}-\\x{063F}\\x{0641}-\\x{0647}\\x{0649}-\\x{064A}\\x{066E}-\\x{066F}\\x{0678}-\\x{0687}\\x{069A}-\\x{06BF}\\x{06C1}-\\x{06C2}\\x{06CC}\\x{06CE}\\x{06D0}-\\x{06D1}\\x{06FA}-\\x{06FC}\\x{06FF}\\x{0712}-\\x{0714}\\x{071A}-\\x{071D}\\x{071F}-\\x{0727}\\x{0729}\\x{072B}\\x{072D}-\\x{072E}\\x{074E}-\\x{0758}\\x{075C}-\\x{076A}\\x{076D}-\\x{0770}\\x{0772}\\x{0775}-\\x{0777}\\x{077A}-\\x{077F}\\x{07CA}-\\x{07EA}\\x{0841}-\\x{0845}\\x{0848}\\x{084A}-\\x{0853}\\x{0855}\\x{0860}\\x{0862}-\\x{0865}\\x{0868}\\x{08A0}-\\x{08A9}\\x{08AF}-\\x{08B0}\\x{08B3}-\\x{08B4}\\x{08B6}-\\x{08B8}\\x{08BA}-\\x{08C7}\\x{1807}\\x{1820}-\\x{1842}\\x{1843}\\x{1844}-\\x{1878}\\x{1887}-\\x{18A8}\\x{18AA}\\x{A840}-\\x{A871}\\x{10AC0}-\\x{10AC4}\\x{10AD3}-\\x{10AD6}\\x{10AD8}-\\x{10ADC}\\x{10ADE}-\\x{10AE0}\\x{10AEB}-\\x{10AEE}\\x{10B80}\\x{10B82}\\x{10B86}-\\x{10B88}\\x{10B8A}-\\x{10B8B}\\x{10B8D}\\x{10B90}\\x{10BAD}-\\x{10BAE}\\x{10D01}-\\x{10D21}\\x{10D23}\\x{10F30}-\\x{10F32}\\x{10F34}-\\x{10F44}\\x{10F51}-\\x{10F53}\\x{10FB0}\\x{10FB2}-\\x{10FB3}\\x{10FB8}\\x{10FBB}-\\x{10FBC}\\x{10FBE}-\\x{10FBF}\\x{10FC1}\\x{10FC4}\\x{10FCA}\\x{1E900}-\\x{1E943}]/u'; } vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php 0000644 00000021374 15174671617 0024366 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata; /** * @internal */ final class DisallowedRanges { /** * @param int $codePoint * * @return bool */ public static function inRange($codePoint) { if ($codePoint >= 128 && $codePoint <= 159) { return \true; } if ($codePoint >= 2155 && $codePoint <= 2207) { return \true; } if ($codePoint >= 3676 && $codePoint <= 3712) { return \true; } if ($codePoint >= 3808 && $codePoint <= 3839) { return \true; } if ($codePoint >= 4059 && $codePoint <= 4095) { return \true; } if ($codePoint >= 4256 && $codePoint <= 4293) { return \true; } if ($codePoint >= 6849 && $codePoint <= 6911) { return \true; } if ($codePoint >= 11859 && $codePoint <= 11903) { return \true; } if ($codePoint >= 42955 && $codePoint <= 42996) { return \true; } if ($codePoint >= 55296 && $codePoint <= 57343) { return \true; } if ($codePoint >= 57344 && $codePoint <= 63743) { return \true; } if ($codePoint >= 64218 && $codePoint <= 64255) { return \true; } if ($codePoint >= 64976 && $codePoint <= 65007) { return \true; } if ($codePoint >= 65630 && $codePoint <= 65663) { return \true; } if ($codePoint >= 65953 && $codePoint <= 65999) { return \true; } if ($codePoint >= 66046 && $codePoint <= 66175) { return \true; } if ($codePoint >= 66518 && $codePoint <= 66559) { return \true; } if ($codePoint >= 66928 && $codePoint <= 67071) { return \true; } if ($codePoint >= 67432 && $codePoint <= 67583) { return \true; } if ($codePoint >= 67760 && $codePoint <= 67807) { return \true; } if ($codePoint >= 67904 && $codePoint <= 67967) { return \true; } if ($codePoint >= 68256 && $codePoint <= 68287) { return \true; } if ($codePoint >= 68528 && $codePoint <= 68607) { return \true; } if ($codePoint >= 68681 && $codePoint <= 68735) { return \true; } if ($codePoint >= 68922 && $codePoint <= 69215) { return \true; } if ($codePoint >= 69298 && $codePoint <= 69375) { return \true; } if ($codePoint >= 69466 && $codePoint <= 69551) { return \true; } if ($codePoint >= 70207 && $codePoint <= 70271) { return \true; } if ($codePoint >= 70517 && $codePoint <= 70655) { return \true; } if ($codePoint >= 70874 && $codePoint <= 71039) { return \true; } if ($codePoint >= 71134 && $codePoint <= 71167) { return \true; } if ($codePoint >= 71370 && $codePoint <= 71423) { return \true; } if ($codePoint >= 71488 && $codePoint <= 71679) { return \true; } if ($codePoint >= 71740 && $codePoint <= 71839) { return \true; } if ($codePoint >= 72026 && $codePoint <= 72095) { return \true; } if ($codePoint >= 72441 && $codePoint <= 72703) { return \true; } if ($codePoint >= 72887 && $codePoint <= 72959) { return \true; } if ($codePoint >= 73130 && $codePoint <= 73439) { return \true; } if ($codePoint >= 73465 && $codePoint <= 73647) { return \true; } if ($codePoint >= 74650 && $codePoint <= 74751) { return \true; } if ($codePoint >= 75076 && $codePoint <= 77823) { return \true; } if ($codePoint >= 78905 && $codePoint <= 82943) { return \true; } if ($codePoint >= 83527 && $codePoint <= 92159) { return \true; } if ($codePoint >= 92784 && $codePoint <= 92879) { return \true; } if ($codePoint >= 93072 && $codePoint <= 93759) { return \true; } if ($codePoint >= 93851 && $codePoint <= 93951) { return \true; } if ($codePoint >= 94112 && $codePoint <= 94175) { return \true; } if ($codePoint >= 101590 && $codePoint <= 101631) { return \true; } if ($codePoint >= 101641 && $codePoint <= 110591) { return \true; } if ($codePoint >= 110879 && $codePoint <= 110927) { return \true; } if ($codePoint >= 111356 && $codePoint <= 113663) { return \true; } if ($codePoint >= 113828 && $codePoint <= 118783) { return \true; } if ($codePoint >= 119366 && $codePoint <= 119519) { return \true; } if ($codePoint >= 119673 && $codePoint <= 119807) { return \true; } if ($codePoint >= 121520 && $codePoint <= 122879) { return \true; } if ($codePoint >= 122923 && $codePoint <= 123135) { return \true; } if ($codePoint >= 123216 && $codePoint <= 123583) { return \true; } if ($codePoint >= 123648 && $codePoint <= 124927) { return \true; } if ($codePoint >= 125143 && $codePoint <= 125183) { return \true; } if ($codePoint >= 125280 && $codePoint <= 126064) { return \true; } if ($codePoint >= 126133 && $codePoint <= 126208) { return \true; } if ($codePoint >= 126270 && $codePoint <= 126463) { return \true; } if ($codePoint >= 126652 && $codePoint <= 126703) { return \true; } if ($codePoint >= 126706 && $codePoint <= 126975) { return \true; } if ($codePoint >= 127406 && $codePoint <= 127461) { return \true; } if ($codePoint >= 127590 && $codePoint <= 127743) { return \true; } if ($codePoint >= 129202 && $codePoint <= 129279) { return \true; } if ($codePoint >= 129751 && $codePoint <= 129791) { return \true; } if ($codePoint >= 129995 && $codePoint <= 130031) { return \true; } if ($codePoint >= 130042 && $codePoint <= 131069) { return \true; } if ($codePoint >= 173790 && $codePoint <= 173823) { return \true; } if ($codePoint >= 191457 && $codePoint <= 194559) { return \true; } if ($codePoint >= 195102 && $codePoint <= 196605) { return \true; } if ($codePoint >= 201547 && $codePoint <= 262141) { return \true; } if ($codePoint >= 262144 && $codePoint <= 327677) { return \true; } if ($codePoint >= 327680 && $codePoint <= 393213) { return \true; } if ($codePoint >= 393216 && $codePoint <= 458749) { return \true; } if ($codePoint >= 458752 && $codePoint <= 524285) { return \true; } if ($codePoint >= 524288 && $codePoint <= 589821) { return \true; } if ($codePoint >= 589824 && $codePoint <= 655357) { return \true; } if ($codePoint >= 655360 && $codePoint <= 720893) { return \true; } if ($codePoint >= 720896 && $codePoint <= 786429) { return \true; } if ($codePoint >= 786432 && $codePoint <= 851965) { return \true; } if ($codePoint >= 851968 && $codePoint <= 917501) { return \true; } if ($codePoint >= 917536 && $codePoint <= 917631) { return \true; } if ($codePoint >= 917632 && $codePoint <= 917759) { return \true; } if ($codePoint >= 918000 && $codePoint <= 983037) { return \true; } if ($codePoint >= 983040 && $codePoint <= 1048573) { return \true; } if ($codePoint >= 1048576 && $codePoint <= 1114109) { return \true; } return \false; } } vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/deviation.php 0000644 00000000145 15174671617 0023112 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(223 => 'ss', 962 => 'σ', 8204 => '', 8205 => ''); vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/disallowed.php 0000644 00000121634 15174671617 0023266 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(888 => \true, 889 => \true, 896 => \true, 897 => \true, 898 => \true, 899 => \true, 907 => \true, 909 => \true, 930 => \true, 1216 => \true, 1328 => \true, 1367 => \true, 1368 => \true, 1419 => \true, 1420 => \true, 1424 => \true, 1480 => \true, 1481 => \true, 1482 => \true, 1483 => \true, 1484 => \true, 1485 => \true, 1486 => \true, 1487 => \true, 1515 => \true, 1516 => \true, 1517 => \true, 1518 => \true, 1525 => \true, 1526 => \true, 1527 => \true, 1528 => \true, 1529 => \true, 1530 => \true, 1531 => \true, 1532 => \true, 1533 => \true, 1534 => \true, 1535 => \true, 1536 => \true, 1537 => \true, 1538 => \true, 1539 => \true, 1540 => \true, 1541 => \true, 1564 => \true, 1565 => \true, 1757 => \true, 1806 => \true, 1807 => \true, 1867 => \true, 1868 => \true, 1970 => \true, 1971 => \true, 1972 => \true, 1973 => \true, 1974 => \true, 1975 => \true, 1976 => \true, 1977 => \true, 1978 => \true, 1979 => \true, 1980 => \true, 1981 => \true, 1982 => \true, 1983 => \true, 2043 => \true, 2044 => \true, 2094 => \true, 2095 => \true, 2111 => \true, 2140 => \true, 2141 => \true, 2143 => \true, 2229 => \true, 2248 => \true, 2249 => \true, 2250 => \true, 2251 => \true, 2252 => \true, 2253 => \true, 2254 => \true, 2255 => \true, 2256 => \true, 2257 => \true, 2258 => \true, 2274 => \true, 2436 => \true, 2445 => \true, 2446 => \true, 2449 => \true, 2450 => \true, 2473 => \true, 2481 => \true, 2483 => \true, 2484 => \true, 2485 => \true, 2490 => \true, 2491 => \true, 2501 => \true, 2502 => \true, 2505 => \true, 2506 => \true, 2511 => \true, 2512 => \true, 2513 => \true, 2514 => \true, 2515 => \true, 2516 => \true, 2517 => \true, 2518 => \true, 2520 => \true, 2521 => \true, 2522 => \true, 2523 => \true, 2526 => \true, 2532 => \true, 2533 => \true, 2559 => \true, 2560 => \true, 2564 => \true, 2571 => \true, 2572 => \true, 2573 => \true, 2574 => \true, 2577 => \true, 2578 => \true, 2601 => \true, 2609 => \true, 2612 => \true, 2615 => \true, 2618 => \true, 2619 => \true, 2621 => \true, 2627 => \true, 2628 => \true, 2629 => \true, 2630 => \true, 2633 => \true, 2634 => \true, 2638 => \true, 2639 => \true, 2640 => \true, 2642 => \true, 2643 => \true, 2644 => \true, 2645 => \true, 2646 => \true, 2647 => \true, 2648 => \true, 2653 => \true, 2655 => \true, 2656 => \true, 2657 => \true, 2658 => \true, 2659 => \true, 2660 => \true, 2661 => \true, 2679 => \true, 2680 => \true, 2681 => \true, 2682 => \true, 2683 => \true, 2684 => \true, 2685 => \true, 2686 => \true, 2687 => \true, 2688 => \true, 2692 => \true, 2702 => \true, 2706 => \true, 2729 => \true, 2737 => \true, 2740 => \true, 2746 => \true, 2747 => \true, 2758 => \true, 2762 => \true, 2766 => \true, 2767 => \true, 2769 => \true, 2770 => \true, 2771 => \true, 2772 => \true, 2773 => \true, 2774 => \true, 2775 => \true, 2776 => \true, 2777 => \true, 2778 => \true, 2779 => \true, 2780 => \true, 2781 => \true, 2782 => \true, 2783 => \true, 2788 => \true, 2789 => \true, 2802 => \true, 2803 => \true, 2804 => \true, 2805 => \true, 2806 => \true, 2807 => \true, 2808 => \true, 2816 => \true, 2820 => \true, 2829 => \true, 2830 => \true, 2833 => \true, 2834 => \true, 2857 => \true, 2865 => \true, 2868 => \true, 2874 => \true, 2875 => \true, 2885 => \true, 2886 => \true, 2889 => \true, 2890 => \true, 2894 => \true, 2895 => \true, 2896 => \true, 2897 => \true, 2898 => \true, 2899 => \true, 2900 => \true, 2904 => \true, 2905 => \true, 2906 => \true, 2907 => \true, 2910 => \true, 2916 => \true, 2917 => \true, 2936 => \true, 2937 => \true, 2938 => \true, 2939 => \true, 2940 => \true, 2941 => \true, 2942 => \true, 2943 => \true, 2944 => \true, 2945 => \true, 2948 => \true, 2955 => \true, 2956 => \true, 2957 => \true, 2961 => \true, 2966 => \true, 2967 => \true, 2968 => \true, 2971 => \true, 2973 => \true, 2976 => \true, 2977 => \true, 2978 => \true, 2981 => \true, 2982 => \true, 2983 => \true, 2987 => \true, 2988 => \true, 2989 => \true, 3002 => \true, 3003 => \true, 3004 => \true, 3005 => \true, 3011 => \true, 3012 => \true, 3013 => \true, 3017 => \true, 3022 => \true, 3023 => \true, 3025 => \true, 3026 => \true, 3027 => \true, 3028 => \true, 3029 => \true, 3030 => \true, 3032 => \true, 3033 => \true, 3034 => \true, 3035 => \true, 3036 => \true, 3037 => \true, 3038 => \true, 3039 => \true, 3040 => \true, 3041 => \true, 3042 => \true, 3043 => \true, 3044 => \true, 3045 => \true, 3067 => \true, 3068 => \true, 3069 => \true, 3070 => \true, 3071 => \true, 3085 => \true, 3089 => \true, 3113 => \true, 3130 => \true, 3131 => \true, 3132 => \true, 3141 => \true, 3145 => \true, 3150 => \true, 3151 => \true, 3152 => \true, 3153 => \true, 3154 => \true, 3155 => \true, 3156 => \true, 3159 => \true, 3163 => \true, 3164 => \true, 3165 => \true, 3166 => \true, 3167 => \true, 3172 => \true, 3173 => \true, 3184 => \true, 3185 => \true, 3186 => \true, 3187 => \true, 3188 => \true, 3189 => \true, 3190 => \true, 3213 => \true, 3217 => \true, 3241 => \true, 3252 => \true, 3258 => \true, 3259 => \true, 3269 => \true, 3273 => \true, 3278 => \true, 3279 => \true, 3280 => \true, 3281 => \true, 3282 => \true, 3283 => \true, 3284 => \true, 3287 => \true, 3288 => \true, 3289 => \true, 3290 => \true, 3291 => \true, 3292 => \true, 3293 => \true, 3295 => \true, 3300 => \true, 3301 => \true, 3312 => \true, 3315 => \true, 3316 => \true, 3317 => \true, 3318 => \true, 3319 => \true, 3320 => \true, 3321 => \true, 3322 => \true, 3323 => \true, 3324 => \true, 3325 => \true, 3326 => \true, 3327 => \true, 3341 => \true, 3345 => \true, 3397 => \true, 3401 => \true, 3408 => \true, 3409 => \true, 3410 => \true, 3411 => \true, 3428 => \true, 3429 => \true, 3456 => \true, 3460 => \true, 3479 => \true, 3480 => \true, 3481 => \true, 3506 => \true, 3516 => \true, 3518 => \true, 3519 => \true, 3527 => \true, 3528 => \true, 3529 => \true, 3531 => \true, 3532 => \true, 3533 => \true, 3534 => \true, 3541 => \true, 3543 => \true, 3552 => \true, 3553 => \true, 3554 => \true, 3555 => \true, 3556 => \true, 3557 => \true, 3568 => \true, 3569 => \true, 3573 => \true, 3574 => \true, 3575 => \true, 3576 => \true, 3577 => \true, 3578 => \true, 3579 => \true, 3580 => \true, 3581 => \true, 3582 => \true, 3583 => \true, 3584 => \true, 3643 => \true, 3644 => \true, 3645 => \true, 3646 => \true, 3715 => \true, 3717 => \true, 3723 => \true, 3748 => \true, 3750 => \true, 3774 => \true, 3775 => \true, 3781 => \true, 3783 => \true, 3790 => \true, 3791 => \true, 3802 => \true, 3803 => \true, 3912 => \true, 3949 => \true, 3950 => \true, 3951 => \true, 3952 => \true, 3992 => \true, 4029 => \true, 4045 => \true, 4294 => \true, 4296 => \true, 4297 => \true, 4298 => \true, 4299 => \true, 4300 => \true, 4302 => \true, 4303 => \true, 4447 => \true, 4448 => \true, 4681 => \true, 4686 => \true, 4687 => \true, 4695 => \true, 4697 => \true, 4702 => \true, 4703 => \true, 4745 => \true, 4750 => \true, 4751 => \true, 4785 => \true, 4790 => \true, 4791 => \true, 4799 => \true, 4801 => \true, 4806 => \true, 4807 => \true, 4823 => \true, 4881 => \true, 4886 => \true, 4887 => \true, 4955 => \true, 4956 => \true, 4989 => \true, 4990 => \true, 4991 => \true, 5018 => \true, 5019 => \true, 5020 => \true, 5021 => \true, 5022 => \true, 5023 => \true, 5110 => \true, 5111 => \true, 5118 => \true, 5119 => \true, 5760 => \true, 5789 => \true, 5790 => \true, 5791 => \true, 5881 => \true, 5882 => \true, 5883 => \true, 5884 => \true, 5885 => \true, 5886 => \true, 5887 => \true, 5901 => \true, 5909 => \true, 5910 => \true, 5911 => \true, 5912 => \true, 5913 => \true, 5914 => \true, 5915 => \true, 5916 => \true, 5917 => \true, 5918 => \true, 5919 => \true, 5943 => \true, 5944 => \true, 5945 => \true, 5946 => \true, 5947 => \true, 5948 => \true, 5949 => \true, 5950 => \true, 5951 => \true, 5972 => \true, 5973 => \true, 5974 => \true, 5975 => \true, 5976 => \true, 5977 => \true, 5978 => \true, 5979 => \true, 5980 => \true, 5981 => \true, 5982 => \true, 5983 => \true, 5997 => \true, 6001 => \true, 6004 => \true, 6005 => \true, 6006 => \true, 6007 => \true, 6008 => \true, 6009 => \true, 6010 => \true, 6011 => \true, 6012 => \true, 6013 => \true, 6014 => \true, 6015 => \true, 6068 => \true, 6069 => \true, 6110 => \true, 6111 => \true, 6122 => \true, 6123 => \true, 6124 => \true, 6125 => \true, 6126 => \true, 6127 => \true, 6138 => \true, 6139 => \true, 6140 => \true, 6141 => \true, 6142 => \true, 6143 => \true, 6150 => \true, 6158 => \true, 6159 => \true, 6170 => \true, 6171 => \true, 6172 => \true, 6173 => \true, 6174 => \true, 6175 => \true, 6265 => \true, 6266 => \true, 6267 => \true, 6268 => \true, 6269 => \true, 6270 => \true, 6271 => \true, 6315 => \true, 6316 => \true, 6317 => \true, 6318 => \true, 6319 => \true, 6390 => \true, 6391 => \true, 6392 => \true, 6393 => \true, 6394 => \true, 6395 => \true, 6396 => \true, 6397 => \true, 6398 => \true, 6399 => \true, 6431 => \true, 6444 => \true, 6445 => \true, 6446 => \true, 6447 => \true, 6460 => \true, 6461 => \true, 6462 => \true, 6463 => \true, 6465 => \true, 6466 => \true, 6467 => \true, 6510 => \true, 6511 => \true, 6517 => \true, 6518 => \true, 6519 => \true, 6520 => \true, 6521 => \true, 6522 => \true, 6523 => \true, 6524 => \true, 6525 => \true, 6526 => \true, 6527 => \true, 6572 => \true, 6573 => \true, 6574 => \true, 6575 => \true, 6602 => \true, 6603 => \true, 6604 => \true, 6605 => \true, 6606 => \true, 6607 => \true, 6619 => \true, 6620 => \true, 6621 => \true, 6684 => \true, 6685 => \true, 6751 => \true, 6781 => \true, 6782 => \true, 6794 => \true, 6795 => \true, 6796 => \true, 6797 => \true, 6798 => \true, 6799 => \true, 6810 => \true, 6811 => \true, 6812 => \true, 6813 => \true, 6814 => \true, 6815 => \true, 6830 => \true, 6831 => \true, 6988 => \true, 6989 => \true, 6990 => \true, 6991 => \true, 7037 => \true, 7038 => \true, 7039 => \true, 7156 => \true, 7157 => \true, 7158 => \true, 7159 => \true, 7160 => \true, 7161 => \true, 7162 => \true, 7163 => \true, 7224 => \true, 7225 => \true, 7226 => \true, 7242 => \true, 7243 => \true, 7244 => \true, 7305 => \true, 7306 => \true, 7307 => \true, 7308 => \true, 7309 => \true, 7310 => \true, 7311 => \true, 7355 => \true, 7356 => \true, 7368 => \true, 7369 => \true, 7370 => \true, 7371 => \true, 7372 => \true, 7373 => \true, 7374 => \true, 7375 => \true, 7419 => \true, 7420 => \true, 7421 => \true, 7422 => \true, 7423 => \true, 7674 => \true, 7958 => \true, 7959 => \true, 7966 => \true, 7967 => \true, 8006 => \true, 8007 => \true, 8014 => \true, 8015 => \true, 8024 => \true, 8026 => \true, 8028 => \true, 8030 => \true, 8062 => \true, 8063 => \true, 8117 => \true, 8133 => \true, 8148 => \true, 8149 => \true, 8156 => \true, 8176 => \true, 8177 => \true, 8181 => \true, 8191 => \true, 8206 => \true, 8207 => \true, 8228 => \true, 8229 => \true, 8230 => \true, 8232 => \true, 8233 => \true, 8234 => \true, 8235 => \true, 8236 => \true, 8237 => \true, 8238 => \true, 8289 => \true, 8290 => \true, 8291 => \true, 8293 => \true, 8294 => \true, 8295 => \true, 8296 => \true, 8297 => \true, 8298 => \true, 8299 => \true, 8300 => \true, 8301 => \true, 8302 => \true, 8303 => \true, 8306 => \true, 8307 => \true, 8335 => \true, 8349 => \true, 8350 => \true, 8351 => \true, 8384 => \true, 8385 => \true, 8386 => \true, 8387 => \true, 8388 => \true, 8389 => \true, 8390 => \true, 8391 => \true, 8392 => \true, 8393 => \true, 8394 => \true, 8395 => \true, 8396 => \true, 8397 => \true, 8398 => \true, 8399 => \true, 8433 => \true, 8434 => \true, 8435 => \true, 8436 => \true, 8437 => \true, 8438 => \true, 8439 => \true, 8440 => \true, 8441 => \true, 8442 => \true, 8443 => \true, 8444 => \true, 8445 => \true, 8446 => \true, 8447 => \true, 8498 => \true, 8579 => \true, 8588 => \true, 8589 => \true, 8590 => \true, 8591 => \true, 9255 => \true, 9256 => \true, 9257 => \true, 9258 => \true, 9259 => \true, 9260 => \true, 9261 => \true, 9262 => \true, 9263 => \true, 9264 => \true, 9265 => \true, 9266 => \true, 9267 => \true, 9268 => \true, 9269 => \true, 9270 => \true, 9271 => \true, 9272 => \true, 9273 => \true, 9274 => \true, 9275 => \true, 9276 => \true, 9277 => \true, 9278 => \true, 9279 => \true, 9291 => \true, 9292 => \true, 9293 => \true, 9294 => \true, 9295 => \true, 9296 => \true, 9297 => \true, 9298 => \true, 9299 => \true, 9300 => \true, 9301 => \true, 9302 => \true, 9303 => \true, 9304 => \true, 9305 => \true, 9306 => \true, 9307 => \true, 9308 => \true, 9309 => \true, 9310 => \true, 9311 => \true, 9352 => \true, 9353 => \true, 9354 => \true, 9355 => \true, 9356 => \true, 9357 => \true, 9358 => \true, 9359 => \true, 9360 => \true, 9361 => \true, 9362 => \true, 9363 => \true, 9364 => \true, 9365 => \true, 9366 => \true, 9367 => \true, 9368 => \true, 9369 => \true, 9370 => \true, 9371 => \true, 11124 => \true, 11125 => \true, 11158 => \true, 11311 => \true, 11359 => \true, 11508 => \true, 11509 => \true, 11510 => \true, 11511 => \true, 11512 => \true, 11558 => \true, 11560 => \true, 11561 => \true, 11562 => \true, 11563 => \true, 11564 => \true, 11566 => \true, 11567 => \true, 11624 => \true, 11625 => \true, 11626 => \true, 11627 => \true, 11628 => \true, 11629 => \true, 11630 => \true, 11633 => \true, 11634 => \true, 11635 => \true, 11636 => \true, 11637 => \true, 11638 => \true, 11639 => \true, 11640 => \true, 11641 => \true, 11642 => \true, 11643 => \true, 11644 => \true, 11645 => \true, 11646 => \true, 11671 => \true, 11672 => \true, 11673 => \true, 11674 => \true, 11675 => \true, 11676 => \true, 11677 => \true, 11678 => \true, 11679 => \true, 11687 => \true, 11695 => \true, 11703 => \true, 11711 => \true, 11719 => \true, 11727 => \true, 11735 => \true, 11743 => \true, 11930 => \true, 12020 => \true, 12021 => \true, 12022 => \true, 12023 => \true, 12024 => \true, 12025 => \true, 12026 => \true, 12027 => \true, 12028 => \true, 12029 => \true, 12030 => \true, 12031 => \true, 12246 => \true, 12247 => \true, 12248 => \true, 12249 => \true, 12250 => \true, 12251 => \true, 12252 => \true, 12253 => \true, 12254 => \true, 12255 => \true, 12256 => \true, 12257 => \true, 12258 => \true, 12259 => \true, 12260 => \true, 12261 => \true, 12262 => \true, 12263 => \true, 12264 => \true, 12265 => \true, 12266 => \true, 12267 => \true, 12268 => \true, 12269 => \true, 12270 => \true, 12271 => \true, 12272 => \true, 12273 => \true, 12274 => \true, 12275 => \true, 12276 => \true, 12277 => \true, 12278 => \true, 12279 => \true, 12280 => \true, 12281 => \true, 12282 => \true, 12283 => \true, 12284 => \true, 12285 => \true, 12286 => \true, 12287 => \true, 12352 => \true, 12439 => \true, 12440 => \true, 12544 => \true, 12545 => \true, 12546 => \true, 12547 => \true, 12548 => \true, 12592 => \true, 12644 => \true, 12687 => \true, 12772 => \true, 12773 => \true, 12774 => \true, 12775 => \true, 12776 => \true, 12777 => \true, 12778 => \true, 12779 => \true, 12780 => \true, 12781 => \true, 12782 => \true, 12783 => \true, 12831 => \true, 13250 => \true, 13255 => \true, 13272 => \true, 40957 => \true, 40958 => \true, 40959 => \true, 42125 => \true, 42126 => \true, 42127 => \true, 42183 => \true, 42184 => \true, 42185 => \true, 42186 => \true, 42187 => \true, 42188 => \true, 42189 => \true, 42190 => \true, 42191 => \true, 42540 => \true, 42541 => \true, 42542 => \true, 42543 => \true, 42544 => \true, 42545 => \true, 42546 => \true, 42547 => \true, 42548 => \true, 42549 => \true, 42550 => \true, 42551 => \true, 42552 => \true, 42553 => \true, 42554 => \true, 42555 => \true, 42556 => \true, 42557 => \true, 42558 => \true, 42559 => \true, 42744 => \true, 42745 => \true, 42746 => \true, 42747 => \true, 42748 => \true, 42749 => \true, 42750 => \true, 42751 => \true, 42944 => \true, 42945 => \true, 43053 => \true, 43054 => \true, 43055 => \true, 43066 => \true, 43067 => \true, 43068 => \true, 43069 => \true, 43070 => \true, 43071 => \true, 43128 => \true, 43129 => \true, 43130 => \true, 43131 => \true, 43132 => \true, 43133 => \true, 43134 => \true, 43135 => \true, 43206 => \true, 43207 => \true, 43208 => \true, 43209 => \true, 43210 => \true, 43211 => \true, 43212 => \true, 43213 => \true, 43226 => \true, 43227 => \true, 43228 => \true, 43229 => \true, 43230 => \true, 43231 => \true, 43348 => \true, 43349 => \true, 43350 => \true, 43351 => \true, 43352 => \true, 43353 => \true, 43354 => \true, 43355 => \true, 43356 => \true, 43357 => \true, 43358 => \true, 43389 => \true, 43390 => \true, 43391 => \true, 43470 => \true, 43482 => \true, 43483 => \true, 43484 => \true, 43485 => \true, 43519 => \true, 43575 => \true, 43576 => \true, 43577 => \true, 43578 => \true, 43579 => \true, 43580 => \true, 43581 => \true, 43582 => \true, 43583 => \true, 43598 => \true, 43599 => \true, 43610 => \true, 43611 => \true, 43715 => \true, 43716 => \true, 43717 => \true, 43718 => \true, 43719 => \true, 43720 => \true, 43721 => \true, 43722 => \true, 43723 => \true, 43724 => \true, 43725 => \true, 43726 => \true, 43727 => \true, 43728 => \true, 43729 => \true, 43730 => \true, 43731 => \true, 43732 => \true, 43733 => \true, 43734 => \true, 43735 => \true, 43736 => \true, 43737 => \true, 43738 => \true, 43767 => \true, 43768 => \true, 43769 => \true, 43770 => \true, 43771 => \true, 43772 => \true, 43773 => \true, 43774 => \true, 43775 => \true, 43776 => \true, 43783 => \true, 43784 => \true, 43791 => \true, 43792 => \true, 43799 => \true, 43800 => \true, 43801 => \true, 43802 => \true, 43803 => \true, 43804 => \true, 43805 => \true, 43806 => \true, 43807 => \true, 43815 => \true, 43823 => \true, 43884 => \true, 43885 => \true, 43886 => \true, 43887 => \true, 44014 => \true, 44015 => \true, 44026 => \true, 44027 => \true, 44028 => \true, 44029 => \true, 44030 => \true, 44031 => \true, 55204 => \true, 55205 => \true, 55206 => \true, 55207 => \true, 55208 => \true, 55209 => \true, 55210 => \true, 55211 => \true, 55212 => \true, 55213 => \true, 55214 => \true, 55215 => \true, 55239 => \true, 55240 => \true, 55241 => \true, 55242 => \true, 55292 => \true, 55293 => \true, 55294 => \true, 55295 => \true, 64110 => \true, 64111 => \true, 64263 => \true, 64264 => \true, 64265 => \true, 64266 => \true, 64267 => \true, 64268 => \true, 64269 => \true, 64270 => \true, 64271 => \true, 64272 => \true, 64273 => \true, 64274 => \true, 64280 => \true, 64281 => \true, 64282 => \true, 64283 => \true, 64284 => \true, 64311 => \true, 64317 => \true, 64319 => \true, 64322 => \true, 64325 => \true, 64450 => \true, 64451 => \true, 64452 => \true, 64453 => \true, 64454 => \true, 64455 => \true, 64456 => \true, 64457 => \true, 64458 => \true, 64459 => \true, 64460 => \true, 64461 => \true, 64462 => \true, 64463 => \true, 64464 => \true, 64465 => \true, 64466 => \true, 64832 => \true, 64833 => \true, 64834 => \true, 64835 => \true, 64836 => \true, 64837 => \true, 64838 => \true, 64839 => \true, 64840 => \true, 64841 => \true, 64842 => \true, 64843 => \true, 64844 => \true, 64845 => \true, 64846 => \true, 64847 => \true, 64912 => \true, 64913 => \true, 64968 => \true, 64969 => \true, 64970 => \true, 64971 => \true, 64972 => \true, 64973 => \true, 64974 => \true, 64975 => \true, 65022 => \true, 65023 => \true, 65042 => \true, 65049 => \true, 65050 => \true, 65051 => \true, 65052 => \true, 65053 => \true, 65054 => \true, 65055 => \true, 65072 => \true, 65106 => \true, 65107 => \true, 65127 => \true, 65132 => \true, 65133 => \true, 65134 => \true, 65135 => \true, 65141 => \true, 65277 => \true, 65278 => \true, 65280 => \true, 65440 => \true, 65471 => \true, 65472 => \true, 65473 => \true, 65480 => \true, 65481 => \true, 65488 => \true, 65489 => \true, 65496 => \true, 65497 => \true, 65501 => \true, 65502 => \true, 65503 => \true, 65511 => \true, 65519 => \true, 65520 => \true, 65521 => \true, 65522 => \true, 65523 => \true, 65524 => \true, 65525 => \true, 65526 => \true, 65527 => \true, 65528 => \true, 65529 => \true, 65530 => \true, 65531 => \true, 65532 => \true, 65533 => \true, 65534 => \true, 65535 => \true, 65548 => \true, 65575 => \true, 65595 => \true, 65598 => \true, 65614 => \true, 65615 => \true, 65787 => \true, 65788 => \true, 65789 => \true, 65790 => \true, 65791 => \true, 65795 => \true, 65796 => \true, 65797 => \true, 65798 => \true, 65844 => \true, 65845 => \true, 65846 => \true, 65935 => \true, 65949 => \true, 65950 => \true, 65951 => \true, 66205 => \true, 66206 => \true, 66207 => \true, 66257 => \true, 66258 => \true, 66259 => \true, 66260 => \true, 66261 => \true, 66262 => \true, 66263 => \true, 66264 => \true, 66265 => \true, 66266 => \true, 66267 => \true, 66268 => \true, 66269 => \true, 66270 => \true, 66271 => \true, 66300 => \true, 66301 => \true, 66302 => \true, 66303 => \true, 66340 => \true, 66341 => \true, 66342 => \true, 66343 => \true, 66344 => \true, 66345 => \true, 66346 => \true, 66347 => \true, 66348 => \true, 66379 => \true, 66380 => \true, 66381 => \true, 66382 => \true, 66383 => \true, 66427 => \true, 66428 => \true, 66429 => \true, 66430 => \true, 66431 => \true, 66462 => \true, 66500 => \true, 66501 => \true, 66502 => \true, 66503 => \true, 66718 => \true, 66719 => \true, 66730 => \true, 66731 => \true, 66732 => \true, 66733 => \true, 66734 => \true, 66735 => \true, 66772 => \true, 66773 => \true, 66774 => \true, 66775 => \true, 66812 => \true, 66813 => \true, 66814 => \true, 66815 => \true, 66856 => \true, 66857 => \true, 66858 => \true, 66859 => \true, 66860 => \true, 66861 => \true, 66862 => \true, 66863 => \true, 66916 => \true, 66917 => \true, 66918 => \true, 66919 => \true, 66920 => \true, 66921 => \true, 66922 => \true, 66923 => \true, 66924 => \true, 66925 => \true, 66926 => \true, 67383 => \true, 67384 => \true, 67385 => \true, 67386 => \true, 67387 => \true, 67388 => \true, 67389 => \true, 67390 => \true, 67391 => \true, 67414 => \true, 67415 => \true, 67416 => \true, 67417 => \true, 67418 => \true, 67419 => \true, 67420 => \true, 67421 => \true, 67422 => \true, 67423 => \true, 67590 => \true, 67591 => \true, 67593 => \true, 67638 => \true, 67641 => \true, 67642 => \true, 67643 => \true, 67645 => \true, 67646 => \true, 67670 => \true, 67743 => \true, 67744 => \true, 67745 => \true, 67746 => \true, 67747 => \true, 67748 => \true, 67749 => \true, 67750 => \true, 67827 => \true, 67830 => \true, 67831 => \true, 67832 => \true, 67833 => \true, 67834 => \true, 67868 => \true, 67869 => \true, 67870 => \true, 67898 => \true, 67899 => \true, 67900 => \true, 67901 => \true, 67902 => \true, 68024 => \true, 68025 => \true, 68026 => \true, 68027 => \true, 68048 => \true, 68049 => \true, 68100 => \true, 68103 => \true, 68104 => \true, 68105 => \true, 68106 => \true, 68107 => \true, 68116 => \true, 68120 => \true, 68150 => \true, 68151 => \true, 68155 => \true, 68156 => \true, 68157 => \true, 68158 => \true, 68169 => \true, 68170 => \true, 68171 => \true, 68172 => \true, 68173 => \true, 68174 => \true, 68175 => \true, 68185 => \true, 68186 => \true, 68187 => \true, 68188 => \true, 68189 => \true, 68190 => \true, 68191 => \true, 68327 => \true, 68328 => \true, 68329 => \true, 68330 => \true, 68343 => \true, 68344 => \true, 68345 => \true, 68346 => \true, 68347 => \true, 68348 => \true, 68349 => \true, 68350 => \true, 68351 => \true, 68406 => \true, 68407 => \true, 68408 => \true, 68438 => \true, 68439 => \true, 68467 => \true, 68468 => \true, 68469 => \true, 68470 => \true, 68471 => \true, 68498 => \true, 68499 => \true, 68500 => \true, 68501 => \true, 68502 => \true, 68503 => \true, 68504 => \true, 68509 => \true, 68510 => \true, 68511 => \true, 68512 => \true, 68513 => \true, 68514 => \true, 68515 => \true, 68516 => \true, 68517 => \true, 68518 => \true, 68519 => \true, 68520 => \true, 68787 => \true, 68788 => \true, 68789 => \true, 68790 => \true, 68791 => \true, 68792 => \true, 68793 => \true, 68794 => \true, 68795 => \true, 68796 => \true, 68797 => \true, 68798 => \true, 68799 => \true, 68851 => \true, 68852 => \true, 68853 => \true, 68854 => \true, 68855 => \true, 68856 => \true, 68857 => \true, 68904 => \true, 68905 => \true, 68906 => \true, 68907 => \true, 68908 => \true, 68909 => \true, 68910 => \true, 68911 => \true, 69247 => \true, 69290 => \true, 69294 => \true, 69295 => \true, 69416 => \true, 69417 => \true, 69418 => \true, 69419 => \true, 69420 => \true, 69421 => \true, 69422 => \true, 69423 => \true, 69580 => \true, 69581 => \true, 69582 => \true, 69583 => \true, 69584 => \true, 69585 => \true, 69586 => \true, 69587 => \true, 69588 => \true, 69589 => \true, 69590 => \true, 69591 => \true, 69592 => \true, 69593 => \true, 69594 => \true, 69595 => \true, 69596 => \true, 69597 => \true, 69598 => \true, 69599 => \true, 69623 => \true, 69624 => \true, 69625 => \true, 69626 => \true, 69627 => \true, 69628 => \true, 69629 => \true, 69630 => \true, 69631 => \true, 69710 => \true, 69711 => \true, 69712 => \true, 69713 => \true, 69744 => \true, 69745 => \true, 69746 => \true, 69747 => \true, 69748 => \true, 69749 => \true, 69750 => \true, 69751 => \true, 69752 => \true, 69753 => \true, 69754 => \true, 69755 => \true, 69756 => \true, 69757 => \true, 69758 => \true, 69821 => \true, 69826 => \true, 69827 => \true, 69828 => \true, 69829 => \true, 69830 => \true, 69831 => \true, 69832 => \true, 69833 => \true, 69834 => \true, 69835 => \true, 69836 => \true, 69837 => \true, 69838 => \true, 69839 => \true, 69865 => \true, 69866 => \true, 69867 => \true, 69868 => \true, 69869 => \true, 69870 => \true, 69871 => \true, 69882 => \true, 69883 => \true, 69884 => \true, 69885 => \true, 69886 => \true, 69887 => \true, 69941 => \true, 69960 => \true, 69961 => \true, 69962 => \true, 69963 => \true, 69964 => \true, 69965 => \true, 69966 => \true, 69967 => \true, 70007 => \true, 70008 => \true, 70009 => \true, 70010 => \true, 70011 => \true, 70012 => \true, 70013 => \true, 70014 => \true, 70015 => \true, 70112 => \true, 70133 => \true, 70134 => \true, 70135 => \true, 70136 => \true, 70137 => \true, 70138 => \true, 70139 => \true, 70140 => \true, 70141 => \true, 70142 => \true, 70143 => \true, 70162 => \true, 70279 => \true, 70281 => \true, 70286 => \true, 70302 => \true, 70314 => \true, 70315 => \true, 70316 => \true, 70317 => \true, 70318 => \true, 70319 => \true, 70379 => \true, 70380 => \true, 70381 => \true, 70382 => \true, 70383 => \true, 70394 => \true, 70395 => \true, 70396 => \true, 70397 => \true, 70398 => \true, 70399 => \true, 70404 => \true, 70413 => \true, 70414 => \true, 70417 => \true, 70418 => \true, 70441 => \true, 70449 => \true, 70452 => \true, 70458 => \true, 70469 => \true, 70470 => \true, 70473 => \true, 70474 => \true, 70478 => \true, 70479 => \true, 70481 => \true, 70482 => \true, 70483 => \true, 70484 => \true, 70485 => \true, 70486 => \true, 70488 => \true, 70489 => \true, 70490 => \true, 70491 => \true, 70492 => \true, 70500 => \true, 70501 => \true, 70509 => \true, 70510 => \true, 70511 => \true, 70748 => \true, 70754 => \true, 70755 => \true, 70756 => \true, 70757 => \true, 70758 => \true, 70759 => \true, 70760 => \true, 70761 => \true, 70762 => \true, 70763 => \true, 70764 => \true, 70765 => \true, 70766 => \true, 70767 => \true, 70768 => \true, 70769 => \true, 70770 => \true, 70771 => \true, 70772 => \true, 70773 => \true, 70774 => \true, 70775 => \true, 70776 => \true, 70777 => \true, 70778 => \true, 70779 => \true, 70780 => \true, 70781 => \true, 70782 => \true, 70783 => \true, 70856 => \true, 70857 => \true, 70858 => \true, 70859 => \true, 70860 => \true, 70861 => \true, 70862 => \true, 70863 => \true, 71094 => \true, 71095 => \true, 71237 => \true, 71238 => \true, 71239 => \true, 71240 => \true, 71241 => \true, 71242 => \true, 71243 => \true, 71244 => \true, 71245 => \true, 71246 => \true, 71247 => \true, 71258 => \true, 71259 => \true, 71260 => \true, 71261 => \true, 71262 => \true, 71263 => \true, 71277 => \true, 71278 => \true, 71279 => \true, 71280 => \true, 71281 => \true, 71282 => \true, 71283 => \true, 71284 => \true, 71285 => \true, 71286 => \true, 71287 => \true, 71288 => \true, 71289 => \true, 71290 => \true, 71291 => \true, 71292 => \true, 71293 => \true, 71294 => \true, 71295 => \true, 71353 => \true, 71354 => \true, 71355 => \true, 71356 => \true, 71357 => \true, 71358 => \true, 71359 => \true, 71451 => \true, 71452 => \true, 71468 => \true, 71469 => \true, 71470 => \true, 71471 => \true, 71923 => \true, 71924 => \true, 71925 => \true, 71926 => \true, 71927 => \true, 71928 => \true, 71929 => \true, 71930 => \true, 71931 => \true, 71932 => \true, 71933 => \true, 71934 => \true, 71943 => \true, 71944 => \true, 71946 => \true, 71947 => \true, 71956 => \true, 71959 => \true, 71990 => \true, 71993 => \true, 71994 => \true, 72007 => \true, 72008 => \true, 72009 => \true, 72010 => \true, 72011 => \true, 72012 => \true, 72013 => \true, 72014 => \true, 72015 => \true, 72104 => \true, 72105 => \true, 72152 => \true, 72153 => \true, 72165 => \true, 72166 => \true, 72167 => \true, 72168 => \true, 72169 => \true, 72170 => \true, 72171 => \true, 72172 => \true, 72173 => \true, 72174 => \true, 72175 => \true, 72176 => \true, 72177 => \true, 72178 => \true, 72179 => \true, 72180 => \true, 72181 => \true, 72182 => \true, 72183 => \true, 72184 => \true, 72185 => \true, 72186 => \true, 72187 => \true, 72188 => \true, 72189 => \true, 72190 => \true, 72191 => \true, 72264 => \true, 72265 => \true, 72266 => \true, 72267 => \true, 72268 => \true, 72269 => \true, 72270 => \true, 72271 => \true, 72355 => \true, 72356 => \true, 72357 => \true, 72358 => \true, 72359 => \true, 72360 => \true, 72361 => \true, 72362 => \true, 72363 => \true, 72364 => \true, 72365 => \true, 72366 => \true, 72367 => \true, 72368 => \true, 72369 => \true, 72370 => \true, 72371 => \true, 72372 => \true, 72373 => \true, 72374 => \true, 72375 => \true, 72376 => \true, 72377 => \true, 72378 => \true, 72379 => \true, 72380 => \true, 72381 => \true, 72382 => \true, 72383 => \true, 72713 => \true, 72759 => \true, 72774 => \true, 72775 => \true, 72776 => \true, 72777 => \true, 72778 => \true, 72779 => \true, 72780 => \true, 72781 => \true, 72782 => \true, 72783 => \true, 72813 => \true, 72814 => \true, 72815 => \true, 72848 => \true, 72849 => \true, 72872 => \true, 72967 => \true, 72970 => \true, 73015 => \true, 73016 => \true, 73017 => \true, 73019 => \true, 73022 => \true, 73032 => \true, 73033 => \true, 73034 => \true, 73035 => \true, 73036 => \true, 73037 => \true, 73038 => \true, 73039 => \true, 73050 => \true, 73051 => \true, 73052 => \true, 73053 => \true, 73054 => \true, 73055 => \true, 73062 => \true, 73065 => \true, 73103 => \true, 73106 => \true, 73113 => \true, 73114 => \true, 73115 => \true, 73116 => \true, 73117 => \true, 73118 => \true, 73119 => \true, 73649 => \true, 73650 => \true, 73651 => \true, 73652 => \true, 73653 => \true, 73654 => \true, 73655 => \true, 73656 => \true, 73657 => \true, 73658 => \true, 73659 => \true, 73660 => \true, 73661 => \true, 73662 => \true, 73663 => \true, 73714 => \true, 73715 => \true, 73716 => \true, 73717 => \true, 73718 => \true, 73719 => \true, 73720 => \true, 73721 => \true, 73722 => \true, 73723 => \true, 73724 => \true, 73725 => \true, 73726 => \true, 74863 => \true, 74869 => \true, 74870 => \true, 74871 => \true, 74872 => \true, 74873 => \true, 74874 => \true, 74875 => \true, 74876 => \true, 74877 => \true, 74878 => \true, 74879 => \true, 78895 => \true, 78896 => \true, 78897 => \true, 78898 => \true, 78899 => \true, 78900 => \true, 78901 => \true, 78902 => \true, 78903 => \true, 78904 => \true, 92729 => \true, 92730 => \true, 92731 => \true, 92732 => \true, 92733 => \true, 92734 => \true, 92735 => \true, 92767 => \true, 92778 => \true, 92779 => \true, 92780 => \true, 92781 => \true, 92910 => \true, 92911 => \true, 92918 => \true, 92919 => \true, 92920 => \true, 92921 => \true, 92922 => \true, 92923 => \true, 92924 => \true, 92925 => \true, 92926 => \true, 92927 => \true, 92998 => \true, 92999 => \true, 93000 => \true, 93001 => \true, 93002 => \true, 93003 => \true, 93004 => \true, 93005 => \true, 93006 => \true, 93007 => \true, 93018 => \true, 93026 => \true, 93048 => \true, 93049 => \true, 93050 => \true, 93051 => \true, 93052 => \true, 94027 => \true, 94028 => \true, 94029 => \true, 94030 => \true, 94088 => \true, 94089 => \true, 94090 => \true, 94091 => \true, 94092 => \true, 94093 => \true, 94094 => \true, 94181 => \true, 94182 => \true, 94183 => \true, 94184 => \true, 94185 => \true, 94186 => \true, 94187 => \true, 94188 => \true, 94189 => \true, 94190 => \true, 94191 => \true, 94194 => \true, 94195 => \true, 94196 => \true, 94197 => \true, 94198 => \true, 94199 => \true, 94200 => \true, 94201 => \true, 94202 => \true, 94203 => \true, 94204 => \true, 94205 => \true, 94206 => \true, 94207 => \true, 100344 => \true, 100345 => \true, 100346 => \true, 100347 => \true, 100348 => \true, 100349 => \true, 100350 => \true, 100351 => \true, 110931 => \true, 110932 => \true, 110933 => \true, 110934 => \true, 110935 => \true, 110936 => \true, 110937 => \true, 110938 => \true, 110939 => \true, 110940 => \true, 110941 => \true, 110942 => \true, 110943 => \true, 110944 => \true, 110945 => \true, 110946 => \true, 110947 => \true, 110952 => \true, 110953 => \true, 110954 => \true, 110955 => \true, 110956 => \true, 110957 => \true, 110958 => \true, 110959 => \true, 113771 => \true, 113772 => \true, 113773 => \true, 113774 => \true, 113775 => \true, 113789 => \true, 113790 => \true, 113791 => \true, 113801 => \true, 113802 => \true, 113803 => \true, 113804 => \true, 113805 => \true, 113806 => \true, 113807 => \true, 113818 => \true, 113819 => \true, 119030 => \true, 119031 => \true, 119032 => \true, 119033 => \true, 119034 => \true, 119035 => \true, 119036 => \true, 119037 => \true, 119038 => \true, 119039 => \true, 119079 => \true, 119080 => \true, 119155 => \true, 119156 => \true, 119157 => \true, 119158 => \true, 119159 => \true, 119160 => \true, 119161 => \true, 119162 => \true, 119273 => \true, 119274 => \true, 119275 => \true, 119276 => \true, 119277 => \true, 119278 => \true, 119279 => \true, 119280 => \true, 119281 => \true, 119282 => \true, 119283 => \true, 119284 => \true, 119285 => \true, 119286 => \true, 119287 => \true, 119288 => \true, 119289 => \true, 119290 => \true, 119291 => \true, 119292 => \true, 119293 => \true, 119294 => \true, 119295 => \true, 119540 => \true, 119541 => \true, 119542 => \true, 119543 => \true, 119544 => \true, 119545 => \true, 119546 => \true, 119547 => \true, 119548 => \true, 119549 => \true, 119550 => \true, 119551 => \true, 119639 => \true, 119640 => \true, 119641 => \true, 119642 => \true, 119643 => \true, 119644 => \true, 119645 => \true, 119646 => \true, 119647 => \true, 119893 => \true, 119965 => \true, 119968 => \true, 119969 => \true, 119971 => \true, 119972 => \true, 119975 => \true, 119976 => \true, 119981 => \true, 119994 => \true, 119996 => \true, 120004 => \true, 120070 => \true, 120075 => \true, 120076 => \true, 120085 => \true, 120093 => \true, 120122 => \true, 120127 => \true, 120133 => \true, 120135 => \true, 120136 => \true, 120137 => \true, 120145 => \true, 120486 => \true, 120487 => \true, 120780 => \true, 120781 => \true, 121484 => \true, 121485 => \true, 121486 => \true, 121487 => \true, 121488 => \true, 121489 => \true, 121490 => \true, 121491 => \true, 121492 => \true, 121493 => \true, 121494 => \true, 121495 => \true, 121496 => \true, 121497 => \true, 121498 => \true, 121504 => \true, 122887 => \true, 122905 => \true, 122906 => \true, 122914 => \true, 122917 => \true, 123181 => \true, 123182 => \true, 123183 => \true, 123198 => \true, 123199 => \true, 123210 => \true, 123211 => \true, 123212 => \true, 123213 => \true, 123642 => \true, 123643 => \true, 123644 => \true, 123645 => \true, 123646 => \true, 125125 => \true, 125126 => \true, 125260 => \true, 125261 => \true, 125262 => \true, 125263 => \true, 125274 => \true, 125275 => \true, 125276 => \true, 125277 => \true, 126468 => \true, 126496 => \true, 126499 => \true, 126501 => \true, 126502 => \true, 126504 => \true, 126515 => \true, 126520 => \true, 126522 => \true, 126524 => \true, 126525 => \true, 126526 => \true, 126527 => \true, 126528 => \true, 126529 => \true, 126531 => \true, 126532 => \true, 126533 => \true, 126534 => \true, 126536 => \true, 126538 => \true, 126540 => \true, 126544 => \true, 126547 => \true, 126549 => \true, 126550 => \true, 126552 => \true, 126554 => \true, 126556 => \true, 126558 => \true, 126560 => \true, 126563 => \true, 126565 => \true, 126566 => \true, 126571 => \true, 126579 => \true, 126584 => \true, 126589 => \true, 126591 => \true, 126602 => \true, 126620 => \true, 126621 => \true, 126622 => \true, 126623 => \true, 126624 => \true, 126628 => \true, 126634 => \true, 127020 => \true, 127021 => \true, 127022 => \true, 127023 => \true, 127124 => \true, 127125 => \true, 127126 => \true, 127127 => \true, 127128 => \true, 127129 => \true, 127130 => \true, 127131 => \true, 127132 => \true, 127133 => \true, 127134 => \true, 127135 => \true, 127151 => \true, 127152 => \true, 127168 => \true, 127184 => \true, 127222 => \true, 127223 => \true, 127224 => \true, 127225 => \true, 127226 => \true, 127227 => \true, 127228 => \true, 127229 => \true, 127230 => \true, 127231 => \true, 127232 => \true, 127491 => \true, 127492 => \true, 127493 => \true, 127494 => \true, 127495 => \true, 127496 => \true, 127497 => \true, 127498 => \true, 127499 => \true, 127500 => \true, 127501 => \true, 127502 => \true, 127503 => \true, 127548 => \true, 127549 => \true, 127550 => \true, 127551 => \true, 127561 => \true, 127562 => \true, 127563 => \true, 127564 => \true, 127565 => \true, 127566 => \true, 127567 => \true, 127570 => \true, 127571 => \true, 127572 => \true, 127573 => \true, 127574 => \true, 127575 => \true, 127576 => \true, 127577 => \true, 127578 => \true, 127579 => \true, 127580 => \true, 127581 => \true, 127582 => \true, 127583 => \true, 128728 => \true, 128729 => \true, 128730 => \true, 128731 => \true, 128732 => \true, 128733 => \true, 128734 => \true, 128735 => \true, 128749 => \true, 128750 => \true, 128751 => \true, 128765 => \true, 128766 => \true, 128767 => \true, 128884 => \true, 128885 => \true, 128886 => \true, 128887 => \true, 128888 => \true, 128889 => \true, 128890 => \true, 128891 => \true, 128892 => \true, 128893 => \true, 128894 => \true, 128895 => \true, 128985 => \true, 128986 => \true, 128987 => \true, 128988 => \true, 128989 => \true, 128990 => \true, 128991 => \true, 129004 => \true, 129005 => \true, 129006 => \true, 129007 => \true, 129008 => \true, 129009 => \true, 129010 => \true, 129011 => \true, 129012 => \true, 129013 => \true, 129014 => \true, 129015 => \true, 129016 => \true, 129017 => \true, 129018 => \true, 129019 => \true, 129020 => \true, 129021 => \true, 129022 => \true, 129023 => \true, 129036 => \true, 129037 => \true, 129038 => \true, 129039 => \true, 129096 => \true, 129097 => \true, 129098 => \true, 129099 => \true, 129100 => \true, 129101 => \true, 129102 => \true, 129103 => \true, 129114 => \true, 129115 => \true, 129116 => \true, 129117 => \true, 129118 => \true, 129119 => \true, 129160 => \true, 129161 => \true, 129162 => \true, 129163 => \true, 129164 => \true, 129165 => \true, 129166 => \true, 129167 => \true, 129198 => \true, 129199 => \true, 129401 => \true, 129484 => \true, 129620 => \true, 129621 => \true, 129622 => \true, 129623 => \true, 129624 => \true, 129625 => \true, 129626 => \true, 129627 => \true, 129628 => \true, 129629 => \true, 129630 => \true, 129631 => \true, 129646 => \true, 129647 => \true, 129653 => \true, 129654 => \true, 129655 => \true, 129659 => \true, 129660 => \true, 129661 => \true, 129662 => \true, 129663 => \true, 129671 => \true, 129672 => \true, 129673 => \true, 129674 => \true, 129675 => \true, 129676 => \true, 129677 => \true, 129678 => \true, 129679 => \true, 129705 => \true, 129706 => \true, 129707 => \true, 129708 => \true, 129709 => \true, 129710 => \true, 129711 => \true, 129719 => \true, 129720 => \true, 129721 => \true, 129722 => \true, 129723 => \true, 129724 => \true, 129725 => \true, 129726 => \true, 129727 => \true, 129731 => \true, 129732 => \true, 129733 => \true, 129734 => \true, 129735 => \true, 129736 => \true, 129737 => \true, 129738 => \true, 129739 => \true, 129740 => \true, 129741 => \true, 129742 => \true, 129743 => \true, 129939 => \true, 131070 => \true, 131071 => \true, 177973 => \true, 177974 => \true, 177975 => \true, 177976 => \true, 177977 => \true, 177978 => \true, 177979 => \true, 177980 => \true, 177981 => \true, 177982 => \true, 177983 => \true, 178206 => \true, 178207 => \true, 183970 => \true, 183971 => \true, 183972 => \true, 183973 => \true, 183974 => \true, 183975 => \true, 183976 => \true, 183977 => \true, 183978 => \true, 183979 => \true, 183980 => \true, 183981 => \true, 183982 => \true, 183983 => \true, 194664 => \true, 194676 => \true, 194847 => \true, 194911 => \true, 195007 => \true, 196606 => \true, 196607 => \true, 262142 => \true, 262143 => \true, 327678 => \true, 327679 => \true, 393214 => \true, 393215 => \true, 458750 => \true, 458751 => \true, 524286 => \true, 524287 => \true, 589822 => \true, 589823 => \true, 655358 => \true, 655359 => \true, 720894 => \true, 720895 => \true, 786430 => \true, 786431 => \true, 851966 => \true, 851967 => \true, 917502 => \true, 917503 => \true, 917504 => \true, 917505 => \true, 917506 => \true, 917507 => \true, 917508 => \true, 917509 => \true, 917510 => \true, 917511 => \true, 917512 => \true, 917513 => \true, 917514 => \true, 917515 => \true, 917516 => \true, 917517 => \true, 917518 => \true, 917519 => \true, 917520 => \true, 917521 => \true, 917522 => \true, 917523 => \true, 917524 => \true, 917525 => \true, 917526 => \true, 917527 => \true, 917528 => \true, 917529 => \true, 917530 => \true, 917531 => \true, 917532 => \true, 917533 => \true, 917534 => \true, 917535 => \true, 983038 => \true, 983039 => \true, 1048574 => \true, 1048575 => \true, 1114110 => \true, 1114111 => \true); vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/ignored.php 0000644 00000010755 15174671617 0022567 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array(173 => \true, 847 => \true, 6155 => \true, 6156 => \true, 6157 => \true, 8203 => \true, 8288 => \true, 8292 => \true, 65024 => \true, 65025 => \true, 65026 => \true, 65027 => \true, 65028 => \true, 65029 => \true, 65030 => \true, 65031 => \true, 65032 => \true, 65033 => \true, 65034 => \true, 65035 => \true, 65036 => \true, 65037 => \true, 65038 => \true, 65039 => \true, 65279 => \true, 113824 => \true, 113825 => \true, 113826 => \true, 113827 => \true, 917760 => \true, 917761 => \true, 917762 => \true, 917763 => \true, 917764 => \true, 917765 => \true, 917766 => \true, 917767 => \true, 917768 => \true, 917769 => \true, 917770 => \true, 917771 => \true, 917772 => \true, 917773 => \true, 917774 => \true, 917775 => \true, 917776 => \true, 917777 => \true, 917778 => \true, 917779 => \true, 917780 => \true, 917781 => \true, 917782 => \true, 917783 => \true, 917784 => \true, 917785 => \true, 917786 => \true, 917787 => \true, 917788 => \true, 917789 => \true, 917790 => \true, 917791 => \true, 917792 => \true, 917793 => \true, 917794 => \true, 917795 => \true, 917796 => \true, 917797 => \true, 917798 => \true, 917799 => \true, 917800 => \true, 917801 => \true, 917802 => \true, 917803 => \true, 917804 => \true, 917805 => \true, 917806 => \true, 917807 => \true, 917808 => \true, 917809 => \true, 917810 => \true, 917811 => \true, 917812 => \true, 917813 => \true, 917814 => \true, 917815 => \true, 917816 => \true, 917817 => \true, 917818 => \true, 917819 => \true, 917820 => \true, 917821 => \true, 917822 => \true, 917823 => \true, 917824 => \true, 917825 => \true, 917826 => \true, 917827 => \true, 917828 => \true, 917829 => \true, 917830 => \true, 917831 => \true, 917832 => \true, 917833 => \true, 917834 => \true, 917835 => \true, 917836 => \true, 917837 => \true, 917838 => \true, 917839 => \true, 917840 => \true, 917841 => \true, 917842 => \true, 917843 => \true, 917844 => \true, 917845 => \true, 917846 => \true, 917847 => \true, 917848 => \true, 917849 => \true, 917850 => \true, 917851 => \true, 917852 => \true, 917853 => \true, 917854 => \true, 917855 => \true, 917856 => \true, 917857 => \true, 917858 => \true, 917859 => \true, 917860 => \true, 917861 => \true, 917862 => \true, 917863 => \true, 917864 => \true, 917865 => \true, 917866 => \true, 917867 => \true, 917868 => \true, 917869 => \true, 917870 => \true, 917871 => \true, 917872 => \true, 917873 => \true, 917874 => \true, 917875 => \true, 917876 => \true, 917877 => \true, 917878 => \true, 917879 => \true, 917880 => \true, 917881 => \true, 917882 => \true, 917883 => \true, 917884 => \true, 917885 => \true, 917886 => \true, 917887 => \true, 917888 => \true, 917889 => \true, 917890 => \true, 917891 => \true, 917892 => \true, 917893 => \true, 917894 => \true, 917895 => \true, 917896 => \true, 917897 => \true, 917898 => \true, 917899 => \true, 917900 => \true, 917901 => \true, 917902 => \true, 917903 => \true, 917904 => \true, 917905 => \true, 917906 => \true, 917907 => \true, 917908 => \true, 917909 => \true, 917910 => \true, 917911 => \true, 917912 => \true, 917913 => \true, 917914 => \true, 917915 => \true, 917916 => \true, 917917 => \true, 917918 => \true, 917919 => \true, 917920 => \true, 917921 => \true, 917922 => \true, 917923 => \true, 917924 => \true, 917925 => \true, 917926 => \true, 917927 => \true, 917928 => \true, 917929 => \true, 917930 => \true, 917931 => \true, 917932 => \true, 917933 => \true, 917934 => \true, 917935 => \true, 917936 => \true, 917937 => \true, 917938 => \true, 917939 => \true, 917940 => \true, 917941 => \true, 917942 => \true, 917943 => \true, 917944 => \true, 917945 => \true, 917946 => \true, 917947 => \true, 917948 => \true, 917949 => \true, 917950 => \true, 917951 => \true, 917952 => \true, 917953 => \true, 917954 => \true, 917955 => \true, 917956 => \true, 917957 => \true, 917958 => \true, 917959 => \true, 917960 => \true, 917961 => \true, 917962 => \true, 917963 => \true, 917964 => \true, 917965 => \true, 917966 => \true, 917967 => \true, 917968 => \true, 917969 => \true, 917970 => \true, 917971 => \true, 917972 => \true, 917973 => \true, 917974 => \true, 917975 => \true, 917976 => \true, 917977 => \true, 917978 => \true, 917979 => \true, 917980 => \true, 917981 => \true, 917982 => \true, 917983 => \true, 917984 => \true, 917985 => \true, 917986 => \true, 917987 => \true, 917988 => \true, 917989 => \true, 917990 => \true, 917991 => \true, 917992 => \true, 917993 => \true, 917994 => \true, 917995 => \true, 917996 => \true, 917997 => \true, 917998 => \true, 917999 => \true); vendor_prefixed/symfony/polyfill-intl-idn/bootstrap80.php 0000644 00000007704 15174671617 0017726 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn as p; if (!defined('U_IDNA_PROHIBITED_ERROR')) { define('U_IDNA_PROHIBITED_ERROR', 66560); } if (!defined('U_IDNA_ERROR_START')) { define('U_IDNA_ERROR_START', 66560); } if (!defined('U_IDNA_UNASSIGNED_ERROR')) { define('U_IDNA_UNASSIGNED_ERROR', 66561); } if (!defined('U_IDNA_CHECK_BIDI_ERROR')) { define('U_IDNA_CHECK_BIDI_ERROR', 66562); } if (!defined('U_IDNA_STD3_ASCII_RULES_ERROR')) { define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563); } if (!defined('U_IDNA_ACE_PREFIX_ERROR')) { define('U_IDNA_ACE_PREFIX_ERROR', 66564); } if (!defined('U_IDNA_VERIFICATION_ERROR')) { define('U_IDNA_VERIFICATION_ERROR', 66565); } if (!defined('U_IDNA_LABEL_TOO_LONG_ERROR')) { define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566); } if (!defined('U_IDNA_ZERO_LENGTH_LABEL_ERROR')) { define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567); } if (!defined('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR')) { define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568); } if (!defined('U_IDNA_ERROR_LIMIT')) { define('U_IDNA_ERROR_LIMIT', 66569); } if (!defined('U_STRINGPREP_PROHIBITED_ERROR')) { define('U_STRINGPREP_PROHIBITED_ERROR', 66560); } if (!defined('U_STRINGPREP_UNASSIGNED_ERROR')) { define('U_STRINGPREP_UNASSIGNED_ERROR', 66561); } if (!defined('U_STRINGPREP_CHECK_BIDI_ERROR')) { define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562); } if (!defined('IDNA_DEFAULT')) { define('IDNA_DEFAULT', 0); } if (!defined('IDNA_ALLOW_UNASSIGNED')) { define('IDNA_ALLOW_UNASSIGNED', 1); } if (!defined('IDNA_USE_STD3_RULES')) { define('IDNA_USE_STD3_RULES', 2); } if (!defined('IDNA_CHECK_BIDI')) { define('IDNA_CHECK_BIDI', 4); } if (!defined('IDNA_CHECK_CONTEXTJ')) { define('IDNA_CHECK_CONTEXTJ', 8); } if (!defined('IDNA_NONTRANSITIONAL_TO_ASCII')) { define('IDNA_NONTRANSITIONAL_TO_ASCII', 16); } if (!defined('IDNA_NONTRANSITIONAL_TO_UNICODE')) { define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32); } if (!defined('INTL_IDNA_VARIANT_UTS46')) { define('INTL_IDNA_VARIANT_UTS46', 1); } if (!defined('IDNA_ERROR_EMPTY_LABEL')) { define('IDNA_ERROR_EMPTY_LABEL', 1); } if (!defined('IDNA_ERROR_LABEL_TOO_LONG')) { define('IDNA_ERROR_LABEL_TOO_LONG', 2); } if (!defined('IDNA_ERROR_DOMAIN_NAME_TOO_LONG')) { define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4); } if (!defined('IDNA_ERROR_LEADING_HYPHEN')) { define('IDNA_ERROR_LEADING_HYPHEN', 8); } if (!defined('IDNA_ERROR_TRAILING_HYPHEN')) { define('IDNA_ERROR_TRAILING_HYPHEN', 16); } if (!defined('IDNA_ERROR_HYPHEN_3_4')) { define('IDNA_ERROR_HYPHEN_3_4', 32); } if (!defined('IDNA_ERROR_LEADING_COMBINING_MARK')) { define('IDNA_ERROR_LEADING_COMBINING_MARK', 64); } if (!defined('IDNA_ERROR_DISALLOWED')) { define('IDNA_ERROR_DISALLOWED', 128); } if (!defined('IDNA_ERROR_PUNYCODE')) { define('IDNA_ERROR_PUNYCODE', 256); } if (!defined('IDNA_ERROR_LABEL_HAS_DOT')) { define('IDNA_ERROR_LABEL_HAS_DOT', 512); } if (!defined('IDNA_ERROR_INVALID_ACE_LABEL')) { define('IDNA_ERROR_INVALID_ACE_LABEL', 1024); } if (!defined('IDNA_ERROR_BIDI')) { define('IDNA_ERROR_BIDI', 2048); } if (!defined('IDNA_ERROR_CONTEXTJ')) { define('IDNA_ERROR_CONTEXTJ', 4096); } if (!function_exists('idn_to_ascii')) { function idn_to_ascii(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_ascii((string) $domain, (int) $flags, (int) $variant, $idna_info); } } if (!function_exists('idn_to_utf8')) { function idn_to_utf8(?string $domain, ?int $flags = IDNA_DEFAULT, ?int $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = null): string|false { return p\Idn::idn_to_utf8((string) $domain, (int) $flags, (int) $variant, $idna_info); } } vendor_prefixed/symfony/polyfill-intl-idn/Idn.php 0000644 00000073642 15174671617 0016257 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> and Trevor Rowbotham <trevor.rowbotham@pm.me> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn; use WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; use WPMailSMTP\Vendor\Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; /** * @see https://www.unicode.org/reports/tr46/ * * @internal */ final class Idn { public const ERROR_EMPTY_LABEL = 1; public const ERROR_LABEL_TOO_LONG = 2; public const ERROR_DOMAIN_NAME_TOO_LONG = 4; public const ERROR_LEADING_HYPHEN = 8; public const ERROR_TRAILING_HYPHEN = 0x10; public const ERROR_HYPHEN_3_4 = 0x20; public const ERROR_LEADING_COMBINING_MARK = 0x40; public const ERROR_DISALLOWED = 0x80; public const ERROR_PUNYCODE = 0x100; public const ERROR_LABEL_HAS_DOT = 0x200; public const ERROR_INVALID_ACE_LABEL = 0x400; public const ERROR_BIDI = 0x800; public const ERROR_CONTEXTJ = 0x1000; public const ERROR_CONTEXTO_PUNCTUATION = 0x2000; public const ERROR_CONTEXTO_DIGITS = 0x4000; public const INTL_IDNA_VARIANT_2003 = 0; public const INTL_IDNA_VARIANT_UTS46 = 1; public const IDNA_DEFAULT = 0; public const IDNA_ALLOW_UNASSIGNED = 1; public const IDNA_USE_STD3_RULES = 2; public const IDNA_CHECK_BIDI = 4; public const IDNA_CHECK_CONTEXTJ = 8; public const IDNA_NONTRANSITIONAL_TO_ASCII = 16; public const IDNA_NONTRANSITIONAL_TO_UNICODE = 32; public const MAX_DOMAIN_SIZE = 253; public const MAX_LABEL_SIZE = 63; public const BASE = 36; public const TMIN = 1; public const TMAX = 26; public const SKEW = 38; public const DAMP = 700; public const INITIAL_BIAS = 72; public const INITIAL_N = 128; public const DELIMITER = '-'; public const MAX_INT = 2147483647; /** * Contains the numeric value of a basic code point (for use in representing integers) in the * range 0 to BASE-1, or -1 if b is does not represent a value. * * @var array<int, int> */ private static $basicToDigit = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; /** * @var array<int, int> */ private static $virama; /** * @var array<int, string> */ private static $mapped; /** * @var array<int, bool> */ private static $ignored; /** * @var array<int, string> */ private static $deviation; /** * @var array<int, bool> */ private static $disallowed; /** * @var array<int, string> */ private static $disallowed_STD3_mapped; /** * @var array<int, bool> */ private static $disallowed_STD3_valid; /** * @var bool */ private static $mappingTableLoaded = \false; /** * @see https://www.unicode.org/reports/tr46/#ToASCII * * @param string $domainName * @param int $options * @param int $variant * @param array $idna_info * * @return string|false */ public static function idn_to_ascii($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) { if (self::INTL_IDNA_VARIANT_2003 === $variant) { @\trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); } $options = ['CheckHyphens' => \true, 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_ASCII), 'VerifyDnsLength' => \true]; $info = new Info(); $labels = self::process((string) $domainName, $options, $info); foreach ($labels as $i => $label) { // Only convert labels to punycode that contain non-ASCII code points if (1 === \preg_match('/[^\\x00-\\x7F]/', $label)) { try { $label = 'xn--' . self::punycodeEncode($label); } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; } $labels[$i] = $label; } } if ($options['VerifyDnsLength']) { self::validateDomainAndLabelLength($labels, $info); } $idna_info = ['result' => \implode('.', $labels), 'isTransitionalDifferent' => $info->transitionalDifferent, 'errors' => $info->errors]; return 0 === $info->errors ? $idna_info['result'] : \false; } /** * @see https://www.unicode.org/reports/tr46/#ToUnicode * * @param string $domainName * @param int $options * @param int $variant * @param array $idna_info * * @return string|false */ public static function idn_to_utf8($domainName, $options = self::IDNA_DEFAULT, $variant = self::INTL_IDNA_VARIANT_UTS46, &$idna_info = []) { if (self::INTL_IDNA_VARIANT_2003 === $variant) { @\trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED); } $info = new Info(); $labels = self::process((string) $domainName, ['CheckHyphens' => \true, 'CheckBidi' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 !== ($options & self::IDNA_CHECK_BIDI), 'CheckJoiners' => self::INTL_IDNA_VARIANT_UTS46 === $variant && 0 !== ($options & self::IDNA_CHECK_CONTEXTJ), 'UseSTD3ASCIIRules' => 0 !== ($options & self::IDNA_USE_STD3_RULES), 'Transitional_Processing' => self::INTL_IDNA_VARIANT_2003 === $variant || 0 === ($options & self::IDNA_NONTRANSITIONAL_TO_UNICODE)], $info); $idna_info = ['result' => \implode('.', $labels), 'isTransitionalDifferent' => $info->transitionalDifferent, 'errors' => $info->errors]; return 0 === $info->errors ? $idna_info['result'] : \false; } /** * @param string $label * * @return bool */ private static function isValidContextJ(array $codePoints, $label) { if (!isset(self::$virama)) { self::$virama = (require __DIR__ . \DIRECTORY_SEPARATOR . 'Resources' . \DIRECTORY_SEPARATOR . 'unidata' . \DIRECTORY_SEPARATOR . 'virama.php'); } $offset = 0; foreach ($codePoints as $i => $codePoint) { if (0x200c !== $codePoint && 0x200d !== $codePoint) { continue; } if (!isset($codePoints[$i - 1])) { return \false; } // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; if (isset(self::$virama[$codePoints[$i - 1]])) { continue; } // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C(Joining_Type:T)*(Joining_Type:{R,D})) Then // True; // Generated RegExp = ([Joining_Type:{L,D}][Joining_Type:T]*\u200C[Joining_Type:T]*)[Joining_Type:{R,D}] if (0x200c === $codePoint && 1 === \preg_match(Regex::ZWNJ, $label, $matches, \PREG_OFFSET_CAPTURE, $offset)) { $offset += \strlen($matches[1][0]); continue; } return \false; } return \true; } /** * @see https://www.unicode.org/reports/tr46/#ProcessingStepMap * * @param string $input * @param array<string, bool> $options * * @return string */ private static function mapCodePoints($input, array $options, Info $info) { $str = ''; $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; $transitional = $options['Transitional_Processing']; foreach (self::utf8Decode($input) as $codePoint) { $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); switch ($data['status']) { case 'disallowed': case 'valid': $str .= \mb_chr($codePoint, 'utf-8'); break; case 'ignored': // Do nothing. break; case 'mapped': $str .= $transitional && 0x1e9e === $codePoint ? 'ss' : $data['mapping']; break; case 'deviation': $info->transitionalDifferent = \true; $str .= $transitional ? $data['mapping'] : \mb_chr($codePoint, 'utf-8'); break; } } return $str; } /** * @see https://www.unicode.org/reports/tr46/#Processing * * @param string $domain * @param array<string, bool> $options * * @return array<int, string> */ private static function process($domain, array $options, Info $info) { // If VerifyDnsLength is not set, we are doing ToUnicode otherwise we are doing ToASCII and // we need to respect the VerifyDnsLength option. $checkForEmptyLabels = !isset($options['VerifyDnsLength']) || $options['VerifyDnsLength']; if ($checkForEmptyLabels && '' === $domain) { $info->errors |= self::ERROR_EMPTY_LABEL; return [$domain]; } // Step 1. Map each code point in the domain name string $domain = self::mapCodePoints($domain, $options, $info); // Step 2. Normalize the domain name string to Unicode Normalization Form C. if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) { $domain = \Normalizer::normalize($domain, \Normalizer::FORM_C); } // Step 3. Break the string into labels at U+002E (.) FULL STOP. $labels = \explode('.', $domain); $lastLabelIndex = \count($labels) - 1; // Step 4. Convert and validate each label in the domain name string. foreach ($labels as $i => $label) { $validationOptions = $options; if ('xn--' === \substr($label, 0, 4)) { // Step 4.1. If the label contains any non-ASCII code point (i.e., a code point greater than U+007F), // record that there was an error, and continue with the next label. if (\preg_match('/[^\\x00-\\x7F]/', $label)) { $info->errors |= self::ERROR_PUNYCODE; continue; } // Step 4.2. Attempt to convert the rest of the label to Unicode according to Punycode [RFC3492]. If // that conversion fails, record that there was an error, and continue // with the next label. Otherwise replace the original label in the string by the results of the // conversion. try { $label = self::punycodeDecode(\substr($label, 4)); } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; continue; } $validationOptions['Transitional_Processing'] = \false; $labels[$i] = $label; } self::validateLabel($label, $info, $validationOptions, $i > 0 && $i === $lastLabelIndex); } if ($info->bidiDomain && !$info->validBidiDomain) { $info->errors |= self::ERROR_BIDI; } // Any input domain name string that does not record an error has been successfully // processed according to this specification. Conversely, if an input domain_name string // causes an error, then the processing of the input domain_name string fails. Determining // what to do with error input is up to the caller, and not in the scope of this document. return $labels; } /** * @see https://tools.ietf.org/html/rfc5893#section-2 * * @param string $label */ private static function validateBidiLabel($label, Info $info) { if (1 === \preg_match(Regex::RTL_LABEL, $label)) { $info->bidiDomain = \true; // Step 1. The first character must be a character with Bidi property L, R, or AL. // If it has the R or AL property, it is an RTL label if (1 !== \preg_match(Regex::BIDI_STEP_1_RTL, $label)) { $info->validBidiDomain = \false; return; } // Step 2. In an RTL label, only characters with the Bidi properties R, AL, AN, EN, ES, // CS, ET, ON, BN, or NSM are allowed. if (1 === \preg_match(Regex::BIDI_STEP_2, $label)) { $info->validBidiDomain = \false; return; } // Step 3. In an RTL label, the end of the label must be a character with Bidi property // R, AL, EN, or AN, followed by zero or more characters with Bidi property NSM. if (1 !== \preg_match(Regex::BIDI_STEP_3, $label)) { $info->validBidiDomain = \false; return; } // Step 4. In an RTL label, if an EN is present, no AN may be present, and vice versa. if (1 === \preg_match(Regex::BIDI_STEP_4_AN, $label) && 1 === \preg_match(Regex::BIDI_STEP_4_EN, $label)) { $info->validBidiDomain = \false; return; } return; } // We are a LTR label // Step 1. The first character must be a character with Bidi property L, R, or AL. // If it has the L property, it is an LTR label. if (1 !== \preg_match(Regex::BIDI_STEP_1_LTR, $label)) { $info->validBidiDomain = \false; return; } // Step 5. In an LTR label, only characters with the Bidi properties L, EN, // ES, CS, ET, ON, BN, or NSM are allowed. if (1 === \preg_match(Regex::BIDI_STEP_5, $label)) { $info->validBidiDomain = \false; return; } // Step 6.In an LTR label, the end of the label must be a character with Bidi property L or // EN, followed by zero or more characters with Bidi property NSM. if (1 !== \preg_match(Regex::BIDI_STEP_6, $label)) { $info->validBidiDomain = \false; return; } } /** * @param array<int, string> $labels */ private static function validateDomainAndLabelLength(array $labels, Info $info) { $maxDomainSize = self::MAX_DOMAIN_SIZE; $length = \count($labels); // Number of "." delimiters. $domainLength = $length - 1; // If the last label is empty and it is not the first label, then it is the root label. // Increase the max size by 1, making it 254, to account for the root label's "." // delimiter. This also means we don't need to check the last label's length for being too // long. if ($length > 1 && '' === $labels[$length - 1]) { ++$maxDomainSize; --$length; } for ($i = 0; $i < $length; ++$i) { $bytes = \strlen($labels[$i]); $domainLength += $bytes; if ($bytes > self::MAX_LABEL_SIZE) { $info->errors |= self::ERROR_LABEL_TOO_LONG; } } if ($domainLength > $maxDomainSize) { $info->errors |= self::ERROR_DOMAIN_NAME_TOO_LONG; } } /** * @see https://www.unicode.org/reports/tr46/#Validity_Criteria * * @param string $label * @param array<string, bool> $options * @param bool $canBeEmpty */ private static function validateLabel($label, Info $info, array $options, $canBeEmpty) { if ('' === $label) { if (!$canBeEmpty && (!isset($options['VerifyDnsLength']) || $options['VerifyDnsLength'])) { $info->errors |= self::ERROR_EMPTY_LABEL; } return; } // Step 1. The label must be in Unicode Normalization Form C. if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) { $info->errors |= self::ERROR_INVALID_ACE_LABEL; } $codePoints = self::utf8Decode($label); if ($options['CheckHyphens']) { // Step 2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character // in both the thrid and fourth positions. if (isset($codePoints[2], $codePoints[3]) && 0x2d === $codePoints[2] && 0x2d === $codePoints[3]) { $info->errors |= self::ERROR_HYPHEN_3_4; } // Step 3. If CheckHyphens, the label must neither begin nor end with a U+002D // HYPHEN-MINUS character. if ('-' === \substr($label, 0, 1)) { $info->errors |= self::ERROR_LEADING_HYPHEN; } if ('-' === \substr($label, -1, 1)) { $info->errors |= self::ERROR_TRAILING_HYPHEN; } } elseif ('xn--' === \substr($label, 0, 4)) { $info->errors |= self::ERROR_PUNYCODE; } // Step 4. The label must not contain a U+002E (.) FULL STOP. if (\false !== \strpos($label, '.')) { $info->errors |= self::ERROR_LABEL_HAS_DOT; } // Step 5. The label must not begin with a combining mark, that is: General_Category=Mark. if (1 === \preg_match(Regex::COMBINING_MARK, $label)) { $info->errors |= self::ERROR_LEADING_COMBINING_MARK; } // Step 6. Each code point in the label must only have certain status values according to // Section 5, IDNA Mapping Table: $transitional = $options['Transitional_Processing']; $useSTD3ASCIIRules = $options['UseSTD3ASCIIRules']; foreach ($codePoints as $codePoint) { $data = self::lookupCodePointStatus($codePoint, $useSTD3ASCIIRules); $status = $data['status']; if ('valid' === $status || !$transitional && 'deviation' === $status) { continue; } $info->errors |= self::ERROR_DISALLOWED; break; } // Step 7. If CheckJoiners, the label must satisify the ContextJ rules from Appendix A, in // The Unicode Code Points and Internationalized Domain Names for Applications (IDNA) // [IDNA2008]. if ($options['CheckJoiners'] && !self::isValidContextJ($codePoints, $label)) { $info->errors |= self::ERROR_CONTEXTJ; } // Step 8. If CheckBidi, and if the domain name is a Bidi domain name, then the label must // satisfy all six of the numbered conditions in [IDNA2008] RFC 5893, Section 2. if ($options['CheckBidi'] && (!$info->bidiDomain || $info->validBidiDomain)) { self::validateBidiLabel($label, $info); } } /** * @see https://tools.ietf.org/html/rfc3492#section-6.2 * * @param string $input * * @return string */ private static function punycodeDecode($input) { $n = self::INITIAL_N; $out = 0; $i = 0; $bias = self::INITIAL_BIAS; $lastDelimIndex = \strrpos($input, self::DELIMITER); $b = \false === $lastDelimIndex ? 0 : $lastDelimIndex; $inputLength = \strlen($input); $output = []; $bytes = \array_map('ord', \str_split($input)); for ($j = 0; $j < $b; ++$j) { if ($bytes[$j] > 0x7f) { throw new \Exception('Invalid input'); } $output[$out++] = $input[$j]; } if ($b > 0) { ++$b; } for ($in = $b; $in < $inputLength; ++$out) { $oldi = $i; $w = 1; for ($k = self::BASE;; $k += self::BASE) { if ($in >= $inputLength) { throw new \Exception('Invalid input'); } $digit = self::$basicToDigit[$bytes[$in++] & 0xff]; if ($digit < 0) { throw new \Exception('Invalid input'); } if ($digit > \intdiv(self::MAX_INT - $i, $w)) { throw new \Exception('Integer overflow'); } $i += $digit * $w; if ($k <= $bias) { $t = self::TMIN; } elseif ($k >= $bias + self::TMAX) { $t = self::TMAX; } else { $t = $k - $bias; } if ($digit < $t) { break; } $baseMinusT = self::BASE - $t; if ($w > \intdiv(self::MAX_INT, $baseMinusT)) { throw new \Exception('Integer overflow'); } $w *= $baseMinusT; } $outPlusOne = $out + 1; $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); if (\intdiv($i, $outPlusOne) > self::MAX_INT - $n) { throw new \Exception('Integer overflow'); } $n += \intdiv($i, $outPlusOne); $i %= $outPlusOne; \array_splice($output, $i++, 0, [\mb_chr($n, 'utf-8')]); } return \implode('', $output); } /** * @see https://tools.ietf.org/html/rfc3492#section-6.3 * * @param string $input * * @return string */ private static function punycodeEncode($input) { $n = self::INITIAL_N; $delta = 0; $out = 0; $bias = self::INITIAL_BIAS; $inputLength = 0; $output = ''; $iter = self::utf8Decode($input); foreach ($iter as $codePoint) { ++$inputLength; if ($codePoint < 0x80) { $output .= \chr($codePoint); ++$out; } } $h = $out; $b = $out; if ($b > 0) { $output .= self::DELIMITER; ++$out; } while ($h < $inputLength) { $m = self::MAX_INT; foreach ($iter as $codePoint) { if ($codePoint >= $n && $codePoint < $m) { $m = $codePoint; } } if ($m - $n > \intdiv(self::MAX_INT - $delta, $h + 1)) { throw new \Exception('Integer overflow'); } $delta += ($m - $n) * ($h + 1); $n = $m; foreach ($iter as $codePoint) { if ($codePoint < $n && 0 === ++$delta) { throw new \Exception('Integer overflow'); } if ($codePoint === $n) { $q = $delta; for ($k = self::BASE;; $k += self::BASE) { if ($k <= $bias) { $t = self::TMIN; } elseif ($k >= $bias + self::TMAX) { $t = self::TMAX; } else { $t = $k - $bias; } if ($q < $t) { break; } $qMinusT = $q - $t; $baseMinusT = self::BASE - $t; $output .= self::encodeDigit($t + $qMinusT % $baseMinusT, \false); ++$out; $q = \intdiv($qMinusT, $baseMinusT); } $output .= self::encodeDigit($q, \false); ++$out; $bias = self::adaptBias($delta, $h + 1, $h === $b); $delta = 0; ++$h; } } ++$delta; ++$n; } return $output; } /** * @see https://tools.ietf.org/html/rfc3492#section-6.1 * * @param int $delta * @param int $numPoints * @param bool $firstTime * * @return int */ private static function adaptBias($delta, $numPoints, $firstTime) { // xxx >> 1 is a faster way of doing intdiv(xxx, 2) $delta = $firstTime ? \intdiv($delta, self::DAMP) : $delta >> 1; $delta += \intdiv($delta, $numPoints); $k = 0; while ($delta > (self::BASE - self::TMIN) * self::TMAX >> 1) { $delta = \intdiv($delta, self::BASE - self::TMIN); $k += self::BASE; } return $k + \intdiv((self::BASE - self::TMIN + 1) * $delta, $delta + self::SKEW); } /** * @param int $d * @param bool $flag * * @return string */ private static function encodeDigit($d, $flag) { return \chr($d + 22 + 75 * ($d < 26 ? 1 : 0) - (($flag ? 1 : 0) << 5)); } /** * Takes a UTF-8 encoded string and converts it into a series of integer code points. Any * invalid byte sequences will be replaced by a U+FFFD replacement code point. * * @see https://encoding.spec.whatwg.org/#utf-8-decoder * * @param string $input * * @return array<int, int> */ private static function utf8Decode($input) { $bytesSeen = 0; $bytesNeeded = 0; $lowerBoundary = 0x80; $upperBoundary = 0xbf; $codePoint = 0; $codePoints = []; $length = \strlen($input); for ($i = 0; $i < $length; ++$i) { $byte = \ord($input[$i]); if (0 === $bytesNeeded) { if ($byte >= 0x0 && $byte <= 0x7f) { $codePoints[] = $byte; continue; } if ($byte >= 0xc2 && $byte <= 0xdf) { $bytesNeeded = 1; $codePoint = $byte & 0x1f; } elseif ($byte >= 0xe0 && $byte <= 0xef) { if (0xe0 === $byte) { $lowerBoundary = 0xa0; } elseif (0xed === $byte) { $upperBoundary = 0x9f; } $bytesNeeded = 2; $codePoint = $byte & 0xf; } elseif ($byte >= 0xf0 && $byte <= 0xf4) { if (0xf0 === $byte) { $lowerBoundary = 0x90; } elseif (0xf4 === $byte) { $upperBoundary = 0x8f; } $bytesNeeded = 3; $codePoint = $byte & 0x7; } else { $codePoints[] = 0xfffd; } continue; } if ($byte < $lowerBoundary || $byte > $upperBoundary) { $codePoint = 0; $bytesNeeded = 0; $bytesSeen = 0; $lowerBoundary = 0x80; $upperBoundary = 0xbf; --$i; $codePoints[] = 0xfffd; continue; } $lowerBoundary = 0x80; $upperBoundary = 0xbf; $codePoint = $codePoint << 6 | $byte & 0x3f; if (++$bytesSeen !== $bytesNeeded) { continue; } $codePoints[] = $codePoint; $codePoint = 0; $bytesNeeded = 0; $bytesSeen = 0; } // String unexpectedly ended, so append a U+FFFD code point. if (0 !== $bytesNeeded) { $codePoints[] = 0xfffd; } return $codePoints; } /** * @param int $codePoint * @param bool $useSTD3ASCIIRules * * @return array{status: string, mapping?: string} */ private static function lookupCodePointStatus($codePoint, $useSTD3ASCIIRules) { if (!self::$mappingTableLoaded) { self::$mappingTableLoaded = \true; self::$mapped = (require __DIR__ . '/Resources/unidata/mapped.php'); self::$ignored = (require __DIR__ . '/Resources/unidata/ignored.php'); self::$deviation = (require __DIR__ . '/Resources/unidata/deviation.php'); self::$disallowed = (require __DIR__ . '/Resources/unidata/disallowed.php'); self::$disallowed_STD3_mapped = (require __DIR__ . '/Resources/unidata/disallowed_STD3_mapped.php'); self::$disallowed_STD3_valid = (require __DIR__ . '/Resources/unidata/disallowed_STD3_valid.php'); } if (isset(self::$mapped[$codePoint])) { return ['status' => 'mapped', 'mapping' => self::$mapped[$codePoint]]; } if (isset(self::$ignored[$codePoint])) { return ['status' => 'ignored']; } if (isset(self::$deviation[$codePoint])) { return ['status' => 'deviation', 'mapping' => self::$deviation[$codePoint]]; } if (isset(self::$disallowed[$codePoint]) || DisallowedRanges::inRange($codePoint)) { return ['status' => 'disallowed']; } $isDisallowedMapped = isset(self::$disallowed_STD3_mapped[$codePoint]); if ($isDisallowedMapped || isset(self::$disallowed_STD3_valid[$codePoint])) { $status = 'disallowed'; if (!$useSTD3ASCIIRules) { $status = $isDisallowedMapped ? 'mapped' : 'valid'; } if ($isDisallowedMapped) { return ['status' => $status, 'mapping' => self::$disallowed_STD3_mapped[$codePoint]]; } return ['status' => $status]; } return ['status' => 'valid']; } } vendor_prefixed/symfony/polyfill-mbstring/LICENSE 0000644 00000002054 15174671617 0016135 0 ustar 00 Copyright (c) 2015-present 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. vendor_prefixed/symfony/polyfill-mbstring/bootstrap.php 0000644 00000020441 15174671617 0017656 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use WPMailSMTP\Vendor\Symfony\Polyfill\Mbstring as p; if (\PHP_VERSION_ID >= 80000) { return require __DIR__.'/bootstrap80.php'; } if (!function_exists('mb_convert_encoding')) { function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } } if (!function_exists('mb_decode_mimeheader')) { function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } } if (!function_exists('mb_encode_mimeheader')) { function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } } if (!function_exists('mb_decode_numericentity')) { function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } } if (!function_exists('mb_encode_numericentity')) { function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } } if (!function_exists('mb_convert_case')) { function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } } if (!function_exists('mb_internal_encoding')) { function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } } if (!function_exists('mb_language')) { function mb_language($language = null) { return p\Mbstring::mb_language($language); } } if (!function_exists('mb_list_encodings')) { function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } } if (!function_exists('mb_encoding_aliases')) { function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } } if (!function_exists('mb_check_encoding')) { function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } } if (!function_exists('mb_detect_encoding')) { function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } } if (!function_exists('mb_detect_order')) { function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } } if (!function_exists('mb_parse_str')) { function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } } if (!function_exists('mb_strlen')) { function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } } if (!function_exists('mb_strpos')) { function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } } if (!function_exists('mb_strtolower')) { function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } } if (!function_exists('mb_strtoupper')) { function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } } if (!function_exists('mb_substitute_character')) { function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } } if (!function_exists('mb_substr')) { function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } } if (!function_exists('mb_stripos')) { function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } } if (!function_exists('mb_stristr')) { function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } } if (!function_exists('mb_strrchr')) { function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } } if (!function_exists('mb_strrichr')) { function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } } if (!function_exists('mb_strripos')) { function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } } if (!function_exists('mb_strrpos')) { function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } } if (!function_exists('mb_strstr')) { function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } } if (!function_exists('mb_get_info')) { function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } } if (!function_exists('mb_http_output')) { function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } } if (!function_exists('mb_strwidth')) { function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } } if (!function_exists('mb_substr_count')) { function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } } if (!function_exists('mb_output_handler')) { function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } } if (!function_exists('mb_http_input')) { function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } } if (!function_exists('mb_convert_variables')) { function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } } if (!function_exists('mb_ord')) { function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } } if (!function_exists('mb_chr')) { function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } } if (!function_exists('mb_scrub')) { function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } } if (!function_exists('mb_str_split')) { function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } } if (!function_exists('mb_str_pad')) { function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } } if (!function_exists('mb_ucfirst')) { function mb_ucfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } } if (!function_exists('mb_lcfirst')) { function mb_lcfirst(string $string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } } if (!function_exists('mb_trim')) { function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); } } if (!function_exists('mb_ltrim')) { function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); } } if (!function_exists('mb_rtrim')) { function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); } } if (extension_loaded('mbstring')) { return; } if (!defined('MB_CASE_UPPER')) { define('MB_CASE_UPPER', 0); } if (!defined('MB_CASE_LOWER')) { define('MB_CASE_LOWER', 1); } if (!defined('MB_CASE_TITLE')) { define('MB_CASE_TITLE', 2); } vendor_prefixed/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php 0000644 00000052423 15174671617 0023171 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array('A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e', 'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j', 'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o', 'P' => 'p', 'Q' => 'q', 'R' => 'r', 'S' => 's', 'T' => 't', 'U' => 'u', 'V' => 'v', 'W' => 'w', 'X' => 'x', 'Y' => 'y', 'Z' => 'z', 'À' => 'à', 'Á' => 'á', 'Â' => 'â', 'Ã' => 'ã', 'Ä' => 'ä', 'Å' => 'å', 'Æ' => 'æ', 'Ç' => 'ç', 'È' => 'è', 'É' => 'é', 'Ê' => 'ê', 'Ë' => 'ë', 'Ì' => 'ì', 'Í' => 'í', 'Î' => 'î', 'Ï' => 'ï', 'Ð' => 'ð', 'Ñ' => 'ñ', 'Ò' => 'ò', 'Ó' => 'ó', 'Ô' => 'ô', 'Õ' => 'õ', 'Ö' => 'ö', 'Ø' => 'ø', 'Ù' => 'ù', 'Ú' => 'ú', 'Û' => 'û', 'Ü' => 'ü', 'Ý' => 'ý', 'Þ' => 'þ', 'Ā' => 'ā', 'Ă' => 'ă', 'Ą' => 'ą', 'Ć' => 'ć', 'Ĉ' => 'ĉ', 'Ċ' => 'ċ', 'Č' => 'č', 'Ď' => 'ď', 'Đ' => 'đ', 'Ē' => 'ē', 'Ĕ' => 'ĕ', 'Ė' => 'ė', 'Ę' => 'ę', 'Ě' => 'ě', 'Ĝ' => 'ĝ', 'Ğ' => 'ğ', 'Ġ' => 'ġ', 'Ģ' => 'ģ', 'Ĥ' => 'ĥ', 'Ħ' => 'ħ', 'Ĩ' => 'ĩ', 'Ī' => 'ī', 'Ĭ' => 'ĭ', 'Į' => 'į', 'İ' => 'i̇', 'IJ' => 'ij', 'Ĵ' => 'ĵ', 'Ķ' => 'ķ', 'Ĺ' => 'ĺ', 'Ļ' => 'ļ', 'Ľ' => 'ľ', 'Ŀ' => 'ŀ', 'Ł' => 'ł', 'Ń' => 'ń', 'Ņ' => 'ņ', 'Ň' => 'ň', 'Ŋ' => 'ŋ', 'Ō' => 'ō', 'Ŏ' => 'ŏ', 'Ő' => 'ő', 'Œ' => 'œ', 'Ŕ' => 'ŕ', 'Ŗ' => 'ŗ', 'Ř' => 'ř', 'Ś' => 'ś', 'Ŝ' => 'ŝ', 'Ş' => 'ş', 'Š' => 'š', 'Ţ' => 'ţ', 'Ť' => 'ť', 'Ŧ' => 'ŧ', 'Ũ' => 'ũ', 'Ū' => 'ū', 'Ŭ' => 'ŭ', 'Ů' => 'ů', 'Ű' => 'ű', 'Ų' => 'ų', 'Ŵ' => 'ŵ', 'Ŷ' => 'ŷ', 'Ÿ' => 'ÿ', 'Ź' => 'ź', 'Ż' => 'ż', 'Ž' => 'ž', 'Ɓ' => 'ɓ', 'Ƃ' => 'ƃ', 'Ƅ' => 'ƅ', 'Ɔ' => 'ɔ', 'Ƈ' => 'ƈ', 'Ɖ' => 'ɖ', 'Ɗ' => 'ɗ', 'Ƌ' => 'ƌ', 'Ǝ' => 'ǝ', 'Ə' => 'ə', 'Ɛ' => 'ɛ', 'Ƒ' => 'ƒ', 'Ɠ' => 'ɠ', 'Ɣ' => 'ɣ', 'Ɩ' => 'ɩ', 'Ɨ' => 'ɨ', 'Ƙ' => 'ƙ', 'Ɯ' => 'ɯ', 'Ɲ' => 'ɲ', 'Ɵ' => 'ɵ', 'Ơ' => 'ơ', 'Ƣ' => 'ƣ', 'Ƥ' => 'ƥ', 'Ʀ' => 'ʀ', 'Ƨ' => 'ƨ', 'Ʃ' => 'ʃ', 'Ƭ' => 'ƭ', 'Ʈ' => 'ʈ', 'Ư' => 'ư', 'Ʊ' => 'ʊ', 'Ʋ' => 'ʋ', 'Ƴ' => 'ƴ', 'Ƶ' => 'ƶ', 'Ʒ' => 'ʒ', 'Ƹ' => 'ƹ', 'Ƽ' => 'ƽ', 'DŽ' => 'dž', 'Dž' => 'dž', 'LJ' => 'lj', 'Lj' => 'lj', 'NJ' => 'nj', 'Nj' => 'nj', 'Ǎ' => 'ǎ', 'Ǐ' => 'ǐ', 'Ǒ' => 'ǒ', 'Ǔ' => 'ǔ', 'Ǖ' => 'ǖ', 'Ǘ' => 'ǘ', 'Ǚ' => 'ǚ', 'Ǜ' => 'ǜ', 'Ǟ' => 'ǟ', 'Ǡ' => 'ǡ', 'Ǣ' => 'ǣ', 'Ǥ' => 'ǥ', 'Ǧ' => 'ǧ', 'Ǩ' => 'ǩ', 'Ǫ' => 'ǫ', 'Ǭ' => 'ǭ', 'Ǯ' => 'ǯ', 'DZ' => 'dz', 'Dz' => 'dz', 'Ǵ' => 'ǵ', 'Ƕ' => 'ƕ', 'Ƿ' => 'ƿ', 'Ǹ' => 'ǹ', 'Ǻ' => 'ǻ', 'Ǽ' => 'ǽ', 'Ǿ' => 'ǿ', 'Ȁ' => 'ȁ', 'Ȃ' => 'ȃ', 'Ȅ' => 'ȅ', 'Ȇ' => 'ȇ', 'Ȉ' => 'ȉ', 'Ȋ' => 'ȋ', 'Ȍ' => 'ȍ', 'Ȏ' => 'ȏ', 'Ȑ' => 'ȑ', 'Ȓ' => 'ȓ', 'Ȕ' => 'ȕ', 'Ȗ' => 'ȗ', 'Ș' => 'ș', 'Ț' => 'ț', 'Ȝ' => 'ȝ', 'Ȟ' => 'ȟ', 'Ƞ' => 'ƞ', 'Ȣ' => 'ȣ', 'Ȥ' => 'ȥ', 'Ȧ' => 'ȧ', 'Ȩ' => 'ȩ', 'Ȫ' => 'ȫ', 'Ȭ' => 'ȭ', 'Ȯ' => 'ȯ', 'Ȱ' => 'ȱ', 'Ȳ' => 'ȳ', 'Ⱥ' => 'ⱥ', 'Ȼ' => 'ȼ', 'Ƚ' => 'ƚ', 'Ⱦ' => 'ⱦ', 'Ɂ' => 'ɂ', 'Ƀ' => 'ƀ', 'Ʉ' => 'ʉ', 'Ʌ' => 'ʌ', 'Ɇ' => 'ɇ', 'Ɉ' => 'ɉ', 'Ɋ' => 'ɋ', 'Ɍ' => 'ɍ', 'Ɏ' => 'ɏ', 'Ͱ' => 'ͱ', 'Ͳ' => 'ͳ', 'Ͷ' => 'ͷ', 'Ϳ' => 'ϳ', 'Ά' => 'ά', 'Έ' => 'έ', 'Ή' => 'ή', 'Ί' => 'ί', 'Ό' => 'ό', 'Ύ' => 'ύ', 'Ώ' => 'ώ', 'Α' => 'α', 'Β' => 'β', 'Γ' => 'γ', 'Δ' => 'δ', 'Ε' => 'ε', 'Ζ' => 'ζ', 'Η' => 'η', 'Θ' => 'θ', 'Ι' => 'ι', 'Κ' => 'κ', 'Λ' => 'λ', 'Μ' => 'μ', 'Ν' => 'ν', 'Ξ' => 'ξ', 'Ο' => 'ο', 'Π' => 'π', 'Ρ' => 'ρ', 'Σ' => 'σ', 'Τ' => 'τ', 'Υ' => 'υ', 'Φ' => 'φ', 'Χ' => 'χ', 'Ψ' => 'ψ', 'Ω' => 'ω', 'Ϊ' => 'ϊ', 'Ϋ' => 'ϋ', 'Ϗ' => 'ϗ', 'Ϙ' => 'ϙ', 'Ϛ' => 'ϛ', 'Ϝ' => 'ϝ', 'Ϟ' => 'ϟ', 'Ϡ' => 'ϡ', 'Ϣ' => 'ϣ', 'Ϥ' => 'ϥ', 'Ϧ' => 'ϧ', 'Ϩ' => 'ϩ', 'Ϫ' => 'ϫ', 'Ϭ' => 'ϭ', 'Ϯ' => 'ϯ', 'ϴ' => 'θ', 'Ϸ' => 'ϸ', 'Ϲ' => 'ϲ', 'Ϻ' => 'ϻ', 'Ͻ' => 'ͻ', 'Ͼ' => 'ͼ', 'Ͽ' => 'ͽ', 'Ѐ' => 'ѐ', 'Ё' => 'ё', 'Ђ' => 'ђ', 'Ѓ' => 'ѓ', 'Є' => 'є', 'Ѕ' => 'ѕ', 'І' => 'і', 'Ї' => 'ї', 'Ј' => 'ј', 'Љ' => 'љ', 'Њ' => 'њ', 'Ћ' => 'ћ', 'Ќ' => 'ќ', 'Ѝ' => 'ѝ', 'Ў' => 'ў', 'Џ' => 'џ', 'А' => 'а', 'Б' => 'б', 'В' => 'в', 'Г' => 'г', 'Д' => 'д', 'Е' => 'е', 'Ж' => 'ж', 'З' => 'з', 'И' => 'и', 'Й' => 'й', 'К' => 'к', 'Л' => 'л', 'М' => 'м', 'Н' => 'н', 'О' => 'о', 'П' => 'п', 'Р' => 'р', 'С' => 'с', 'Т' => 'т', 'У' => 'у', 'Ф' => 'ф', 'Х' => 'х', 'Ц' => 'ц', 'Ч' => 'ч', 'Ш' => 'ш', 'Щ' => 'щ', 'Ъ' => 'ъ', 'Ы' => 'ы', 'Ь' => 'ь', 'Э' => 'э', 'Ю' => 'ю', 'Я' => 'я', 'Ѡ' => 'ѡ', 'Ѣ' => 'ѣ', 'Ѥ' => 'ѥ', 'Ѧ' => 'ѧ', 'Ѩ' => 'ѩ', 'Ѫ' => 'ѫ', 'Ѭ' => 'ѭ', 'Ѯ' => 'ѯ', 'Ѱ' => 'ѱ', 'Ѳ' => 'ѳ', 'Ѵ' => 'ѵ', 'Ѷ' => 'ѷ', 'Ѹ' => 'ѹ', 'Ѻ' => 'ѻ', 'Ѽ' => 'ѽ', 'Ѿ' => 'ѿ', 'Ҁ' => 'ҁ', 'Ҋ' => 'ҋ', 'Ҍ' => 'ҍ', 'Ҏ' => 'ҏ', 'Ґ' => 'ґ', 'Ғ' => 'ғ', 'Ҕ' => 'ҕ', 'Җ' => 'җ', 'Ҙ' => 'ҙ', 'Қ' => 'қ', 'Ҝ' => 'ҝ', 'Ҟ' => 'ҟ', 'Ҡ' => 'ҡ', 'Ң' => 'ң', 'Ҥ' => 'ҥ', 'Ҧ' => 'ҧ', 'Ҩ' => 'ҩ', 'Ҫ' => 'ҫ', 'Ҭ' => 'ҭ', 'Ү' => 'ү', 'Ұ' => 'ұ', 'Ҳ' => 'ҳ', 'Ҵ' => 'ҵ', 'Ҷ' => 'ҷ', 'Ҹ' => 'ҹ', 'Һ' => 'һ', 'Ҽ' => 'ҽ', 'Ҿ' => 'ҿ', 'Ӏ' => 'ӏ', 'Ӂ' => 'ӂ', 'Ӄ' => 'ӄ', 'Ӆ' => 'ӆ', 'Ӈ' => 'ӈ', 'Ӊ' => 'ӊ', 'Ӌ' => 'ӌ', 'Ӎ' => 'ӎ', 'Ӑ' => 'ӑ', 'Ӓ' => 'ӓ', 'Ӕ' => 'ӕ', 'Ӗ' => 'ӗ', 'Ә' => 'ә', 'Ӛ' => 'ӛ', 'Ӝ' => 'ӝ', 'Ӟ' => 'ӟ', 'Ӡ' => 'ӡ', 'Ӣ' => 'ӣ', 'Ӥ' => 'ӥ', 'Ӧ' => 'ӧ', 'Ө' => 'ө', 'Ӫ' => 'ӫ', 'Ӭ' => 'ӭ', 'Ӯ' => 'ӯ', 'Ӱ' => 'ӱ', 'Ӳ' => 'ӳ', 'Ӵ' => 'ӵ', 'Ӷ' => 'ӷ', 'Ӹ' => 'ӹ', 'Ӻ' => 'ӻ', 'Ӽ' => 'ӽ', 'Ӿ' => 'ӿ', 'Ԁ' => 'ԁ', 'Ԃ' => 'ԃ', 'Ԅ' => 'ԅ', 'Ԇ' => 'ԇ', 'Ԉ' => 'ԉ', 'Ԋ' => 'ԋ', 'Ԍ' => 'ԍ', 'Ԏ' => 'ԏ', 'Ԑ' => 'ԑ', 'Ԓ' => 'ԓ', 'Ԕ' => 'ԕ', 'Ԗ' => 'ԗ', 'Ԙ' => 'ԙ', 'Ԛ' => 'ԛ', 'Ԝ' => 'ԝ', 'Ԟ' => 'ԟ', 'Ԡ' => 'ԡ', 'Ԣ' => 'ԣ', 'Ԥ' => 'ԥ', 'Ԧ' => 'ԧ', 'Ԩ' => 'ԩ', 'Ԫ' => 'ԫ', 'Ԭ' => 'ԭ', 'Ԯ' => 'ԯ', 'Ա' => 'ա', 'Բ' => 'բ', 'Գ' => 'գ', 'Դ' => 'դ', 'Ե' => 'ե', 'Զ' => 'զ', 'Է' => 'է', 'Ը' => 'ը', 'Թ' => 'թ', 'Ժ' => 'ժ', 'Ի' => 'ի', 'Լ' => 'լ', 'Խ' => 'խ', 'Ծ' => 'ծ', 'Կ' => 'կ', 'Հ' => 'հ', 'Ձ' => 'ձ', 'Ղ' => 'ղ', 'Ճ' => 'ճ', 'Մ' => 'մ', 'Յ' => 'յ', 'Ն' => 'ն', 'Շ' => 'շ', 'Ո' => 'ո', 'Չ' => 'չ', 'Պ' => 'պ', 'Ջ' => 'ջ', 'Ռ' => 'ռ', 'Ս' => 'ս', 'Վ' => 'վ', 'Տ' => 'տ', 'Ր' => 'ր', 'Ց' => 'ց', 'Ւ' => 'ւ', 'Փ' => 'փ', 'Ք' => 'ք', 'Օ' => 'օ', 'Ֆ' => 'ֆ', 'Ⴀ' => 'ⴀ', 'Ⴁ' => 'ⴁ', 'Ⴂ' => 'ⴂ', 'Ⴃ' => 'ⴃ', 'Ⴄ' => 'ⴄ', 'Ⴅ' => 'ⴅ', 'Ⴆ' => 'ⴆ', 'Ⴇ' => 'ⴇ', 'Ⴈ' => 'ⴈ', 'Ⴉ' => 'ⴉ', 'Ⴊ' => 'ⴊ', 'Ⴋ' => 'ⴋ', 'Ⴌ' => 'ⴌ', 'Ⴍ' => 'ⴍ', 'Ⴎ' => 'ⴎ', 'Ⴏ' => 'ⴏ', 'Ⴐ' => 'ⴐ', 'Ⴑ' => 'ⴑ', 'Ⴒ' => 'ⴒ', 'Ⴓ' => 'ⴓ', 'Ⴔ' => 'ⴔ', 'Ⴕ' => 'ⴕ', 'Ⴖ' => 'ⴖ', 'Ⴗ' => 'ⴗ', 'Ⴘ' => 'ⴘ', 'Ⴙ' => 'ⴙ', 'Ⴚ' => 'ⴚ', 'Ⴛ' => 'ⴛ', 'Ⴜ' => 'ⴜ', 'Ⴝ' => 'ⴝ', 'Ⴞ' => 'ⴞ', 'Ⴟ' => 'ⴟ', 'Ⴠ' => 'ⴠ', 'Ⴡ' => 'ⴡ', 'Ⴢ' => 'ⴢ', 'Ⴣ' => 'ⴣ', 'Ⴤ' => 'ⴤ', 'Ⴥ' => 'ⴥ', 'Ⴧ' => 'ⴧ', 'Ⴭ' => 'ⴭ', 'Ꭰ' => 'ꭰ', 'Ꭱ' => 'ꭱ', 'Ꭲ' => 'ꭲ', 'Ꭳ' => 'ꭳ', 'Ꭴ' => 'ꭴ', 'Ꭵ' => 'ꭵ', 'Ꭶ' => 'ꭶ', 'Ꭷ' => 'ꭷ', 'Ꭸ' => 'ꭸ', 'Ꭹ' => 'ꭹ', 'Ꭺ' => 'ꭺ', 'Ꭻ' => 'ꭻ', 'Ꭼ' => 'ꭼ', 'Ꭽ' => 'ꭽ', 'Ꭾ' => 'ꭾ', 'Ꭿ' => 'ꭿ', 'Ꮀ' => 'ꮀ', 'Ꮁ' => 'ꮁ', 'Ꮂ' => 'ꮂ', 'Ꮃ' => 'ꮃ', 'Ꮄ' => 'ꮄ', 'Ꮅ' => 'ꮅ', 'Ꮆ' => 'ꮆ', 'Ꮇ' => 'ꮇ', 'Ꮈ' => 'ꮈ', 'Ꮉ' => 'ꮉ', 'Ꮊ' => 'ꮊ', 'Ꮋ' => 'ꮋ', 'Ꮌ' => 'ꮌ', 'Ꮍ' => 'ꮍ', 'Ꮎ' => 'ꮎ', 'Ꮏ' => 'ꮏ', 'Ꮐ' => 'ꮐ', 'Ꮑ' => 'ꮑ', 'Ꮒ' => 'ꮒ', 'Ꮓ' => 'ꮓ', 'Ꮔ' => 'ꮔ', 'Ꮕ' => 'ꮕ', 'Ꮖ' => 'ꮖ', 'Ꮗ' => 'ꮗ', 'Ꮘ' => 'ꮘ', 'Ꮙ' => 'ꮙ', 'Ꮚ' => 'ꮚ', 'Ꮛ' => 'ꮛ', 'Ꮜ' => 'ꮜ', 'Ꮝ' => 'ꮝ', 'Ꮞ' => 'ꮞ', 'Ꮟ' => 'ꮟ', 'Ꮠ' => 'ꮠ', 'Ꮡ' => 'ꮡ', 'Ꮢ' => 'ꮢ', 'Ꮣ' => 'ꮣ', 'Ꮤ' => 'ꮤ', 'Ꮥ' => 'ꮥ', 'Ꮦ' => 'ꮦ', 'Ꮧ' => 'ꮧ', 'Ꮨ' => 'ꮨ', 'Ꮩ' => 'ꮩ', 'Ꮪ' => 'ꮪ', 'Ꮫ' => 'ꮫ', 'Ꮬ' => 'ꮬ', 'Ꮭ' => 'ꮭ', 'Ꮮ' => 'ꮮ', 'Ꮯ' => 'ꮯ', 'Ꮰ' => 'ꮰ', 'Ꮱ' => 'ꮱ', 'Ꮲ' => 'ꮲ', 'Ꮳ' => 'ꮳ', 'Ꮴ' => 'ꮴ', 'Ꮵ' => 'ꮵ', 'Ꮶ' => 'ꮶ', 'Ꮷ' => 'ꮷ', 'Ꮸ' => 'ꮸ', 'Ꮹ' => 'ꮹ', 'Ꮺ' => 'ꮺ', 'Ꮻ' => 'ꮻ', 'Ꮼ' => 'ꮼ', 'Ꮽ' => 'ꮽ', 'Ꮾ' => 'ꮾ', 'Ꮿ' => 'ꮿ', 'Ᏸ' => 'ᏸ', 'Ᏹ' => 'ᏹ', 'Ᏺ' => 'ᏺ', 'Ᏻ' => 'ᏻ', 'Ᏼ' => 'ᏼ', 'Ᏽ' => 'ᏽ', 'Ა' => 'ა', 'Ბ' => 'ბ', 'Გ' => 'გ', 'Დ' => 'დ', 'Ე' => 'ე', 'Ვ' => 'ვ', 'Ზ' => 'ზ', 'Თ' => 'თ', 'Ი' => 'ი', 'Კ' => 'კ', 'Ლ' => 'ლ', 'Მ' => 'მ', 'Ნ' => 'ნ', 'Ო' => 'ო', 'Პ' => 'პ', 'Ჟ' => 'ჟ', 'Რ' => 'რ', 'Ს' => 'ს', 'Ტ' => 'ტ', 'Უ' => 'უ', 'Ფ' => 'ფ', 'Ქ' => 'ქ', 'Ღ' => 'ღ', 'Ყ' => 'ყ', 'Შ' => 'შ', 'Ჩ' => 'ჩ', 'Ც' => 'ც', 'Ძ' => 'ძ', 'Წ' => 'წ', 'Ჭ' => 'ჭ', 'Ხ' => 'ხ', 'Ჯ' => 'ჯ', 'Ჰ' => 'ჰ', 'Ჱ' => 'ჱ', 'Ჲ' => 'ჲ', 'Ჳ' => 'ჳ', 'Ჴ' => 'ჴ', 'Ჵ' => 'ჵ', 'Ჶ' => 'ჶ', 'Ჷ' => 'ჷ', 'Ჸ' => 'ჸ', 'Ჹ' => 'ჹ', 'Ჺ' => 'ჺ', 'Ჽ' => 'ჽ', 'Ჾ' => 'ჾ', 'Ჿ' => 'ჿ', 'Ḁ' => 'ḁ', 'Ḃ' => 'ḃ', 'Ḅ' => 'ḅ', 'Ḇ' => 'ḇ', 'Ḉ' => 'ḉ', 'Ḋ' => 'ḋ', 'Ḍ' => 'ḍ', 'Ḏ' => 'ḏ', 'Ḑ' => 'ḑ', 'Ḓ' => 'ḓ', 'Ḕ' => 'ḕ', 'Ḗ' => 'ḗ', 'Ḙ' => 'ḙ', 'Ḛ' => 'ḛ', 'Ḝ' => 'ḝ', 'Ḟ' => 'ḟ', 'Ḡ' => 'ḡ', 'Ḣ' => 'ḣ', 'Ḥ' => 'ḥ', 'Ḧ' => 'ḧ', 'Ḩ' => 'ḩ', 'Ḫ' => 'ḫ', 'Ḭ' => 'ḭ', 'Ḯ' => 'ḯ', 'Ḱ' => 'ḱ', 'Ḳ' => 'ḳ', 'Ḵ' => 'ḵ', 'Ḷ' => 'ḷ', 'Ḹ' => 'ḹ', 'Ḻ' => 'ḻ', 'Ḽ' => 'ḽ', 'Ḿ' => 'ḿ', 'Ṁ' => 'ṁ', 'Ṃ' => 'ṃ', 'Ṅ' => 'ṅ', 'Ṇ' => 'ṇ', 'Ṉ' => 'ṉ', 'Ṋ' => 'ṋ', 'Ṍ' => 'ṍ', 'Ṏ' => 'ṏ', 'Ṑ' => 'ṑ', 'Ṓ' => 'ṓ', 'Ṕ' => 'ṕ', 'Ṗ' => 'ṗ', 'Ṙ' => 'ṙ', 'Ṛ' => 'ṛ', 'Ṝ' => 'ṝ', 'Ṟ' => 'ṟ', 'Ṡ' => 'ṡ', 'Ṣ' => 'ṣ', 'Ṥ' => 'ṥ', 'Ṧ' => 'ṧ', 'Ṩ' => 'ṩ', 'Ṫ' => 'ṫ', 'Ṭ' => 'ṭ', 'Ṯ' => 'ṯ', 'Ṱ' => 'ṱ', 'Ṳ' => 'ṳ', 'Ṵ' => 'ṵ', 'Ṷ' => 'ṷ', 'Ṹ' => 'ṹ', 'Ṻ' => 'ṻ', 'Ṽ' => 'ṽ', 'Ṿ' => 'ṿ', 'Ẁ' => 'ẁ', 'Ẃ' => 'ẃ', 'Ẅ' => 'ẅ', 'Ẇ' => 'ẇ', 'Ẉ' => 'ẉ', 'Ẋ' => 'ẋ', 'Ẍ' => 'ẍ', 'Ẏ' => 'ẏ', 'Ẑ' => 'ẑ', 'Ẓ' => 'ẓ', 'Ẕ' => 'ẕ', 'ẞ' => 'ß', 'Ạ' => 'ạ', 'Ả' => 'ả', 'Ấ' => 'ấ', 'Ầ' => 'ầ', 'Ẩ' => 'ẩ', 'Ẫ' => 'ẫ', 'Ậ' => 'ậ', 'Ắ' => 'ắ', 'Ằ' => 'ằ', 'Ẳ' => 'ẳ', 'Ẵ' => 'ẵ', 'Ặ' => 'ặ', 'Ẹ' => 'ẹ', 'Ẻ' => 'ẻ', 'Ẽ' => 'ẽ', 'Ế' => 'ế', 'Ề' => 'ề', 'Ể' => 'ể', 'Ễ' => 'ễ', 'Ệ' => 'ệ', 'Ỉ' => 'ỉ', 'Ị' => 'ị', 'Ọ' => 'ọ', 'Ỏ' => 'ỏ', 'Ố' => 'ố', 'Ồ' => 'ồ', 'Ổ' => 'ổ', 'Ỗ' => 'ỗ', 'Ộ' => 'ộ', 'Ớ' => 'ớ', 'Ờ' => 'ờ', 'Ở' => 'ở', 'Ỡ' => 'ỡ', 'Ợ' => 'ợ', 'Ụ' => 'ụ', 'Ủ' => 'ủ', 'Ứ' => 'ứ', 'Ừ' => 'ừ', 'Ử' => 'ử', 'Ữ' => 'ữ', 'Ự' => 'ự', 'Ỳ' => 'ỳ', 'Ỵ' => 'ỵ', 'Ỷ' => 'ỷ', 'Ỹ' => 'ỹ', 'Ỻ' => 'ỻ', 'Ỽ' => 'ỽ', 'Ỿ' => 'ỿ', 'Ἀ' => 'ἀ', 'Ἁ' => 'ἁ', 'Ἂ' => 'ἂ', 'Ἃ' => 'ἃ', 'Ἄ' => 'ἄ', 'Ἅ' => 'ἅ', 'Ἆ' => 'ἆ', 'Ἇ' => 'ἇ', 'Ἐ' => 'ἐ', 'Ἑ' => 'ἑ', 'Ἒ' => 'ἒ', 'Ἓ' => 'ἓ', 'Ἔ' => 'ἔ', 'Ἕ' => 'ἕ', 'Ἠ' => 'ἠ', 'Ἡ' => 'ἡ', 'Ἢ' => 'ἢ', 'Ἣ' => 'ἣ', 'Ἤ' => 'ἤ', 'Ἥ' => 'ἥ', 'Ἦ' => 'ἦ', 'Ἧ' => 'ἧ', 'Ἰ' => 'ἰ', 'Ἱ' => 'ἱ', 'Ἲ' => 'ἲ', 'Ἳ' => 'ἳ', 'Ἴ' => 'ἴ', 'Ἵ' => 'ἵ', 'Ἶ' => 'ἶ', 'Ἷ' => 'ἷ', 'Ὀ' => 'ὀ', 'Ὁ' => 'ὁ', 'Ὂ' => 'ὂ', 'Ὃ' => 'ὃ', 'Ὄ' => 'ὄ', 'Ὅ' => 'ὅ', 'Ὑ' => 'ὑ', 'Ὓ' => 'ὓ', 'Ὕ' => 'ὕ', 'Ὗ' => 'ὗ', 'Ὠ' => 'ὠ', 'Ὡ' => 'ὡ', 'Ὢ' => 'ὢ', 'Ὣ' => 'ὣ', 'Ὤ' => 'ὤ', 'Ὥ' => 'ὥ', 'Ὦ' => 'ὦ', 'Ὧ' => 'ὧ', 'ᾈ' => 'ᾀ', 'ᾉ' => 'ᾁ', 'ᾊ' => 'ᾂ', 'ᾋ' => 'ᾃ', 'ᾌ' => 'ᾄ', 'ᾍ' => 'ᾅ', 'ᾎ' => 'ᾆ', 'ᾏ' => 'ᾇ', 'ᾘ' => 'ᾐ', 'ᾙ' => 'ᾑ', 'ᾚ' => 'ᾒ', 'ᾛ' => 'ᾓ', 'ᾜ' => 'ᾔ', 'ᾝ' => 'ᾕ', 'ᾞ' => 'ᾖ', 'ᾟ' => 'ᾗ', 'ᾨ' => 'ᾠ', 'ᾩ' => 'ᾡ', 'ᾪ' => 'ᾢ', 'ᾫ' => 'ᾣ', 'ᾬ' => 'ᾤ', 'ᾭ' => 'ᾥ', 'ᾮ' => 'ᾦ', 'ᾯ' => 'ᾧ', 'Ᾰ' => 'ᾰ', 'Ᾱ' => 'ᾱ', 'Ὰ' => 'ὰ', 'Ά' => 'ά', 'ᾼ' => 'ᾳ', 'Ὲ' => 'ὲ', 'Έ' => 'έ', 'Ὴ' => 'ὴ', 'Ή' => 'ή', 'ῌ' => 'ῃ', 'Ῐ' => 'ῐ', 'Ῑ' => 'ῑ', 'Ὶ' => 'ὶ', 'Ί' => 'ί', 'Ῠ' => 'ῠ', 'Ῡ' => 'ῡ', 'Ὺ' => 'ὺ', 'Ύ' => 'ύ', 'Ῥ' => 'ῥ', 'Ὸ' => 'ὸ', 'Ό' => 'ό', 'Ὼ' => 'ὼ', 'Ώ' => 'ώ', 'ῼ' => 'ῳ', 'Ω' => 'ω', 'K' => 'k', 'Å' => 'å', 'Ⅎ' => 'ⅎ', 'Ⅰ' => 'ⅰ', 'Ⅱ' => 'ⅱ', 'Ⅲ' => 'ⅲ', 'Ⅳ' => 'ⅳ', 'Ⅴ' => 'ⅴ', 'Ⅵ' => 'ⅵ', 'Ⅶ' => 'ⅶ', 'Ⅷ' => 'ⅷ', 'Ⅸ' => 'ⅸ', 'Ⅹ' => 'ⅹ', 'Ⅺ' => 'ⅺ', 'Ⅻ' => 'ⅻ', 'Ⅼ' => 'ⅼ', 'Ⅽ' => 'ⅽ', 'Ⅾ' => 'ⅾ', 'Ⅿ' => 'ⅿ', 'Ↄ' => 'ↄ', 'Ⓐ' => 'ⓐ', 'Ⓑ' => 'ⓑ', 'Ⓒ' => 'ⓒ', 'Ⓓ' => 'ⓓ', 'Ⓔ' => 'ⓔ', 'Ⓕ' => 'ⓕ', 'Ⓖ' => 'ⓖ', 'Ⓗ' => 'ⓗ', 'Ⓘ' => 'ⓘ', 'Ⓙ' => 'ⓙ', 'Ⓚ' => 'ⓚ', 'Ⓛ' => 'ⓛ', 'Ⓜ' => 'ⓜ', 'Ⓝ' => 'ⓝ', 'Ⓞ' => 'ⓞ', 'Ⓟ' => 'ⓟ', 'Ⓠ' => 'ⓠ', 'Ⓡ' => 'ⓡ', 'Ⓢ' => 'ⓢ', 'Ⓣ' => 'ⓣ', 'Ⓤ' => 'ⓤ', 'Ⓥ' => 'ⓥ', 'Ⓦ' => 'ⓦ', 'Ⓧ' => 'ⓧ', 'Ⓨ' => 'ⓨ', 'Ⓩ' => 'ⓩ', 'Ⰰ' => 'ⰰ', 'Ⰱ' => 'ⰱ', 'Ⰲ' => 'ⰲ', 'Ⰳ' => 'ⰳ', 'Ⰴ' => 'ⰴ', 'Ⰵ' => 'ⰵ', 'Ⰶ' => 'ⰶ', 'Ⰷ' => 'ⰷ', 'Ⰸ' => 'ⰸ', 'Ⰹ' => 'ⰹ', 'Ⰺ' => 'ⰺ', 'Ⰻ' => 'ⰻ', 'Ⰼ' => 'ⰼ', 'Ⰽ' => 'ⰽ', 'Ⰾ' => 'ⰾ', 'Ⰿ' => 'ⰿ', 'Ⱀ' => 'ⱀ', 'Ⱁ' => 'ⱁ', 'Ⱂ' => 'ⱂ', 'Ⱃ' => 'ⱃ', 'Ⱄ' => 'ⱄ', 'Ⱅ' => 'ⱅ', 'Ⱆ' => 'ⱆ', 'Ⱇ' => 'ⱇ', 'Ⱈ' => 'ⱈ', 'Ⱉ' => 'ⱉ', 'Ⱊ' => 'ⱊ', 'Ⱋ' => 'ⱋ', 'Ⱌ' => 'ⱌ', 'Ⱍ' => 'ⱍ', 'Ⱎ' => 'ⱎ', 'Ⱏ' => 'ⱏ', 'Ⱐ' => 'ⱐ', 'Ⱑ' => 'ⱑ', 'Ⱒ' => 'ⱒ', 'Ⱓ' => 'ⱓ', 'Ⱔ' => 'ⱔ', 'Ⱕ' => 'ⱕ', 'Ⱖ' => 'ⱖ', 'Ⱗ' => 'ⱗ', 'Ⱘ' => 'ⱘ', 'Ⱙ' => 'ⱙ', 'Ⱚ' => 'ⱚ', 'Ⱛ' => 'ⱛ', 'Ⱜ' => 'ⱜ', 'Ⱝ' => 'ⱝ', 'Ⱞ' => 'ⱞ', 'Ⱡ' => 'ⱡ', 'Ɫ' => 'ɫ', 'Ᵽ' => 'ᵽ', 'Ɽ' => 'ɽ', 'Ⱨ' => 'ⱨ', 'Ⱪ' => 'ⱪ', 'Ⱬ' => 'ⱬ', 'Ɑ' => 'ɑ', 'Ɱ' => 'ɱ', 'Ɐ' => 'ɐ', 'Ɒ' => 'ɒ', 'Ⱳ' => 'ⱳ', 'Ⱶ' => 'ⱶ', 'Ȿ' => 'ȿ', 'Ɀ' => 'ɀ', 'Ⲁ' => 'ⲁ', 'Ⲃ' => 'ⲃ', 'Ⲅ' => 'ⲅ', 'Ⲇ' => 'ⲇ', 'Ⲉ' => 'ⲉ', 'Ⲋ' => 'ⲋ', 'Ⲍ' => 'ⲍ', 'Ⲏ' => 'ⲏ', 'Ⲑ' => 'ⲑ', 'Ⲓ' => 'ⲓ', 'Ⲕ' => 'ⲕ', 'Ⲗ' => 'ⲗ', 'Ⲙ' => 'ⲙ', 'Ⲛ' => 'ⲛ', 'Ⲝ' => 'ⲝ', 'Ⲟ' => 'ⲟ', 'Ⲡ' => 'ⲡ', 'Ⲣ' => 'ⲣ', 'Ⲥ' => 'ⲥ', 'Ⲧ' => 'ⲧ', 'Ⲩ' => 'ⲩ', 'Ⲫ' => 'ⲫ', 'Ⲭ' => 'ⲭ', 'Ⲯ' => 'ⲯ', 'Ⲱ' => 'ⲱ', 'Ⲳ' => 'ⲳ', 'Ⲵ' => 'ⲵ', 'Ⲷ' => 'ⲷ', 'Ⲹ' => 'ⲹ', 'Ⲻ' => 'ⲻ', 'Ⲽ' => 'ⲽ', 'Ⲿ' => 'ⲿ', 'Ⳁ' => 'ⳁ', 'Ⳃ' => 'ⳃ', 'Ⳅ' => 'ⳅ', 'Ⳇ' => 'ⳇ', 'Ⳉ' => 'ⳉ', 'Ⳋ' => 'ⳋ', 'Ⳍ' => 'ⳍ', 'Ⳏ' => 'ⳏ', 'Ⳑ' => 'ⳑ', 'Ⳓ' => 'ⳓ', 'Ⳕ' => 'ⳕ', 'Ⳗ' => 'ⳗ', 'Ⳙ' => 'ⳙ', 'Ⳛ' => 'ⳛ', 'Ⳝ' => 'ⳝ', 'Ⳟ' => 'ⳟ', 'Ⳡ' => 'ⳡ', 'Ⳣ' => 'ⳣ', 'Ⳬ' => 'ⳬ', 'Ⳮ' => 'ⳮ', 'Ⳳ' => 'ⳳ', 'Ꙁ' => 'ꙁ', 'Ꙃ' => 'ꙃ', 'Ꙅ' => 'ꙅ', 'Ꙇ' => 'ꙇ', 'Ꙉ' => 'ꙉ', 'Ꙋ' => 'ꙋ', 'Ꙍ' => 'ꙍ', 'Ꙏ' => 'ꙏ', 'Ꙑ' => 'ꙑ', 'Ꙓ' => 'ꙓ', 'Ꙕ' => 'ꙕ', 'Ꙗ' => 'ꙗ', 'Ꙙ' => 'ꙙ', 'Ꙛ' => 'ꙛ', 'Ꙝ' => 'ꙝ', 'Ꙟ' => 'ꙟ', 'Ꙡ' => 'ꙡ', 'Ꙣ' => 'ꙣ', 'Ꙥ' => 'ꙥ', 'Ꙧ' => 'ꙧ', 'Ꙩ' => 'ꙩ', 'Ꙫ' => 'ꙫ', 'Ꙭ' => 'ꙭ', 'Ꚁ' => 'ꚁ', 'Ꚃ' => 'ꚃ', 'Ꚅ' => 'ꚅ', 'Ꚇ' => 'ꚇ', 'Ꚉ' => 'ꚉ', 'Ꚋ' => 'ꚋ', 'Ꚍ' => 'ꚍ', 'Ꚏ' => 'ꚏ', 'Ꚑ' => 'ꚑ', 'Ꚓ' => 'ꚓ', 'Ꚕ' => 'ꚕ', 'Ꚗ' => 'ꚗ', 'Ꚙ' => 'ꚙ', 'Ꚛ' => 'ꚛ', 'Ꜣ' => 'ꜣ', 'Ꜥ' => 'ꜥ', 'Ꜧ' => 'ꜧ', 'Ꜩ' => 'ꜩ', 'Ꜫ' => 'ꜫ', 'Ꜭ' => 'ꜭ', 'Ꜯ' => 'ꜯ', 'Ꜳ' => 'ꜳ', 'Ꜵ' => 'ꜵ', 'Ꜷ' => 'ꜷ', 'Ꜹ' => 'ꜹ', 'Ꜻ' => 'ꜻ', 'Ꜽ' => 'ꜽ', 'Ꜿ' => 'ꜿ', 'Ꝁ' => 'ꝁ', 'Ꝃ' => 'ꝃ', 'Ꝅ' => 'ꝅ', 'Ꝇ' => 'ꝇ', 'Ꝉ' => 'ꝉ', 'Ꝋ' => 'ꝋ', 'Ꝍ' => 'ꝍ', 'Ꝏ' => 'ꝏ', 'Ꝑ' => 'ꝑ', 'Ꝓ' => 'ꝓ', 'Ꝕ' => 'ꝕ', 'Ꝗ' => 'ꝗ', 'Ꝙ' => 'ꝙ', 'Ꝛ' => 'ꝛ', 'Ꝝ' => 'ꝝ', 'Ꝟ' => 'ꝟ', 'Ꝡ' => 'ꝡ', 'Ꝣ' => 'ꝣ', 'Ꝥ' => 'ꝥ', 'Ꝧ' => 'ꝧ', 'Ꝩ' => 'ꝩ', 'Ꝫ' => 'ꝫ', 'Ꝭ' => 'ꝭ', 'Ꝯ' => 'ꝯ', 'Ꝺ' => 'ꝺ', 'Ꝼ' => 'ꝼ', 'Ᵹ' => 'ᵹ', 'Ꝿ' => 'ꝿ', 'Ꞁ' => 'ꞁ', 'Ꞃ' => 'ꞃ', 'Ꞅ' => 'ꞅ', 'Ꞇ' => 'ꞇ', 'Ꞌ' => 'ꞌ', 'Ɥ' => 'ɥ', 'Ꞑ' => 'ꞑ', 'Ꞓ' => 'ꞓ', 'Ꞗ' => 'ꞗ', 'Ꞙ' => 'ꞙ', 'Ꞛ' => 'ꞛ', 'Ꞝ' => 'ꞝ', 'Ꞟ' => 'ꞟ', 'Ꞡ' => 'ꞡ', 'Ꞣ' => 'ꞣ', 'Ꞥ' => 'ꞥ', 'Ꞧ' => 'ꞧ', 'Ꞩ' => 'ꞩ', 'Ɦ' => 'ɦ', 'Ɜ' => 'ɜ', 'Ɡ' => 'ɡ', 'Ɬ' => 'ɬ', 'Ɪ' => 'ɪ', 'Ʞ' => 'ʞ', 'Ʇ' => 'ʇ', 'Ʝ' => 'ʝ', 'Ꭓ' => 'ꭓ', 'Ꞵ' => 'ꞵ', 'Ꞷ' => 'ꞷ', 'Ꞹ' => 'ꞹ', 'Ꞻ' => 'ꞻ', 'Ꞽ' => 'ꞽ', 'Ꞿ' => 'ꞿ', 'Ꟃ' => 'ꟃ', 'Ꞔ' => 'ꞔ', 'Ʂ' => 'ʂ', 'Ᶎ' => 'ᶎ', 'Ꟈ' => 'ꟈ', 'Ꟊ' => 'ꟊ', 'Ꟶ' => 'ꟶ', 'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd', 'E' => 'e', 'F' => 'f', 'G' => 'g', 'H' => 'h', 'I' => 'i', 'J' => 'j', 'K' => 'k', 'L' => 'l', 'M' => 'm', 'N' => 'n', 'O' => 'o', 'P' => 'p', 'Q' => 'q', 'R' => 'r', 'S' => 's', 'T' => 't', 'U' => 'u', 'V' => 'v', 'W' => 'w', 'X' => 'x', 'Y' => 'y', 'Z' => 'z', '𐐀' => '𐐨', '𐐁' => '𐐩', '𐐂' => '𐐪', '𐐃' => '𐐫', '𐐄' => '𐐬', '𐐅' => '𐐭', '𐐆' => '𐐮', '𐐇' => '𐐯', '𐐈' => '𐐰', '𐐉' => '𐐱', '𐐊' => '𐐲', '𐐋' => '𐐳', '𐐌' => '𐐴', '𐐍' => '𐐵', '𐐎' => '𐐶', '𐐏' => '𐐷', '𐐐' => '𐐸', '𐐑' => '𐐹', '𐐒' => '𐐺', '𐐓' => '𐐻', '𐐔' => '𐐼', '𐐕' => '𐐽', '𐐖' => '𐐾', '𐐗' => '𐐿', '𐐘' => '𐑀', '𐐙' => '𐑁', '𐐚' => '𐑂', '𐐛' => '𐑃', '𐐜' => '𐑄', '𐐝' => '𐑅', '𐐞' => '𐑆', '𐐟' => '𐑇', '𐐠' => '𐑈', '𐐡' => '𐑉', '𐐢' => '𐑊', '𐐣' => '𐑋', '𐐤' => '𐑌', '𐐥' => '𐑍', '𐐦' => '𐑎', '𐐧' => '𐑏', '𐒰' => '𐓘', '𐒱' => '𐓙', '𐒲' => '𐓚', '𐒳' => '𐓛', '𐒴' => '𐓜', '𐒵' => '𐓝', '𐒶' => '𐓞', '𐒷' => '𐓟', '𐒸' => '𐓠', '𐒹' => '𐓡', '𐒺' => '𐓢', '𐒻' => '𐓣', '𐒼' => '𐓤', '𐒽' => '𐓥', '𐒾' => '𐓦', '𐒿' => '𐓧', '𐓀' => '𐓨', '𐓁' => '𐓩', '𐓂' => '𐓪', '𐓃' => '𐓫', '𐓄' => '𐓬', '𐓅' => '𐓭', '𐓆' => '𐓮', '𐓇' => '𐓯', '𐓈' => '𐓰', '𐓉' => '𐓱', '𐓊' => '𐓲', '𐓋' => '𐓳', '𐓌' => '𐓴', '𐓍' => '𐓵', '𐓎' => '𐓶', '𐓏' => '𐓷', '𐓐' => '𐓸', '𐓑' => '𐓹', '𐓒' => '𐓺', '𐓓' => '𐓻', '𐲀' => '𐳀', '𐲁' => '𐳁', '𐲂' => '𐳂', '𐲃' => '𐳃', '𐲄' => '𐳄', '𐲅' => '𐳅', '𐲆' => '𐳆', '𐲇' => '𐳇', '𐲈' => '𐳈', '𐲉' => '𐳉', '𐲊' => '𐳊', '𐲋' => '𐳋', '𐲌' => '𐳌', '𐲍' => '𐳍', '𐲎' => '𐳎', '𐲏' => '𐳏', '𐲐' => '𐳐', '𐲑' => '𐳑', '𐲒' => '𐳒', '𐲓' => '𐳓', '𐲔' => '𐳔', '𐲕' => '𐳕', '𐲖' => '𐳖', '𐲗' => '𐳗', '𐲘' => '𐳘', '𐲙' => '𐳙', '𐲚' => '𐳚', '𐲛' => '𐳛', '𐲜' => '𐳜', '𐲝' => '𐳝', '𐲞' => '𐳞', '𐲟' => '𐳟', '𐲠' => '𐳠', '𐲡' => '𐳡', '𐲢' => '𐳢', '𐲣' => '𐳣', '𐲤' => '𐳤', '𐲥' => '𐳥', '𐲦' => '𐳦', '𐲧' => '𐳧', '𐲨' => '𐳨', '𐲩' => '𐳩', '𐲪' => '𐳪', '𐲫' => '𐳫', '𐲬' => '𐳬', '𐲭' => '𐳭', '𐲮' => '𐳮', '𐲯' => '𐳯', '𐲰' => '𐳰', '𐲱' => '𐳱', '𐲲' => '𐳲', '𑢠' => '𑣀', '𑢡' => '𑣁', '𑢢' => '𑣂', '𑢣' => '𑣃', '𑢤' => '𑣄', '𑢥' => '𑣅', '𑢦' => '𑣆', '𑢧' => '𑣇', '𑢨' => '𑣈', '𑢩' => '𑣉', '𑢪' => '𑣊', '𑢫' => '𑣋', '𑢬' => '𑣌', '𑢭' => '𑣍', '𑢮' => '𑣎', '𑢯' => '𑣏', '𑢰' => '𑣐', '𑢱' => '𑣑', '𑢲' => '𑣒', '𑢳' => '𑣓', '𑢴' => '𑣔', '𑢵' => '𑣕', '𑢶' => '𑣖', '𑢷' => '𑣗', '𑢸' => '𑣘', '𑢹' => '𑣙', '𑢺' => '𑣚', '𑢻' => '𑣛', '𑢼' => '𑣜', '𑢽' => '𑣝', '𑢾' => '𑣞', '𑢿' => '𑣟', '𖹀' => '𖹠', '𖹁' => '𖹡', '𖹂' => '𖹢', '𖹃' => '𖹣', '𖹄' => '𖹤', '𖹅' => '𖹥', '𖹆' => '𖹦', '𖹇' => '𖹧', '𖹈' => '𖹨', '𖹉' => '𖹩', '𖹊' => '𖹪', '𖹋' => '𖹫', '𖹌' => '𖹬', '𖹍' => '𖹭', '𖹎' => '𖹮', '𖹏' => '𖹯', '𖹐' => '𖹰', '𖹑' => '𖹱', '𖹒' => '𖹲', '𖹓' => '𖹳', '𖹔' => '𖹴', '𖹕' => '𖹵', '𖹖' => '𖹶', '𖹗' => '𖹷', '𖹘' => '𖹸', '𖹙' => '𖹹', '𖹚' => '𖹺', '𖹛' => '𖹻', '𖹜' => '𖹼', '𖹝' => '𖹽', '𖹞' => '𖹾', '𖹟' => '𖹿', '𞤀' => '𞤢', '𞤁' => '𞤣', '𞤂' => '𞤤', '𞤃' => '𞤥', '𞤄' => '𞤦', '𞤅' => '𞤧', '𞤆' => '𞤨', '𞤇' => '𞤩', '𞤈' => '𞤪', '𞤉' => '𞤫', '𞤊' => '𞤬', '𞤋' => '𞤭', '𞤌' => '𞤮', '𞤍' => '𞤯', '𞤎' => '𞤰', '𞤏' => '𞤱', '𞤐' => '𞤲', '𞤑' => '𞤳', '𞤒' => '𞤴', '𞤓' => '𞤵', '𞤔' => '𞤶', '𞤕' => '𞤷', '𞤖' => '𞤸', '𞤗' => '𞤹', '𞤘' => '𞤺', '𞤙' => '𞤻', '𞤚' => '𞤼', '𞤛' => '𞤽', '𞤜' => '𞤾', '𞤝' => '𞤿', '𞤞' => '𞥀', '𞤟' => '𞥁', '𞤠' => '𞥂', '𞤡' => '𞥃'); vendor_prefixed/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php 0000644 00000015425 15174671617 0024336 0 ustar 00 <?php namespace WPMailSMTP\Vendor; // from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt return '/(?<![\\x{0027}\\x{002E}\\x{003A}\\x{005E}\\x{0060}\\x{00A8}\\x{00AD}\\x{00AF}\\x{00B4}\\x{00B7}\\x{00B8}\\x{02B0}-\\x{02C1}\\x{02C2}-\\x{02C5}\\x{02C6}-\\x{02D1}\\x{02D2}-\\x{02DF}\\x{02E0}-\\x{02E4}\\x{02E5}-\\x{02EB}\\x{02EC}\\x{02ED}\\x{02EE}\\x{02EF}-\\x{02FF}\\x{0300}-\\x{036F}\\x{0374}\\x{0375}\\x{037A}\\x{0384}-\\x{0385}\\x{0387}\\x{0483}-\\x{0487}\\x{0488}-\\x{0489}\\x{0559}\\x{0591}-\\x{05BD}\\x{05BF}\\x{05C1}-\\x{05C2}\\x{05C4}-\\x{05C5}\\x{05C7}\\x{05F4}\\x{0600}-\\x{0605}\\x{0610}-\\x{061A}\\x{061C}\\x{0640}\\x{064B}-\\x{065F}\\x{0670}\\x{06D6}-\\x{06DC}\\x{06DD}\\x{06DF}-\\x{06E4}\\x{06E5}-\\x{06E6}\\x{06E7}-\\x{06E8}\\x{06EA}-\\x{06ED}\\x{070F}\\x{0711}\\x{0730}-\\x{074A}\\x{07A6}-\\x{07B0}\\x{07EB}-\\x{07F3}\\x{07F4}-\\x{07F5}\\x{07FA}\\x{07FD}\\x{0816}-\\x{0819}\\x{081A}\\x{081B}-\\x{0823}\\x{0824}\\x{0825}-\\x{0827}\\x{0828}\\x{0829}-\\x{082D}\\x{0859}-\\x{085B}\\x{08D3}-\\x{08E1}\\x{08E2}\\x{08E3}-\\x{0902}\\x{093A}\\x{093C}\\x{0941}-\\x{0948}\\x{094D}\\x{0951}-\\x{0957}\\x{0962}-\\x{0963}\\x{0971}\\x{0981}\\x{09BC}\\x{09C1}-\\x{09C4}\\x{09CD}\\x{09E2}-\\x{09E3}\\x{09FE}\\x{0A01}-\\x{0A02}\\x{0A3C}\\x{0A41}-\\x{0A42}\\x{0A47}-\\x{0A48}\\x{0A4B}-\\x{0A4D}\\x{0A51}\\x{0A70}-\\x{0A71}\\x{0A75}\\x{0A81}-\\x{0A82}\\x{0ABC}\\x{0AC1}-\\x{0AC5}\\x{0AC7}-\\x{0AC8}\\x{0ACD}\\x{0AE2}-\\x{0AE3}\\x{0AFA}-\\x{0AFF}\\x{0B01}\\x{0B3C}\\x{0B3F}\\x{0B41}-\\x{0B44}\\x{0B4D}\\x{0B56}\\x{0B62}-\\x{0B63}\\x{0B82}\\x{0BC0}\\x{0BCD}\\x{0C00}\\x{0C04}\\x{0C3E}-\\x{0C40}\\x{0C46}-\\x{0C48}\\x{0C4A}-\\x{0C4D}\\x{0C55}-\\x{0C56}\\x{0C62}-\\x{0C63}\\x{0C81}\\x{0CBC}\\x{0CBF}\\x{0CC6}\\x{0CCC}-\\x{0CCD}\\x{0CE2}-\\x{0CE3}\\x{0D00}-\\x{0D01}\\x{0D3B}-\\x{0D3C}\\x{0D41}-\\x{0D44}\\x{0D4D}\\x{0D62}-\\x{0D63}\\x{0DCA}\\x{0DD2}-\\x{0DD4}\\x{0DD6}\\x{0E31}\\x{0E34}-\\x{0E3A}\\x{0E46}\\x{0E47}-\\x{0E4E}\\x{0EB1}\\x{0EB4}-\\x{0EB9}\\x{0EBB}-\\x{0EBC}\\x{0EC6}\\x{0EC8}-\\x{0ECD}\\x{0F18}-\\x{0F19}\\x{0F35}\\x{0F37}\\x{0F39}\\x{0F71}-\\x{0F7E}\\x{0F80}-\\x{0F84}\\x{0F86}-\\x{0F87}\\x{0F8D}-\\x{0F97}\\x{0F99}-\\x{0FBC}\\x{0FC6}\\x{102D}-\\x{1030}\\x{1032}-\\x{1037}\\x{1039}-\\x{103A}\\x{103D}-\\x{103E}\\x{1058}-\\x{1059}\\x{105E}-\\x{1060}\\x{1071}-\\x{1074}\\x{1082}\\x{1085}-\\x{1086}\\x{108D}\\x{109D}\\x{10FC}\\x{135D}-\\x{135F}\\x{1712}-\\x{1714}\\x{1732}-\\x{1734}\\x{1752}-\\x{1753}\\x{1772}-\\x{1773}\\x{17B4}-\\x{17B5}\\x{17B7}-\\x{17BD}\\x{17C6}\\x{17C9}-\\x{17D3}\\x{17D7}\\x{17DD}\\x{180B}-\\x{180D}\\x{180E}\\x{1843}\\x{1885}-\\x{1886}\\x{18A9}\\x{1920}-\\x{1922}\\x{1927}-\\x{1928}\\x{1932}\\x{1939}-\\x{193B}\\x{1A17}-\\x{1A18}\\x{1A1B}\\x{1A56}\\x{1A58}-\\x{1A5E}\\x{1A60}\\x{1A62}\\x{1A65}-\\x{1A6C}\\x{1A73}-\\x{1A7C}\\x{1A7F}\\x{1AA7}\\x{1AB0}-\\x{1ABD}\\x{1ABE}\\x{1B00}-\\x{1B03}\\x{1B34}\\x{1B36}-\\x{1B3A}\\x{1B3C}\\x{1B42}\\x{1B6B}-\\x{1B73}\\x{1B80}-\\x{1B81}\\x{1BA2}-\\x{1BA5}\\x{1BA8}-\\x{1BA9}\\x{1BAB}-\\x{1BAD}\\x{1BE6}\\x{1BE8}-\\x{1BE9}\\x{1BED}\\x{1BEF}-\\x{1BF1}\\x{1C2C}-\\x{1C33}\\x{1C36}-\\x{1C37}\\x{1C78}-\\x{1C7D}\\x{1CD0}-\\x{1CD2}\\x{1CD4}-\\x{1CE0}\\x{1CE2}-\\x{1CE8}\\x{1CED}\\x{1CF4}\\x{1CF8}-\\x{1CF9}\\x{1D2C}-\\x{1D6A}\\x{1D78}\\x{1D9B}-\\x{1DBF}\\x{1DC0}-\\x{1DF9}\\x{1DFB}-\\x{1DFF}\\x{1FBD}\\x{1FBF}-\\x{1FC1}\\x{1FCD}-\\x{1FCF}\\x{1FDD}-\\x{1FDF}\\x{1FED}-\\x{1FEF}\\x{1FFD}-\\x{1FFE}\\x{200B}-\\x{200F}\\x{2018}\\x{2019}\\x{2024}\\x{2027}\\x{202A}-\\x{202E}\\x{2060}-\\x{2064}\\x{2066}-\\x{206F}\\x{2071}\\x{207F}\\x{2090}-\\x{209C}\\x{20D0}-\\x{20DC}\\x{20DD}-\\x{20E0}\\x{20E1}\\x{20E2}-\\x{20E4}\\x{20E5}-\\x{20F0}\\x{2C7C}-\\x{2C7D}\\x{2CEF}-\\x{2CF1}\\x{2D6F}\\x{2D7F}\\x{2DE0}-\\x{2DFF}\\x{2E2F}\\x{3005}\\x{302A}-\\x{302D}\\x{3031}-\\x{3035}\\x{303B}\\x{3099}-\\x{309A}\\x{309B}-\\x{309C}\\x{309D}-\\x{309E}\\x{30FC}-\\x{30FE}\\x{A015}\\x{A4F8}-\\x{A4FD}\\x{A60C}\\x{A66F}\\x{A670}-\\x{A672}\\x{A674}-\\x{A67D}\\x{A67F}\\x{A69C}-\\x{A69D}\\x{A69E}-\\x{A69F}\\x{A6F0}-\\x{A6F1}\\x{A700}-\\x{A716}\\x{A717}-\\x{A71F}\\x{A720}-\\x{A721}\\x{A770}\\x{A788}\\x{A789}-\\x{A78A}\\x{A7F8}-\\x{A7F9}\\x{A802}\\x{A806}\\x{A80B}\\x{A825}-\\x{A826}\\x{A8C4}-\\x{A8C5}\\x{A8E0}-\\x{A8F1}\\x{A8FF}\\x{A926}-\\x{A92D}\\x{A947}-\\x{A951}\\x{A980}-\\x{A982}\\x{A9B3}\\x{A9B6}-\\x{A9B9}\\x{A9BC}\\x{A9CF}\\x{A9E5}\\x{A9E6}\\x{AA29}-\\x{AA2E}\\x{AA31}-\\x{AA32}\\x{AA35}-\\x{AA36}\\x{AA43}\\x{AA4C}\\x{AA70}\\x{AA7C}\\x{AAB0}\\x{AAB2}-\\x{AAB4}\\x{AAB7}-\\x{AAB8}\\x{AABE}-\\x{AABF}\\x{AAC1}\\x{AADD}\\x{AAEC}-\\x{AAED}\\x{AAF3}-\\x{AAF4}\\x{AAF6}\\x{AB5B}\\x{AB5C}-\\x{AB5F}\\x{ABE5}\\x{ABE8}\\x{ABED}\\x{FB1E}\\x{FBB2}-\\x{FBC1}\\x{FE00}-\\x{FE0F}\\x{FE13}\\x{FE20}-\\x{FE2F}\\x{FE52}\\x{FE55}\\x{FEFF}\\x{FF07}\\x{FF0E}\\x{FF1A}\\x{FF3E}\\x{FF40}\\x{FF70}\\x{FF9E}-\\x{FF9F}\\x{FFE3}\\x{FFF9}-\\x{FFFB}\\x{101FD}\\x{102E0}\\x{10376}-\\x{1037A}\\x{10A01}-\\x{10A03}\\x{10A05}-\\x{10A06}\\x{10A0C}-\\x{10A0F}\\x{10A38}-\\x{10A3A}\\x{10A3F}\\x{10AE5}-\\x{10AE6}\\x{10D24}-\\x{10D27}\\x{10F46}-\\x{10F50}\\x{11001}\\x{11038}-\\x{11046}\\x{1107F}-\\x{11081}\\x{110B3}-\\x{110B6}\\x{110B9}-\\x{110BA}\\x{110BD}\\x{110CD}\\x{11100}-\\x{11102}\\x{11127}-\\x{1112B}\\x{1112D}-\\x{11134}\\x{11173}\\x{11180}-\\x{11181}\\x{111B6}-\\x{111BE}\\x{111C9}-\\x{111CC}\\x{1122F}-\\x{11231}\\x{11234}\\x{11236}-\\x{11237}\\x{1123E}\\x{112DF}\\x{112E3}-\\x{112EA}\\x{11300}-\\x{11301}\\x{1133B}-\\x{1133C}\\x{11340}\\x{11366}-\\x{1136C}\\x{11370}-\\x{11374}\\x{11438}-\\x{1143F}\\x{11442}-\\x{11444}\\x{11446}\\x{1145E}\\x{114B3}-\\x{114B8}\\x{114BA}\\x{114BF}-\\x{114C0}\\x{114C2}-\\x{114C3}\\x{115B2}-\\x{115B5}\\x{115BC}-\\x{115BD}\\x{115BF}-\\x{115C0}\\x{115DC}-\\x{115DD}\\x{11633}-\\x{1163A}\\x{1163D}\\x{1163F}-\\x{11640}\\x{116AB}\\x{116AD}\\x{116B0}-\\x{116B5}\\x{116B7}\\x{1171D}-\\x{1171F}\\x{11722}-\\x{11725}\\x{11727}-\\x{1172B}\\x{1182F}-\\x{11837}\\x{11839}-\\x{1183A}\\x{11A01}-\\x{11A0A}\\x{11A33}-\\x{11A38}\\x{11A3B}-\\x{11A3E}\\x{11A47}\\x{11A51}-\\x{11A56}\\x{11A59}-\\x{11A5B}\\x{11A8A}-\\x{11A96}\\x{11A98}-\\x{11A99}\\x{11C30}-\\x{11C36}\\x{11C38}-\\x{11C3D}\\x{11C3F}\\x{11C92}-\\x{11CA7}\\x{11CAA}-\\x{11CB0}\\x{11CB2}-\\x{11CB3}\\x{11CB5}-\\x{11CB6}\\x{11D31}-\\x{11D36}\\x{11D3A}\\x{11D3C}-\\x{11D3D}\\x{11D3F}-\\x{11D45}\\x{11D47}\\x{11D90}-\\x{11D91}\\x{11D95}\\x{11D97}\\x{11EF3}-\\x{11EF4}\\x{16AF0}-\\x{16AF4}\\x{16B30}-\\x{16B36}\\x{16B40}-\\x{16B43}\\x{16F8F}-\\x{16F92}\\x{16F93}-\\x{16F9F}\\x{16FE0}-\\x{16FE1}\\x{1BC9D}-\\x{1BC9E}\\x{1BCA0}-\\x{1BCA3}\\x{1D167}-\\x{1D169}\\x{1D173}-\\x{1D17A}\\x{1D17B}-\\x{1D182}\\x{1D185}-\\x{1D18B}\\x{1D1AA}-\\x{1D1AD}\\x{1D242}-\\x{1D244}\\x{1DA00}-\\x{1DA36}\\x{1DA3B}-\\x{1DA6C}\\x{1DA75}\\x{1DA84}\\x{1DA9B}-\\x{1DA9F}\\x{1DAA1}-\\x{1DAAF}\\x{1E000}-\\x{1E006}\\x{1E008}-\\x{1E018}\\x{1E01B}-\\x{1E021}\\x{1E023}-\\x{1E024}\\x{1E026}-\\x{1E02A}\\x{1E8D0}-\\x{1E8D6}\\x{1E944}-\\x{1E94A}\\x{1F3FB}-\\x{1F3FF}\\x{E0001}\\x{E0020}-\\x{E007F}\\x{E0100}-\\x{E01EF}])(\\pL)(\\pL*+)/u'; vendor_prefixed/symfony/polyfill-mbstring/Resources/unidata/upperCase.php 0000644 00000055522 15174671617 0023177 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return array('a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D', 'e' => 'E', 'f' => 'F', 'g' => 'G', 'h' => 'H', 'i' => 'I', 'j' => 'J', 'k' => 'K', 'l' => 'L', 'm' => 'M', 'n' => 'N', 'o' => 'O', 'p' => 'P', 'q' => 'Q', 'r' => 'R', 's' => 'S', 't' => 'T', 'u' => 'U', 'v' => 'V', 'w' => 'W', 'x' => 'X', 'y' => 'Y', 'z' => 'Z', 'µ' => 'Μ', 'à' => 'À', 'á' => 'Á', 'â' => 'Â', 'ã' => 'Ã', 'ä' => 'Ä', 'å' => 'Å', 'æ' => 'Æ', 'ç' => 'Ç', 'è' => 'È', 'é' => 'É', 'ê' => 'Ê', 'ë' => 'Ë', 'ì' => 'Ì', 'í' => 'Í', 'î' => 'Î', 'ï' => 'Ï', 'ð' => 'Ð', 'ñ' => 'Ñ', 'ò' => 'Ò', 'ó' => 'Ó', 'ô' => 'Ô', 'õ' => 'Õ', 'ö' => 'Ö', 'ø' => 'Ø', 'ù' => 'Ù', 'ú' => 'Ú', 'û' => 'Û', 'ü' => 'Ü', 'ý' => 'Ý', 'þ' => 'Þ', 'ÿ' => 'Ÿ', 'ā' => 'Ā', 'ă' => 'Ă', 'ą' => 'Ą', 'ć' => 'Ć', 'ĉ' => 'Ĉ', 'ċ' => 'Ċ', 'č' => 'Č', 'ď' => 'Ď', 'đ' => 'Đ', 'ē' => 'Ē', 'ĕ' => 'Ĕ', 'ė' => 'Ė', 'ę' => 'Ę', 'ě' => 'Ě', 'ĝ' => 'Ĝ', 'ğ' => 'Ğ', 'ġ' => 'Ġ', 'ģ' => 'Ģ', 'ĥ' => 'Ĥ', 'ħ' => 'Ħ', 'ĩ' => 'Ĩ', 'ī' => 'Ī', 'ĭ' => 'Ĭ', 'į' => 'Į', 'ı' => 'I', 'ij' => 'IJ', 'ĵ' => 'Ĵ', 'ķ' => 'Ķ', 'ĺ' => 'Ĺ', 'ļ' => 'Ļ', 'ľ' => 'Ľ', 'ŀ' => 'Ŀ', 'ł' => 'Ł', 'ń' => 'Ń', 'ņ' => 'Ņ', 'ň' => 'Ň', 'ŋ' => 'Ŋ', 'ō' => 'Ō', 'ŏ' => 'Ŏ', 'ő' => 'Ő', 'œ' => 'Œ', 'ŕ' => 'Ŕ', 'ŗ' => 'Ŗ', 'ř' => 'Ř', 'ś' => 'Ś', 'ŝ' => 'Ŝ', 'ş' => 'Ş', 'š' => 'Š', 'ţ' => 'Ţ', 'ť' => 'Ť', 'ŧ' => 'Ŧ', 'ũ' => 'Ũ', 'ū' => 'Ū', 'ŭ' => 'Ŭ', 'ů' => 'Ů', 'ű' => 'Ű', 'ų' => 'Ų', 'ŵ' => 'Ŵ', 'ŷ' => 'Ŷ', 'ź' => 'Ź', 'ż' => 'Ż', 'ž' => 'Ž', 'ſ' => 'S', 'ƀ' => 'Ƀ', 'ƃ' => 'Ƃ', 'ƅ' => 'Ƅ', 'ƈ' => 'Ƈ', 'ƌ' => 'Ƌ', 'ƒ' => 'Ƒ', 'ƕ' => 'Ƕ', 'ƙ' => 'Ƙ', 'ƚ' => 'Ƚ', 'ƞ' => 'Ƞ', 'ơ' => 'Ơ', 'ƣ' => 'Ƣ', 'ƥ' => 'Ƥ', 'ƨ' => 'Ƨ', 'ƭ' => 'Ƭ', 'ư' => 'Ư', 'ƴ' => 'Ƴ', 'ƶ' => 'Ƶ', 'ƹ' => 'Ƹ', 'ƽ' => 'Ƽ', 'ƿ' => 'Ƿ', 'Dž' => 'DŽ', 'dž' => 'DŽ', 'Lj' => 'LJ', 'lj' => 'LJ', 'Nj' => 'NJ', 'nj' => 'NJ', 'ǎ' => 'Ǎ', 'ǐ' => 'Ǐ', 'ǒ' => 'Ǒ', 'ǔ' => 'Ǔ', 'ǖ' => 'Ǖ', 'ǘ' => 'Ǘ', 'ǚ' => 'Ǚ', 'ǜ' => 'Ǜ', 'ǝ' => 'Ǝ', 'ǟ' => 'Ǟ', 'ǡ' => 'Ǡ', 'ǣ' => 'Ǣ', 'ǥ' => 'Ǥ', 'ǧ' => 'Ǧ', 'ǩ' => 'Ǩ', 'ǫ' => 'Ǫ', 'ǭ' => 'Ǭ', 'ǯ' => 'Ǯ', 'Dz' => 'DZ', 'dz' => 'DZ', 'ǵ' => 'Ǵ', 'ǹ' => 'Ǹ', 'ǻ' => 'Ǻ', 'ǽ' => 'Ǽ', 'ǿ' => 'Ǿ', 'ȁ' => 'Ȁ', 'ȃ' => 'Ȃ', 'ȅ' => 'Ȅ', 'ȇ' => 'Ȇ', 'ȉ' => 'Ȉ', 'ȋ' => 'Ȋ', 'ȍ' => 'Ȍ', 'ȏ' => 'Ȏ', 'ȑ' => 'Ȑ', 'ȓ' => 'Ȓ', 'ȕ' => 'Ȕ', 'ȗ' => 'Ȗ', 'ș' => 'Ș', 'ț' => 'Ț', 'ȝ' => 'Ȝ', 'ȟ' => 'Ȟ', 'ȣ' => 'Ȣ', 'ȥ' => 'Ȥ', 'ȧ' => 'Ȧ', 'ȩ' => 'Ȩ', 'ȫ' => 'Ȫ', 'ȭ' => 'Ȭ', 'ȯ' => 'Ȯ', 'ȱ' => 'Ȱ', 'ȳ' => 'Ȳ', 'ȼ' => 'Ȼ', 'ȿ' => 'Ȿ', 'ɀ' => 'Ɀ', 'ɂ' => 'Ɂ', 'ɇ' => 'Ɇ', 'ɉ' => 'Ɉ', 'ɋ' => 'Ɋ', 'ɍ' => 'Ɍ', 'ɏ' => 'Ɏ', 'ɐ' => 'Ɐ', 'ɑ' => 'Ɑ', 'ɒ' => 'Ɒ', 'ɓ' => 'Ɓ', 'ɔ' => 'Ɔ', 'ɖ' => 'Ɖ', 'ɗ' => 'Ɗ', 'ə' => 'Ə', 'ɛ' => 'Ɛ', 'ɜ' => 'Ɜ', 'ɠ' => 'Ɠ', 'ɡ' => 'Ɡ', 'ɣ' => 'Ɣ', 'ɥ' => 'Ɥ', 'ɦ' => 'Ɦ', 'ɨ' => 'Ɨ', 'ɩ' => 'Ɩ', 'ɪ' => 'Ɪ', 'ɫ' => 'Ɫ', 'ɬ' => 'Ɬ', 'ɯ' => 'Ɯ', 'ɱ' => 'Ɱ', 'ɲ' => 'Ɲ', 'ɵ' => 'Ɵ', 'ɽ' => 'Ɽ', 'ʀ' => 'Ʀ', 'ʂ' => 'Ʂ', 'ʃ' => 'Ʃ', 'ʇ' => 'Ʇ', 'ʈ' => 'Ʈ', 'ʉ' => 'Ʉ', 'ʊ' => 'Ʊ', 'ʋ' => 'Ʋ', 'ʌ' => 'Ʌ', 'ʒ' => 'Ʒ', 'ʝ' => 'Ʝ', 'ʞ' => 'Ʞ', 'ͅ' => 'Ι', 'ͱ' => 'Ͱ', 'ͳ' => 'Ͳ', 'ͷ' => 'Ͷ', 'ͻ' => 'Ͻ', 'ͼ' => 'Ͼ', 'ͽ' => 'Ͽ', 'ά' => 'Ά', 'έ' => 'Έ', 'ή' => 'Ή', 'ί' => 'Ί', 'α' => 'Α', 'β' => 'Β', 'γ' => 'Γ', 'δ' => 'Δ', 'ε' => 'Ε', 'ζ' => 'Ζ', 'η' => 'Η', 'θ' => 'Θ', 'ι' => 'Ι', 'κ' => 'Κ', 'λ' => 'Λ', 'μ' => 'Μ', 'ν' => 'Ν', 'ξ' => 'Ξ', 'ο' => 'Ο', 'π' => 'Π', 'ρ' => 'Ρ', 'ς' => 'Σ', 'σ' => 'Σ', 'τ' => 'Τ', 'υ' => 'Υ', 'φ' => 'Φ', 'χ' => 'Χ', 'ψ' => 'Ψ', 'ω' => 'Ω', 'ϊ' => 'Ϊ', 'ϋ' => 'Ϋ', 'ό' => 'Ό', 'ύ' => 'Ύ', 'ώ' => 'Ώ', 'ϐ' => 'Β', 'ϑ' => 'Θ', 'ϕ' => 'Φ', 'ϖ' => 'Π', 'ϗ' => 'Ϗ', 'ϙ' => 'Ϙ', 'ϛ' => 'Ϛ', 'ϝ' => 'Ϝ', 'ϟ' => 'Ϟ', 'ϡ' => 'Ϡ', 'ϣ' => 'Ϣ', 'ϥ' => 'Ϥ', 'ϧ' => 'Ϧ', 'ϩ' => 'Ϩ', 'ϫ' => 'Ϫ', 'ϭ' => 'Ϭ', 'ϯ' => 'Ϯ', 'ϰ' => 'Κ', 'ϱ' => 'Ρ', 'ϲ' => 'Ϲ', 'ϳ' => 'Ϳ', 'ϵ' => 'Ε', 'ϸ' => 'Ϸ', 'ϻ' => 'Ϻ', 'а' => 'А', 'б' => 'Б', 'в' => 'В', 'г' => 'Г', 'д' => 'Д', 'е' => 'Е', 'ж' => 'Ж', 'з' => 'З', 'и' => 'И', 'й' => 'Й', 'к' => 'К', 'л' => 'Л', 'м' => 'М', 'н' => 'Н', 'о' => 'О', 'п' => 'П', 'р' => 'Р', 'с' => 'С', 'т' => 'Т', 'у' => 'У', 'ф' => 'Ф', 'х' => 'Х', 'ц' => 'Ц', 'ч' => 'Ч', 'ш' => 'Ш', 'щ' => 'Щ', 'ъ' => 'Ъ', 'ы' => 'Ы', 'ь' => 'Ь', 'э' => 'Э', 'ю' => 'Ю', 'я' => 'Я', 'ѐ' => 'Ѐ', 'ё' => 'Ё', 'ђ' => 'Ђ', 'ѓ' => 'Ѓ', 'є' => 'Є', 'ѕ' => 'Ѕ', 'і' => 'І', 'ї' => 'Ї', 'ј' => 'Ј', 'љ' => 'Љ', 'њ' => 'Њ', 'ћ' => 'Ћ', 'ќ' => 'Ќ', 'ѝ' => 'Ѝ', 'ў' => 'Ў', 'џ' => 'Џ', 'ѡ' => 'Ѡ', 'ѣ' => 'Ѣ', 'ѥ' => 'Ѥ', 'ѧ' => 'Ѧ', 'ѩ' => 'Ѩ', 'ѫ' => 'Ѫ', 'ѭ' => 'Ѭ', 'ѯ' => 'Ѯ', 'ѱ' => 'Ѱ', 'ѳ' => 'Ѳ', 'ѵ' => 'Ѵ', 'ѷ' => 'Ѷ', 'ѹ' => 'Ѹ', 'ѻ' => 'Ѻ', 'ѽ' => 'Ѽ', 'ѿ' => 'Ѿ', 'ҁ' => 'Ҁ', 'ҋ' => 'Ҋ', 'ҍ' => 'Ҍ', 'ҏ' => 'Ҏ', 'ґ' => 'Ґ', 'ғ' => 'Ғ', 'ҕ' => 'Ҕ', 'җ' => 'Җ', 'ҙ' => 'Ҙ', 'қ' => 'Қ', 'ҝ' => 'Ҝ', 'ҟ' => 'Ҟ', 'ҡ' => 'Ҡ', 'ң' => 'Ң', 'ҥ' => 'Ҥ', 'ҧ' => 'Ҧ', 'ҩ' => 'Ҩ', 'ҫ' => 'Ҫ', 'ҭ' => 'Ҭ', 'ү' => 'Ү', 'ұ' => 'Ұ', 'ҳ' => 'Ҳ', 'ҵ' => 'Ҵ', 'ҷ' => 'Ҷ', 'ҹ' => 'Ҹ', 'һ' => 'Һ', 'ҽ' => 'Ҽ', 'ҿ' => 'Ҿ', 'ӂ' => 'Ӂ', 'ӄ' => 'Ӄ', 'ӆ' => 'Ӆ', 'ӈ' => 'Ӈ', 'ӊ' => 'Ӊ', 'ӌ' => 'Ӌ', 'ӎ' => 'Ӎ', 'ӏ' => 'Ӏ', 'ӑ' => 'Ӑ', 'ӓ' => 'Ӓ', 'ӕ' => 'Ӕ', 'ӗ' => 'Ӗ', 'ә' => 'Ә', 'ӛ' => 'Ӛ', 'ӝ' => 'Ӝ', 'ӟ' => 'Ӟ', 'ӡ' => 'Ӡ', 'ӣ' => 'Ӣ', 'ӥ' => 'Ӥ', 'ӧ' => 'Ӧ', 'ө' => 'Ө', 'ӫ' => 'Ӫ', 'ӭ' => 'Ӭ', 'ӯ' => 'Ӯ', 'ӱ' => 'Ӱ', 'ӳ' => 'Ӳ', 'ӵ' => 'Ӵ', 'ӷ' => 'Ӷ', 'ӹ' => 'Ӹ', 'ӻ' => 'Ӻ', 'ӽ' => 'Ӽ', 'ӿ' => 'Ӿ', 'ԁ' => 'Ԁ', 'ԃ' => 'Ԃ', 'ԅ' => 'Ԅ', 'ԇ' => 'Ԇ', 'ԉ' => 'Ԉ', 'ԋ' => 'Ԋ', 'ԍ' => 'Ԍ', 'ԏ' => 'Ԏ', 'ԑ' => 'Ԑ', 'ԓ' => 'Ԓ', 'ԕ' => 'Ԕ', 'ԗ' => 'Ԗ', 'ԙ' => 'Ԙ', 'ԛ' => 'Ԛ', 'ԝ' => 'Ԝ', 'ԟ' => 'Ԟ', 'ԡ' => 'Ԡ', 'ԣ' => 'Ԣ', 'ԥ' => 'Ԥ', 'ԧ' => 'Ԧ', 'ԩ' => 'Ԩ', 'ԫ' => 'Ԫ', 'ԭ' => 'Ԭ', 'ԯ' => 'Ԯ', 'ա' => 'Ա', 'բ' => 'Բ', 'գ' => 'Գ', 'դ' => 'Դ', 'ե' => 'Ե', 'զ' => 'Զ', 'է' => 'Է', 'ը' => 'Ը', 'թ' => 'Թ', 'ժ' => 'Ժ', 'ի' => 'Ի', 'լ' => 'Լ', 'խ' => 'Խ', 'ծ' => 'Ծ', 'կ' => 'Կ', 'հ' => 'Հ', 'ձ' => 'Ձ', 'ղ' => 'Ղ', 'ճ' => 'Ճ', 'մ' => 'Մ', 'յ' => 'Յ', 'ն' => 'Ն', 'շ' => 'Շ', 'ո' => 'Ո', 'չ' => 'Չ', 'պ' => 'Պ', 'ջ' => 'Ջ', 'ռ' => 'Ռ', 'ս' => 'Ս', 'վ' => 'Վ', 'տ' => 'Տ', 'ր' => 'Ր', 'ց' => 'Ց', 'ւ' => 'Ւ', 'փ' => 'Փ', 'ք' => 'Ք', 'օ' => 'Օ', 'ֆ' => 'Ֆ', 'ა' => 'Ა', 'ბ' => 'Ბ', 'გ' => 'Გ', 'დ' => 'Დ', 'ე' => 'Ე', 'ვ' => 'Ვ', 'ზ' => 'Ზ', 'თ' => 'Თ', 'ი' => 'Ი', 'კ' => 'Კ', 'ლ' => 'Ლ', 'მ' => 'Მ', 'ნ' => 'Ნ', 'ო' => 'Ო', 'პ' => 'Პ', 'ჟ' => 'Ჟ', 'რ' => 'Რ', 'ს' => 'Ს', 'ტ' => 'Ტ', 'უ' => 'Უ', 'ფ' => 'Ფ', 'ქ' => 'Ქ', 'ღ' => 'Ღ', 'ყ' => 'Ყ', 'შ' => 'Შ', 'ჩ' => 'Ჩ', 'ც' => 'Ც', 'ძ' => 'Ძ', 'წ' => 'Წ', 'ჭ' => 'Ჭ', 'ხ' => 'Ხ', 'ჯ' => 'Ჯ', 'ჰ' => 'Ჰ', 'ჱ' => 'Ჱ', 'ჲ' => 'Ჲ', 'ჳ' => 'Ჳ', 'ჴ' => 'Ჴ', 'ჵ' => 'Ჵ', 'ჶ' => 'Ჶ', 'ჷ' => 'Ჷ', 'ჸ' => 'Ჸ', 'ჹ' => 'Ჹ', 'ჺ' => 'Ჺ', 'ჽ' => 'Ჽ', 'ჾ' => 'Ჾ', 'ჿ' => 'Ჿ', 'ᏸ' => 'Ᏸ', 'ᏹ' => 'Ᏹ', 'ᏺ' => 'Ᏺ', 'ᏻ' => 'Ᏻ', 'ᏼ' => 'Ᏼ', 'ᏽ' => 'Ᏽ', 'ᲀ' => 'В', 'ᲁ' => 'Д', 'ᲂ' => 'О', 'ᲃ' => 'С', 'ᲄ' => 'Т', 'ᲅ' => 'Т', 'ᲆ' => 'Ъ', 'ᲇ' => 'Ѣ', 'ᲈ' => 'Ꙋ', 'ᵹ' => 'Ᵹ', 'ᵽ' => 'Ᵽ', 'ᶎ' => 'Ᶎ', 'ḁ' => 'Ḁ', 'ḃ' => 'Ḃ', 'ḅ' => 'Ḅ', 'ḇ' => 'Ḇ', 'ḉ' => 'Ḉ', 'ḋ' => 'Ḋ', 'ḍ' => 'Ḍ', 'ḏ' => 'Ḏ', 'ḑ' => 'Ḑ', 'ḓ' => 'Ḓ', 'ḕ' => 'Ḕ', 'ḗ' => 'Ḗ', 'ḙ' => 'Ḙ', 'ḛ' => 'Ḛ', 'ḝ' => 'Ḝ', 'ḟ' => 'Ḟ', 'ḡ' => 'Ḡ', 'ḣ' => 'Ḣ', 'ḥ' => 'Ḥ', 'ḧ' => 'Ḧ', 'ḩ' => 'Ḩ', 'ḫ' => 'Ḫ', 'ḭ' => 'Ḭ', 'ḯ' => 'Ḯ', 'ḱ' => 'Ḱ', 'ḳ' => 'Ḳ', 'ḵ' => 'Ḵ', 'ḷ' => 'Ḷ', 'ḹ' => 'Ḹ', 'ḻ' => 'Ḻ', 'ḽ' => 'Ḽ', 'ḿ' => 'Ḿ', 'ṁ' => 'Ṁ', 'ṃ' => 'Ṃ', 'ṅ' => 'Ṅ', 'ṇ' => 'Ṇ', 'ṉ' => 'Ṉ', 'ṋ' => 'Ṋ', 'ṍ' => 'Ṍ', 'ṏ' => 'Ṏ', 'ṑ' => 'Ṑ', 'ṓ' => 'Ṓ', 'ṕ' => 'Ṕ', 'ṗ' => 'Ṗ', 'ṙ' => 'Ṙ', 'ṛ' => 'Ṛ', 'ṝ' => 'Ṝ', 'ṟ' => 'Ṟ', 'ṡ' => 'Ṡ', 'ṣ' => 'Ṣ', 'ṥ' => 'Ṥ', 'ṧ' => 'Ṧ', 'ṩ' => 'Ṩ', 'ṫ' => 'Ṫ', 'ṭ' => 'Ṭ', 'ṯ' => 'Ṯ', 'ṱ' => 'Ṱ', 'ṳ' => 'Ṳ', 'ṵ' => 'Ṵ', 'ṷ' => 'Ṷ', 'ṹ' => 'Ṹ', 'ṻ' => 'Ṻ', 'ṽ' => 'Ṽ', 'ṿ' => 'Ṿ', 'ẁ' => 'Ẁ', 'ẃ' => 'Ẃ', 'ẅ' => 'Ẅ', 'ẇ' => 'Ẇ', 'ẉ' => 'Ẉ', 'ẋ' => 'Ẋ', 'ẍ' => 'Ẍ', 'ẏ' => 'Ẏ', 'ẑ' => 'Ẑ', 'ẓ' => 'Ẓ', 'ẕ' => 'Ẕ', 'ẛ' => 'Ṡ', 'ạ' => 'Ạ', 'ả' => 'Ả', 'ấ' => 'Ấ', 'ầ' => 'Ầ', 'ẩ' => 'Ẩ', 'ẫ' => 'Ẫ', 'ậ' => 'Ậ', 'ắ' => 'Ắ', 'ằ' => 'Ằ', 'ẳ' => 'Ẳ', 'ẵ' => 'Ẵ', 'ặ' => 'Ặ', 'ẹ' => 'Ẹ', 'ẻ' => 'Ẻ', 'ẽ' => 'Ẽ', 'ế' => 'Ế', 'ề' => 'Ề', 'ể' => 'Ể', 'ễ' => 'Ễ', 'ệ' => 'Ệ', 'ỉ' => 'Ỉ', 'ị' => 'Ị', 'ọ' => 'Ọ', 'ỏ' => 'Ỏ', 'ố' => 'Ố', 'ồ' => 'Ồ', 'ổ' => 'Ổ', 'ỗ' => 'Ỗ', 'ộ' => 'Ộ', 'ớ' => 'Ớ', 'ờ' => 'Ờ', 'ở' => 'Ở', 'ỡ' => 'Ỡ', 'ợ' => 'Ợ', 'ụ' => 'Ụ', 'ủ' => 'Ủ', 'ứ' => 'Ứ', 'ừ' => 'Ừ', 'ử' => 'Ử', 'ữ' => 'Ữ', 'ự' => 'Ự', 'ỳ' => 'Ỳ', 'ỵ' => 'Ỵ', 'ỷ' => 'Ỷ', 'ỹ' => 'Ỹ', 'ỻ' => 'Ỻ', 'ỽ' => 'Ỽ', 'ỿ' => 'Ỿ', 'ἀ' => 'Ἀ', 'ἁ' => 'Ἁ', 'ἂ' => 'Ἂ', 'ἃ' => 'Ἃ', 'ἄ' => 'Ἄ', 'ἅ' => 'Ἅ', 'ἆ' => 'Ἆ', 'ἇ' => 'Ἇ', 'ἐ' => 'Ἐ', 'ἑ' => 'Ἑ', 'ἒ' => 'Ἒ', 'ἓ' => 'Ἓ', 'ἔ' => 'Ἔ', 'ἕ' => 'Ἕ', 'ἠ' => 'Ἠ', 'ἡ' => 'Ἡ', 'ἢ' => 'Ἢ', 'ἣ' => 'Ἣ', 'ἤ' => 'Ἤ', 'ἥ' => 'Ἥ', 'ἦ' => 'Ἦ', 'ἧ' => 'Ἧ', 'ἰ' => 'Ἰ', 'ἱ' => 'Ἱ', 'ἲ' => 'Ἲ', 'ἳ' => 'Ἳ', 'ἴ' => 'Ἴ', 'ἵ' => 'Ἵ', 'ἶ' => 'Ἶ', 'ἷ' => 'Ἷ', 'ὀ' => 'Ὀ', 'ὁ' => 'Ὁ', 'ὂ' => 'Ὂ', 'ὃ' => 'Ὃ', 'ὄ' => 'Ὄ', 'ὅ' => 'Ὅ', 'ὑ' => 'Ὑ', 'ὓ' => 'Ὓ', 'ὕ' => 'Ὕ', 'ὗ' => 'Ὗ', 'ὠ' => 'Ὠ', 'ὡ' => 'Ὡ', 'ὢ' => 'Ὢ', 'ὣ' => 'Ὣ', 'ὤ' => 'Ὤ', 'ὥ' => 'Ὥ', 'ὦ' => 'Ὦ', 'ὧ' => 'Ὧ', 'ὰ' => 'Ὰ', 'ά' => 'Ά', 'ὲ' => 'Ὲ', 'έ' => 'Έ', 'ὴ' => 'Ὴ', 'ή' => 'Ή', 'ὶ' => 'Ὶ', 'ί' => 'Ί', 'ὸ' => 'Ὸ', 'ό' => 'Ό', 'ὺ' => 'Ὺ', 'ύ' => 'Ύ', 'ὼ' => 'Ὼ', 'ώ' => 'Ώ', 'ᾀ' => 'ἈΙ', 'ᾁ' => 'ἉΙ', 'ᾂ' => 'ἊΙ', 'ᾃ' => 'ἋΙ', 'ᾄ' => 'ἌΙ', 'ᾅ' => 'ἍΙ', 'ᾆ' => 'ἎΙ', 'ᾇ' => 'ἏΙ', 'ᾐ' => 'ἨΙ', 'ᾑ' => 'ἩΙ', 'ᾒ' => 'ἪΙ', 'ᾓ' => 'ἫΙ', 'ᾔ' => 'ἬΙ', 'ᾕ' => 'ἭΙ', 'ᾖ' => 'ἮΙ', 'ᾗ' => 'ἯΙ', 'ᾠ' => 'ὨΙ', 'ᾡ' => 'ὩΙ', 'ᾢ' => 'ὪΙ', 'ᾣ' => 'ὫΙ', 'ᾤ' => 'ὬΙ', 'ᾥ' => 'ὭΙ', 'ᾦ' => 'ὮΙ', 'ᾧ' => 'ὯΙ', 'ᾰ' => 'Ᾰ', 'ᾱ' => 'Ᾱ', 'ᾳ' => 'ΑΙ', 'ι' => 'Ι', 'ῃ' => 'ΗΙ', 'ῐ' => 'Ῐ', 'ῑ' => 'Ῑ', 'ῠ' => 'Ῠ', 'ῡ' => 'Ῡ', 'ῥ' => 'Ῥ', 'ῳ' => 'ΩΙ', 'ⅎ' => 'Ⅎ', 'ⅰ' => 'Ⅰ', 'ⅱ' => 'Ⅱ', 'ⅲ' => 'Ⅲ', 'ⅳ' => 'Ⅳ', 'ⅴ' => 'Ⅴ', 'ⅵ' => 'Ⅵ', 'ⅶ' => 'Ⅶ', 'ⅷ' => 'Ⅷ', 'ⅸ' => 'Ⅸ', 'ⅹ' => 'Ⅹ', 'ⅺ' => 'Ⅺ', 'ⅻ' => 'Ⅻ', 'ⅼ' => 'Ⅼ', 'ⅽ' => 'Ⅽ', 'ⅾ' => 'Ⅾ', 'ⅿ' => 'Ⅿ', 'ↄ' => 'Ↄ', 'ⓐ' => 'Ⓐ', 'ⓑ' => 'Ⓑ', 'ⓒ' => 'Ⓒ', 'ⓓ' => 'Ⓓ', 'ⓔ' => 'Ⓔ', 'ⓕ' => 'Ⓕ', 'ⓖ' => 'Ⓖ', 'ⓗ' => 'Ⓗ', 'ⓘ' => 'Ⓘ', 'ⓙ' => 'Ⓙ', 'ⓚ' => 'Ⓚ', 'ⓛ' => 'Ⓛ', 'ⓜ' => 'Ⓜ', 'ⓝ' => 'Ⓝ', 'ⓞ' => 'Ⓞ', 'ⓟ' => 'Ⓟ', 'ⓠ' => 'Ⓠ', 'ⓡ' => 'Ⓡ', 'ⓢ' => 'Ⓢ', 'ⓣ' => 'Ⓣ', 'ⓤ' => 'Ⓤ', 'ⓥ' => 'Ⓥ', 'ⓦ' => 'Ⓦ', 'ⓧ' => 'Ⓧ', 'ⓨ' => 'Ⓨ', 'ⓩ' => 'Ⓩ', 'ⰰ' => 'Ⰰ', 'ⰱ' => 'Ⰱ', 'ⰲ' => 'Ⰲ', 'ⰳ' => 'Ⰳ', 'ⰴ' => 'Ⰴ', 'ⰵ' => 'Ⰵ', 'ⰶ' => 'Ⰶ', 'ⰷ' => 'Ⰷ', 'ⰸ' => 'Ⰸ', 'ⰹ' => 'Ⰹ', 'ⰺ' => 'Ⰺ', 'ⰻ' => 'Ⰻ', 'ⰼ' => 'Ⰼ', 'ⰽ' => 'Ⰽ', 'ⰾ' => 'Ⰾ', 'ⰿ' => 'Ⰿ', 'ⱀ' => 'Ⱀ', 'ⱁ' => 'Ⱁ', 'ⱂ' => 'Ⱂ', 'ⱃ' => 'Ⱃ', 'ⱄ' => 'Ⱄ', 'ⱅ' => 'Ⱅ', 'ⱆ' => 'Ⱆ', 'ⱇ' => 'Ⱇ', 'ⱈ' => 'Ⱈ', 'ⱉ' => 'Ⱉ', 'ⱊ' => 'Ⱊ', 'ⱋ' => 'Ⱋ', 'ⱌ' => 'Ⱌ', 'ⱍ' => 'Ⱍ', 'ⱎ' => 'Ⱎ', 'ⱏ' => 'Ⱏ', 'ⱐ' => 'Ⱐ', 'ⱑ' => 'Ⱑ', 'ⱒ' => 'Ⱒ', 'ⱓ' => 'Ⱓ', 'ⱔ' => 'Ⱔ', 'ⱕ' => 'Ⱕ', 'ⱖ' => 'Ⱖ', 'ⱗ' => 'Ⱗ', 'ⱘ' => 'Ⱘ', 'ⱙ' => 'Ⱙ', 'ⱚ' => 'Ⱚ', 'ⱛ' => 'Ⱛ', 'ⱜ' => 'Ⱜ', 'ⱝ' => 'Ⱝ', 'ⱞ' => 'Ⱞ', 'ⱡ' => 'Ⱡ', 'ⱥ' => 'Ⱥ', 'ⱦ' => 'Ⱦ', 'ⱨ' => 'Ⱨ', 'ⱪ' => 'Ⱪ', 'ⱬ' => 'Ⱬ', 'ⱳ' => 'Ⱳ', 'ⱶ' => 'Ⱶ', 'ⲁ' => 'Ⲁ', 'ⲃ' => 'Ⲃ', 'ⲅ' => 'Ⲅ', 'ⲇ' => 'Ⲇ', 'ⲉ' => 'Ⲉ', 'ⲋ' => 'Ⲋ', 'ⲍ' => 'Ⲍ', 'ⲏ' => 'Ⲏ', 'ⲑ' => 'Ⲑ', 'ⲓ' => 'Ⲓ', 'ⲕ' => 'Ⲕ', 'ⲗ' => 'Ⲗ', 'ⲙ' => 'Ⲙ', 'ⲛ' => 'Ⲛ', 'ⲝ' => 'Ⲝ', 'ⲟ' => 'Ⲟ', 'ⲡ' => 'Ⲡ', 'ⲣ' => 'Ⲣ', 'ⲥ' => 'Ⲥ', 'ⲧ' => 'Ⲧ', 'ⲩ' => 'Ⲩ', 'ⲫ' => 'Ⲫ', 'ⲭ' => 'Ⲭ', 'ⲯ' => 'Ⲯ', 'ⲱ' => 'Ⲱ', 'ⲳ' => 'Ⲳ', 'ⲵ' => 'Ⲵ', 'ⲷ' => 'Ⲷ', 'ⲹ' => 'Ⲹ', 'ⲻ' => 'Ⲻ', 'ⲽ' => 'Ⲽ', 'ⲿ' => 'Ⲿ', 'ⳁ' => 'Ⳁ', 'ⳃ' => 'Ⳃ', 'ⳅ' => 'Ⳅ', 'ⳇ' => 'Ⳇ', 'ⳉ' => 'Ⳉ', 'ⳋ' => 'Ⳋ', 'ⳍ' => 'Ⳍ', 'ⳏ' => 'Ⳏ', 'ⳑ' => 'Ⳑ', 'ⳓ' => 'Ⳓ', 'ⳕ' => 'Ⳕ', 'ⳗ' => 'Ⳗ', 'ⳙ' => 'Ⳙ', 'ⳛ' => 'Ⳛ', 'ⳝ' => 'Ⳝ', 'ⳟ' => 'Ⳟ', 'ⳡ' => 'Ⳡ', 'ⳣ' => 'Ⳣ', 'ⳬ' => 'Ⳬ', 'ⳮ' => 'Ⳮ', 'ⳳ' => 'Ⳳ', 'ⴀ' => 'Ⴀ', 'ⴁ' => 'Ⴁ', 'ⴂ' => 'Ⴂ', 'ⴃ' => 'Ⴃ', 'ⴄ' => 'Ⴄ', 'ⴅ' => 'Ⴅ', 'ⴆ' => 'Ⴆ', 'ⴇ' => 'Ⴇ', 'ⴈ' => 'Ⴈ', 'ⴉ' => 'Ⴉ', 'ⴊ' => 'Ⴊ', 'ⴋ' => 'Ⴋ', 'ⴌ' => 'Ⴌ', 'ⴍ' => 'Ⴍ', 'ⴎ' => 'Ⴎ', 'ⴏ' => 'Ⴏ', 'ⴐ' => 'Ⴐ', 'ⴑ' => 'Ⴑ', 'ⴒ' => 'Ⴒ', 'ⴓ' => 'Ⴓ', 'ⴔ' => 'Ⴔ', 'ⴕ' => 'Ⴕ', 'ⴖ' => 'Ⴖ', 'ⴗ' => 'Ⴗ', 'ⴘ' => 'Ⴘ', 'ⴙ' => 'Ⴙ', 'ⴚ' => 'Ⴚ', 'ⴛ' => 'Ⴛ', 'ⴜ' => 'Ⴜ', 'ⴝ' => 'Ⴝ', 'ⴞ' => 'Ⴞ', 'ⴟ' => 'Ⴟ', 'ⴠ' => 'Ⴠ', 'ⴡ' => 'Ⴡ', 'ⴢ' => 'Ⴢ', 'ⴣ' => 'Ⴣ', 'ⴤ' => 'Ⴤ', 'ⴥ' => 'Ⴥ', 'ⴧ' => 'Ⴧ', 'ⴭ' => 'Ⴭ', 'ꙁ' => 'Ꙁ', 'ꙃ' => 'Ꙃ', 'ꙅ' => 'Ꙅ', 'ꙇ' => 'Ꙇ', 'ꙉ' => 'Ꙉ', 'ꙋ' => 'Ꙋ', 'ꙍ' => 'Ꙍ', 'ꙏ' => 'Ꙏ', 'ꙑ' => 'Ꙑ', 'ꙓ' => 'Ꙓ', 'ꙕ' => 'Ꙕ', 'ꙗ' => 'Ꙗ', 'ꙙ' => 'Ꙙ', 'ꙛ' => 'Ꙛ', 'ꙝ' => 'Ꙝ', 'ꙟ' => 'Ꙟ', 'ꙡ' => 'Ꙡ', 'ꙣ' => 'Ꙣ', 'ꙥ' => 'Ꙥ', 'ꙧ' => 'Ꙧ', 'ꙩ' => 'Ꙩ', 'ꙫ' => 'Ꙫ', 'ꙭ' => 'Ꙭ', 'ꚁ' => 'Ꚁ', 'ꚃ' => 'Ꚃ', 'ꚅ' => 'Ꚅ', 'ꚇ' => 'Ꚇ', 'ꚉ' => 'Ꚉ', 'ꚋ' => 'Ꚋ', 'ꚍ' => 'Ꚍ', 'ꚏ' => 'Ꚏ', 'ꚑ' => 'Ꚑ', 'ꚓ' => 'Ꚓ', 'ꚕ' => 'Ꚕ', 'ꚗ' => 'Ꚗ', 'ꚙ' => 'Ꚙ', 'ꚛ' => 'Ꚛ', 'ꜣ' => 'Ꜣ', 'ꜥ' => 'Ꜥ', 'ꜧ' => 'Ꜧ', 'ꜩ' => 'Ꜩ', 'ꜫ' => 'Ꜫ', 'ꜭ' => 'Ꜭ', 'ꜯ' => 'Ꜯ', 'ꜳ' => 'Ꜳ', 'ꜵ' => 'Ꜵ', 'ꜷ' => 'Ꜷ', 'ꜹ' => 'Ꜹ', 'ꜻ' => 'Ꜻ', 'ꜽ' => 'Ꜽ', 'ꜿ' => 'Ꜿ', 'ꝁ' => 'Ꝁ', 'ꝃ' => 'Ꝃ', 'ꝅ' => 'Ꝅ', 'ꝇ' => 'Ꝇ', 'ꝉ' => 'Ꝉ', 'ꝋ' => 'Ꝋ', 'ꝍ' => 'Ꝍ', 'ꝏ' => 'Ꝏ', 'ꝑ' => 'Ꝑ', 'ꝓ' => 'Ꝓ', 'ꝕ' => 'Ꝕ', 'ꝗ' => 'Ꝗ', 'ꝙ' => 'Ꝙ', 'ꝛ' => 'Ꝛ', 'ꝝ' => 'Ꝝ', 'ꝟ' => 'Ꝟ', 'ꝡ' => 'Ꝡ', 'ꝣ' => 'Ꝣ', 'ꝥ' => 'Ꝥ', 'ꝧ' => 'Ꝧ', 'ꝩ' => 'Ꝩ', 'ꝫ' => 'Ꝫ', 'ꝭ' => 'Ꝭ', 'ꝯ' => 'Ꝯ', 'ꝺ' => 'Ꝺ', 'ꝼ' => 'Ꝼ', 'ꝿ' => 'Ꝿ', 'ꞁ' => 'Ꞁ', 'ꞃ' => 'Ꞃ', 'ꞅ' => 'Ꞅ', 'ꞇ' => 'Ꞇ', 'ꞌ' => 'Ꞌ', 'ꞑ' => 'Ꞑ', 'ꞓ' => 'Ꞓ', 'ꞔ' => 'Ꞔ', 'ꞗ' => 'Ꞗ', 'ꞙ' => 'Ꞙ', 'ꞛ' => 'Ꞛ', 'ꞝ' => 'Ꞝ', 'ꞟ' => 'Ꞟ', 'ꞡ' => 'Ꞡ', 'ꞣ' => 'Ꞣ', 'ꞥ' => 'Ꞥ', 'ꞧ' => 'Ꞧ', 'ꞩ' => 'Ꞩ', 'ꞵ' => 'Ꞵ', 'ꞷ' => 'Ꞷ', 'ꞹ' => 'Ꞹ', 'ꞻ' => 'Ꞻ', 'ꞽ' => 'Ꞽ', 'ꞿ' => 'Ꞿ', 'ꟃ' => 'Ꟃ', 'ꟈ' => 'Ꟈ', 'ꟊ' => 'Ꟊ', 'ꟶ' => 'Ꟶ', 'ꭓ' => 'Ꭓ', 'ꭰ' => 'Ꭰ', 'ꭱ' => 'Ꭱ', 'ꭲ' => 'Ꭲ', 'ꭳ' => 'Ꭳ', 'ꭴ' => 'Ꭴ', 'ꭵ' => 'Ꭵ', 'ꭶ' => 'Ꭶ', 'ꭷ' => 'Ꭷ', 'ꭸ' => 'Ꭸ', 'ꭹ' => 'Ꭹ', 'ꭺ' => 'Ꭺ', 'ꭻ' => 'Ꭻ', 'ꭼ' => 'Ꭼ', 'ꭽ' => 'Ꭽ', 'ꭾ' => 'Ꭾ', 'ꭿ' => 'Ꭿ', 'ꮀ' => 'Ꮀ', 'ꮁ' => 'Ꮁ', 'ꮂ' => 'Ꮂ', 'ꮃ' => 'Ꮃ', 'ꮄ' => 'Ꮄ', 'ꮅ' => 'Ꮅ', 'ꮆ' => 'Ꮆ', 'ꮇ' => 'Ꮇ', 'ꮈ' => 'Ꮈ', 'ꮉ' => 'Ꮉ', 'ꮊ' => 'Ꮊ', 'ꮋ' => 'Ꮋ', 'ꮌ' => 'Ꮌ', 'ꮍ' => 'Ꮍ', 'ꮎ' => 'Ꮎ', 'ꮏ' => 'Ꮏ', 'ꮐ' => 'Ꮐ', 'ꮑ' => 'Ꮑ', 'ꮒ' => 'Ꮒ', 'ꮓ' => 'Ꮓ', 'ꮔ' => 'Ꮔ', 'ꮕ' => 'Ꮕ', 'ꮖ' => 'Ꮖ', 'ꮗ' => 'Ꮗ', 'ꮘ' => 'Ꮘ', 'ꮙ' => 'Ꮙ', 'ꮚ' => 'Ꮚ', 'ꮛ' => 'Ꮛ', 'ꮜ' => 'Ꮜ', 'ꮝ' => 'Ꮝ', 'ꮞ' => 'Ꮞ', 'ꮟ' => 'Ꮟ', 'ꮠ' => 'Ꮠ', 'ꮡ' => 'Ꮡ', 'ꮢ' => 'Ꮢ', 'ꮣ' => 'Ꮣ', 'ꮤ' => 'Ꮤ', 'ꮥ' => 'Ꮥ', 'ꮦ' => 'Ꮦ', 'ꮧ' => 'Ꮧ', 'ꮨ' => 'Ꮨ', 'ꮩ' => 'Ꮩ', 'ꮪ' => 'Ꮪ', 'ꮫ' => 'Ꮫ', 'ꮬ' => 'Ꮬ', 'ꮭ' => 'Ꮭ', 'ꮮ' => 'Ꮮ', 'ꮯ' => 'Ꮯ', 'ꮰ' => 'Ꮰ', 'ꮱ' => 'Ꮱ', 'ꮲ' => 'Ꮲ', 'ꮳ' => 'Ꮳ', 'ꮴ' => 'Ꮴ', 'ꮵ' => 'Ꮵ', 'ꮶ' => 'Ꮶ', 'ꮷ' => 'Ꮷ', 'ꮸ' => 'Ꮸ', 'ꮹ' => 'Ꮹ', 'ꮺ' => 'Ꮺ', 'ꮻ' => 'Ꮻ', 'ꮼ' => 'Ꮼ', 'ꮽ' => 'Ꮽ', 'ꮾ' => 'Ꮾ', 'ꮿ' => 'Ꮿ', 'a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D', 'e' => 'E', 'f' => 'F', 'g' => 'G', 'h' => 'H', 'i' => 'I', 'j' => 'J', 'k' => 'K', 'l' => 'L', 'm' => 'M', 'n' => 'N', 'o' => 'O', 'p' => 'P', 'q' => 'Q', 'r' => 'R', 's' => 'S', 't' => 'T', 'u' => 'U', 'v' => 'V', 'w' => 'W', 'x' => 'X', 'y' => 'Y', 'z' => 'Z', '𐐨' => '𐐀', '𐐩' => '𐐁', '𐐪' => '𐐂', '𐐫' => '𐐃', '𐐬' => '𐐄', '𐐭' => '𐐅', '𐐮' => '𐐆', '𐐯' => '𐐇', '𐐰' => '𐐈', '𐐱' => '𐐉', '𐐲' => '𐐊', '𐐳' => '𐐋', '𐐴' => '𐐌', '𐐵' => '𐐍', '𐐶' => '𐐎', '𐐷' => '𐐏', '𐐸' => '𐐐', '𐐹' => '𐐑', '𐐺' => '𐐒', '𐐻' => '𐐓', '𐐼' => '𐐔', '𐐽' => '𐐕', '𐐾' => '𐐖', '𐐿' => '𐐗', '𐑀' => '𐐘', '𐑁' => '𐐙', '𐑂' => '𐐚', '𐑃' => '𐐛', '𐑄' => '𐐜', '𐑅' => '𐐝', '𐑆' => '𐐞', '𐑇' => '𐐟', '𐑈' => '𐐠', '𐑉' => '𐐡', '𐑊' => '𐐢', '𐑋' => '𐐣', '𐑌' => '𐐤', '𐑍' => '𐐥', '𐑎' => '𐐦', '𐑏' => '𐐧', '𐓘' => '𐒰', '𐓙' => '𐒱', '𐓚' => '𐒲', '𐓛' => '𐒳', '𐓜' => '𐒴', '𐓝' => '𐒵', '𐓞' => '𐒶', '𐓟' => '𐒷', '𐓠' => '𐒸', '𐓡' => '𐒹', '𐓢' => '𐒺', '𐓣' => '𐒻', '𐓤' => '𐒼', '𐓥' => '𐒽', '𐓦' => '𐒾', '𐓧' => '𐒿', '𐓨' => '𐓀', '𐓩' => '𐓁', '𐓪' => '𐓂', '𐓫' => '𐓃', '𐓬' => '𐓄', '𐓭' => '𐓅', '𐓮' => '𐓆', '𐓯' => '𐓇', '𐓰' => '𐓈', '𐓱' => '𐓉', '𐓲' => '𐓊', '𐓳' => '𐓋', '𐓴' => '𐓌', '𐓵' => '𐓍', '𐓶' => '𐓎', '𐓷' => '𐓏', '𐓸' => '𐓐', '𐓹' => '𐓑', '𐓺' => '𐓒', '𐓻' => '𐓓', '𐳀' => '𐲀', '𐳁' => '𐲁', '𐳂' => '𐲂', '𐳃' => '𐲃', '𐳄' => '𐲄', '𐳅' => '𐲅', '𐳆' => '𐲆', '𐳇' => '𐲇', '𐳈' => '𐲈', '𐳉' => '𐲉', '𐳊' => '𐲊', '𐳋' => '𐲋', '𐳌' => '𐲌', '𐳍' => '𐲍', '𐳎' => '𐲎', '𐳏' => '𐲏', '𐳐' => '𐲐', '𐳑' => '𐲑', '𐳒' => '𐲒', '𐳓' => '𐲓', '𐳔' => '𐲔', '𐳕' => '𐲕', '𐳖' => '𐲖', '𐳗' => '𐲗', '𐳘' => '𐲘', '𐳙' => '𐲙', '𐳚' => '𐲚', '𐳛' => '𐲛', '𐳜' => '𐲜', '𐳝' => '𐲝', '𐳞' => '𐲞', '𐳟' => '𐲟', '𐳠' => '𐲠', '𐳡' => '𐲡', '𐳢' => '𐲢', '𐳣' => '𐲣', '𐳤' => '𐲤', '𐳥' => '𐲥', '𐳦' => '𐲦', '𐳧' => '𐲧', '𐳨' => '𐲨', '𐳩' => '𐲩', '𐳪' => '𐲪', '𐳫' => '𐲫', '𐳬' => '𐲬', '𐳭' => '𐲭', '𐳮' => '𐲮', '𐳯' => '𐲯', '𐳰' => '𐲰', '𐳱' => '𐲱', '𐳲' => '𐲲', '𑣀' => '𑢠', '𑣁' => '𑢡', '𑣂' => '𑢢', '𑣃' => '𑢣', '𑣄' => '𑢤', '𑣅' => '𑢥', '𑣆' => '𑢦', '𑣇' => '𑢧', '𑣈' => '𑢨', '𑣉' => '𑢩', '𑣊' => '𑢪', '𑣋' => '𑢫', '𑣌' => '𑢬', '𑣍' => '𑢭', '𑣎' => '𑢮', '𑣏' => '𑢯', '𑣐' => '𑢰', '𑣑' => '𑢱', '𑣒' => '𑢲', '𑣓' => '𑢳', '𑣔' => '𑢴', '𑣕' => '𑢵', '𑣖' => '𑢶', '𑣗' => '𑢷', '𑣘' => '𑢸', '𑣙' => '𑢹', '𑣚' => '𑢺', '𑣛' => '𑢻', '𑣜' => '𑢼', '𑣝' => '𑢽', '𑣞' => '𑢾', '𑣟' => '𑢿', '𖹠' => '𖹀', '𖹡' => '𖹁', '𖹢' => '𖹂', '𖹣' => '𖹃', '𖹤' => '𖹄', '𖹥' => '𖹅', '𖹦' => '𖹆', '𖹧' => '𖹇', '𖹨' => '𖹈', '𖹩' => '𖹉', '𖹪' => '𖹊', '𖹫' => '𖹋', '𖹬' => '𖹌', '𖹭' => '𖹍', '𖹮' => '𖹎', '𖹯' => '𖹏', '𖹰' => '𖹐', '𖹱' => '𖹑', '𖹲' => '𖹒', '𖹳' => '𖹓', '𖹴' => '𖹔', '𖹵' => '𖹕', '𖹶' => '𖹖', '𖹷' => '𖹗', '𖹸' => '𖹘', '𖹹' => '𖹙', '𖹺' => '𖹚', '𖹻' => '𖹛', '𖹼' => '𖹜', '𖹽' => '𖹝', '𖹾' => '𖹞', '𖹿' => '𖹟', '𞤢' => '𞤀', '𞤣' => '𞤁', '𞤤' => '𞤂', '𞤥' => '𞤃', '𞤦' => '𞤄', '𞤧' => '𞤅', '𞤨' => '𞤆', '𞤩' => '𞤇', '𞤪' => '𞤈', '𞤫' => '𞤉', '𞤬' => '𞤊', '𞤭' => '𞤋', '𞤮' => '𞤌', '𞤯' => '𞤍', '𞤰' => '𞤎', '𞤱' => '𞤏', '𞤲' => '𞤐', '𞤳' => '𞤑', '𞤴' => '𞤒', '𞤵' => '𞤓', '𞤶' => '𞤔', '𞤷' => '𞤕', '𞤸' => '𞤖', '𞤹' => '𞤗', '𞤺' => '𞤘', '𞤻' => '𞤙', '𞤼' => '𞤚', '𞤽' => '𞤛', '𞤾' => '𞤜', '𞤿' => '𞤝', '𞥀' => '𞤞', '𞥁' => '𞤟', '𞥂' => '𞤠', '𞥃' => '𞤡', 'ß' => 'SS', 'ff' => 'FF', 'fi' => 'FI', 'fl' => 'FL', 'ffi' => 'FFI', 'ffl' => 'FFL', 'ſt' => 'ST', 'st' => 'ST', 'և' => 'ԵՒ', 'ﬓ' => 'ՄՆ', 'ﬔ' => 'ՄԵ', 'ﬕ' => 'ՄԻ', 'ﬖ' => 'ՎՆ', 'ﬗ' => 'ՄԽ', 'ʼn' => 'ʼN', 'ΐ' => 'Ϊ́', 'ΰ' => 'Ϋ́', 'ǰ' => 'J̌', 'ẖ' => 'H̱', 'ẗ' => 'T̈', 'ẘ' => 'W̊', 'ẙ' => 'Y̊', 'ẚ' => 'Aʾ', 'ὐ' => 'Υ̓', 'ὒ' => 'Υ̓̀', 'ὔ' => 'Υ̓́', 'ὖ' => 'Υ̓͂', 'ᾶ' => 'Α͂', 'ῆ' => 'Η͂', 'ῒ' => 'Ϊ̀', 'ΐ' => 'Ϊ́', 'ῖ' => 'Ι͂', 'ῗ' => 'Ϊ͂', 'ῢ' => 'Ϋ̀', 'ΰ' => 'Ϋ́', 'ῤ' => 'Ρ̓', 'ῦ' => 'Υ͂', 'ῧ' => 'Ϋ͂', 'ῶ' => 'Ω͂', 'ᾈ' => 'ἈΙ', 'ᾉ' => 'ἉΙ', 'ᾊ' => 'ἊΙ', 'ᾋ' => 'ἋΙ', 'ᾌ' => 'ἌΙ', 'ᾍ' => 'ἍΙ', 'ᾎ' => 'ἎΙ', 'ᾏ' => 'ἏΙ', 'ᾘ' => 'ἨΙ', 'ᾙ' => 'ἩΙ', 'ᾚ' => 'ἪΙ', 'ᾛ' => 'ἫΙ', 'ᾜ' => 'ἬΙ', 'ᾝ' => 'ἭΙ', 'ᾞ' => 'ἮΙ', 'ᾟ' => 'ἯΙ', 'ᾨ' => 'ὨΙ', 'ᾩ' => 'ὩΙ', 'ᾪ' => 'ὪΙ', 'ᾫ' => 'ὫΙ', 'ᾬ' => 'ὬΙ', 'ᾭ' => 'ὭΙ', 'ᾮ' => 'ὮΙ', 'ᾯ' => 'ὯΙ', 'ᾼ' => 'ΑΙ', 'ῌ' => 'ΗΙ', 'ῼ' => 'ΩΙ', 'ᾲ' => 'ᾺΙ', 'ᾴ' => 'ΆΙ', 'ῂ' => 'ῊΙ', 'ῄ' => 'ΉΙ', 'ῲ' => 'ῺΙ', 'ῴ' => 'ΏΙ', 'ᾷ' => 'Α͂Ι', 'ῇ' => 'Η͂Ι', 'ῷ' => 'Ω͂Ι'); vendor_prefixed/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php 0000644 00000003660 15174671617 0023462 0 ustar 00 <?php namespace WPMailSMTP\Vendor; return ['İ' => 'i̇', 'µ' => 'μ', 'ſ' => 's', 'ͅ' => 'ι', 'ς' => 'σ', 'ϐ' => 'β', 'ϑ' => 'θ', 'ϕ' => 'φ', 'ϖ' => 'π', 'ϰ' => 'κ', 'ϱ' => 'ρ', 'ϵ' => 'ε', 'ẛ' => 'ṡ', 'ι' => 'ι', 'ß' => 'ss', 'ʼn' => 'ʼn', 'ǰ' => 'ǰ', 'ΐ' => 'ΐ', 'ΰ' => 'ΰ', 'և' => 'եւ', 'ẖ' => 'ẖ', 'ẗ' => 'ẗ', 'ẘ' => 'ẘ', 'ẙ' => 'ẙ', 'ẚ' => 'aʾ', 'ẞ' => 'ss', 'ὐ' => 'ὐ', 'ὒ' => 'ὒ', 'ὔ' => 'ὔ', 'ὖ' => 'ὖ', 'ᾀ' => 'ἀι', 'ᾁ' => 'ἁι', 'ᾂ' => 'ἂι', 'ᾃ' => 'ἃι', 'ᾄ' => 'ἄι', 'ᾅ' => 'ἅι', 'ᾆ' => 'ἆι', 'ᾇ' => 'ἇι', 'ᾈ' => 'ἀι', 'ᾉ' => 'ἁι', 'ᾊ' => 'ἂι', 'ᾋ' => 'ἃι', 'ᾌ' => 'ἄι', 'ᾍ' => 'ἅι', 'ᾎ' => 'ἆι', 'ᾏ' => 'ἇι', 'ᾐ' => 'ἠι', 'ᾑ' => 'ἡι', 'ᾒ' => 'ἢι', 'ᾓ' => 'ἣι', 'ᾔ' => 'ἤι', 'ᾕ' => 'ἥι', 'ᾖ' => 'ἦι', 'ᾗ' => 'ἧι', 'ᾘ' => 'ἠι', 'ᾙ' => 'ἡι', 'ᾚ' => 'ἢι', 'ᾛ' => 'ἣι', 'ᾜ' => 'ἤι', 'ᾝ' => 'ἥι', 'ᾞ' => 'ἦι', 'ᾟ' => 'ἧι', 'ᾠ' => 'ὠι', 'ᾡ' => 'ὡι', 'ᾢ' => 'ὢι', 'ᾣ' => 'ὣι', 'ᾤ' => 'ὤι', 'ᾥ' => 'ὥι', 'ᾦ' => 'ὦι', 'ᾧ' => 'ὧι', 'ᾨ' => 'ὠι', 'ᾩ' => 'ὡι', 'ᾪ' => 'ὢι', 'ᾫ' => 'ὣι', 'ᾬ' => 'ὤι', 'ᾭ' => 'ὥι', 'ᾮ' => 'ὦι', 'ᾯ' => 'ὧι', 'ᾲ' => 'ὰι', 'ᾳ' => 'αι', 'ᾴ' => 'άι', 'ᾶ' => 'ᾶ', 'ᾷ' => 'ᾶι', 'ᾼ' => 'αι', 'ῂ' => 'ὴι', 'ῃ' => 'ηι', 'ῄ' => 'ήι', 'ῆ' => 'ῆ', 'ῇ' => 'ῆι', 'ῌ' => 'ηι', 'ῒ' => 'ῒ', 'ῖ' => 'ῖ', 'ῗ' => 'ῗ', 'ῢ' => 'ῢ', 'ῤ' => 'ῤ', 'ῦ' => 'ῦ', 'ῧ' => 'ῧ', 'ῲ' => 'ὼι', 'ῳ' => 'ωι', 'ῴ' => 'ώι', 'ῶ' => 'ῶ', 'ῷ' => 'ῶι', 'ῼ' => 'ωι', 'ff' => 'ff', 'fi' => 'fi', 'fl' => 'fl', 'ffi' => 'ffi', 'ffl' => 'ffl', 'ſt' => 'st', 'st' => 'st', 'ﬓ' => 'մն', 'ﬔ' => 'մե', 'ﬕ' => 'մի', 'ﬖ' => 'վն', 'ﬗ' => 'մխ']; vendor_prefixed/symfony/polyfill-mbstring/bootstrap80.php 0000644 00000023442 15174671617 0020032 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use WPMailSMTP\Vendor\Symfony\Polyfill\Mbstring as p; if (!function_exists('mb_convert_encoding')) { function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } } if (!function_exists('mb_decode_mimeheader')) { function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } } if (!function_exists('mb_encode_mimeheader')) { function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } } if (!function_exists('mb_decode_numericentity')) { function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } } if (!function_exists('mb_encode_numericentity')) { function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } } if (!function_exists('mb_convert_case')) { function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } } if (!function_exists('mb_internal_encoding')) { function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } } if (!function_exists('mb_language')) { function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } } if (!function_exists('mb_list_encodings')) { function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } } if (!function_exists('mb_encoding_aliases')) { function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } } if (!function_exists('mb_check_encoding')) { function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } } if (!function_exists('mb_detect_encoding')) { function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } } if (!function_exists('mb_detect_order')) { function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } } if (!function_exists('mb_parse_str')) { function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } } if (!function_exists('mb_strlen')) { function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } } if (!function_exists('mb_strpos')) { function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } } if (!function_exists('mb_strtolower')) { function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } } if (!function_exists('mb_strtoupper')) { function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } } if (!function_exists('mb_substitute_character')) { function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } } if (!function_exists('mb_substr')) { function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } } if (!function_exists('mb_stripos')) { function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } } if (!function_exists('mb_stristr')) { function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } } if (!function_exists('mb_strrchr')) { function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } } if (!function_exists('mb_strrichr')) { function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } } if (!function_exists('mb_strripos')) { function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } } if (!function_exists('mb_strrpos')) { function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } } if (!function_exists('mb_strstr')) { function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } } if (!function_exists('mb_get_info')) { function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); } } if (!function_exists('mb_http_output')) { function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } } if (!function_exists('mb_strwidth')) { function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } } if (!function_exists('mb_substr_count')) { function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } } if (!function_exists('mb_output_handler')) { function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } } if (!function_exists('mb_http_input')) { function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } } if (!function_exists('mb_convert_variables')) { function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } } if (!function_exists('mb_ord')) { function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } } if (!function_exists('mb_chr')) { function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } } if (!function_exists('mb_scrub')) { function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } } if (!function_exists('mb_str_split')) { function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } } if (!function_exists('mb_str_pad')) { function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } } if (!function_exists('mb_ucfirst')) { function mb_ucfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_ucfirst($string, $encoding); } } if (!function_exists('mb_lcfirst')) { function mb_lcfirst($string, ?string $encoding = null): string { return p\Mbstring::mb_lcfirst($string, $encoding); } } if (!function_exists('mb_trim')) { function mb_trim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_trim($string, $characters, $encoding); } } if (!function_exists('mb_ltrim')) { function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_ltrim($string, $characters, $encoding); } } if (!function_exists('mb_rtrim')) { function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null): string { return p\Mbstring::mb_rtrim($string, $characters, $encoding); } } if (extension_loaded('mbstring')) { return; } if (!defined('MB_CASE_UPPER')) { define('MB_CASE_UPPER', 0); } if (!defined('MB_CASE_LOWER')) { define('MB_CASE_LOWER', 1); } if (!defined('MB_CASE_TITLE')) { define('MB_CASE_TITLE', 2); } vendor_prefixed/symfony/polyfill-mbstring/Mbstring.php 0000644 00000105704 15174671617 0017434 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace WPMailSMTP\Vendor\Symfony\Polyfill\Mbstring; /** * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. * * Implemented: * - mb_chr - Returns a specific character from its Unicode code point * - mb_convert_encoding - Convert character encoding * - mb_convert_variables - Convert character code in variable(s) * - mb_decode_mimeheader - Decode string in MIME header field * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED * - mb_decode_numericentity - Decode HTML numeric string reference to character * - mb_encode_numericentity - Encode character to HTML numeric string reference * - mb_convert_case - Perform case folding on a string * - mb_detect_encoding - Detect character encoding * - mb_get_info - Get internal settings of mbstring * - mb_http_input - Detect HTTP input character encoding * - mb_http_output - Set/Get HTTP output character encoding * - mb_internal_encoding - Set/Get internal character encoding * - mb_list_encodings - Returns an array of all supported encodings * - mb_ord - Returns the Unicode code point of a character * - mb_output_handler - Callback function converts character encoding in output buffer * - mb_scrub - Replaces ill-formed byte sequences with substitute characters * - mb_strlen - Get string length * - mb_strpos - Find position of first occurrence of string in a string * - mb_strrpos - Find position of last occurrence of a string in a string * - mb_str_split - Convert a string to an array * - mb_strtolower - Make a string lowercase * - mb_strtoupper - Make a string uppercase * - mb_substitute_character - Set/Get substitution character * - mb_substr - Get part of string * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive * - mb_stristr - Finds first occurrence of a string within another, case insensitive * - mb_strrchr - Finds the last occurrence of a character in a string within another * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive * - mb_strstr - Finds first occurrence of a string within another * - mb_strwidth - Return width of string * - mb_substr_count - Count the number of substring occurrences * - mb_ucfirst - Make a string's first character uppercase * - mb_lcfirst - Make a string's first character lowercase * - mb_trim - Strip whitespace (or other characters) from the beginning and end of a string * - mb_ltrim - Strip whitespace (or other characters) from the beginning of a string * - mb_rtrim - Strip whitespace (or other characters) from the end of a string * * Not implemented: * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) * - mb_ereg_* - Regular expression with multibyte support * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable * - mb_preferred_mime_name - Get MIME charset string * - mb_regex_encoding - Returns current encoding for multibyte regex as string * - mb_regex_set_options - Set/Get the default options for mbregex functions * - mb_send_mail - Send encoded mail * - mb_split - Split multibyte string using regular expression * - mb_strcut - Get part of string * - mb_strimwidth - Get truncated string with specified width * * @author Nicolas Grekas <p@tchwork.com> * * @internal */ final class Mbstring { public const MB_CASE_FOLD = \PHP_INT_MAX; private const SIMPLE_CASE_FOLD = [['µ', 'ſ', "ͅ", 'ς', "ϐ", "ϑ", "ϕ", "ϖ", "ϰ", "ϱ", "ϵ", "ẛ", "ι"], ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "ṡ", 'ι']]; private static $encodingList = ['ASCII', 'UTF-8']; private static $language = 'neutral'; private static $internalEncoding = 'UTF-8'; public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) { if (\is_array($s)) { $r = []; foreach ($s as $str) { $r[] = self::mb_convert_encoding($str, $toEncoding, $fromEncoding); } return $r; } if (\is_array($fromEncoding) || null !== $fromEncoding && \false !== \strpos($fromEncoding, ',')) { $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); } else { $fromEncoding = self::getEncoding($fromEncoding); } $toEncoding = self::getEncoding($toEncoding); if ('BASE64' === $fromEncoding) { $s = \base64_decode($s); $fromEncoding = $toEncoding; } if ('BASE64' === $toEncoding) { return \base64_encode($s); } if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { $fromEncoding = 'Windows-1252'; } if ('UTF-8' !== $fromEncoding) { $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s); } return \preg_replace_callback('/[\\x80-\\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); } if ('HTML-ENTITIES' === $fromEncoding) { $s = \html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); $fromEncoding = 'UTF-8'; } return \iconv($fromEncoding, $toEncoding . '//IGNORE', $s); } public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) { $ok = \true; \array_walk_recursive($vars, function (&$v) use(&$ok, $toEncoding, $fromEncoding) { if (\false === ($v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding))) { $ok = \false; } }); return $ok ? $fromEncoding : \false; } public static function mb_decode_mimeheader($s) { return \iconv_mime_decode($s, 2, self::$internalEncoding); } public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) { \trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); } public static function mb_decode_numericentity($s, $convmap, $encoding = null) { if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { \trigger_error('mb_decode_numericentity() expects parameter 1 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); return null; } if (!\is_array($convmap) || 80000 > \PHP_VERSION_ID && !$convmap) { return \false; } if (null !== $encoding && !\is_scalar($encoding)) { \trigger_error('mb_decode_numericentity() expects parameter 3 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); return ''; // Instead of null (cf. mb_encode_numericentity). } $s = (string) $s; if ('' === $s) { return ''; } $encoding = self::getEncoding($encoding); if ('UTF-8' === $encoding) { $encoding = null; if (!\preg_match('//u', $s)) { $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); } } else { $s = \iconv($encoding, 'UTF-8//IGNORE', $s); } $cnt = \floor(\count($convmap) / 4) * 4; for ($i = 0; $i < $cnt; $i += 4) { // collector_decode_htmlnumericentity ignores $convmap[$i + 3] $convmap[$i] += $convmap[$i + 2]; $convmap[$i + 1] += $convmap[$i + 2]; } $s = \preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use($cnt, $convmap) { $c = isset($m[2]) ? (int) \hexdec($m[2]) : $m[1]; for ($i = 0; $i < $cnt; $i += 4) { if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { return self::mb_chr($c - $convmap[$i + 2]); } } return $m[0]; }, $s); if (null === $encoding) { return $s; } return \iconv('UTF-8', $encoding . '//IGNORE', $s); } public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = \false) { if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { \trigger_error('mb_encode_numericentity() expects parameter 1 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); return null; } if (!\is_array($convmap) || 80000 > \PHP_VERSION_ID && !$convmap) { return \false; } if (null !== $encoding && !\is_scalar($encoding)) { \trigger_error('mb_encode_numericentity() expects parameter 3 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); return null; // Instead of '' (cf. mb_decode_numericentity). } if (null !== $is_hex && !\is_scalar($is_hex)) { \trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, ' . \gettype($s) . ' given', \E_USER_WARNING); return null; } $s = (string) $s; if ('' === $s) { return ''; } $encoding = self::getEncoding($encoding); if ('UTF-8' === $encoding) { $encoding = null; if (!\preg_match('//u', $s)) { $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); } } else { $s = \iconv($encoding, 'UTF-8//IGNORE', $s); } static $ulenMask = ["\xc0" => 2, "\xd0" => 2, "\xe0" => 3, "\xf0" => 4]; $cnt = \floor(\count($convmap) / 4) * 4; $i = 0; $len = \strlen($s); $result = ''; while ($i < $len) { $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xf0"]; $uchr = \substr($s, $i, $ulen); $i += $ulen; $c = self::mb_ord($uchr); for ($j = 0; $j < $cnt; $j += 4) { if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { $cOffset = $c + $convmap[$j + 2] & $convmap[$j + 3]; $result .= $is_hex ? \sprintf('&#x%X;', $cOffset) : '&#' . $cOffset . ';'; continue 2; } } $result .= $uchr; } if (null === $encoding) { return $result; } return \iconv('UTF-8', $encoding . '//IGNORE', $result); } public static function mb_convert_case($s, $mode, $encoding = null) { $s = (string) $s; if ('' === $s) { return ''; } $encoding = self::getEncoding($encoding); if ('UTF-8' === $encoding) { $encoding = null; if (!\preg_match('//u', $s)) { $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s); } } else { $s = \iconv($encoding, 'UTF-8//IGNORE', $s); } if (\MB_CASE_TITLE == $mode) { static $titleRegexp = null; if (null === $titleRegexp) { $titleRegexp = self::getData('titleCaseRegexp'); } $s = \preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); } else { if (\MB_CASE_UPPER == $mode) { static $upper = null; if (null === $upper) { $upper = self::getData('upperCase'); } $map = $upper; } else { if (self::MB_CASE_FOLD === $mode) { static $caseFolding = null; if (null === $caseFolding) { $caseFolding = self::getData('caseFolding'); } $s = \strtr($s, $caseFolding); } static $lower = null; if (null === $lower) { $lower = self::getData('lowerCase'); } $map = $lower; } static $ulenMask = ["\xc0" => 2, "\xd0" => 2, "\xe0" => 3, "\xf0" => 4]; $i = 0; $len = \strlen($s); while ($i < $len) { $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xf0"]; $uchr = \substr($s, $i, $ulen); $i += $ulen; if (isset($map[$uchr])) { $uchr = $map[$uchr]; $nlen = \strlen($uchr); if ($nlen == $ulen) { $nlen = $i; do { $s[--$nlen] = $uchr[--$ulen]; } while ($ulen); } else { $s = \substr_replace($s, $uchr, $i - $ulen, $ulen); $len += $nlen - $ulen; $i += $nlen - $ulen; } } } } if (null === $encoding) { return $s; } return \iconv('UTF-8', $encoding . '//IGNORE', $s); } public static function mb_internal_encoding($encoding = null) { if (null === $encoding) { return self::$internalEncoding; } $normalizedEncoding = self::getEncoding($encoding); if ('UTF-8' === $normalizedEncoding || \false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) { self::$internalEncoding = $normalizedEncoding; return \true; } if (80000 > \PHP_VERSION_ID) { return \false; } throw new \ValueError(\sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); } public static function mb_language($lang = null) { if (null === $lang) { return self::$language; } switch ($normalizedLang = \strtolower($lang)) { case 'uni': case 'neutral': self::$language = $normalizedLang; return \true; } if (80000 > \PHP_VERSION_ID) { return \false; } throw new \ValueError(\sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); } public static function mb_list_encodings() { return ['UTF-8']; } public static function mb_encoding_aliases($encoding) { switch (\strtoupper($encoding)) { case 'UTF8': case 'UTF-8': return ['utf8']; } return \false; } public static function mb_check_encoding($var = null, $encoding = null) { if (null === $encoding) { if (null === $var) { return \false; } $encoding = self::$internalEncoding; } if (!\is_array($var)) { return self::mb_detect_encoding($var, [$encoding]) || \false !== @\iconv($encoding, $encoding, $var); } foreach ($var as $key => $value) { if (!self::mb_check_encoding($key, $encoding)) { return \false; } if (!self::mb_check_encoding($value, $encoding)) { return \false; } } return \true; } public static function mb_detect_encoding($str, $encodingList = null, $strict = \false) { if (null === $encodingList) { $encodingList = self::$encodingList; } else { if (!\is_array($encodingList)) { $encodingList = \array_map('trim', \explode(',', $encodingList)); } $encodingList = \array_map('strtoupper', $encodingList); } foreach ($encodingList as $enc) { switch ($enc) { case 'ASCII': if (!\preg_match('/[\\x80-\\xFF]/', $str)) { return $enc; } break; case 'UTF8': case 'UTF-8': if (\preg_match('//u', $str)) { return 'UTF-8'; } break; default: if (0 === \strncmp($enc, 'ISO-8859-', 9)) { return $enc; } } } return \false; } public static function mb_detect_order($encodingList = null) { if (null === $encodingList) { return self::$encodingList; } if (!\is_array($encodingList)) { $encodingList = \array_map('trim', \explode(',', $encodingList)); } $encodingList = \array_map('strtoupper', $encodingList); foreach ($encodingList as $enc) { switch ($enc) { default: if (\strncmp($enc, 'ISO-8859-', 9)) { return \false; } // no break case 'ASCII': case 'UTF8': case 'UTF-8': } } self::$encodingList = $encodingList; return \true; } public static function mb_strlen($s, $encoding = null) { $encoding = self::getEncoding($encoding); if ('CP850' === $encoding || 'ASCII' === $encoding) { return \strlen($s); } return @\iconv_strlen($s, $encoding); } public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { $encoding = self::getEncoding($encoding); if ('CP850' === $encoding || 'ASCII' === $encoding) { return \strpos($haystack, $needle, $offset); } $needle = (string) $needle; if ('' === $needle) { if (80000 > \PHP_VERSION_ID) { \trigger_error(__METHOD__ . ': Empty delimiter', \E_USER_WARNING); return \false; } return 0; } return \iconv_strpos($haystack, $needle, $offset, $encoding); } public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { $encoding = self::getEncoding($encoding); if ('CP850' === $encoding || 'ASCII' === $encoding) { return \strrpos($haystack, $needle, $offset); } if ($offset != (int) $offset) { $offset = 0; } elseif ($offset = (int) $offset) { if ($offset < 0) { if (0 > ($offset += self::mb_strlen($needle))) { $haystack = self::mb_substr($haystack, 0, $offset, $encoding); } $offset = 0; } else { $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); } } $pos = '' !== $needle || 80000 > \PHP_VERSION_ID ? \iconv_strrpos($haystack, $needle, $encoding) : self::mb_strlen($haystack, $encoding); return \false !== $pos ? $offset + $pos : \false; } public static function mb_str_split($string, $split_length = 1, $encoding = null) { if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) { \trigger_error('mb_str_split() expects parameter 1 to be string, ' . \gettype($string) . ' given', \E_USER_WARNING); return null; } if (1 > ($split_length = (int) $split_length)) { if (80000 > \PHP_VERSION_ID) { \trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); return \false; } throw new \ValueError('Argument #2 ($length) must be greater than 0'); } if (null === $encoding) { $encoding = \mb_internal_encoding(); } if ('UTF-8' === ($encoding = self::getEncoding($encoding))) { $rx = '/('; while (65535 < $split_length) { $rx .= '.{65535}'; $split_length -= 65535; } $rx .= '.{' . $split_length . '})/us'; return \preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); } $result = []; $length = \mb_strlen($string, $encoding); for ($i = 0; $i < $length; $i += $split_length) { $result[] = \mb_substr($string, $i, $split_length, $encoding); } return $result; } public static function mb_strtolower($s, $encoding = null) { return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); } public static function mb_strtoupper($s, $encoding = null) { return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); } public static function mb_substitute_character($c = null) { if (null === $c) { return 'none'; } if (0 === \strcasecmp($c, 'none')) { return \true; } if (80000 > \PHP_VERSION_ID) { return \false; } if (\is_int($c) || 'long' === $c || 'entity' === $c) { return \false; } throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); } public static function mb_substr($s, $start, $length = null, $encoding = null) { $encoding = self::getEncoding($encoding); if ('CP850' === $encoding || 'ASCII' === $encoding) { return (string) \substr($s, $start, null === $length ? 2147483647 : $length); } if ($start < 0) { $start = \iconv_strlen($s, $encoding) + $start; if ($start < 0) { $start = 0; } } if (null === $length) { $length = 2147483647; } elseif ($length < 0) { $length = \iconv_strlen($s, $encoding) + $length - $start; if ($length < 0) { return ''; } } return (string) \iconv_substr($s, $start, $length, $encoding); } public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { [$haystack, $needle] = \str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding), self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding)]); return self::mb_strpos($haystack, $needle, $offset, $encoding); } public static function mb_stristr($haystack, $needle, $part = \false, $encoding = null) { $pos = self::mb_stripos($haystack, $needle, 0, $encoding); return self::getSubpart($pos, $part, $haystack, $encoding); } public static function mb_strrchr($haystack, $needle, $part = \false, $encoding = null) { $encoding = self::getEncoding($encoding); if ('CP850' === $encoding || 'ASCII' === $encoding) { $pos = \strrpos($haystack, $needle); } else { $needle = self::mb_substr($needle, 0, 1, $encoding); $pos = \iconv_strrpos($haystack, $needle, $encoding); } return self::getSubpart($pos, $part, $haystack, $encoding); } public static function mb_strrichr($haystack, $needle, $part = \false, $encoding = null) { $needle = self::mb_substr($needle, 0, 1, $encoding); $pos = self::mb_strripos($haystack, $needle, $encoding); return self::getSubpart($pos, $part, $haystack, $encoding); } public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding); $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding); $haystack = \str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack); $needle = \str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle); return self::mb_strrpos($haystack, $needle, $offset, $encoding); } public static function mb_strstr($haystack, $needle, $part = \false, $encoding = null) { $pos = \strpos($haystack, $needle); if (\false === $pos) { return \false; } if ($part) { return \substr($haystack, 0, $pos); } return \substr($haystack, $pos); } public static function mb_get_info($type = 'all') { $info = ['internal_encoding' => self::$internalEncoding, 'http_output' => 'pass', 'http_output_conv_mimetypes' => '^(text/|application/xhtml\\+xml)', 'func_overload' => 0, 'func_overload_list' => 'no overload', 'mail_charset' => 'UTF-8', 'mail_header_encoding' => 'BASE64', 'mail_body_encoding' => 'BASE64', 'illegal_chars' => 0, 'encoding_translation' => 'Off', 'language' => self::$language, 'detect_order' => self::$encodingList, 'substitute_character' => 'none', 'strict_detection' => 'Off']; if ('all' === $type) { return $info; } if (isset($info[$type])) { return $info[$type]; } return \false; } public static function mb_http_input($type = '') { return \false; } public static function mb_http_output($encoding = null) { return null !== $encoding ? 'pass' === $encoding : 'pass'; } public static function mb_strwidth($s, $encoding = null) { $encoding = self::getEncoding($encoding); if ('UTF-8' !== $encoding) { $s = \iconv($encoding, 'UTF-8//IGNORE', $s); } $s = \preg_replace('/[\\x{1100}-\\x{115F}\\x{2329}\\x{232A}\\x{2E80}-\\x{303E}\\x{3040}-\\x{A4CF}\\x{AC00}-\\x{D7A3}\\x{F900}-\\x{FAFF}\\x{FE10}-\\x{FE19}\\x{FE30}-\\x{FE6F}\\x{FF00}-\\x{FF60}\\x{FFE0}-\\x{FFE6}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}]/u', '', $s, -1, $wide); return ($wide << 1) + \iconv_strlen($s, 'UTF-8'); } public static function mb_substr_count($haystack, $needle, $encoding = null) { return \substr_count($haystack, $needle); } public static function mb_output_handler($contents, $status) { return $contents; } public static function mb_chr($code, $encoding = null) { if (0x80 > ($code %= 0x200000)) { $s = \chr($code); } elseif (0x800 > $code) { $s = \chr(0xc0 | $code >> 6) . \chr(0x80 | $code & 0x3f); } elseif (0x10000 > $code) { $s = \chr(0xe0 | $code >> 12) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f); } else { $s = \chr(0xf0 | $code >> 18) . \chr(0x80 | $code >> 12 & 0x3f) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f); } if ('UTF-8' !== ($encoding = self::getEncoding($encoding))) { $s = \mb_convert_encoding($s, $encoding, 'UTF-8'); } return $s; } public static function mb_ord($s, $encoding = null) { if ('UTF-8' !== ($encoding = self::getEncoding($encoding))) { $s = \mb_convert_encoding($s, 'UTF-8', $encoding); } if (1 === \strlen($s)) { return \ord($s); } $code = ($s = \unpack('C*', \substr($s, 0, 4))) ? $s[1] : 0; if (0xf0 <= $code) { return ($code - 0xf0 << 18) + ($s[2] - 0x80 << 12) + ($s[3] - 0x80 << 6) + $s[4] - 0x80; } if (0xe0 <= $code) { return ($code - 0xe0 << 12) + ($s[2] - 0x80 << 6) + $s[3] - 0x80; } if (0xc0 <= $code) { return ($code - 0xc0 << 6) + $s[2] - 0x80; } return $code; } public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, ?string $encoding = null) : string { if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], \true)) { throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); } if (null === $encoding) { $encoding = self::mb_internal_encoding(); } else { self::assertEncoding($encoding, 'mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given'); } if (self::mb_strlen($pad_string, $encoding) <= 0) { throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); } $paddingRequired = $length - self::mb_strlen($string, $encoding); if ($paddingRequired < 1) { return $string; } switch ($pad_type) { case \STR_PAD_LEFT: return self::mb_substr(\str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding) . $string; case \STR_PAD_RIGHT: return $string . self::mb_substr(\str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); default: $leftPaddingLength = \floor($paddingRequired / 2); $rightPaddingLength = $paddingRequired - $leftPaddingLength; return self::mb_substr(\str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding) . $string . self::mb_substr(\str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); } } public static function mb_ucfirst(string $string, ?string $encoding = null) : string { if (null === $encoding) { $encoding = self::mb_internal_encoding(); } else { self::assertEncoding($encoding, 'mb_ucfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); } $firstChar = \mb_substr($string, 0, 1, $encoding); $firstChar = \mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding); return $firstChar . \mb_substr($string, 1, null, $encoding); } public static function mb_lcfirst(string $string, ?string $encoding = null) : string { if (null === $encoding) { $encoding = self::mb_internal_encoding(); } else { self::assertEncoding($encoding, 'mb_lcfirst(): Argument #2 ($encoding) must be a valid encoding, "%s" given'); } $firstChar = \mb_substr($string, 0, 1, $encoding); $firstChar = \mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding); return $firstChar . \mb_substr($string, 1, null, $encoding); } private static function getSubpart($pos, $part, $haystack, $encoding) { if (\false === $pos) { return \false; } if ($part) { return self::mb_substr($haystack, 0, $pos, $encoding); } return self::mb_substr($haystack, $pos, null, $encoding); } private static function html_encoding_callback(array $m) { $i = 1; $entities = ''; $m = \unpack('C*', \htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); while (isset($m[$i])) { if (0x80 > $m[$i]) { $entities .= \chr($m[$i++]); continue; } if (0xf0 <= $m[$i]) { $c = ($m[$i++] - 0xf0 << 18) + ($m[$i++] - 0x80 << 12) + ($m[$i++] - 0x80 << 6) + $m[$i++] - 0x80; } elseif (0xe0 <= $m[$i]) { $c = ($m[$i++] - 0xe0 << 12) + ($m[$i++] - 0x80 << 6) + $m[$i++] - 0x80; } else { $c = ($m[$i++] - 0xc0 << 6) + $m[$i++] - 0x80; } $entities .= '&#' . $c . ';'; } return $entities; } private static function title_case(array $s) { return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8') . self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); } private static function getData($file) { if (\file_exists($file = __DIR__ . '/Resources/unidata/' . $file . '.php')) { return require $file; } return \false; } private static function getEncoding($encoding) { if (null === $encoding) { return self::$internalEncoding; } if ('UTF-8' === $encoding) { return 'UTF-8'; } $encoding = \strtoupper($encoding); if ('8BIT' === $encoding || 'BINARY' === $encoding) { return 'CP850'; } if ('UTF8' === $encoding) { return 'UTF-8'; } return $encoding; } public static function mb_trim(string $string, ?string $characters = null, ?string $encoding = null) : string { return self::mb_internal_trim('{^[%s]+|[%1$s]+$}Du', $string, $characters, $encoding, __FUNCTION__); } public static function mb_ltrim(string $string, ?string $characters = null, ?string $encoding = null) : string { return self::mb_internal_trim('{^[%s]+}Du', $string, $characters, $encoding, __FUNCTION__); } public static function mb_rtrim(string $string, ?string $characters = null, ?string $encoding = null) : string { return self::mb_internal_trim('{[%s]+$}D', $string, $characters, $encoding, __FUNCTION__); } private static function mb_internal_trim(string $regex, string $string, ?string $characters, ?string $encoding, string $function) : string { if (null === $encoding) { $encoding = self::mb_internal_encoding(); } else { self::assertEncoding($encoding, $function . '(): Argument #3 ($encoding) must be a valid encoding, "%s" given'); } if ('' === $characters) { return null === $encoding ? $string : self::mb_convert_encoding($string, $encoding); } if ('UTF-8' === $encoding) { $encoding = null; if (!\preg_match('//u', $string)) { $string = @\iconv('UTF-8', 'UTF-8//IGNORE', $string); } if (null !== $characters && !\preg_match('//u', $characters)) { $characters = @\iconv('UTF-8', 'UTF-8//IGNORE', $characters); } } else { $string = \iconv($encoding, 'UTF-8//IGNORE', $string); if (null !== $characters) { $characters = \iconv($encoding, 'UTF-8//IGNORE', $characters); } } if (null === $characters) { $characters = "\\0 \f\n\r\t\v "; } else { $characters = \preg_quote($characters); } $string = \preg_replace(\sprintf($regex, $characters), '', $string); if (null === $encoding) { return $string; } return \iconv('UTF-8', $encoding . '//IGNORE', $string); } private static function assertEncoding(string $encoding, string $errorFormat) : void { try { $validEncoding = @self::mb_check_encoding('', $encoding); } catch (\ValueError $e) { throw new \ValueError(\sprintf($errorFormat, $encoding)); } // BC for PHP 7.3 and lower if (!$validEncoding) { throw new \ValueError(\sprintf($errorFormat, $encoding)); } } } vendor_prefixed/google/apiclient-services/src/Gmail/SmimeInfo.php 0000644 00000005667 15174671617 0021250 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class SmimeInfo extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $encryptedKeyPassword; /** * @var string */ public $expiration; /** * @var string */ public $id; /** * @var bool */ public $isDefault; /** * @var string */ public $issuerCn; /** * @var string */ public $pem; /** * @var string */ public $pkcs12; /** * @param string */ public function setEncryptedKeyPassword($encryptedKeyPassword) { $this->encryptedKeyPassword = $encryptedKeyPassword; } /** * @return string */ public function getEncryptedKeyPassword() { return $this->encryptedKeyPassword; } /** * @param string */ public function setExpiration($expiration) { $this->expiration = $expiration; } /** * @return string */ public function getExpiration() { return $this->expiration; } /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } /** * @param bool */ public function setIsDefault($isDefault) { $this->isDefault = $isDefault; } /** * @return bool */ public function getIsDefault() { return $this->isDefault; } /** * @param string */ public function setIssuerCn($issuerCn) { $this->issuerCn = $issuerCn; } /** * @return string */ public function getIssuerCn() { return $this->issuerCn; } /** * @param string */ public function setPem($pem) { $this->pem = $pem; } /** * @return string */ public function getPem() { return $this->pem; } /** * @param string */ public function setPkcs12($pkcs12) { $this->pkcs12 = $pkcs12; } /** * @return string */ public function getPkcs12() { return $this->pkcs12; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(SmimeInfo::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_SmimeInfo'); vendor_prefixed/google/apiclient-services/src/Gmail/HistoryMessageAdded.php 0000644 00000002326 15174671617 0023237 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class HistoryMessageAdded extends \WPMailSMTP\Vendor\Google\Model { protected $messageType = Message::class; protected $messageDataType = ''; /** * @param Message */ public function setMessage(Message $message) { $this->message = $message; } /** * @return Message */ public function getMessage() { return $this->message; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(HistoryMessageAdded::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_HistoryMessageAdded'); vendor_prefixed/google/apiclient-services/src/Gmail/ListDraftsResponse.php 0000644 00000003672 15174671617 0023152 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListDraftsResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'drafts'; protected $draftsType = Draft::class; protected $draftsDataType = 'array'; /** * @var string */ public $nextPageToken; /** * @var string */ public $resultSizeEstimate; /** * @param Draft[] */ public function setDrafts($drafts) { $this->drafts = $drafts; } /** * @return Draft[] */ public function getDrafts() { return $this->drafts; } /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } /** * @param string */ public function setResultSizeEstimate($resultSizeEstimate) { $this->resultSizeEstimate = $resultSizeEstimate; } /** * @return string */ public function getResultSizeEstimate() { return $this->resultSizeEstimate; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListDraftsResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListDraftsResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/Label.php 0000644 00000007764 15174671617 0020401 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Label extends \WPMailSMTP\Vendor\Google\Model { protected $colorType = LabelColor::class; protected $colorDataType = ''; /** * @var string */ public $id; /** * @var string */ public $labelListVisibility; /** * @var string */ public $messageListVisibility; /** * @var int */ public $messagesTotal; /** * @var int */ public $messagesUnread; /** * @var string */ public $name; /** * @var int */ public $threadsTotal; /** * @var int */ public $threadsUnread; /** * @var string */ public $type; /** * @param LabelColor */ public function setColor(LabelColor $color) { $this->color = $color; } /** * @return LabelColor */ public function getColor() { return $this->color; } /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } /** * @param string */ public function setLabelListVisibility($labelListVisibility) { $this->labelListVisibility = $labelListVisibility; } /** * @return string */ public function getLabelListVisibility() { return $this->labelListVisibility; } /** * @param string */ public function setMessageListVisibility($messageListVisibility) { $this->messageListVisibility = $messageListVisibility; } /** * @return string */ public function getMessageListVisibility() { return $this->messageListVisibility; } /** * @param int */ public function setMessagesTotal($messagesTotal) { $this->messagesTotal = $messagesTotal; } /** * @return int */ public function getMessagesTotal() { return $this->messagesTotal; } /** * @param int */ public function setMessagesUnread($messagesUnread) { $this->messagesUnread = $messagesUnread; } /** * @return int */ public function getMessagesUnread() { return $this->messagesUnread; } /** * @param string */ public function setName($name) { $this->name = $name; } /** * @return string */ public function getName() { return $this->name; } /** * @param int */ public function setThreadsTotal($threadsTotal) { $this->threadsTotal = $threadsTotal; } /** * @return int */ public function getThreadsTotal() { return $this->threadsTotal; } /** * @param int */ public function setThreadsUnread($threadsUnread) { $this->threadsUnread = $threadsUnread; } /** * @return int */ public function getThreadsUnread() { return $this->threadsUnread; } /** * @param string */ public function setType($type) { $this->type = $type; } /** * @return string */ public function getType() { return $this->type; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Label::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Label'); vendor_prefixed/google/apiclient-services/src/Gmail/ModifyMessageRequest.php 0000644 00000003154 15174671617 0023454 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ModifyMessageRequest extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'removeLabelIds'; /** * @var string[] */ public $addLabelIds; /** * @var string[] */ public $removeLabelIds; /** * @param string[] */ public function setAddLabelIds($addLabelIds) { $this->addLabelIds = $addLabelIds; } /** * @return string[] */ public function getAddLabelIds() { return $this->addLabelIds; } /** * @param string[] */ public function setRemoveLabelIds($removeLabelIds) { $this->removeLabelIds = $removeLabelIds; } /** * @return string[] */ public function getRemoveLabelIds() { return $this->removeLabelIds; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ModifyMessageRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ModifyMessageRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/History.php 0000644 00000006167 15174671617 0021017 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class History extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'messagesDeleted'; /** * @var string */ public $id; protected $labelsAddedType = HistoryLabelAdded::class; protected $labelsAddedDataType = 'array'; protected $labelsRemovedType = HistoryLabelRemoved::class; protected $labelsRemovedDataType = 'array'; protected $messagesType = Message::class; protected $messagesDataType = 'array'; protected $messagesAddedType = HistoryMessageAdded::class; protected $messagesAddedDataType = 'array'; protected $messagesDeletedType = HistoryMessageDeleted::class; protected $messagesDeletedDataType = 'array'; /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } /** * @param HistoryLabelAdded[] */ public function setLabelsAdded($labelsAdded) { $this->labelsAdded = $labelsAdded; } /** * @return HistoryLabelAdded[] */ public function getLabelsAdded() { return $this->labelsAdded; } /** * @param HistoryLabelRemoved[] */ public function setLabelsRemoved($labelsRemoved) { $this->labelsRemoved = $labelsRemoved; } /** * @return HistoryLabelRemoved[] */ public function getLabelsRemoved() { return $this->labelsRemoved; } /** * @param Message[] */ public function setMessages($messages) { $this->messages = $messages; } /** * @return Message[] */ public function getMessages() { return $this->messages; } /** * @param HistoryMessageAdded[] */ public function setMessagesAdded($messagesAdded) { $this->messagesAdded = $messagesAdded; } /** * @return HistoryMessageAdded[] */ public function getMessagesAdded() { return $this->messagesAdded; } /** * @param HistoryMessageDeleted[] */ public function setMessagesDeleted($messagesDeleted) { $this->messagesDeleted = $messagesDeleted; } /** * @return HistoryMessageDeleted[] */ public function getMessagesDeleted() { return $this->messagesDeleted; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(History::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_History'); vendor_prefixed/google/apiclient-services/src/Gmail/HistoryLabelRemoved.php 0000644 00000003073 15174671617 0023272 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class HistoryLabelRemoved extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'labelIds'; /** * @var string[] */ public $labelIds; protected $messageType = Message::class; protected $messageDataType = ''; /** * @param string[] */ public function setLabelIds($labelIds) { $this->labelIds = $labelIds; } /** * @return string[] */ public function getLabelIds() { return $this->labelIds; } /** * @param Message */ public function setMessage(Message $message) { $this->message = $message; } /** * @return Message */ public function getMessage() { return $this->message; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(HistoryLabelRemoved::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_HistoryLabelRemoved'); vendor_prefixed/google/apiclient-services/src/Gmail/DisableCseKeyPairRequest.php 0000644 00000001632 15174671617 0024202 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class DisableCseKeyPairRequest extends \WPMailSMTP\Vendor\Google\Model { } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(DisableCseKeyPairRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_DisableCseKeyPairRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/Message.php 0000644 00000007113 15174671617 0020732 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Message extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'labelIds'; /** * @var string */ public $historyId; /** * @var string */ public $id; /** * @var string */ public $internalDate; /** * @var string[] */ public $labelIds; protected $payloadType = MessagePart::class; protected $payloadDataType = ''; /** * @var string */ public $raw; /** * @var int */ public $sizeEstimate; /** * @var string */ public $snippet; /** * @var string */ public $threadId; /** * @param string */ public function setHistoryId($historyId) { $this->historyId = $historyId; } /** * @return string */ public function getHistoryId() { return $this->historyId; } /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } /** * @param string */ public function setInternalDate($internalDate) { $this->internalDate = $internalDate; } /** * @return string */ public function getInternalDate() { return $this->internalDate; } /** * @param string[] */ public function setLabelIds($labelIds) { $this->labelIds = $labelIds; } /** * @return string[] */ public function getLabelIds() { return $this->labelIds; } /** * @param MessagePart */ public function setPayload(MessagePart $payload) { $this->payload = $payload; } /** * @return MessagePart */ public function getPayload() { return $this->payload; } /** * @param string */ public function setRaw($raw) { $this->raw = $raw; } /** * @return string */ public function getRaw() { return $this->raw; } /** * @param int */ public function setSizeEstimate($sizeEstimate) { $this->sizeEstimate = $sizeEstimate; } /** * @return int */ public function getSizeEstimate() { return $this->sizeEstimate; } /** * @param string */ public function setSnippet($snippet) { $this->snippet = $snippet; } /** * @return string */ public function getSnippet() { return $this->snippet; } /** * @param string */ public function setThreadId($threadId) { $this->threadId = $threadId; } /** * @return string */ public function getThreadId() { return $this->threadId; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Message::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Message'); vendor_prefixed/google/apiclient-services/src/Gmail/EnableCseKeyPairRequest.php 0000644 00000001627 15174671617 0024031 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class EnableCseKeyPairRequest extends \WPMailSMTP\Vendor\Google\Model { } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(EnableCseKeyPairRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_EnableCseKeyPairRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/CseKeyPair.php 0000644 00000006406 15174671617 0021351 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class CseKeyPair extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'subjectEmailAddresses'; /** * @var string */ public $disableTime; /** * @var string */ public $enablementState; /** * @var string */ public $keyPairId; /** * @var string */ public $pem; /** * @var string */ public $pkcs7; protected $privateKeyMetadataType = CsePrivateKeyMetadata::class; protected $privateKeyMetadataDataType = 'array'; /** * @var string[] */ public $subjectEmailAddresses; /** * @param string */ public function setDisableTime($disableTime) { $this->disableTime = $disableTime; } /** * @return string */ public function getDisableTime() { return $this->disableTime; } /** * @param string */ public function setEnablementState($enablementState) { $this->enablementState = $enablementState; } /** * @return string */ public function getEnablementState() { return $this->enablementState; } /** * @param string */ public function setKeyPairId($keyPairId) { $this->keyPairId = $keyPairId; } /** * @return string */ public function getKeyPairId() { return $this->keyPairId; } /** * @param string */ public function setPem($pem) { $this->pem = $pem; } /** * @return string */ public function getPem() { return $this->pem; } /** * @param string */ public function setPkcs7($pkcs7) { $this->pkcs7 = $pkcs7; } /** * @return string */ public function getPkcs7() { return $this->pkcs7; } /** * @param CsePrivateKeyMetadata[] */ public function setPrivateKeyMetadata($privateKeyMetadata) { $this->privateKeyMetadata = $privateKeyMetadata; } /** * @return CsePrivateKeyMetadata[] */ public function getPrivateKeyMetadata() { return $this->privateKeyMetadata; } /** * @param string[] */ public function setSubjectEmailAddresses($subjectEmailAddresses) { $this->subjectEmailAddresses = $subjectEmailAddresses; } /** * @return string[] */ public function getSubjectEmailAddresses() { return $this->subjectEmailAddresses; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(CseKeyPair::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_CseKeyPair'); vendor_prefixed/google/apiclient-services/src/Gmail/Draft.php 0000644 00000002660 15174671617 0020410 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Draft extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $id; protected $messageType = Message::class; protected $messageDataType = ''; /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } /** * @param Message */ public function setMessage(Message $message) { $this->message = $message; } /** * @return Message */ public function getMessage() { return $this->message; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Draft::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Draft'); vendor_prefixed/google/apiclient-services/src/Gmail/Thread.php 0000644 00000004111 15174671617 0020550 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Thread extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'messages'; /** * @var string */ public $historyId; /** * @var string */ public $id; protected $messagesType = Message::class; protected $messagesDataType = 'array'; /** * @var string */ public $snippet; /** * @param string */ public function setHistoryId($historyId) { $this->historyId = $historyId; } /** * @return string */ public function getHistoryId() { return $this->historyId; } /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } /** * @param Message[] */ public function setMessages($messages) { $this->messages = $messages; } /** * @return Message[] */ public function getMessages() { return $this->messages; } /** * @param string */ public function setSnippet($snippet) { $this->snippet = $snippet; } /** * @return string */ public function getSnippet() { return $this->snippet; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Thread::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Thread'); vendor_prefixed/google/apiclient-services/src/Gmail/WatchResponse.php 0000644 00000002752 15174671617 0022137 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class WatchResponse extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $expiration; /** * @var string */ public $historyId; /** * @param string */ public function setExpiration($expiration) { $this->expiration = $expiration; } /** * @return string */ public function getExpiration() { return $this->expiration; } /** * @param string */ public function setHistoryId($historyId) { $this->historyId = $historyId; } /** * @return string */ public function getHistoryId() { return $this->historyId; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(WatchResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_WatchResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/PopSettings.php 0000644 00000003000 15174671617 0021614 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class PopSettings extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $accessWindow; /** * @var string */ public $disposition; /** * @param string */ public function setAccessWindow($accessWindow) { $this->accessWindow = $accessWindow; } /** * @return string */ public function getAccessWindow() { return $this->accessWindow; } /** * @param string */ public function setDisposition($disposition) { $this->disposition = $disposition; } /** * @return string */ public function getDisposition() { return $this->disposition; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(PopSettings::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_PopSettings'); vendor_prefixed/google/apiclient-services/src/Gmail/FilterAction.php 0000644 00000003573 15174671617 0021737 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class FilterAction extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'removeLabelIds'; /** * @var string[] */ public $addLabelIds; /** * @var string */ public $forward; /** * @var string[] */ public $removeLabelIds; /** * @param string[] */ public function setAddLabelIds($addLabelIds) { $this->addLabelIds = $addLabelIds; } /** * @return string[] */ public function getAddLabelIds() { return $this->addLabelIds; } /** * @param string */ public function setForward($forward) { $this->forward = $forward; } /** * @return string */ public function getForward() { return $this->forward; } /** * @param string[] */ public function setRemoveLabelIds($removeLabelIds) { $this->removeLabelIds = $removeLabelIds; } /** * @return string[] */ public function getRemoveLabelIds() { return $this->removeLabelIds; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(FilterAction::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_FilterAction'); vendor_prefixed/google/apiclient-services/src/Gmail/MessagePart.php 0000644 00000005442 15174671617 0021564 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class MessagePart extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'parts'; protected $bodyType = MessagePartBody::class; protected $bodyDataType = ''; /** * @var string */ public $filename; protected $headersType = MessagePartHeader::class; protected $headersDataType = 'array'; /** * @var string */ public $mimeType; /** * @var string */ public $partId; protected $partsType = MessagePart::class; protected $partsDataType = 'array'; /** * @param MessagePartBody */ public function setBody(MessagePartBody $body) { $this->body = $body; } /** * @return MessagePartBody */ public function getBody() { return $this->body; } /** * @param string */ public function setFilename($filename) { $this->filename = $filename; } /** * @return string */ public function getFilename() { return $this->filename; } /** * @param MessagePartHeader[] */ public function setHeaders($headers) { $this->headers = $headers; } /** * @return MessagePartHeader[] */ public function getHeaders() { return $this->headers; } /** * @param string */ public function setMimeType($mimeType) { $this->mimeType = $mimeType; } /** * @return string */ public function getMimeType() { return $this->mimeType; } /** * @param string */ public function setPartId($partId) { $this->partId = $partId; } /** * @return string */ public function getPartId() { return $this->partId; } /** * @param MessagePart[] */ public function setParts($parts) { $this->parts = $parts; } /** * @return MessagePart[] */ public function getParts() { return $this->parts; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(MessagePart::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_MessagePart'); vendor_prefixed/google/apiclient-services/src/Gmail/SmtpMsa.php 0000644 00000004450 15174671617 0020733 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class SmtpMsa extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $host; /** * @var string */ public $password; /** * @var int */ public $port; /** * @var string */ public $securityMode; /** * @var string */ public $username; /** * @param string */ public function setHost($host) { $this->host = $host; } /** * @return string */ public function getHost() { return $this->host; } /** * @param string */ public function setPassword($password) { $this->password = $password; } /** * @return string */ public function getPassword() { return $this->password; } /** * @param int */ public function setPort($port) { $this->port = $port; } /** * @return int */ public function getPort() { return $this->port; } /** * @param string */ public function setSecurityMode($securityMode) { $this->securityMode = $securityMode; } /** * @return string */ public function getSecurityMode() { return $this->securityMode; } /** * @param string */ public function setUsername($username) { $this->username = $username; } /** * @return string */ public function getUsername() { return $this->username; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(SmtpMsa::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_SmtpMsa'); vendor_prefixed/google/apiclient-services/src/Gmail/PivKeyMetadata.php 0000644 00000002277 15174671617 0022224 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class PivKeyMetadata extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $description; /** * @param string */ public function setDescription($description) { $this->description = $description; } /** * @return string */ public function getDescription() { return $this->description; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(PivKeyMetadata::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_PivKeyMetadata'); vendor_prefixed/google/apiclient-services/src/Gmail/ListLabelsResponse.php 0000644 00000002365 15174671617 0023127 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListLabelsResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'labels'; protected $labelsType = Label::class; protected $labelsDataType = 'array'; /** * @param Label[] */ public function setLabels($labels) { $this->labels = $labels; } /** * @return Label[] */ public function getLabels() { return $this->labels; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListLabelsResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListLabelsResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/ObliterateCseKeyPairRequest.php 0000644 00000001643 15174671617 0024733 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ObliterateCseKeyPairRequest extends \WPMailSMTP\Vendor\Google\Model { } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ObliterateCseKeyPairRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ObliterateCseKeyPairRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/BatchModifyMessagesRequest.php 0000644 00000003617 15174671617 0024605 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class BatchModifyMessagesRequest extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'removeLabelIds'; /** * @var string[] */ public $addLabelIds; /** * @var string[] */ public $ids; /** * @var string[] */ public $removeLabelIds; /** * @param string[] */ public function setAddLabelIds($addLabelIds) { $this->addLabelIds = $addLabelIds; } /** * @return string[] */ public function getAddLabelIds() { return $this->addLabelIds; } /** * @param string[] */ public function setIds($ids) { $this->ids = $ids; } /** * @return string[] */ public function getIds() { return $this->ids; } /** * @param string[] */ public function setRemoveLabelIds($removeLabelIds) { $this->removeLabelIds = $removeLabelIds; } /** * @return string[] */ public function getRemoveLabelIds() { return $this->removeLabelIds; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(BatchModifyMessagesRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_BatchModifyMessagesRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/ListDelegatesResponse.php 0000644 00000002442 15174671617 0023616 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListDelegatesResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'delegates'; protected $delegatesType = Delegate::class; protected $delegatesDataType = 'array'; /** * @param Delegate[] */ public function setDelegates($delegates) { $this->delegates = $delegates; } /** * @return Delegate[] */ public function getDelegates() { return $this->delegates; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListDelegatesResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListDelegatesResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/CseIdentity.php 0000644 00000004042 15174671617 0021570 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class CseIdentity extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $emailAddress; /** * @var string */ public $primaryKeyPairId; protected $signAndEncryptKeyPairsType = SignAndEncryptKeyPairs::class; protected $signAndEncryptKeyPairsDataType = ''; /** * @param string */ public function setEmailAddress($emailAddress) { $this->emailAddress = $emailAddress; } /** * @return string */ public function getEmailAddress() { return $this->emailAddress; } /** * @param string */ public function setPrimaryKeyPairId($primaryKeyPairId) { $this->primaryKeyPairId = $primaryKeyPairId; } /** * @return string */ public function getPrimaryKeyPairId() { return $this->primaryKeyPairId; } /** * @param SignAndEncryptKeyPairs */ public function setSignAndEncryptKeyPairs(SignAndEncryptKeyPairs $signAndEncryptKeyPairs) { $this->signAndEncryptKeyPairs = $signAndEncryptKeyPairs; } /** * @return SignAndEncryptKeyPairs */ public function getSignAndEncryptKeyPairs() { return $this->signAndEncryptKeyPairs; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(CseIdentity::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_CseIdentity'); vendor_prefixed/google/apiclient-services/src/Gmail/HistoryMessageDeleted.php 0000644 00000002334 15174671617 0023603 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class HistoryMessageDeleted extends \WPMailSMTP\Vendor\Google\Model { protected $messageType = Message::class; protected $messageDataType = ''; /** * @param Message */ public function setMessage(Message $message) { $this->message = $message; } /** * @return Message */ public function getMessage() { return $this->message; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(HistoryMessageDeleted::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_HistoryMessageDeleted'); vendor_prefixed/google/apiclient-services/src/Gmail/ListHistoryResponse.php 0000644 00000003615 15174671617 0023365 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListHistoryResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'history'; protected $historyType = History::class; protected $historyDataType = 'array'; /** * @var string */ public $historyId; /** * @var string */ public $nextPageToken; /** * @param History[] */ public function setHistory($history) { $this->history = $history; } /** * @return History[] */ public function getHistory() { return $this->history; } /** * @param string */ public function setHistoryId($historyId) { $this->historyId = $historyId; } /** * @return string */ public function getHistoryId() { return $this->historyId; } /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListHistoryResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListHistoryResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/ListCseKeyPairsResponse.php 0000644 00000003221 15174671617 0024077 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListCseKeyPairsResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'cseKeyPairs'; protected $cseKeyPairsType = CseKeyPair::class; protected $cseKeyPairsDataType = 'array'; /** * @var string */ public $nextPageToken; /** * @param CseKeyPair[] */ public function setCseKeyPairs($cseKeyPairs) { $this->cseKeyPairs = $cseKeyPairs; } /** * @return CseKeyPair[] */ public function getCseKeyPairs() { return $this->cseKeyPairs; } /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListCseKeyPairsResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListCseKeyPairsResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartHeader.php 0000644 00000002660 15174671617 0022674 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class MessagePartHeader extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $name; /** * @var string */ public $value; /** * @param string */ public function setName($name) { $this->name = $name; } /** * @return string */ public function getName() { return $this->name; } /** * @param string */ public function setValue($value) { $this->value = $value; } /** * @return string */ public function getValue() { return $this->value; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(MessagePartHeader::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_MessagePartHeader'); vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartBody.php 0000644 00000003344 15174671617 0022401 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class MessagePartBody extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $attachmentId; /** * @var string */ public $data; /** * @var int */ public $size; /** * @param string */ public function setAttachmentId($attachmentId) { $this->attachmentId = $attachmentId; } /** * @return string */ public function getAttachmentId() { return $this->attachmentId; } /** * @param string */ public function setData($data) { $this->data = $data; } /** * @return string */ public function getData() { return $this->data; } /** * @param int */ public function setSize($size) { $this->size = $size; } /** * @return int */ public function getSize() { return $this->size; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(MessagePartBody::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_MessagePartBody'); vendor_prefixed/google/apiclient-services/src/Gmail/HardwareKeyMetadata.php 0000644 00000002316 15174671617 0023215 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class HardwareKeyMetadata extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $description; /** * @param string */ public function setDescription($description) { $this->description = $description; } /** * @return string */ public function getDescription() { return $this->description; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(HardwareKeyMetadata::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_HardwareKeyMetadata'); vendor_prefixed/google/apiclient-services/src/Gmail/Filter.php 0000644 00000003456 15174671617 0020601 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Filter extends \WPMailSMTP\Vendor\Google\Model { protected $actionType = FilterAction::class; protected $actionDataType = ''; protected $criteriaType = FilterCriteria::class; protected $criteriaDataType = ''; /** * @var string */ public $id; /** * @param FilterAction */ public function setAction(FilterAction $action) { $this->action = $action; } /** * @return FilterAction */ public function getAction() { return $this->action; } /** * @param FilterCriteria */ public function setCriteria(FilterCriteria $criteria) { $this->criteria = $criteria; } /** * @return FilterCriteria */ public function getCriteria() { return $this->criteria; } /** * @param string */ public function setId($id) { $this->id = $id; } /** * @return string */ public function getId() { return $this->id; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Filter::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Filter'); vendor_prefixed/google/apiclient-services/src/Gmail/CsePrivateKeyMetadata.php 0000644 00000004245 15174671617 0023530 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class CsePrivateKeyMetadata extends \WPMailSMTP\Vendor\Google\Model { protected $hardwareKeyMetadataType = HardwareKeyMetadata::class; protected $hardwareKeyMetadataDataType = ''; protected $kaclsKeyMetadataType = KaclsKeyMetadata::class; protected $kaclsKeyMetadataDataType = ''; /** * @var string */ public $privateKeyMetadataId; /** * @param HardwareKeyMetadata */ public function setHardwareKeyMetadata(HardwareKeyMetadata $hardwareKeyMetadata) { $this->hardwareKeyMetadata = $hardwareKeyMetadata; } /** * @return HardwareKeyMetadata */ public function getHardwareKeyMetadata() { return $this->hardwareKeyMetadata; } /** * @param KaclsKeyMetadata */ public function setKaclsKeyMetadata(KaclsKeyMetadata $kaclsKeyMetadata) { $this->kaclsKeyMetadata = $kaclsKeyMetadata; } /** * @return KaclsKeyMetadata */ public function getKaclsKeyMetadata() { return $this->kaclsKeyMetadata; } /** * @param string */ public function setPrivateKeyMetadataId($privateKeyMetadataId) { $this->privateKeyMetadataId = $privateKeyMetadataId; } /** * @return string */ public function getPrivateKeyMetadataId() { return $this->privateKeyMetadataId; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(CsePrivateKeyMetadata::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_CsePrivateKeyMetadata'); vendor_prefixed/google/apiclient-services/src/Gmail/AutoForwarding.php 0000644 00000003452 15174671617 0022303 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class AutoForwarding extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $disposition; /** * @var string */ public $emailAddress; /** * @var bool */ public $enabled; /** * @param string */ public function setDisposition($disposition) { $this->disposition = $disposition; } /** * @return string */ public function getDisposition() { return $this->disposition; } /** * @param string */ public function setEmailAddress($emailAddress) { $this->emailAddress = $emailAddress; } /** * @return string */ public function getEmailAddress() { return $this->emailAddress; } /** * @param bool */ public function setEnabled($enabled) { $this->enabled = $enabled; } /** * @return bool */ public function getEnabled() { return $this->enabled; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(AutoForwarding::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_AutoForwarding'); vendor_prefixed/google/apiclient-services/src/Gmail/VacationSettings.php 0000644 00000007123 15174671617 0022634 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class VacationSettings extends \WPMailSMTP\Vendor\Google\Model { /** * @var bool */ public $enableAutoReply; /** * @var string */ public $endTime; /** * @var string */ public $responseBodyHtml; /** * @var string */ public $responseBodyPlainText; /** * @var string */ public $responseSubject; /** * @var bool */ public $restrictToContacts; /** * @var bool */ public $restrictToDomain; /** * @var string */ public $startTime; /** * @param bool */ public function setEnableAutoReply($enableAutoReply) { $this->enableAutoReply = $enableAutoReply; } /** * @return bool */ public function getEnableAutoReply() { return $this->enableAutoReply; } /** * @param string */ public function setEndTime($endTime) { $this->endTime = $endTime; } /** * @return string */ public function getEndTime() { return $this->endTime; } /** * @param string */ public function setResponseBodyHtml($responseBodyHtml) { $this->responseBodyHtml = $responseBodyHtml; } /** * @return string */ public function getResponseBodyHtml() { return $this->responseBodyHtml; } /** * @param string */ public function setResponseBodyPlainText($responseBodyPlainText) { $this->responseBodyPlainText = $responseBodyPlainText; } /** * @return string */ public function getResponseBodyPlainText() { return $this->responseBodyPlainText; } /** * @param string */ public function setResponseSubject($responseSubject) { $this->responseSubject = $responseSubject; } /** * @return string */ public function getResponseSubject() { return $this->responseSubject; } /** * @param bool */ public function setRestrictToContacts($restrictToContacts) { $this->restrictToContacts = $restrictToContacts; } /** * @return bool */ public function getRestrictToContacts() { return $this->restrictToContacts; } /** * @param bool */ public function setRestrictToDomain($restrictToDomain) { $this->restrictToDomain = $restrictToDomain; } /** * @return bool */ public function getRestrictToDomain() { return $this->restrictToDomain; } /** * @param string */ public function setStartTime($startTime) { $this->startTime = $startTime; } /** * @return string */ public function getStartTime() { return $this->startTime; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(VacationSettings::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_VacationSettings'); vendor_prefixed/google/apiclient-services/src/Gmail/LanguageSettings.php 0000644 00000002341 15174671617 0022610 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class LanguageSettings extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $displayLanguage; /** * @param string */ public function setDisplayLanguage($displayLanguage) { $this->displayLanguage = $displayLanguage; } /** * @return string */ public function getDisplayLanguage() { return $this->displayLanguage; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(LanguageSettings::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_LanguageSettings'); vendor_prefixed/google/apiclient-services/src/Gmail/ListThreadsResponse.php 0000644 00000003711 15174671617 0023313 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListThreadsResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'threads'; /** * @var string */ public $nextPageToken; /** * @var string */ public $resultSizeEstimate; protected $threadsType = Thread::class; protected $threadsDataType = 'array'; /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } /** * @param string */ public function setResultSizeEstimate($resultSizeEstimate) { $this->resultSizeEstimate = $resultSizeEstimate; } /** * @return string */ public function getResultSizeEstimate() { return $this->resultSizeEstimate; } /** * @param Thread[] */ public function setThreads($threads) { $this->threads = $threads; } /** * @return Thread[] */ public function getThreads() { return $this->threads; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListThreadsResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListThreadsResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/ListForwardingAddressesResponse.php 0000644 00000002665 15174671617 0025670 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListForwardingAddressesResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'forwardingAddresses'; protected $forwardingAddressesType = ForwardingAddress::class; protected $forwardingAddressesDataType = 'array'; /** * @param ForwardingAddress[] */ public function setForwardingAddresses($forwardingAddresses) { $this->forwardingAddresses = $forwardingAddresses; } /** * @return ForwardingAddress[] */ public function getForwardingAddresses() { return $this->forwardingAddresses; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListForwardingAddressesResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListForwardingAddressesResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/ModifyThreadRequest.php 0000644 00000003151 15174671617 0023274 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ModifyThreadRequest extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'removeLabelIds'; /** * @var string[] */ public $addLabelIds; /** * @var string[] */ public $removeLabelIds; /** * @param string[] */ public function setAddLabelIds($addLabelIds) { $this->addLabelIds = $addLabelIds; } /** * @return string[] */ public function getAddLabelIds() { return $this->addLabelIds; } /** * @param string[] */ public function setRemoveLabelIds($removeLabelIds) { $this->removeLabelIds = $removeLabelIds; } /** * @return string[] */ public function getRemoveLabelIds() { return $this->removeLabelIds; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ModifyThreadRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ModifyThreadRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/Profile.php 0000644 00000004157 15174671617 0020753 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Profile extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $emailAddress; /** * @var string */ public $historyId; /** * @var int */ public $messagesTotal; /** * @var int */ public $threadsTotal; /** * @param string */ public function setEmailAddress($emailAddress) { $this->emailAddress = $emailAddress; } /** * @return string */ public function getEmailAddress() { return $this->emailAddress; } /** * @param string */ public function setHistoryId($historyId) { $this->historyId = $historyId; } /** * @return string */ public function getHistoryId() { return $this->historyId; } /** * @param int */ public function setMessagesTotal($messagesTotal) { $this->messagesTotal = $messagesTotal; } /** * @return int */ public function getMessagesTotal() { return $this->messagesTotal; } /** * @param int */ public function setThreadsTotal($threadsTotal) { $this->threadsTotal = $threadsTotal; } /** * @return int */ public function getThreadsTotal() { return $this->threadsTotal; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Profile::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Profile'); vendor_prefixed/google/apiclient-services/src/Gmail/ListSmimeInfoResponse.php 0000644 00000002445 15174671617 0023612 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListSmimeInfoResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'smimeInfo'; protected $smimeInfoType = SmimeInfo::class; protected $smimeInfoDataType = 'array'; /** * @param SmimeInfo[] */ public function setSmimeInfo($smimeInfo) { $this->smimeInfo = $smimeInfo; } /** * @return SmimeInfo[] */ public function getSmimeInfo() { return $this->smimeInfo; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListSmimeInfoResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListSmimeInfoResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/Delegate.php 0000644 00000003057 15174671617 0021063 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class Delegate extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $delegateEmail; /** * @var string */ public $verificationStatus; /** * @param string */ public function setDelegateEmail($delegateEmail) { $this->delegateEmail = $delegateEmail; } /** * @return string */ public function getDelegateEmail() { return $this->delegateEmail; } /** * @param string */ public function setVerificationStatus($verificationStatus) { $this->verificationStatus = $verificationStatus; } /** * @return string */ public function getVerificationStatus() { return $this->verificationStatus; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Delegate::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Delegate'); vendor_prefixed/google/apiclient-services/src/Gmail/ListSendAsResponse.php 0000644 00000002370 15174671617 0023076 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListSendAsResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'sendAs'; protected $sendAsType = SendAs::class; protected $sendAsDataType = 'array'; /** * @param SendAs[] */ public function setSendAs($sendAs) { $this->sendAs = $sendAs; } /** * @return SendAs[] */ public function getSendAs() { return $this->sendAs; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListSendAsResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListSendAsResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/KaclsKeyMetadata.php 0000644 00000002745 15174671617 0022523 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class KaclsKeyMetadata extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $kaclsData; /** * @var string */ public $kaclsUri; /** * @param string */ public function setKaclsData($kaclsData) { $this->kaclsData = $kaclsData; } /** * @return string */ public function getKaclsData() { return $this->kaclsData; } /** * @param string */ public function setKaclsUri($kaclsUri) { $this->kaclsUri = $kaclsUri; } /** * @return string */ public function getKaclsUri() { return $this->kaclsUri; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(KaclsKeyMetadata::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_KaclsKeyMetadata'); vendor_prefixed/google/apiclient-services/src/Gmail/ForwardingAddress.php 0000644 00000003130 15174671617 0022751 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ForwardingAddress extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $forwardingEmail; /** * @var string */ public $verificationStatus; /** * @param string */ public function setForwardingEmail($forwardingEmail) { $this->forwardingEmail = $forwardingEmail; } /** * @return string */ public function getForwardingEmail() { return $this->forwardingEmail; } /** * @param string */ public function setVerificationStatus($verificationStatus) { $this->verificationStatus = $verificationStatus; } /** * @return string */ public function getVerificationStatus() { return $this->verificationStatus; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ForwardingAddress::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ForwardingAddress'); vendor_prefixed/google/apiclient-services/src/Gmail/FilterCriteria.php 0000644 00000007014 15174671617 0022256 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class FilterCriteria extends \WPMailSMTP\Vendor\Google\Model { /** * @var bool */ public $excludeChats; /** * @var string */ public $from; /** * @var bool */ public $hasAttachment; /** * @var string */ public $negatedQuery; /** * @var string */ public $query; /** * @var int */ public $size; /** * @var string */ public $sizeComparison; /** * @var string */ public $subject; /** * @var string */ public $to; /** * @param bool */ public function setExcludeChats($excludeChats) { $this->excludeChats = $excludeChats; } /** * @return bool */ public function getExcludeChats() { return $this->excludeChats; } /** * @param string */ public function setFrom($from) { $this->from = $from; } /** * @return string */ public function getFrom() { return $this->from; } /** * @param bool */ public function setHasAttachment($hasAttachment) { $this->hasAttachment = $hasAttachment; } /** * @return bool */ public function getHasAttachment() { return $this->hasAttachment; } /** * @param string */ public function setNegatedQuery($negatedQuery) { $this->negatedQuery = $negatedQuery; } /** * @return string */ public function getNegatedQuery() { return $this->negatedQuery; } /** * @param string */ public function setQuery($query) { $this->query = $query; } /** * @return string */ public function getQuery() { return $this->query; } /** * @param int */ public function setSize($size) { $this->size = $size; } /** * @return int */ public function getSize() { return $this->size; } /** * @param string */ public function setSizeComparison($sizeComparison) { $this->sizeComparison = $sizeComparison; } /** * @return string */ public function getSizeComparison() { return $this->sizeComparison; } /** * @param string */ public function setSubject($subject) { $this->subject = $subject; } /** * @return string */ public function getSubject() { return $this->subject; } /** * @param string */ public function setTo($to) { $this->to = $to; } /** * @return string */ public function getTo() { return $this->to; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(FilterCriteria::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_FilterCriteria'); vendor_prefixed/google/apiclient-services/src/Gmail/SignAndEncryptKeyPairs.php 0000644 00000003165 15174671617 0023711 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class SignAndEncryptKeyPairs extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $encryptionKeyPairId; /** * @var string */ public $signingKeyPairId; /** * @param string */ public function setEncryptionKeyPairId($encryptionKeyPairId) { $this->encryptionKeyPairId = $encryptionKeyPairId; } /** * @return string */ public function getEncryptionKeyPairId() { return $this->encryptionKeyPairId; } /** * @param string */ public function setSigningKeyPairId($signingKeyPairId) { $this->signingKeyPairId = $signingKeyPairId; } /** * @return string */ public function getSigningKeyPairId() { return $this->signingKeyPairId; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(SignAndEncryptKeyPairs::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_SignAndEncryptKeyPairs'); vendor_prefixed/google/apiclient-services/src/Gmail/WatchRequest.php 0000644 00000004370 15174671617 0021767 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class WatchRequest extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'labelIds'; /** * @var string */ public $labelFilterAction; /** * @var string */ public $labelFilterBehavior; /** * @var string[] */ public $labelIds; /** * @var string */ public $topicName; /** * @param string */ public function setLabelFilterAction($labelFilterAction) { $this->labelFilterAction = $labelFilterAction; } /** * @return string */ public function getLabelFilterAction() { return $this->labelFilterAction; } /** * @param string */ public function setLabelFilterBehavior($labelFilterBehavior) { $this->labelFilterBehavior = $labelFilterBehavior; } /** * @return string */ public function getLabelFilterBehavior() { return $this->labelFilterBehavior; } /** * @param string[] */ public function setLabelIds($labelIds) { $this->labelIds = $labelIds; } /** * @return string[] */ public function getLabelIds() { return $this->labelIds; } /** * @param string */ public function setTopicName($topicName) { $this->topicName = $topicName; } /** * @return string */ public function getTopicName() { return $this->topicName; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(WatchRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_WatchRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/ListFiltersResponse.php 0000644 00000002373 15174671617 0023334 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListFiltersResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'filter'; protected $filterType = Filter::class; protected $filterDataType = 'array'; /** * @param Filter[] */ public function setFilter($filter) { $this->filter = $filter; } /** * @return Filter[] */ public function getFilter() { return $this->filter; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListFiltersResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListFiltersResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/ImapSettings.php 0000644 00000004173 15174671617 0021760 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ImapSettings extends \WPMailSMTP\Vendor\Google\Model { /** * @var bool */ public $autoExpunge; /** * @var bool */ public $enabled; /** * @var string */ public $expungeBehavior; /** * @var int */ public $maxFolderSize; /** * @param bool */ public function setAutoExpunge($autoExpunge) { $this->autoExpunge = $autoExpunge; } /** * @return bool */ public function getAutoExpunge() { return $this->autoExpunge; } /** * @param bool */ public function setEnabled($enabled) { $this->enabled = $enabled; } /** * @return bool */ public function getEnabled() { return $this->enabled; } /** * @param string */ public function setExpungeBehavior($expungeBehavior) { $this->expungeBehavior = $expungeBehavior; } /** * @return string */ public function getExpungeBehavior() { return $this->expungeBehavior; } /** * @param int */ public function setMaxFolderSize($maxFolderSize) { $this->maxFolderSize = $maxFolderSize; } /** * @return int */ public function getMaxFolderSize() { return $this->maxFolderSize; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ImapSettings::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ImapSettings'); vendor_prefixed/google/apiclient-services/src/Gmail/ListCseIdentitiesResponse.php 0000644 00000003254 15174671617 0024457 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListCseIdentitiesResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'cseIdentities'; protected $cseIdentitiesType = CseIdentity::class; protected $cseIdentitiesDataType = 'array'; /** * @var string */ public $nextPageToken; /** * @param CseIdentity[] */ public function setCseIdentities($cseIdentities) { $this->cseIdentities = $cseIdentities; } /** * @return CseIdentity[] */ public function getCseIdentities() { return $this->cseIdentities; } /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListCseIdentitiesResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListCseIdentitiesResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/LabelColor.php 0000644 00000003004 15174671617 0021357 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class LabelColor extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $backgroundColor; /** * @var string */ public $textColor; /** * @param string */ public function setBackgroundColor($backgroundColor) { $this->backgroundColor = $backgroundColor; } /** * @return string */ public function getBackgroundColor() { return $this->backgroundColor; } /** * @param string */ public function setTextColor($textColor) { $this->textColor = $textColor; } /** * @return string */ public function getTextColor() { return $this->textColor; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(LabelColor::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_LabelColor'); vendor_prefixed/google/apiclient-services/src/Gmail/ListMessagesResponse.php 0000644 00000003730 15174671617 0023471 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class ListMessagesResponse extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'messages'; protected $messagesType = Message::class; protected $messagesDataType = 'array'; /** * @var string */ public $nextPageToken; /** * @var string */ public $resultSizeEstimate; /** * @param Message[] */ public function setMessages($messages) { $this->messages = $messages; } /** * @return Message[] */ public function getMessages() { return $this->messages; } /** * @param string */ public function setNextPageToken($nextPageToken) { $this->nextPageToken = $nextPageToken; } /** * @return string */ public function getNextPageToken() { return $this->nextPageToken; } /** * @param string */ public function setResultSizeEstimate($resultSizeEstimate) { $this->resultSizeEstimate = $resultSizeEstimate; } /** * @return string */ public function getResultSizeEstimate() { return $this->resultSizeEstimate; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(ListMessagesResponse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_ListMessagesResponse'); vendor_prefixed/google/apiclient-services/src/Gmail/BatchDeleteMessagesRequest.php 0000644 00000002335 15174671617 0024554 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class BatchDeleteMessagesRequest extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'ids'; /** * @var string[] */ public $ids; /** * @param string[] */ public function setIds($ids) { $this->ids = $ids; } /** * @return string[] */ public function getIds() { return $this->ids; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(BatchDeleteMessagesRequest::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_BatchDeleteMessagesRequest'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettings.php 0000644 00000020055 15174671617 0023757 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\AutoForwarding; use WPMailSMTP\Vendor\Google\Service\Gmail\ImapSettings; use WPMailSMTP\Vendor\Google\Service\Gmail\LanguageSettings; use WPMailSMTP\Vendor\Google\Service\Gmail\PopSettings; use WPMailSMTP\Vendor\Google\Service\Gmail\VacationSettings; /** * The "settings" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $settings = $gmailService->users_settings; * </code> */ class UsersSettings extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Gets the auto-forwarding setting for the specified account. * (settings.getAutoForwarding) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return AutoForwarding * @throws \Google\Service\Exception */ public function getAutoForwarding($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('getAutoForwarding', [$params], AutoForwarding::class); } /** * Gets IMAP settings. (settings.getImap) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return ImapSettings * @throws \Google\Service\Exception */ public function getImap($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('getImap', [$params], ImapSettings::class); } /** * Gets language settings. (settings.getLanguage) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return LanguageSettings * @throws \Google\Service\Exception */ public function getLanguage($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('getLanguage', [$params], LanguageSettings::class); } /** * Gets POP settings. (settings.getPop) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return PopSettings * @throws \Google\Service\Exception */ public function getPop($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('getPop', [$params], PopSettings::class); } /** * Gets vacation responder settings. (settings.getVacation) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return VacationSettings * @throws \Google\Service\Exception */ public function getVacation($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('getVacation', [$params], VacationSettings::class); } /** * Updates the auto-forwarding setting for the specified account. A verified * forwarding address must be specified when auto-forwarding is enabled. This * method is only available to service account clients that have been delegated * domain-wide authority. (settings.updateAutoForwarding) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param AutoForwarding $postBody * @param array $optParams Optional parameters. * @return AutoForwarding * @throws \Google\Service\Exception */ public function updateAutoForwarding($userId, AutoForwarding $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('updateAutoForwarding', [$params], AutoForwarding::class); } /** * Updates IMAP settings. (settings.updateImap) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param ImapSettings $postBody * @param array $optParams Optional parameters. * @return ImapSettings * @throws \Google\Service\Exception */ public function updateImap($userId, ImapSettings $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('updateImap', [$params], ImapSettings::class); } /** * Updates language settings. If successful, the return object contains the * `displayLanguage` that was saved for the user, which may differ from the * value passed into the request. This is because the requested * `displayLanguage` may not be directly supported by Gmail but have a close * variant that is, and so the variant may be chosen and saved instead. * (settings.updateLanguage) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param LanguageSettings $postBody * @param array $optParams Optional parameters. * @return LanguageSettings * @throws \Google\Service\Exception */ public function updateLanguage($userId, LanguageSettings $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('updateLanguage', [$params], LanguageSettings::class); } /** * Updates POP settings. (settings.updatePop) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param PopSettings $postBody * @param array $optParams Optional parameters. * @return PopSettings * @throws \Google\Service\Exception */ public function updatePop($userId, PopSettings $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('updatePop', [$params], PopSettings::class); } /** * Updates vacation responder settings. (settings.updateVacation) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param VacationSettings $postBody * @param array $optParams Optional parameters. * @return VacationSettings * @throws \Google\Service\Exception */ public function updateVacation($userId, VacationSettings $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('updateVacation', [$params], VacationSettings::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettings::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettings'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsSendAs.php 0000644 00000016275 15174671617 0025066 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\ListSendAsResponse; use WPMailSMTP\Vendor\Google\Service\Gmail\SendAs; /** * The "sendAs" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $sendAs = $gmailService->users_settings_sendAs; * </code> */ class UsersSettingsSendAs extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates a custom "from" send-as alias. If an SMTP MSA is specified, Gmail * will attempt to connect to the SMTP service to validate the configuration * before creating the alias. If ownership verification is required for the * alias, a message will be sent to the email address and the resource's * verification status will be set to `pending`; otherwise, the resource will be * created with verification status set to `accepted`. If a signature is * provided, Gmail will sanitize the HTML before saving it with the alias. This * method is only available to service account clients that have been delegated * domain-wide authority. (sendAs.create) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param SendAs $postBody * @param array $optParams Optional parameters. * @return SendAs * @throws \Google\Service\Exception */ public function create($userId, SendAs $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], SendAs::class); } /** * Deletes the specified send-as alias. Revokes any verification that may have * been required for using it. This method is only available to service account * clients that have been delegated domain-wide authority. (sendAs.delete) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be deleted. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $sendAsEmail, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified send-as alias. Fails with an HTTP 404 error if the * specified address is not a member of the collection. (sendAs.get) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be retrieved. * @param array $optParams Optional parameters. * @return SendAs * @throws \Google\Service\Exception */ public function get($userId, $sendAsEmail, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], SendAs::class); } /** * Lists the send-as aliases for the specified account. The result includes the * primary send-as address associated with the account as well as any custom * "from" aliases. (sendAs.listUsersSettingsSendAs) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return ListSendAsResponse * @throws \Google\Service\Exception */ public function listUsersSettingsSendAs($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListSendAsResponse::class); } /** * Patch the specified send-as alias. (sendAs.patch) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be updated. * @param SendAs $postBody * @param array $optParams Optional parameters. * @return SendAs * @throws \Google\Service\Exception */ public function patch($userId, $sendAsEmail, SendAs $postBody, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('patch', [$params], SendAs::class); } /** * Updates a send-as alias. If a signature is provided, Gmail will sanitize the * HTML before saving it with the alias. Addresses other than the primary * address for the account can only be updated by service account clients that * have been delegated domain-wide authority. (sendAs.update) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be updated. * @param SendAs $postBody * @param array $optParams Optional parameters. * @return SendAs * @throws \Google\Service\Exception */ public function update($userId, $sendAsEmail, SendAs $postBody, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('update', [$params], SendAs::class); } /** * Sends a verification email to the specified send-as alias address. The * verification status must be `pending`. This method is only available to * service account clients that have been delegated domain-wide authority. * (sendAs.verify) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $sendAsEmail The send-as alias to be verified. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function verify($userId, $sendAsEmail, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail]; $params = \array_merge($params, $optParams); return $this->call('verify', [$params]); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsSendAs::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsSendAs'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersMessages.php 0000644 00000026656 15174671617 0023743 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\BatchDeleteMessagesRequest; use WPMailSMTP\Vendor\Google\Service\Gmail\BatchModifyMessagesRequest; use WPMailSMTP\Vendor\Google\Service\Gmail\ListMessagesResponse; use WPMailSMTP\Vendor\Google\Service\Gmail\Message; use WPMailSMTP\Vendor\Google\Service\Gmail\ModifyMessageRequest; /** * The "messages" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $messages = $gmailService->users_messages; * </code> */ class UsersMessages extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Deletes many messages by message ID. Provides no guarantees that messages * were not already deleted or even existed at all. (messages.batchDelete) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param BatchDeleteMessagesRequest $postBody * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function batchDelete($userId, BatchDeleteMessagesRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('batchDelete', [$params]); } /** * Modifies the labels on the specified messages. (messages.batchModify) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param BatchModifyMessagesRequest $postBody * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function batchModify($userId, BatchModifyMessagesRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('batchModify', [$params]); } /** * Immediately and permanently deletes the specified message. This operation * cannot be undone. Prefer `messages.trash` instead. (messages.delete) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the message to delete. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified message. (messages.get) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the message to retrieve. This ID is usually * retrieved using `messages.list`. The ID is also contained in the result when * a message is inserted (`messages.insert`) or imported (`messages.import`). * @param array $optParams Optional parameters. * * @opt_param string format The format to return the message in. * @opt_param string metadataHeaders When given and format is `METADATA`, only * include headers specified. * @opt_param bool temporaryEeccBypass * @return Message * @throws \Google\Service\Exception */ public function get($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], Message::class); } /** * Imports a message into only this user's mailbox, with standard email delivery * scanning and classification similar to receiving via SMTP. This method * doesn't perform SPF checks, so it might not work for some spam messages, such * as those attempting to perform domain spoofing. This method does not send a * message. (messages.import) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param Message $postBody * @param array $optParams Optional parameters. * * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and * only visible in Google Vault to a Vault administrator. Only used for Google * Workspace accounts. * @opt_param string internalDateSource Source for Gmail's internal date of the * message. * @opt_param bool neverMarkSpam Ignore the Gmail spam classifier decision and * never mark this email as SPAM in the mailbox. * @opt_param bool processForCalendar Process calendar invites in the email and * add any extracted meetings to the Google Calendar for this user. * @return Message * @throws \Google\Service\Exception */ public function import($userId, Message $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('import', [$params], Message::class); } /** * Directly inserts a message into only this user's mailbox similar to `IMAP * APPEND`, bypassing most scanning and classification. Does not send a message. * (messages.insert) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param Message $postBody * @param array $optParams Optional parameters. * * @opt_param bool deleted Mark the email as permanently deleted (not TRASH) and * only visible in Google Vault to a Vault administrator. Only used for Google * Workspace accounts. * @opt_param string internalDateSource Source for Gmail's internal date of the * message. * @return Message * @throws \Google\Service\Exception */ public function insert($userId, Message $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('insert', [$params], Message::class); } /** * Lists the messages in the user's mailbox. (messages.listUsersMessages) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * * @opt_param bool includeSpamTrash Include messages from `SPAM` and `TRASH` in * the results. * @opt_param string labelIds Only return messages with labels that match all of * the specified label IDs. Messages in a thread might have labels that other * messages in the same thread don't have. To learn more, see [Manage labels on * messages and threads](https://developers.google.com/gmail/api/guides/labels#m * anage_labels_on_messages_threads). * @opt_param string maxResults Maximum number of messages to return. This field * defaults to 100. The maximum allowed value for this field is 500. * @opt_param string pageToken Page token to retrieve a specific page of results * in the list. * @opt_param string q Only return messages matching the specified query. * Supports the same query format as the Gmail search box. For example, * `"from:someuser@example.com rfc822msgid: is:unread"`. Parameter cannot be * used when accessing the api using the gmail.metadata scope. * @opt_param bool temporaryEeccBypass * @return ListMessagesResponse * @throws \Google\Service\Exception */ public function listUsersMessages($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListMessagesResponse::class); } /** * Modifies the labels on the specified message. (messages.modify) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the message to modify. * @param ModifyMessageRequest $postBody * @param array $optParams Optional parameters. * @return Message * @throws \Google\Service\Exception */ public function modify($userId, $id, ModifyMessageRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('modify', [$params], Message::class); } /** * Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` * headers. For example usage, see [Sending * email](https://developers.google.com/gmail/api/guides/sending). * (messages.send) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param Message $postBody * @param array $optParams Optional parameters. * @return Message * @throws \Google\Service\Exception */ public function send($userId, Message $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('send', [$params], Message::class); } /** * Moves the specified message to the trash. (messages.trash) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the message to Trash. * @param array $optParams Optional parameters. * @return Message * @throws \Google\Service\Exception */ public function trash($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('trash', [$params], Message::class); } /** * Removes the specified message from the trash. (messages.untrash) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the message to remove from Trash. * @param array $optParams Optional parameters. * @return Message * @throws \Google\Service\Exception */ public function untrash($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('untrash', [$params], Message::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersMessages::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersMessages'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsFilters.php 0000644 00000007246 15174671617 0025317 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\Filter; use WPMailSMTP\Vendor\Google\Service\Gmail\ListFiltersResponse; /** * The "filters" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $filters = $gmailService->users_settings_filters; * </code> */ class UsersSettingsFilters extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates a filter. Note: you can only create a maximum of 1,000 filters. * (filters.create) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Filter $postBody * @param array $optParams Optional parameters. * @return Filter * @throws \Google\Service\Exception */ public function create($userId, Filter $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], Filter::class); } /** * Immediately and permanently deletes the specified filter. (filters.delete) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $id The ID of the filter to be deleted. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets a filter. (filters.get) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $id The ID of the filter to be fetched. * @param array $optParams Optional parameters. * @return Filter * @throws \Google\Service\Exception */ public function get($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], Filter::class); } /** * Lists the message filters of a Gmail user. (filters.listUsersSettingsFilters) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return ListFiltersResponse * @throws \Google\Service\Exception */ public function listUsersSettingsFilters($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListFiltersResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsFilters::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsFilters'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersMessagesAttachments.php 0000644 00000003757 15174671617 0026134 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\MessagePartBody; /** * The "attachments" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $attachments = $gmailService->users_messages_attachments; * </code> */ class UsersMessagesAttachments extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Gets the specified message attachment. (attachments.get) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $messageId The ID of the message containing the attachment. * @param string $id The ID of the attachment. * @param array $optParams Optional parameters. * * @opt_param bool temporaryEeccBypass * @return MessagePartBody * @throws \Google\Service\Exception */ public function get($userId, $messageId, $id, $optParams = []) { $params = ['userId' => $userId, 'messageId' => $messageId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], MessagePartBody::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersMessagesAttachments::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersMessagesAttachments'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsForwardingAddresses.php 0000644 00000011051 15174671617 0027634 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\ForwardingAddress; use WPMailSMTP\Vendor\Google\Service\Gmail\ListForwardingAddressesResponse; /** * The "forwardingAddresses" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $forwardingAddresses = $gmailService->users_settings_forwardingAddresses; * </code> */ class UsersSettingsForwardingAddresses extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates a forwarding address. If ownership verification is required, a * message will be sent to the recipient and the resource's verification status * will be set to `pending`; otherwise, the resource will be created with * verification status set to `accepted`. This method is only available to * service account clients that have been delegated domain-wide authority. * (forwardingAddresses.create) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param ForwardingAddress $postBody * @param array $optParams Optional parameters. * @return ForwardingAddress * @throws \Google\Service\Exception */ public function create($userId, ForwardingAddress $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], ForwardingAddress::class); } /** * Deletes the specified forwarding address and revokes any verification that * may have been required. This method is only available to service account * clients that have been delegated domain-wide authority. * (forwardingAddresses.delete) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $forwardingEmail The forwarding address to be deleted. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $forwardingEmail, $optParams = []) { $params = ['userId' => $userId, 'forwardingEmail' => $forwardingEmail]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified forwarding address. (forwardingAddresses.get) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $forwardingEmail The forwarding address to be retrieved. * @param array $optParams Optional parameters. * @return ForwardingAddress * @throws \Google\Service\Exception */ public function get($userId, $forwardingEmail, $optParams = []) { $params = ['userId' => $userId, 'forwardingEmail' => $forwardingEmail]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], ForwardingAddress::class); } /** * Lists the forwarding addresses for the specified account. * (forwardingAddresses.listUsersSettingsForwardingAddresses) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return ListForwardingAddressesResponse * @throws \Google\Service\Exception */ public function listUsersSettingsForwardingAddresses($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListForwardingAddressesResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsForwardingAddresses::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsForwardingAddresses'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersDrafts.php 0000644 00000013226 15174671617 0023404 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\Draft; use WPMailSMTP\Vendor\Google\Service\Gmail\ListDraftsResponse; use WPMailSMTP\Vendor\Google\Service\Gmail\Message; /** * The "drafts" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $drafts = $gmailService->users_drafts; * </code> */ class UsersDrafts extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates a new draft with the `DRAFT` label. (drafts.create) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param Draft $postBody * @param array $optParams Optional parameters. * @return Draft * @throws \Google\Service\Exception */ public function create($userId, Draft $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], Draft::class); } /** * Immediately and permanently deletes the specified draft. Does not simply * trash it. (drafts.delete) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the draft to delete. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified draft. (drafts.get) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the draft to retrieve. * @param array $optParams Optional parameters. * * @opt_param string format The format to return the draft in. * @return Draft * @throws \Google\Service\Exception */ public function get($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], Draft::class); } /** * Lists the drafts in the user's mailbox. (drafts.listUsersDrafts) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * * @opt_param bool includeSpamTrash Include drafts from `SPAM` and `TRASH` in * the results. * @opt_param string maxResults Maximum number of drafts to return. This field * defaults to 100. The maximum allowed value for this field is 500. * @opt_param string pageToken Page token to retrieve a specific page of results * in the list. * @opt_param string q Only return draft messages matching the specified query. * Supports the same query format as the Gmail search box. For example, * `"from:someuser@example.com rfc822msgid: is:unread"`. * @return ListDraftsResponse * @throws \Google\Service\Exception */ public function listUsersDrafts($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListDraftsResponse::class); } /** * Sends the specified, existing draft to the recipients in the `To`, `Cc`, and * `Bcc` headers. (drafts.send) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param Draft $postBody * @param array $optParams Optional parameters. * @return Message * @throws \Google\Service\Exception */ public function send($userId, Draft $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('send', [$params], Message::class); } /** * Replaces a draft's content. (drafts.update) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the draft to update. * @param Draft $postBody * @param array $optParams Optional parameters. * @return Draft * @throws \Google\Service\Exception */ public function update($userId, $id, Draft $postBody, $optParams = []) { $params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('update', [$params], Draft::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersDrafts::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersDrafts'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsSendAsSmimeInfo.php 0000644 00000012572 15174671617 0026671 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\ListSmimeInfoResponse; use WPMailSMTP\Vendor\Google\Service\Gmail\SmimeInfo; /** * The "smimeInfo" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $smimeInfo = $gmailService->users_settings_sendAs_smimeInfo; * </code> */ class UsersSettingsSendAsSmimeInfo extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Deletes the specified S/MIME config for the specified send-as alias. * (smimeInfo.delete) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $sendAsEmail The email address that appears in the "From:" * header for mail sent using this alias. * @param string $id The immutable ID for the SmimeInfo. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $sendAsEmail, $id, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified S/MIME config for the specified send-as alias. * (smimeInfo.get) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $sendAsEmail The email address that appears in the "From:" * header for mail sent using this alias. * @param string $id The immutable ID for the SmimeInfo. * @param array $optParams Optional parameters. * @return SmimeInfo * @throws \Google\Service\Exception */ public function get($userId, $sendAsEmail, $id, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], SmimeInfo::class); } /** * Insert (upload) the given S/MIME config for the specified send-as alias. Note * that pkcs12 format is required for the key. (smimeInfo.insert) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $sendAsEmail The email address that appears in the "From:" * header for mail sent using this alias. * @param SmimeInfo $postBody * @param array $optParams Optional parameters. * @return SmimeInfo * @throws \Google\Service\Exception */ public function insert($userId, $sendAsEmail, SmimeInfo $postBody, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('insert', [$params], SmimeInfo::class); } /** * Lists S/MIME configs for the specified send-as alias. * (smimeInfo.listUsersSettingsSendAsSmimeInfo) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $sendAsEmail The email address that appears in the "From:" * header for mail sent using this alias. * @param array $optParams Optional parameters. * @return ListSmimeInfoResponse * @throws \Google\Service\Exception */ public function listUsersSettingsSendAsSmimeInfo($userId, $sendAsEmail, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListSmimeInfoResponse::class); } /** * Sets the default S/MIME config for the specified send-as alias. * (smimeInfo.setDefault) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $sendAsEmail The email address that appears in the "From:" * header for mail sent using this alias. * @param string $id The immutable ID for the SmimeInfo. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function setDefault($userId, $sendAsEmail, $id, $optParams = []) { $params = ['userId' => $userId, 'sendAsEmail' => $sendAsEmail, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('setDefault', [$params]); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsSendAsSmimeInfo::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsSendAsSmimeInfo'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsDelegates.php 0000644 00000012471 15174671617 0025600 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\Delegate; use WPMailSMTP\Vendor\Google\Service\Gmail\ListDelegatesResponse; /** * The "delegates" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $delegates = $gmailService->users_settings_delegates; * </code> */ class UsersSettingsDelegates extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Adds a delegate with its verification status set directly to `accepted`, * without sending any verification email. The delegate user must be a member of * the same Google Workspace organization as the delegator user. Gmail imposes * limitations on the number of delegates and delegators each user in a Google * Workspace organization can have. These limits depend on your organization, * but in general each user can have up to 25 delegates and up to 10 delegators. * Note that a delegate user must be referred to by their primary email address, * and not an email alias. Also note that when a new delegate is created, there * may be up to a one minute delay before the new delegate is available for use. * This method is only available to service account clients that have been * delegated domain-wide authority. (delegates.create) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param Delegate $postBody * @param array $optParams Optional parameters. * @return Delegate * @throws \Google\Service\Exception */ public function create($userId, Delegate $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], Delegate::class); } /** * Removes the specified delegate (which can be of any verification status), and * revokes any verification that may have been required for using it. Note that * a delegate user must be referred to by their primary email address, and not * an email alias. This method is only available to service account clients that * have been delegated domain-wide authority. (delegates.delete) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $delegateEmail The email address of the user to be removed as a * delegate. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $delegateEmail, $optParams = []) { $params = ['userId' => $userId, 'delegateEmail' => $delegateEmail]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified delegate. Note that a delegate user must be referred to by * their primary email address, and not an email alias. This method is only * available to service account clients that have been delegated domain-wide * authority. (delegates.get) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param string $delegateEmail The email address of the user whose delegate * relationship is to be retrieved. * @param array $optParams Optional parameters. * @return Delegate * @throws \Google\Service\Exception */ public function get($userId, $delegateEmail, $optParams = []) { $params = ['userId' => $userId, 'delegateEmail' => $delegateEmail]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], Delegate::class); } /** * Lists the delegates for the specified account. This method is only available * to service account clients that have been delegated domain-wide authority. * (delegates.listUsersSettingsDelegates) * * @param string $userId User's email address. The special value "me" can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return ListDelegatesResponse * @throws \Google\Service\Exception */ public function listUsersSettingsDelegates($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListDelegatesResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsDelegates::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsDelegates'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCseIdentities.php 0000644 00000013705 15174671617 0026440 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\CseIdentity; use WPMailSMTP\Vendor\Google\Service\Gmail\ListCseIdentitiesResponse; /** * The "identities" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $identities = $gmailService->users_settings_cse_identities; * </code> */ class UsersSettingsCseIdentities extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates and configures a client-side encryption identity that's authorized to * send mail from the user account. Google publishes the S/MIME certificate to a * shared domain-wide directory so that people within a Google Workspace * organization can encrypt and send mail to the identity. (identities.create) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param CseIdentity $postBody * @param array $optParams Optional parameters. * @return CseIdentity * @throws \Google\Service\Exception */ public function create($userId, CseIdentity $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], CseIdentity::class); } /** * Deletes a client-side encryption identity. The authenticated user can no * longer use the identity to send encrypted messages. You cannot restore the * identity after you delete it. Instead, use the CreateCseIdentity method to * create another identity with the same configuration. (identities.delete) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $cseEmailAddress The primary email address associated with the * client-side encryption identity configuration that's removed. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $cseEmailAddress, $optParams = []) { $params = ['userId' => $userId, 'cseEmailAddress' => $cseEmailAddress]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Retrieves a client-side encryption identity configuration. (identities.get) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $cseEmailAddress The primary email address associated with the * client-side encryption identity configuration that's retrieved. * @param array $optParams Optional parameters. * @return CseIdentity * @throws \Google\Service\Exception */ public function get($userId, $cseEmailAddress, $optParams = []) { $params = ['userId' => $userId, 'cseEmailAddress' => $cseEmailAddress]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], CseIdentity::class); } /** * Lists the client-side encrypted identities for an authenticated user. * (identities.listUsersSettingsCseIdentities) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param array $optParams Optional parameters. * * @opt_param int pageSize The number of identities to return. If not provided, * the page size will default to 20 entries. * @opt_param string pageToken Pagination token indicating which page of * identities to return. If the token is not supplied, then the API will return * the first page of results. * @return ListCseIdentitiesResponse * @throws \Google\Service\Exception */ public function listUsersSettingsCseIdentities($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListCseIdentitiesResponse::class); } /** * Associates a different key pair with an existing client-side encryption * identity. The updated key pair must validate against Google's [S/MIME * certificate profiles](https://support.google.com/a/answer/7300887). * (identities.patch) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $emailAddress The email address of the client-side encryption * identity to update. * @param CseIdentity $postBody * @param array $optParams Optional parameters. * @return CseIdentity * @throws \Google\Service\Exception */ public function patch($userId, $emailAddress, CseIdentity $postBody, $optParams = []) { $params = ['userId' => $userId, 'emailAddress' => $emailAddress, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('patch', [$params], CseIdentity::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsCseIdentities::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsCseIdentities'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersLabels.php 0000644 00000011735 15174671617 0023366 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\Label; use WPMailSMTP\Vendor\Google\Service\Gmail\ListLabelsResponse; /** * The "labels" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $labels = $gmailService->users_labels; * </code> */ class UsersLabels extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates a new label. (labels.create) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param Label $postBody * @param array $optParams Optional parameters. * @return Label * @throws \Google\Service\Exception */ public function create($userId, Label $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], Label::class); } /** * Immediately and permanently deletes the specified label and removes it from * any messages and threads that it is applied to. (labels.delete) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the label to delete. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified label. (labels.get) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the label to retrieve. * @param array $optParams Optional parameters. * @return Label * @throws \Google\Service\Exception */ public function get($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], Label::class); } /** * Lists all labels in the user's mailbox. (labels.listUsersLabels) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @return ListLabelsResponse * @throws \Google\Service\Exception */ public function listUsersLabels($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListLabelsResponse::class); } /** * Patch the specified label. (labels.patch) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the label to update. * @param Label $postBody * @param array $optParams Optional parameters. * @return Label * @throws \Google\Service\Exception */ public function patch($userId, $id, Label $postBody, $optParams = []) { $params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('patch', [$params], Label::class); } /** * Updates the specified label. (labels.update) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the label to update. * @param Label $postBody * @param array $optParams Optional parameters. * @return Label * @throws \Google\Service\Exception */ public function update($userId, $id, Label $postBody, $optParams = []) { $params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('update', [$params], Label::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersLabels::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersLabels'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/Users.php 0000644 00000006013 15174671617 0022234 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\Profile; use WPMailSMTP\Vendor\Google\Service\Gmail\WatchRequest; use WPMailSMTP\Vendor\Google\Service\Gmail\WatchResponse; /** * The "users" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $users = $gmailService->users; * </code> */ class Users extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Gets the current user's Gmail profile. (users.getProfile) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * * @opt_param bool temporaryEeccBypass * @return Profile * @throws \Google\Service\Exception */ public function getProfile($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('getProfile', [$params], Profile::class); } /** * Stop receiving push notifications for the given user mailbox. (users.stop) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function stop($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('stop', [$params]); } /** * Set up or update a push notification watch on the given user mailbox. * (users.watch) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param WatchRequest $postBody * @param array $optParams Optional parameters. * @return WatchResponse * @throws \Google\Service\Exception */ public function watch($userId, WatchRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('watch', [$params], WatchResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Users::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_Users'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCse.php 0000644 00000002132 15174671617 0024406 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; /** * The "cse" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $cse = $gmailService->users_settings_cse; * </code> */ class UsersSettingsCse extends \WPMailSMTP\Vendor\Google\Service\Resource { } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsCse::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsCse'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCseKeypairs.php 0000644 00000016053 15174671617 0026125 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\CseKeyPair; use WPMailSMTP\Vendor\Google\Service\Gmail\DisableCseKeyPairRequest; use WPMailSMTP\Vendor\Google\Service\Gmail\EnableCseKeyPairRequest; use WPMailSMTP\Vendor\Google\Service\Gmail\ListCseKeyPairsResponse; use WPMailSMTP\Vendor\Google\Service\Gmail\ObliterateCseKeyPairRequest; /** * The "keypairs" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $keypairs = $gmailService->users_settings_cse_keypairs; * </code> */ class UsersSettingsCseKeypairs extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Creates and uploads a client-side encryption S/MIME public key certificate * chain and private key metadata for the authenticated user. (keypairs.create) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param CseKeyPair $postBody * @param array $optParams Optional parameters. * @return CseKeyPair * @throws \Google\Service\Exception */ public function create($userId, CseKeyPair $postBody, $optParams = []) { $params = ['userId' => $userId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('create', [$params], CseKeyPair::class); } /** * Turns off a client-side encryption key pair. The authenticated user can no * longer use the key pair to decrypt incoming CSE message texts or sign * outgoing CSE mail. To regain access, use the EnableCseKeyPair to turn on the * key pair. After 30 days, you can permanently delete the key pair by using the * ObliterateCseKeyPair method. (keypairs.disable) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $keyPairId The identifier of the key pair to turn off. * @param DisableCseKeyPairRequest $postBody * @param array $optParams Optional parameters. * @return CseKeyPair * @throws \Google\Service\Exception */ public function disable($userId, $keyPairId, DisableCseKeyPairRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'keyPairId' => $keyPairId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('disable', [$params], CseKeyPair::class); } /** * Turns on a client-side encryption key pair that was turned off. The key pair * becomes active again for any associated client-side encryption identities. * (keypairs.enable) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $keyPairId The identifier of the key pair to turn on. * @param EnableCseKeyPairRequest $postBody * @param array $optParams Optional parameters. * @return CseKeyPair * @throws \Google\Service\Exception */ public function enable($userId, $keyPairId, EnableCseKeyPairRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'keyPairId' => $keyPairId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('enable', [$params], CseKeyPair::class); } /** * Retrieves an existing client-side encryption key pair. (keypairs.get) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $keyPairId The identifier of the key pair to retrieve. * @param array $optParams Optional parameters. * @return CseKeyPair * @throws \Google\Service\Exception */ public function get($userId, $keyPairId, $optParams = []) { $params = ['userId' => $userId, 'keyPairId' => $keyPairId]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], CseKeyPair::class); } /** * Lists client-side encryption key pairs for an authenticated user. * (keypairs.listUsersSettingsCseKeypairs) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param array $optParams Optional parameters. * * @opt_param int pageSize The number of key pairs to return. If not provided, * the page size will default to 20 entries. * @opt_param string pageToken Pagination token indicating which page of key * pairs to return. If the token is not supplied, then the API will return the * first page of results. * @return ListCseKeyPairsResponse * @throws \Google\Service\Exception */ public function listUsersSettingsCseKeypairs($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListCseKeyPairsResponse::class); } /** * Deletes a client-side encryption key pair permanently and immediately. You * can only permanently delete key pairs that have been turned off for more than * 30 days. To turn off a key pair, use the DisableCseKeyPair method. Gmail * can't restore or decrypt any messages that were encrypted by an obliterated * key. Authenticated users and Google Workspace administrators lose access to * reading the encrypted messages. (keypairs.obliterate) * * @param string $userId The requester's primary email address. To indicate the * authenticated user, you can use the special value `me`. * @param string $keyPairId The identifier of the key pair to obliterate. * @param ObliterateCseKeyPairRequest $postBody * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function obliterate($userId, $keyPairId, ObliterateCseKeyPairRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'keyPairId' => $keyPairId, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('obliterate', [$params]); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersSettingsCseKeypairs::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersSettingsCseKeypairs'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersThreads.php 0000644 00000014610 15174671617 0023551 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\ListThreadsResponse; use WPMailSMTP\Vendor\Google\Service\Gmail\ModifyThreadRequest; use WPMailSMTP\Vendor\Google\Service\Gmail\Thread; /** * The "threads" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $threads = $gmailService->users_threads; * </code> */ class UsersThreads extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Immediately and permanently deletes the specified thread. Any messages that * belong to the thread are also deleted. This operation cannot be undone. * Prefer `threads.trash` instead. (threads.delete) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id ID of the Thread to delete. * @param array $optParams Optional parameters. * @throws \Google\Service\Exception */ public function delete($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('delete', [$params]); } /** * Gets the specified thread. (threads.get) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the thread to retrieve. * @param array $optParams Optional parameters. * * @opt_param string format The format to return the messages in. * @opt_param string metadataHeaders When given and format is METADATA, only * include headers specified. * @opt_param bool temporaryEeccBypass * @return Thread * @throws \Google\Service\Exception */ public function get($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('get', [$params], Thread::class); } /** * Lists the threads in the user's mailbox. (threads.listUsersThreads) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * * @opt_param bool includeSpamTrash Include threads from `SPAM` and `TRASH` in * the results. * @opt_param string labelIds Only return threads with labels that match all of * the specified label IDs. * @opt_param string maxResults Maximum number of threads to return. This field * defaults to 100. The maximum allowed value for this field is 500. * @opt_param string pageToken Page token to retrieve a specific page of results * in the list. * @opt_param string q Only return threads matching the specified query. * Supports the same query format as the Gmail search box. For example, * `"from:someuser@example.com rfc822msgid: is:unread"`. Parameter cannot be * used when accessing the api using the gmail.metadata scope. * @opt_param bool temporaryEeccBypass * @return ListThreadsResponse * @throws \Google\Service\Exception */ public function listUsersThreads($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListThreadsResponse::class); } /** * Modifies the labels applied to the thread. This applies to all messages in * the thread. (threads.modify) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the thread to modify. * @param ModifyThreadRequest $postBody * @param array $optParams Optional parameters. * @return Thread * @throws \Google\Service\Exception */ public function modify($userId, $id, ModifyThreadRequest $postBody, $optParams = []) { $params = ['userId' => $userId, 'id' => $id, 'postBody' => $postBody]; $params = \array_merge($params, $optParams); return $this->call('modify', [$params], Thread::class); } /** * Moves the specified thread to the trash. Any messages that belong to the * thread are also moved to the trash. (threads.trash) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the thread to Trash. * @param array $optParams Optional parameters. * @return Thread * @throws \Google\Service\Exception */ public function trash($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('trash', [$params], Thread::class); } /** * Removes the specified thread from the trash. Any messages that belong to the * thread are also removed from the trash. (threads.untrash) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param string $id The ID of the thread to remove from Trash. * @param array $optParams Optional parameters. * @return Thread * @throws \Google\Service\Exception */ public function untrash($userId, $id, $optParams = []) { $params = ['userId' => $userId, 'id' => $id]; $params = \array_merge($params, $optParams); return $this->call('untrash', [$params], Thread::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersThreads::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersThreads'); vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersHistory.php 0000644 00000006154 15174671617 0023624 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail\Resource; use WPMailSMTP\Vendor\Google\Service\Gmail\ListHistoryResponse; /** * The "history" collection of methods. * Typical usage is: * <code> * $gmailService = new Google\Service\Gmail(...); * $history = $gmailService->users_history; * </code> */ class UsersHistory extends \WPMailSMTP\Vendor\Google\Service\Resource { /** * Lists the history of all changes to the given mailbox. History results are * returned in chronological order (increasing `historyId`). * (history.listUsersHistory) * * @param string $userId The user's email address. The special value `me` can be * used to indicate the authenticated user. * @param array $optParams Optional parameters. * * @opt_param string historyTypes History types to be returned by the function * @opt_param string labelId Only return messages with a label matching the ID. * @opt_param string maxResults Maximum number of history records to return. * This field defaults to 100. The maximum allowed value for this field is 500. * @opt_param string pageToken Page token to retrieve a specific page of results * in the list. * @opt_param string startHistoryId Required. Returns history records after the * specified `startHistoryId`. The supplied `startHistoryId` should be obtained * from the `historyId` of a message, thread, or previous `list` response. * History IDs increase chronologically but are not contiguous with random gaps * in between valid IDs. Supplying an invalid or out of date `startHistoryId` * typically returns an `HTTP 404` error code. A `historyId` is typically valid * for at least a week, but in some rare circumstances may be valid for only a * few hours. If you receive an `HTTP 404` error response, your application * should perform a full sync. If you receive no `nextPageToken` in the * response, there are no updates to retrieve and you can store the returned * `historyId` for a future request. * @return ListHistoryResponse * @throws \Google\Service\Exception */ public function listUsersHistory($userId, $optParams = []) { $params = ['userId' => $userId]; $params = \array_merge($params, $optParams); return $this->call('list', [$params], ListHistoryResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(UsersHistory::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_Resource_UsersHistory'); vendor_prefixed/google/apiclient-services/src/Gmail/HistoryLabelAdded.php 0000644 00000003065 15174671617 0022673 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class HistoryLabelAdded extends \WPMailSMTP\Vendor\Google\Collection { protected $collection_key = 'labelIds'; /** * @var string[] */ public $labelIds; protected $messageType = Message::class; protected $messageDataType = ''; /** * @param string[] */ public function setLabelIds($labelIds) { $this->labelIds = $labelIds; } /** * @return string[] */ public function getLabelIds() { return $this->labelIds; } /** * @param Message */ public function setMessage(Message $message) { $this->message = $message; } /** * @return Message */ public function getMessage() { return $this->message; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(HistoryLabelAdded::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_HistoryLabelAdded'); vendor_prefixed/google/apiclient-services/src/Gmail/SendAs.php 0000644 00000007330 15174671617 0020524 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service\Gmail; class SendAs extends \WPMailSMTP\Vendor\Google\Model { /** * @var string */ public $displayName; /** * @var bool */ public $isDefault; /** * @var bool */ public $isPrimary; /** * @var string */ public $replyToAddress; /** * @var string */ public $sendAsEmail; /** * @var string */ public $signature; protected $smtpMsaType = SmtpMsa::class; protected $smtpMsaDataType = ''; /** * @var bool */ public $treatAsAlias; /** * @var string */ public $verificationStatus; /** * @param string */ public function setDisplayName($displayName) { $this->displayName = $displayName; } /** * @return string */ public function getDisplayName() { return $this->displayName; } /** * @param bool */ public function setIsDefault($isDefault) { $this->isDefault = $isDefault; } /** * @return bool */ public function getIsDefault() { return $this->isDefault; } /** * @param bool */ public function setIsPrimary($isPrimary) { $this->isPrimary = $isPrimary; } /** * @return bool */ public function getIsPrimary() { return $this->isPrimary; } /** * @param string */ public function setReplyToAddress($replyToAddress) { $this->replyToAddress = $replyToAddress; } /** * @return string */ public function getReplyToAddress() { return $this->replyToAddress; } /** * @param string */ public function setSendAsEmail($sendAsEmail) { $this->sendAsEmail = $sendAsEmail; } /** * @return string */ public function getSendAsEmail() { return $this->sendAsEmail; } /** * @param string */ public function setSignature($signature) { $this->signature = $signature; } /** * @return string */ public function getSignature() { return $this->signature; } /** * @param SmtpMsa */ public function setSmtpMsa(SmtpMsa $smtpMsa) { $this->smtpMsa = $smtpMsa; } /** * @return SmtpMsa */ public function getSmtpMsa() { return $this->smtpMsa; } /** * @param bool */ public function setTreatAsAlias($treatAsAlias) { $this->treatAsAlias = $treatAsAlias; } /** * @return bool */ public function getTreatAsAlias() { return $this->treatAsAlias; } /** * @param string */ public function setVerificationStatus($verificationStatus) { $this->verificationStatus = $verificationStatus; } /** * @return string */ public function getVerificationStatus() { return $this->verificationStatus; } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(SendAs::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail_SendAs'); vendor_prefixed/google/apiclient-services/src/Gmail.php 0000644 00000066533 15174671617 0017361 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Service; use WPMailSMTP\Vendor\Google\Client; /** * Service definition for Gmail (v1). * * <p> * The Gmail API lets you view and manage Gmail mailbox data like threads, * messages, and labels.</p> * * <p> * For more information about this service, see the API * <a href="https://developers.google.com/gmail/api/" target="_blank">Documentation</a> * </p> * * @author Google, Inc. */ class Gmail extends \WPMailSMTP\Vendor\Google\Service { /** Read, compose, send, and permanently delete all your email from Gmail. */ const MAIL_GOOGLE_COM = "https://mail.google.com/"; /** Manage drafts and send emails when you interact with the add-on. */ const GMAIL_ADDONS_CURRENT_ACTION_COMPOSE = "https://www.googleapis.com/auth/gmail.addons.current.action.compose"; /** View your email messages when you interact with the add-on. */ const GMAIL_ADDONS_CURRENT_MESSAGE_ACTION = "https://www.googleapis.com/auth/gmail.addons.current.message.action"; /** View your email message metadata when the add-on is running. */ const GMAIL_ADDONS_CURRENT_MESSAGE_METADATA = "https://www.googleapis.com/auth/gmail.addons.current.message.metadata"; /** View your email messages when the add-on is running. */ const GMAIL_ADDONS_CURRENT_MESSAGE_READONLY = "https://www.googleapis.com/auth/gmail.addons.current.message.readonly"; /** Manage drafts and send emails. */ const GMAIL_COMPOSE = "https://www.googleapis.com/auth/gmail.compose"; /** Add emails into your Gmail mailbox. */ const GMAIL_INSERT = "https://www.googleapis.com/auth/gmail.insert"; /** See and edit your email labels. */ const GMAIL_LABELS = "https://www.googleapis.com/auth/gmail.labels"; /** View your email message metadata such as labels and headers, but not the email body. */ const GMAIL_METADATA = "https://www.googleapis.com/auth/gmail.metadata"; /** Read, compose, and send emails from your Gmail account. */ const GMAIL_MODIFY = "https://www.googleapis.com/auth/gmail.modify"; /** View your email messages and settings. */ const GMAIL_READONLY = "https://www.googleapis.com/auth/gmail.readonly"; /** Send email on your behalf. */ const GMAIL_SEND = "https://www.googleapis.com/auth/gmail.send"; /** See, edit, create, or change your email settings and filters in Gmail. */ const GMAIL_SETTINGS_BASIC = "https://www.googleapis.com/auth/gmail.settings.basic"; /** Manage your sensitive mail settings, including who can manage your mail. */ const GMAIL_SETTINGS_SHARING = "https://www.googleapis.com/auth/gmail.settings.sharing"; public $users; public $users_drafts; public $users_history; public $users_labels; public $users_messages; public $users_messages_attachments; public $users_settings; public $users_settings_cse_identities; public $users_settings_cse_keypairs; public $users_settings_delegates; public $users_settings_filters; public $users_settings_forwardingAddresses; public $users_settings_sendAs; public $users_settings_sendAs_smimeInfo; public $users_threads; public $rootUrlTemplate; /** * Constructs the internal representation of the Gmail service. * * @param Client|array $clientOrConfig The client used to deliver requests, or a * config array to pass to a new Client instance. * @param string $rootUrl The root URL used for requests to the service. */ public function __construct($clientOrConfig = [], $rootUrl = null) { parent::__construct($clientOrConfig); $this->rootUrl = $rootUrl ?: 'https://gmail.googleapis.com/'; $this->rootUrlTemplate = $rootUrl ?: 'https://gmail.UNIVERSE_DOMAIN/'; $this->servicePath = ''; $this->batchPath = 'batch'; $this->version = 'v1'; $this->serviceName = 'gmail'; $this->users = new Gmail\Resource\Users($this, $this->serviceName, 'users', ['methods' => ['getProfile' => ['path' => 'gmail/v1/users/{userId}/profile', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'temporaryEeccBypass' => ['location' => 'query', 'type' => 'boolean']]], 'stop' => ['path' => 'gmail/v1/users/{userId}/stop', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'watch' => ['path' => 'gmail/v1/users/{userId}/watch', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_drafts = new Gmail\Resource\UsersDrafts($this, $this->serviceName, 'drafts', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/drafts', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/drafts/{id}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/drafts/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'format' => ['location' => 'query', 'type' => 'string']]], 'list' => ['path' => 'gmail/v1/users/{userId}/drafts', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'includeSpamTrash' => ['location' => 'query', 'type' => 'boolean'], 'maxResults' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string'], 'q' => ['location' => 'query', 'type' => 'string']]], 'send' => ['path' => 'gmail/v1/users/{userId}/drafts/send', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'update' => ['path' => 'gmail/v1/users/{userId}/drafts/{id}', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_history = new Gmail\Resource\UsersHistory($this, $this->serviceName, 'history', ['methods' => ['list' => ['path' => 'gmail/v1/users/{userId}/history', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'historyTypes' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'labelId' => ['location' => 'query', 'type' => 'string'], 'maxResults' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string'], 'startHistoryId' => ['location' => 'query', 'type' => 'string']]]]]); $this->users_labels = new Gmail\Resource\UsersLabels($this, $this->serviceName, 'labels', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/labels', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/labels/{id}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/labels/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/labels', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'patch' => ['path' => 'gmail/v1/users/{userId}/labels/{id}', 'httpMethod' => 'PATCH', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'update' => ['path' => 'gmail/v1/users/{userId}/labels/{id}', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_messages = new Gmail\Resource\UsersMessages($this, $this->serviceName, 'messages', ['methods' => ['batchDelete' => ['path' => 'gmail/v1/users/{userId}/messages/batchDelete', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'batchModify' => ['path' => 'gmail/v1/users/{userId}/messages/batchModify', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/messages/{id}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/messages/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'format' => ['location' => 'query', 'type' => 'string'], 'metadataHeaders' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'temporaryEeccBypass' => ['location' => 'query', 'type' => 'boolean']]], 'import' => ['path' => 'gmail/v1/users/{userId}/messages/import', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'deleted' => ['location' => 'query', 'type' => 'boolean'], 'internalDateSource' => ['location' => 'query', 'type' => 'string'], 'neverMarkSpam' => ['location' => 'query', 'type' => 'boolean'], 'processForCalendar' => ['location' => 'query', 'type' => 'boolean']]], 'insert' => ['path' => 'gmail/v1/users/{userId}/messages', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'deleted' => ['location' => 'query', 'type' => 'boolean'], 'internalDateSource' => ['location' => 'query', 'type' => 'string']]], 'list' => ['path' => 'gmail/v1/users/{userId}/messages', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'includeSpamTrash' => ['location' => 'query', 'type' => 'boolean'], 'labelIds' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'maxResults' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string'], 'q' => ['location' => 'query', 'type' => 'string'], 'temporaryEeccBypass' => ['location' => 'query', 'type' => 'boolean']]], 'modify' => ['path' => 'gmail/v1/users/{userId}/messages/{id}/modify', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'send' => ['path' => 'gmail/v1/users/{userId}/messages/send', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'trash' => ['path' => 'gmail/v1/users/{userId}/messages/{id}/trash', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'untrash' => ['path' => 'gmail/v1/users/{userId}/messages/{id}/untrash', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_messages_attachments = new Gmail\Resource\UsersMessagesAttachments($this, $this->serviceName, 'attachments', ['methods' => ['get' => ['path' => 'gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'messageId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'temporaryEeccBypass' => ['location' => 'query', 'type' => 'boolean']]]]]); $this->users_settings = new Gmail\Resource\UsersSettings($this, $this->serviceName, 'settings', ['methods' => ['getAutoForwarding' => ['path' => 'gmail/v1/users/{userId}/settings/autoForwarding', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getImap' => ['path' => 'gmail/v1/users/{userId}/settings/imap', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getLanguage' => ['path' => 'gmail/v1/users/{userId}/settings/language', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getPop' => ['path' => 'gmail/v1/users/{userId}/settings/pop', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getVacation' => ['path' => 'gmail/v1/users/{userId}/settings/vacation', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'updateAutoForwarding' => ['path' => 'gmail/v1/users/{userId}/settings/autoForwarding', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'updateImap' => ['path' => 'gmail/v1/users/{userId}/settings/imap', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'updateLanguage' => ['path' => 'gmail/v1/users/{userId}/settings/language', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'updatePop' => ['path' => 'gmail/v1/users/{userId}/settings/pop', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'updateVacation' => ['path' => 'gmail/v1/users/{userId}/settings/vacation', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_cse_identities = new Gmail\Resource\UsersSettingsCseIdentities($this, $this->serviceName, 'identities', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/settings/cse/identities', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'cseEmailAddress' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'cseEmailAddress' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/cse/identities', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'patch' => ['path' => 'gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}', 'httpMethod' => 'PATCH', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'emailAddress' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_cse_keypairs = new Gmail\Resource\UsersSettingsCseKeypairs($this, $this->serviceName, 'keypairs', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/settings/cse/keypairs', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'disable' => ['path' => 'gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disable', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'keyPairId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'enable' => ['path' => 'gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enable', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'keyPairId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'keyPairId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/cse/keypairs', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'obliterate' => ['path' => 'gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliterate', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'keyPairId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_delegates = new Gmail\Resource\UsersSettingsDelegates($this, $this->serviceName, 'delegates', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/settings/delegates', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'delegateEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/delegates/{delegateEmail}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'delegateEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/delegates', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_filters = new Gmail\Resource\UsersSettingsFilters($this, $this->serviceName, 'filters', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/settings/filters', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/settings/filters/{id}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/filters/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/filters', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_forwardingAddresses = new Gmail\Resource\UsersSettingsForwardingAddresses($this, $this->serviceName, 'forwardingAddresses', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'forwardingEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'forwardingEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/forwardingAddresses', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_sendAs = new Gmail\Resource\UsersSettingsSendAs($this, $this->serviceName, 'sendAs', ['methods' => ['create' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'patch' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'PATCH', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'update' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}', 'httpMethod' => 'PUT', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'verify' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verify', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_settings_sendAs_smimeInfo = new Gmail\Resource\UsersSettingsSendAsSmimeInfo($this, $this->serviceName, 'smimeInfo', ['methods' => ['delete' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'insert' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'setDefault' => ['path' => 'gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefault', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'sendAsEmail' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); $this->users_threads = new Gmail\Resource\UsersThreads($this, $this->serviceName, 'threads', ['methods' => ['delete' => ['path' => 'gmail/v1/users/{userId}/threads/{id}', 'httpMethod' => 'DELETE', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'gmail/v1/users/{userId}/threads/{id}', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'format' => ['location' => 'query', 'type' => 'string'], 'metadataHeaders' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'temporaryEeccBypass' => ['location' => 'query', 'type' => 'boolean']]], 'list' => ['path' => 'gmail/v1/users/{userId}/threads', 'httpMethod' => 'GET', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'includeSpamTrash' => ['location' => 'query', 'type' => 'boolean'], 'labelIds' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'maxResults' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string'], 'q' => ['location' => 'query', 'type' => 'string'], 'temporaryEeccBypass' => ['location' => 'query', 'type' => 'boolean']]], 'modify' => ['path' => 'gmail/v1/users/{userId}/threads/{id}/modify', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'trash' => ['path' => 'gmail/v1/users/{userId}/threads/{id}/trash', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'untrash' => ['path' => 'gmail/v1/users/{userId}/threads/{id}/untrash', 'httpMethod' => 'POST', 'parameters' => ['userId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'id' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]); } } // Adding a class alias for backwards compatibility with the previous class name. \class_alias(Gmail::class, 'WPMailSMTP\\Vendor\\Google_Service_Gmail'); vendor_prefixed/google/apiclient/LICENSE 0000644 00000024020 15174671617 0014175 0 ustar 00 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. vendor_prefixed/google/apiclient/src/Utils/UriTemplate.php 0000644 00000024456 15174671617 0020040 0 ustar 00 <?php /* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Utils; /** * Implementation of levels 1-3 of the URI Template spec. * @see http://tools.ietf.org/html/rfc6570 */ class UriTemplate { const TYPE_MAP = "1"; const TYPE_LIST = "2"; const TYPE_SCALAR = "4"; /** * @var array $operators * These are valid at the start of a template block to * modify the way in which the variables inside are * processed. */ private $operators = ["+" => "reserved", "/" => "segments", "." => "dotprefix", "#" => "fragment", ";" => "semicolon", "?" => "form", "&" => "continuation"]; /** * @var array<string> * These are the characters which should not be URL encoded in reserved * strings. */ private $reserved = ["=", ",", "!", "@", "|", ":", "/", "?", "#", "[", "]", '$', "&", "'", "(", ")", "*", "+", ";"]; private $reservedEncoded = ["%3D", "%2C", "%21", "%40", "%7C", "%3A", "%2F", "%3F", "%23", "%5B", "%5D", "%24", "%26", "%27", "%28", "%29", "%2A", "%2B", "%3B"]; public function parse($string, array $parameters) { return $this->resolveNextSection($string, $parameters); } /** * This function finds the first matching {...} block and * executes the replacement. It then calls itself to find * subsequent blocks, if any. */ private function resolveNextSection($string, $parameters) { $start = \strpos($string, "{"); if ($start === \false) { return $string; } $end = \strpos($string, "}"); if ($end === \false) { return $string; } $string = $this->replace($string, $start, $end, $parameters); return $this->resolveNextSection($string, $parameters); } private function replace($string, $start, $end, $parameters) { // We know a data block will have {} round it, so we can strip that. $data = \substr($string, $start + 1, $end - $start - 1); // If the first character is one of the reserved operators, it effects // the processing of the stream. if (isset($this->operators[$data[0]])) { $op = $this->operators[$data[0]]; $data = \substr($data, 1); $prefix = ""; $prefix_on_missing = \false; switch ($op) { case "reserved": // Reserved means certain characters should not be URL encoded $data = $this->replaceVars($data, $parameters, ",", null, \true); break; case "fragment": // Comma separated with fragment prefix. Bare values only. $prefix = "#"; $prefix_on_missing = \true; $data = $this->replaceVars($data, $parameters, ",", null, \true); break; case "segments": // Slash separated data. Bare values only. $prefix = "/"; $data = $this->replaceVars($data, $parameters, "/"); break; case "dotprefix": // Dot separated data. Bare values only. $prefix = "."; $prefix_on_missing = \true; $data = $this->replaceVars($data, $parameters, "."); break; case "semicolon": // Semicolon prefixed and separated. Uses the key name $prefix = ";"; $data = $this->replaceVars($data, $parameters, ";", "=", \false, \true, \false); break; case "form": // Standard URL format. Uses the key name $prefix = "?"; $data = $this->replaceVars($data, $parameters, "&", "="); break; case "continuation": // Standard URL, but with leading ampersand. Uses key name. $prefix = "&"; $data = $this->replaceVars($data, $parameters, "&", "="); break; } // Add the initial prefix character if data is valid. if ($data || $data !== \false && $prefix_on_missing) { $data = $prefix . $data; } } else { // If no operator we replace with the defaults. $data = $this->replaceVars($data, $parameters); } // This is chops out the {...} and replaces with the new section. return \substr($string, 0, $start) . $data . \substr($string, $end + 1); } private function replaceVars($section, $parameters, $sep = ",", $combine = null, $reserved = \false, $tag_empty = \false, $combine_on_empty = \true) { if (\strpos($section, ",") === \false) { // If we only have a single value, we can immediately process. return $this->combine($section, $parameters, $sep, $combine, $reserved, $tag_empty, $combine_on_empty); } else { // If we have multiple values, we need to split and loop over them. // Each is treated individually, then glued together with the // separator character. $vars = \explode(",", $section); return $this->combineList( $vars, $sep, $parameters, $combine, $reserved, \false, // Never emit empty strings in multi-param replacements $combine_on_empty ); } } public function combine($key, $parameters, $sep, $combine, $reserved, $tag_empty, $combine_on_empty) { $length = \false; $explode = \false; $skip_final_combine = \false; $value = \false; // Check for length restriction. if (\strpos($key, ":") !== \false) { list($key, $length) = \explode(":", $key); } // Check for explode parameter. if ($key[\strlen($key) - 1] == "*") { $explode = \true; $key = \substr($key, 0, -1); $skip_final_combine = \true; } // Define the list separator. $list_sep = $explode ? $sep : ","; if (isset($parameters[$key])) { $data_type = $this->getDataType($parameters[$key]); switch ($data_type) { case self::TYPE_SCALAR: $value = $this->getValue($parameters[$key], $length); break; case self::TYPE_LIST: $values = []; foreach ($parameters[$key] as $pkey => $pvalue) { $pvalue = $this->getValue($pvalue, $length); if ($combine && $explode) { $values[$pkey] = $key . $combine . $pvalue; } else { $values[$pkey] = $pvalue; } } $value = \implode($list_sep, $values); if ($value == '') { return ''; } break; case self::TYPE_MAP: $values = []; foreach ($parameters[$key] as $pkey => $pvalue) { $pvalue = $this->getValue($pvalue, $length); if ($explode) { $pkey = $this->getValue($pkey, $length); $values[] = $pkey . "=" . $pvalue; // Explode triggers = combine. } else { $values[] = $pkey; $values[] = $pvalue; } } $value = \implode($list_sep, $values); if ($value == '') { return \false; } break; } } elseif ($tag_empty) { // If we are just indicating empty values with their key name, return that. return $key; } else { // Otherwise we can skip this variable due to not being defined. return \false; } if ($reserved) { $value = \str_replace($this->reservedEncoded, $this->reserved, $value); } // If we do not need to include the key name, we just return the raw // value. if (!$combine || $skip_final_combine) { return $value; } // Else we combine the key name: foo=bar, if value is not the empty string. return $key . ($value != '' || $combine_on_empty ? $combine . $value : ''); } /** * Return the type of a passed in value */ private function getDataType($data) { if (\is_array($data)) { \reset($data); if (\key($data) !== 0) { return self::TYPE_MAP; } return self::TYPE_LIST; } return self::TYPE_SCALAR; } /** * Utility function that merges multiple combine calls * for multi-key templates. */ private function combineList($vars, $sep, $parameters, $combine, $reserved, $tag_empty, $combine_on_empty) { $ret = []; foreach ($vars as $var) { $response = $this->combine($var, $parameters, $sep, $combine, $reserved, $tag_empty, $combine_on_empty); if ($response === \false) { continue; } $ret[] = $response; } return \implode($sep, $ret); } /** * Utility function to encode and trim values */ private function getValue($value, $length) { if ($length) { $value = \substr($value, 0, $length); } $value = \rawurlencode($value); return $value; } } vendor_prefixed/google/apiclient/src/Client.php 0000644 00000123733 15174671617 0015721 0 ustar 00 <?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google; use BadMethodCallException; use DomainException; use WPMailSMTP\Vendor\Google\AccessToken\Revoke; use WPMailSMTP\Vendor\Google\AccessToken\Verify; use WPMailSMTP\Vendor\Google\Auth\ApplicationDefaultCredentials; use WPMailSMTP\Vendor\Google\Auth\Cache\MemoryCacheItemPool; use WPMailSMTP\Vendor\Google\Auth\Credentials\ServiceAccountCredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\UserRefreshCredentials; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenCache; use WPMailSMTP\Vendor\Google\Auth\GetUniverseDomainInterface; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Auth\OAuth2; use WPMailSMTP\Vendor\Google\AuthHandler\AuthHandlerFactory; use WPMailSMTP\Vendor\Google\Http\REST; use WPMailSMTP\Vendor\GuzzleHttp\Client as GuzzleClient; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use WPMailSMTP\Vendor\GuzzleHttp\Ring\Client\StreamHandler; use InvalidArgumentException; use LogicException; use WPMailSMTP\Vendor\Monolog\Handler\StreamHandler as MonologStreamHandler; use WPMailSMTP\Vendor\Monolog\Handler\SyslogHandler as MonologSyslogHandler; use WPMailSMTP\Vendor\Monolog\Logger; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Log\LoggerInterface; use UnexpectedValueException; /** * The Google API Client * https://github.com/google/google-api-php-client */ class Client { const LIBVER = "2.12.6"; const USER_AGENT_SUFFIX = "google-api-php-client/"; const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke'; const OAUTH2_TOKEN_URI = 'https://oauth2.googleapis.com/token'; const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/v2/auth'; const API_BASE_PATH = 'https://www.googleapis.com'; /** * @var ?OAuth2 $auth */ private $auth; /** * @var ClientInterface $http */ private $http; /** * @var ?CacheItemPoolInterface $cache */ private $cache; /** * @var array access token */ private $token; /** * @var array $config */ private $config; /** * @var ?LoggerInterface $logger */ private $logger; /** * @var ?CredentialsLoader $credentials */ private $credentials; /** * @var boolean $deferExecution */ private $deferExecution = \false; /** @var array $scopes */ // Scopes requested by the client protected $requestedScopes = []; /** * Construct the Google Client. * * @param array $config { * An array of required and optional arguments. * * @type string $application_name * The name of your application * @type string $base_path * The base URL for the service. This is only accounted for when calling * {@see Client::authorize()} directly. * @type string $client_id * Your Google Cloud client ID found in https://developers.google.com/console * @type string $client_secret * Your Google Cloud client secret found in https://developers.google.com/console * @type string|array|CredentialsLoader $credentials * Can be a path to JSON credentials or an array representing those * credentials (@see Google\Client::setAuthConfig), or an instance of * {@see CredentialsLoader}. * @type string|array $scopes * {@see Google\Client::setScopes} * @type string $quota_project * Sets X-Goog-User-Project, which specifies a user project to bill * for access charges associated with the request. * @type string $redirect_uri * @type string $state * @type string $developer_key * Simple API access key, also from the API console. Ensure you get * a Server key, and not a Browser key. * **NOTE:** The universe domain is assumed to be "googleapis.com" unless * explicitly set. When setting an API ley directly via this option, there * is no way to verify the universe domain. Be sure to set the * "universe_domain" option if "googleapis.com" is not intended. * @type bool $use_application_default_credentials * For use with Google Cloud Platform * fetch the ApplicationDefaultCredentials, if applicable * {@see https://developers.google.com/identity/protocols/application-default-credentials} * @type string $signing_key * @type string $signing_algorithm * @type string $subject * @type string $hd * @type string $prompt * @type string $openid * @type bool $include_granted_scopes * @type string $login_hint * @type string $request_visible_actions * @type string $access_type * @type string $approval_prompt * @type array $retry * Task Runner retry configuration * {@see \Google\Task\Runner} * @type array $retry_map * @type CacheItemPoolInterface $cache * Cache class implementing {@see CacheItemPoolInterface}. Defaults * to {@see MemoryCacheItemPool}. * @type array $cache_config * Cache config for downstream auth caching. * @type callable $token_callback * Function to be called when an access token is fetched. Follows * the signature `function (string $cacheKey, string $accessToken)`. * @type \Firebase\JWT $jwt * Service class used in {@see Client::verifyIdToken()}. Explicitly * pass this in to avoid setting {@see \Firebase\JWT::$leeway} * @type bool $api_format_v2 * Setting api_format_v2 will return more detailed error messages * from certain APIs. * @type string $universe_domain * Setting the universe domain will change the default rootUrl of the service. * If not set explicitly, the universe domain will be the value provided in the *. "GOOGLE_CLOUD_UNIVERSE_DOMAIN" environment variable, or "googleapis.com". * } */ public function __construct(array $config = []) { $this->config = \array_merge(['application_name' => '', 'base_path' => self::API_BASE_PATH, 'client_id' => '', 'client_secret' => '', 'credentials' => null, 'scopes' => null, 'quota_project' => null, 'redirect_uri' => null, 'state' => null, 'developer_key' => '', 'use_application_default_credentials' => \false, 'signing_key' => null, 'signing_algorithm' => null, 'subject' => null, 'hd' => '', 'prompt' => '', 'openid.realm' => '', 'include_granted_scopes' => null, 'login_hint' => '', 'request_visible_actions' => '', 'access_type' => 'online', 'approval_prompt' => 'auto', 'retry' => [], 'retry_map' => null, 'cache' => null, 'cache_config' => [], 'token_callback' => null, 'jwt' => null, 'api_format_v2' => \false, 'universe_domain' => \getenv('GOOGLE_CLOUD_UNIVERSE_DOMAIN') ?: GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN], $config); if (!\is_null($this->config['credentials'])) { if ($this->config['credentials'] instanceof CredentialsLoader) { $this->credentials = $this->config['credentials']; } else { $this->setAuthConfig($this->config['credentials']); } unset($this->config['credentials']); } if (!\is_null($this->config['scopes'])) { $this->setScopes($this->config['scopes']); unset($this->config['scopes']); } // Set a default token callback to update the in-memory access token if (\is_null($this->config['token_callback'])) { $this->config['token_callback'] = function ($cacheKey, $newAccessToken) { $this->setAccessToken([ 'access_token' => $newAccessToken, 'expires_in' => 3600, // Google default 'created' => \time(), ]); }; } if (!\is_null($this->config['cache'])) { $this->setCache($this->config['cache']); unset($this->config['cache']); } } /** * Get a string containing the version of the library. * * @return string */ public function getLibraryVersion() { return self::LIBVER; } /** * For backwards compatibility * alias for fetchAccessTokenWithAuthCode * * @param string $code string code from accounts.google.com * @return array access token * @deprecated */ public function authenticate($code) { return $this->fetchAccessTokenWithAuthCode($code); } /** * Attempt to exchange a code for an valid authentication token. * Helper wrapped around the OAuth 2.0 implementation. * * @param string $code code from accounts.google.com * @param string $codeVerifier the code verifier used for PKCE (if applicable) * @return array access token */ public function fetchAccessTokenWithAuthCode($code, $codeVerifier = null) { if (\strlen($code) == 0) { throw new InvalidArgumentException("Invalid code"); } $auth = $this->getOAuth2Service(); $auth->setCode($code); $auth->setRedirectUri($this->getRedirectUri()); if ($codeVerifier) { $auth->setCodeVerifier($codeVerifier); } $httpHandler = HttpHandlerFactory::build($this->getHttpClient()); $creds = $auth->fetchAuthToken($httpHandler); if ($creds && isset($creds['access_token'])) { $creds['created'] = \time(); $this->setAccessToken($creds); } return $creds; } /** * For backwards compatibility * alias for fetchAccessTokenWithAssertion * * @return array access token * @deprecated */ public function refreshTokenWithAssertion() { return $this->fetchAccessTokenWithAssertion(); } /** * Fetches a fresh access token with a given assertion token. * @param ClientInterface $authHttp optional. * @return array access token */ public function fetchAccessTokenWithAssertion(?ClientInterface $authHttp = null) { if (!$this->isUsingApplicationDefaultCredentials()) { throw new DomainException('set the JSON service account credentials using' . ' Google\\Client::setAuthConfig or set the path to your JSON file' . ' with the "GOOGLE_APPLICATION_CREDENTIALS" environment variable' . ' and call Google\\Client::useApplicationDefaultCredentials to' . ' refresh a token with assertion.'); } $this->getLogger()->log('info', 'OAuth2 access token refresh with Signed JWT assertion grants.'); $credentials = $this->createApplicationDefaultCredentials(); $httpHandler = HttpHandlerFactory::build($authHttp); $creds = $credentials->fetchAuthToken($httpHandler); if ($creds && isset($creds['access_token'])) { $creds['created'] = \time(); $this->setAccessToken($creds); } return $creds; } /** * For backwards compatibility * alias for fetchAccessTokenWithRefreshToken * * @param string $refreshToken * @return array access token */ public function refreshToken($refreshToken) { return $this->fetchAccessTokenWithRefreshToken($refreshToken); } /** * Fetches a fresh OAuth 2.0 access token with the given refresh token. * @param string $refreshToken * @return array access token */ public function fetchAccessTokenWithRefreshToken($refreshToken = null) { if (null === $refreshToken) { if (!isset($this->token['refresh_token'])) { throw new LogicException('refresh token must be passed in or set as part of setAccessToken'); } $refreshToken = $this->token['refresh_token']; } $this->getLogger()->info('OAuth2 access token refresh'); $auth = $this->getOAuth2Service(); $auth->setRefreshToken($refreshToken); $httpHandler = HttpHandlerFactory::build($this->getHttpClient()); $creds = $auth->fetchAuthToken($httpHandler); if ($creds && isset($creds['access_token'])) { $creds['created'] = \time(); if (!isset($creds['refresh_token'])) { $creds['refresh_token'] = $refreshToken; } $this->setAccessToken($creds); } return $creds; } /** * Create a URL to obtain user authorization. * The authorization endpoint allows the user to first * authenticate, and then grant/deny the access request. * @param string|array $scope The scope is expressed as an array or list of space-delimited strings. * @param array $queryParams Querystring params to add to the authorization URL. * @return string */ public function createAuthUrl($scope = null, array $queryParams = []) { if (empty($scope)) { $scope = $this->prepareScopes(); } if (\is_array($scope)) { $scope = \implode(' ', $scope); } // only accept one of prompt or approval_prompt $approvalPrompt = $this->config['prompt'] ? null : $this->config['approval_prompt']; // include_granted_scopes should be string "true", string "false", or null $includeGrantedScopes = $this->config['include_granted_scopes'] === null ? null : \var_export($this->config['include_granted_scopes'], \true); $params = \array_filter(['access_type' => $this->config['access_type'], 'approval_prompt' => $approvalPrompt, 'hd' => $this->config['hd'], 'include_granted_scopes' => $includeGrantedScopes, 'login_hint' => $this->config['login_hint'], 'openid.realm' => $this->config['openid.realm'], 'prompt' => $this->config['prompt'], 'redirect_uri' => $this->config['redirect_uri'], 'response_type' => 'code', 'scope' => $scope, 'state' => $this->config['state']]) + $queryParams; // If the list of scopes contains plus.login, add request_visible_actions // to auth URL. $rva = $this->config['request_visible_actions']; if (\strlen($rva) > 0 && \false !== \strpos($scope, 'plus.login')) { $params['request_visible_actions'] = $rva; } $auth = $this->getOAuth2Service(); return (string) $auth->buildFullAuthorizationUri($params); } /** * Adds auth listeners to the HTTP client based on the credentials * set in the Google API Client object * * @param ClientInterface $http the http client object. * @return ClientInterface the http client object */ public function authorize(?ClientInterface $http = null) { $http = $http ?: $this->getHttpClient(); $authHandler = $this->getAuthHandler(); // These conditionals represent the decision tree for authentication // 1. Check if a Google\Auth\CredentialsLoader instance has been supplied via the "credentials" option // 2. Check for Application Default Credentials // 3a. Check for an Access Token // 3b. If access token exists but is expired, try to refresh it // 4. Check for API Key if ($this->credentials) { $this->checkUniverseDomain($this->credentials); return $authHandler->attachCredentials($http, $this->credentials, $this->config['token_callback']); } if ($this->isUsingApplicationDefaultCredentials()) { $credentials = $this->createApplicationDefaultCredentials(); $this->checkUniverseDomain($credentials); return $authHandler->attachCredentialsCache($http, $credentials, $this->config['token_callback']); } if ($token = $this->getAccessToken()) { $scopes = $this->prepareScopes(); // add refresh subscriber to request a new token if (isset($token['refresh_token']) && $this->isAccessTokenExpired()) { $credentials = $this->createUserRefreshCredentials($scopes, $token['refresh_token']); $this->checkUniverseDomain($credentials); return $authHandler->attachCredentials($http, $credentials, $this->config['token_callback']); } return $authHandler->attachToken($http, $token, (array) $scopes); } if ($key = $this->config['developer_key']) { return $authHandler->attachKey($http, $key); } return $http; } /** * Set the configuration to use application default credentials for * authentication * * @see https://developers.google.com/identity/protocols/application-default-credentials * @param boolean $useAppCreds */ public function useApplicationDefaultCredentials($useAppCreds = \true) { $this->config['use_application_default_credentials'] = $useAppCreds; } /** * To prevent useApplicationDefaultCredentials from inappropriately being * called in a conditional * * @see https://developers.google.com/identity/protocols/application-default-credentials */ public function isUsingApplicationDefaultCredentials() { return $this->config['use_application_default_credentials']; } /** * Set the access token used for requests. * * Note that at the time requests are sent, tokens are cached. A token will be * cached for each combination of service and authentication scopes. If a * cache pool is not provided, creating a new instance of the client will * allow modification of access tokens. If a persistent cache pool is * provided, in order to change the access token, you must clear the cached * token by calling `$client->getCache()->clear()`. (Use caution in this case, * as calling `clear()` will remove all cache items, including any items not * related to Google API PHP Client.) * * **NOTE:** The universe domain is assumed to be "googleapis.com" unless * explicitly set. When setting an access token directly via this method, there * is no way to verify the universe domain. Be sure to set the "universe_domain" * option if "googleapis.com" is not intended. * * @param string|array $token * @throws InvalidArgumentException */ public function setAccessToken($token) { if (\is_string($token)) { if ($json = \json_decode($token, \true)) { $token = $json; } else { // assume $token is just the token string $token = ['access_token' => $token]; } } if ($token == null) { throw new InvalidArgumentException('invalid json token'); } if (!isset($token['access_token'])) { throw new InvalidArgumentException("Invalid token format"); } $this->token = $token; } public function getAccessToken() { return $this->token; } /** * @return string|null */ public function getRefreshToken() { if (isset($this->token['refresh_token'])) { return $this->token['refresh_token']; } return null; } /** * Returns if the access_token is expired. * @return bool Returns True if the access_token is expired. */ public function isAccessTokenExpired() { if (!$this->token) { return \true; } $created = 0; if (isset($this->token['created'])) { $created = $this->token['created']; } elseif (isset($this->token['id_token'])) { // check the ID token for "iat" // signature verification is not required here, as we are just // using this for convenience to save a round trip request // to the Google API server $idToken = $this->token['id_token']; if (\substr_count($idToken, '.') == 2) { $parts = \explode('.', $idToken); $payload = \json_decode(\base64_decode($parts[1]), \true); if ($payload && isset($payload['iat'])) { $created = $payload['iat']; } } } if (!isset($this->token['expires_in'])) { // if the token does not have an "expires_in", then it's considered expired return \true; } // If the token is set to expire in the next 30 seconds. return $created + ($this->token['expires_in'] - 30) < \time(); } /** * @deprecated See UPGRADING.md for more information */ public function getAuth() { throw new BadMethodCallException('This function no longer exists. See UPGRADING.md for more information'); } /** * @deprecated See UPGRADING.md for more information */ public function setAuth($auth) { throw new BadMethodCallException('This function no longer exists. See UPGRADING.md for more information'); } /** * Set the OAuth 2.0 Client ID. * @param string $clientId */ public function setClientId($clientId) { $this->config['client_id'] = $clientId; } public function getClientId() { return $this->config['client_id']; } /** * Set the OAuth 2.0 Client Secret. * @param string $clientSecret */ public function setClientSecret($clientSecret) { $this->config['client_secret'] = $clientSecret; } public function getClientSecret() { return $this->config['client_secret']; } /** * Set the OAuth 2.0 Redirect URI. * @param string $redirectUri */ public function setRedirectUri($redirectUri) { $this->config['redirect_uri'] = $redirectUri; } public function getRedirectUri() { return $this->config['redirect_uri']; } /** * Set OAuth 2.0 "state" parameter to achieve per-request customization. * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2 * @param string $state */ public function setState($state) { $this->config['state'] = $state; } /** * @param string $accessType Possible values for access_type include: * {@code "offline"} to request offline access from the user. * {@code "online"} to request online access from the user. */ public function setAccessType($accessType) { $this->config['access_type'] = $accessType; } /** * @param string $approvalPrompt Possible values for approval_prompt include: * {@code "force"} to force the approval UI to appear. * {@code "auto"} to request auto-approval when possible. (This is the default value) */ public function setApprovalPrompt($approvalPrompt) { $this->config['approval_prompt'] = $approvalPrompt; } /** * Set the login hint, email address or sub id. * @param string $loginHint */ public function setLoginHint($loginHint) { $this->config['login_hint'] = $loginHint; } /** * Set the application name, this is included in the User-Agent HTTP header. * @param string $applicationName */ public function setApplicationName($applicationName) { $this->config['application_name'] = $applicationName; } /** * If 'plus.login' is included in the list of requested scopes, you can use * this method to define types of app activities that your app will write. * You can find a list of available types here: * @link https://developers.google.com/+/api/moment-types * * @param array $requestVisibleActions Array of app activity types */ public function setRequestVisibleActions($requestVisibleActions) { if (\is_array($requestVisibleActions)) { $requestVisibleActions = \implode(" ", $requestVisibleActions); } $this->config['request_visible_actions'] = $requestVisibleActions; } /** * Set the developer key to use, these are obtained through the API Console. * @see http://code.google.com/apis/console-help/#generatingdevkeys * @param string $developerKey */ public function setDeveloperKey($developerKey) { $this->config['developer_key'] = $developerKey; } /** * Set the hd (hosted domain) parameter streamlines the login process for * Google Apps hosted accounts. By including the domain of the user, you * restrict sign-in to accounts at that domain. * @param string $hd the domain to use. */ public function setHostedDomain($hd) { $this->config['hd'] = $hd; } /** * Set the prompt hint. Valid values are none, consent and select_account. * If no value is specified and the user has not previously authorized * access, then the user is shown a consent screen. * @param string $prompt * {@code "none"} Do not display any authentication or consent screens. Must not be specified with other values. * {@code "consent"} Prompt the user for consent. * {@code "select_account"} Prompt the user to select an account. */ public function setPrompt($prompt) { $this->config['prompt'] = $prompt; } /** * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which * an authentication request is valid. * @param string $realm the URL-space to use. */ public function setOpenidRealm($realm) { $this->config['openid.realm'] = $realm; } /** * If this is provided with the value true, and the authorization request is * granted, the authorization will include any previous authorizations * granted to this user/application combination for other scopes. * @param bool $include the URL-space to use. */ public function setIncludeGrantedScopes($include) { $this->config['include_granted_scopes'] = $include; } /** * sets function to be called when an access token is fetched * @param callable $tokenCallback - function ($cacheKey, $accessToken) */ public function setTokenCallback(callable $tokenCallback) { $this->config['token_callback'] = $tokenCallback; } /** * Revoke an OAuth2 access token or refresh token. This method will revoke the current access * token, if a token isn't provided. * * @param string|array|null $token The token (access token or a refresh token) that should be revoked. * @return boolean Returns True if the revocation was successful, otherwise False. */ public function revokeToken($token = null) { $tokenRevoker = new Revoke($this->getHttpClient()); return $tokenRevoker->revokeToken($token ?: $this->getAccessToken()); } /** * Verify an id_token. This method will verify the current id_token, if one * isn't provided. * * @throws LogicException If no token was provided and no token was set using `setAccessToken`. * @throws UnexpectedValueException If the token is not a valid JWT. * @param string|null $idToken The token (id_token) that should be verified. * @return array|false Returns the token payload as an array if the verification was * successful, false otherwise. */ public function verifyIdToken($idToken = null) { $tokenVerifier = new Verify($this->getHttpClient(), $this->getCache(), $this->config['jwt']); if (null === $idToken) { $token = $this->getAccessToken(); if (!isset($token['id_token'])) { throw new LogicException('id_token must be passed in or set as part of setAccessToken'); } $idToken = $token['id_token']; } return $tokenVerifier->verifyIdToken($idToken, $this->getClientId()); } /** * Set the scopes to be requested. Must be called before createAuthUrl(). * Will remove any previously configured scopes. * @param string|array $scope_or_scopes, ie: * array( * 'https://www.googleapis.com/auth/plus.login', * 'https://www.googleapis.com/auth/moderator' * ); */ public function setScopes($scope_or_scopes) { $this->requestedScopes = []; $this->addScope($scope_or_scopes); } /** * This functions adds a scope to be requested as part of the OAuth2.0 flow. * Will append any scopes not previously requested to the scope parameter. * A single string will be treated as a scope to request. An array of strings * will each be appended. * @param string|string[] $scope_or_scopes e.g. "profile" */ public function addScope($scope_or_scopes) { if (\is_string($scope_or_scopes) && !\in_array($scope_or_scopes, $this->requestedScopes)) { $this->requestedScopes[] = $scope_or_scopes; } elseif (\is_array($scope_or_scopes)) { foreach ($scope_or_scopes as $scope) { $this->addScope($scope); } } } /** * Returns the list of scopes requested by the client * @return array the list of scopes * */ public function getScopes() { return $this->requestedScopes; } /** * @return string|null * @visible For Testing */ public function prepareScopes() { if (empty($this->requestedScopes)) { return null; } return \implode(' ', $this->requestedScopes); } /** * Helper method to execute deferred HTTP requests. * * @template T * @param RequestInterface $request * @param class-string<T>|false|null $expectedClass * @throws \Google\Exception * @return mixed|T|ResponseInterface */ public function execute(RequestInterface $request, $expectedClass = null) { $request = $request->withHeader('User-Agent', \sprintf('%s %s%s', $this->config['application_name'], self::USER_AGENT_SUFFIX, $this->getLibraryVersion()))->withHeader('x-goog-api-client', \sprintf('gl-php/%s gdcl/%s', \phpversion(), $this->getLibraryVersion())); if ($this->config['api_format_v2']) { $request = $request->withHeader('X-GOOG-API-FORMAT-VERSION', '2'); } // call the authorize method // this is where most of the grunt work is done $http = $this->authorize(); return REST::execute($http, $request, $expectedClass, $this->config['retry'], $this->config['retry_map']); } /** * Declare whether batch calls should be used. This may increase throughput * by making multiple requests in one connection. * * @param boolean $useBatch True if the batch support should * be enabled. Defaults to False. */ public function setUseBatch($useBatch) { // This is actually an alias for setDefer. $this->setDefer($useBatch); } /** * Are we running in Google AppEngine? * return bool */ public function isAppEngine() { return isset($_SERVER['SERVER_SOFTWARE']) && \strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== \false; } public function setConfig($name, $value) { $this->config[$name] = $value; } public function getConfig($name, $default = null) { return isset($this->config[$name]) ? $this->config[$name] : $default; } /** * For backwards compatibility * alias for setAuthConfig * * @param string $file the configuration file * @throws \Google\Exception * @deprecated */ public function setAuthConfigFile($file) { $this->setAuthConfig($file); } /** * Set the auth config from new or deprecated JSON config. * This structure should match the file downloaded from * the "Download JSON" button on in the Google Developer * Console. * @param string|array $config the configuration json * @throws \Google\Exception */ public function setAuthConfig($config) { if (\is_string($config)) { if (!\file_exists($config)) { throw new InvalidArgumentException(\sprintf('file "%s" does not exist', $config)); } $json = \file_get_contents($config); if (!($config = \json_decode($json, \true))) { throw new LogicException('invalid json for auth config'); } } $key = isset($config['installed']) ? 'installed' : 'web'; if (isset($config['type']) && $config['type'] == 'service_account') { // application default credentials $this->useApplicationDefaultCredentials(); // set the information from the config $this->setClientId($config['client_id']); $this->config['client_email'] = $config['client_email']; $this->config['signing_key'] = $config['private_key']; $this->config['signing_algorithm'] = 'HS256'; } elseif (isset($config[$key])) { // old-style $this->setClientId($config[$key]['client_id']); $this->setClientSecret($config[$key]['client_secret']); if (isset($config[$key]['redirect_uris'])) { $this->setRedirectUri($config[$key]['redirect_uris'][0]); } } else { // new-style $this->setClientId($config['client_id']); $this->setClientSecret($config['client_secret']); if (isset($config['redirect_uris'])) { $this->setRedirectUri($config['redirect_uris'][0]); } } } /** * Use when the service account has been delegated domain wide access. * * @param string $subject an email address account to impersonate */ public function setSubject($subject) { $this->config['subject'] = $subject; } /** * Declare whether making API calls should make the call immediately, or * return a request which can be called with ->execute(); * * @param boolean $defer True if calls should not be executed right away. */ public function setDefer($defer) { $this->deferExecution = $defer; } /** * Whether or not to return raw requests * @return boolean */ public function shouldDefer() { return $this->deferExecution; } /** * @return OAuth2 implementation */ public function getOAuth2Service() { if (!isset($this->auth)) { $this->auth = $this->createOAuth2Service(); } return $this->auth; } /** * create a default google auth object */ protected function createOAuth2Service() { $auth = new OAuth2(['clientId' => $this->getClientId(), 'clientSecret' => $this->getClientSecret(), 'authorizationUri' => self::OAUTH2_AUTH_URL, 'tokenCredentialUri' => self::OAUTH2_TOKEN_URI, 'redirectUri' => $this->getRedirectUri(), 'issuer' => $this->config['client_id'], 'signingKey' => $this->config['signing_key'], 'signingAlgorithm' => $this->config['signing_algorithm']]); return $auth; } /** * Set the Cache object * @param CacheItemPoolInterface $cache */ public function setCache(CacheItemPoolInterface $cache) { $this->cache = $cache; } /** * @return CacheItemPoolInterface */ public function getCache() { if (!$this->cache) { $this->cache = $this->createDefaultCache(); } return $this->cache; } /** * @param array $cacheConfig */ public function setCacheConfig(array $cacheConfig) { $this->config['cache_config'] = $cacheConfig; } /** * Set the Logger object * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger) { $this->logger = $logger; } /** * @return LoggerInterface */ public function getLogger() { if (!isset($this->logger)) { $this->logger = $this->createDefaultLogger(); } return $this->logger; } protected function createDefaultLogger() { $logger = new Logger('google-api-php-client'); if ($this->isAppEngine()) { $handler = new MonologSyslogHandler('app', \LOG_USER, Logger::NOTICE); } else { $handler = new MonologStreamHandler('php://stderr', Logger::NOTICE); } $logger->pushHandler($handler); return $logger; } protected function createDefaultCache() { return new MemoryCacheItemPool(); } /** * Set the Http Client object * @param ClientInterface $http */ public function setHttpClient(ClientInterface $http) { $this->http = $http; } /** * @return ClientInterface */ public function getHttpClient() { if (null === $this->http) { $this->http = $this->createDefaultHttpClient(); } return $this->http; } /** * Set the API format version. * * `true` will use V2, which may return more useful error messages. * * @param bool $value */ public function setApiFormatV2($value) { $this->config['api_format_v2'] = (bool) $value; } protected function createDefaultHttpClient() { $guzzleVersion = null; if (\defined('\\WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) { $guzzleVersion = ClientInterface::MAJOR_VERSION; } elseif (\defined('\\WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::VERSION')) { $guzzleVersion = (int) \substr(ClientInterface::VERSION, 0, 1); } if (5 === $guzzleVersion) { $options = ['base_url' => $this->config['base_path'], 'defaults' => ['exceptions' => \false]]; if ($this->isAppEngine()) { if (\class_exists(StreamHandler::class)) { // set StreamHandler on AppEngine by default $options['handler'] = new StreamHandler(); $options['defaults']['verify'] = '/etc/ca-certificates.crt'; } } } elseif (6 === $guzzleVersion || 7 === $guzzleVersion) { // guzzle 6 or 7 $options = ['base_uri' => $this->config['base_path'], 'http_errors' => \false]; } else { throw new LogicException('Could not find supported version of Guzzle.'); } return new GuzzleClient($options); } /** * @return FetchAuthTokenCache */ private function createApplicationDefaultCredentials() { $scopes = $this->prepareScopes(); $sub = $this->config['subject']; $signingKey = $this->config['signing_key']; // create credentials using values supplied in setAuthConfig if ($signingKey) { $serviceAccountCredentials = ['client_id' => $this->config['client_id'], 'client_email' => $this->config['client_email'], 'private_key' => $signingKey, 'type' => 'service_account', 'quota_project_id' => $this->config['quota_project']]; $credentials = CredentialsLoader::makeCredentials($scopes, $serviceAccountCredentials); } else { // When $sub is provided, we cannot pass cache classes to ::getCredentials // because FetchAuthTokenCache::setSub does not exist. // The result is when $sub is provided, calls to ::onGce are not cached. $credentials = ApplicationDefaultCredentials::getCredentials($scopes, null, $sub ? null : $this->config['cache_config'], $sub ? null : $this->getCache(), $this->config['quota_project']); } // for service account domain-wide authority (impersonating a user) // @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount if ($sub) { if (!$credentials instanceof ServiceAccountCredentials) { throw new DomainException('domain-wide authority requires service account credentials'); } $credentials->setSub($sub); } // If we are not using FetchAuthTokenCache yet, create it now if (!$credentials instanceof FetchAuthTokenCache) { $credentials = new FetchAuthTokenCache($credentials, $this->config['cache_config'], $this->getCache()); } return $credentials; } protected function getAuthHandler() { // Be very careful using the cache, as the underlying auth library's cache // implementation is naive, and the cache keys do not account for user // sessions. // // @see https://github.com/google/google-api-php-client/issues/821 return AuthHandlerFactory::build($this->getCache(), $this->config['cache_config']); } private function createUserRefreshCredentials($scope, $refreshToken) { $creds = \array_filter(['client_id' => $this->getClientId(), 'client_secret' => $this->getClientSecret(), 'refresh_token' => $refreshToken]); return new UserRefreshCredentials($scope, $creds); } private function checkUniverseDomain($credentials) { $credentialsUniverse = $credentials instanceof GetUniverseDomainInterface ? $credentials->getUniverseDomain() : GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN; if ($credentialsUniverse !== $this->getUniverseDomain()) { throw new DomainException(\sprintf('The configured universe domain (%s) does not match the credential universe domain (%s)', $this->getUniverseDomain(), $credentialsUniverse)); } } public function getUniverseDomain() { return $this->config['universe_domain']; } } vendor_prefixed/google/apiclient/src/Service/Resource.php 0000644 00000024530 15174671617 0017665 0 ustar 00 <?php /** * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Service; use WPMailSMTP\Vendor\Google\Exception as GoogleException; use WPMailSMTP\Vendor\Google\Http\MediaFileUpload; use WPMailSMTP\Vendor\Google\Model; use WPMailSMTP\Vendor\Google\Utils\UriTemplate; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; /** * Implements the actual methods/resources of the discovered Google API using magic function * calling overloading (__call()), which on call will see if the method name (plus.activities.list) * is available in this service, and if so construct an apiHttpRequest representing it. * */ class Resource { // Valid query parameters that work, but don't appear in discovery. private $stackParameters = ['alt' => ['type' => 'string', 'location' => 'query'], 'fields' => ['type' => 'string', 'location' => 'query'], 'trace' => ['type' => 'string', 'location' => 'query'], 'userIp' => ['type' => 'string', 'location' => 'query'], 'quotaUser' => ['type' => 'string', 'location' => 'query'], 'data' => ['type' => 'string', 'location' => 'body'], 'mimeType' => ['type' => 'string', 'location' => 'header'], 'uploadType' => ['type' => 'string', 'location' => 'query'], 'mediaUpload' => ['type' => 'complex', 'location' => 'query'], 'prettyPrint' => ['type' => 'string', 'location' => 'query']]; /** @var string $rootUrlTemplate */ private $rootUrlTemplate; /** @var \Google\Client $client */ private $client; /** @var string $serviceName */ private $serviceName; /** @var string $servicePath */ private $servicePath; /** @var string $resourceName */ private $resourceName; /** @var array $methods */ private $methods; public function __construct($service, $serviceName, $resourceName, $resource) { $this->rootUrlTemplate = $service->rootUrlTemplate ?? $service->rootUrl; $this->client = $service->getClient(); $this->servicePath = $service->servicePath; $this->serviceName = $serviceName; $this->resourceName = $resourceName; $this->methods = \is_array($resource) && isset($resource['methods']) ? $resource['methods'] : [$resourceName => $resource]; } /** * TODO: This function needs simplifying. * * @template T * @param string $name * @param array $arguments * @param class-string<T> $expectedClass - optional, the expected class name * @return mixed|T|ResponseInterface|RequestInterface * @throws \Google\Exception */ public function call($name, $arguments, $expectedClass = null) { if (!isset($this->methods[$name])) { $this->client->getLogger()->error('Service method unknown', ['service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name]); throw new GoogleException("Unknown function: " . "{$this->serviceName}->{$this->resourceName}->{$name}()"); } $method = $this->methods[$name]; $parameters = $arguments[0]; // postBody is a special case since it's not defined in the discovery // document as parameter, but we abuse the param entry for storing it. $postBody = null; if (isset($parameters['postBody'])) { if ($parameters['postBody'] instanceof Model) { // In the cases the post body is an existing object, we want // to use the smart method to create a simple object for // for JSONification. $parameters['postBody'] = $parameters['postBody']->toSimpleObject(); } elseif (\is_object($parameters['postBody'])) { // If the post body is another kind of object, we will try and // wrangle it into a sensible format. $parameters['postBody'] = $this->convertToArrayAndStripNulls($parameters['postBody']); } $postBody = (array) $parameters['postBody']; unset($parameters['postBody']); } // TODO: optParams here probably should have been // handled already - this may well be redundant code. if (isset($parameters['optParams'])) { $optParams = $parameters['optParams']; unset($parameters['optParams']); $parameters = \array_merge($parameters, $optParams); } if (!isset($method['parameters'])) { $method['parameters'] = []; } $method['parameters'] = \array_merge($this->stackParameters, $method['parameters']); foreach ($parameters as $key => $val) { if ($key != 'postBody' && !isset($method['parameters'][$key])) { $this->client->getLogger()->error('Service parameter unknown', ['service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name, 'parameter' => $key]); throw new GoogleException("({$name}) unknown parameter: '{$key}'"); } } foreach ($method['parameters'] as $paramName => $paramSpec) { if (isset($paramSpec['required']) && $paramSpec['required'] && !isset($parameters[$paramName])) { $this->client->getLogger()->error('Service parameter missing', ['service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name, 'parameter' => $paramName]); throw new GoogleException("({$name}) missing required param: '{$paramName}'"); } if (isset($parameters[$paramName])) { $value = $parameters[$paramName]; $parameters[$paramName] = $paramSpec; $parameters[$paramName]['value'] = $value; unset($parameters[$paramName]['required']); } else { // Ensure we don't pass nulls. unset($parameters[$paramName]); } } $this->client->getLogger()->info('Service Call', ['service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name, 'arguments' => $parameters]); // build the service uri $url = $this->createRequestUri($method['path'], $parameters); // NOTE: because we're creating the request by hand, // and because the service has a rootUrl property // the "base_uri" of the Http Client is not accounted for $request = new Request($method['httpMethod'], $url, $postBody ? ['content-type' => 'application/json'] : [], $postBody ? \json_encode($postBody) : ''); // support uploads if (isset($parameters['data'])) { $mimeType = isset($parameters['mimeType']) ? $parameters['mimeType']['value'] : 'application/octet-stream'; $data = $parameters['data']['value']; $upload = new MediaFileUpload($this->client, $request, $mimeType, $data); // pull down the modified request $request = $upload->getRequest(); } // if this is a media type, we will return the raw response // rather than using an expected class if (isset($parameters['alt']) && $parameters['alt']['value'] == 'media') { $expectedClass = null; } // if the client is marked for deferring, rather than // execute the request, return the response if ($this->client->shouldDefer()) { // @TODO find a better way to do this $request = $request->withHeader('X-Php-Expected-Class', $expectedClass); return $request; } return $this->client->execute($request, $expectedClass); } protected function convertToArrayAndStripNulls($o) { $o = (array) $o; foreach ($o as $k => $v) { if ($v === null) { unset($o[$k]); } elseif (\is_object($v) || \is_array($v)) { $o[$k] = $this->convertToArrayAndStripNulls($o[$k]); } } return $o; } /** * Parse/expand request parameters and create a fully qualified * request uri. * @static * @param string $restPath * @param array $params * @return string $requestUrl */ public function createRequestUri($restPath, $params) { // Override the default servicePath address if the $restPath use a / if ('/' == \substr($restPath, 0, 1)) { $requestUrl = \substr($restPath, 1); } else { $requestUrl = $this->servicePath . $restPath; } if ($this->rootUrlTemplate) { // code for universe domain $rootUrl = \str_replace('UNIVERSE_DOMAIN', $this->client->getUniverseDomain(), $this->rootUrlTemplate); // code for leading slash if ('/' !== \substr($rootUrl, -1) && '/' !== \substr($requestUrl, 0, 1)) { $requestUrl = '/' . $requestUrl; } $requestUrl = $rootUrl . $requestUrl; } $uriTemplateVars = []; $queryVars = []; foreach ($params as $paramName => $paramSpec) { if ($paramSpec['type'] == 'boolean') { $paramSpec['value'] = $paramSpec['value'] ? 'true' : 'false'; } if ($paramSpec['location'] == 'path') { $uriTemplateVars[$paramName] = $paramSpec['value']; } elseif ($paramSpec['location'] == 'query') { if (\is_array($paramSpec['value'])) { foreach ($paramSpec['value'] as $value) { $queryVars[] = $paramName . '=' . \rawurlencode(\rawurldecode($value)); } } else { $queryVars[] = $paramName . '=' . \rawurlencode(\rawurldecode($paramSpec['value'])); } } } if (\count($uriTemplateVars)) { $uriTemplateParser = new UriTemplate(); $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars); } if (\count($queryVars)) { $requestUrl .= '?' . \implode('&', $queryVars); } return $requestUrl; } } vendor_prefixed/google/apiclient/src/Service/Exception.php 0000644 00000003770 15174671617 0020037 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Service; use WPMailSMTP\Vendor\Google\Exception as GoogleException; class Exception extends GoogleException { /** * Optional list of errors returned in a JSON body of an HTTP error response. */ protected $errors = []; /** * Override default constructor to add the ability to set $errors and a retry * map. * * @param string $message * @param int $code * @param Exception|null $previous * @param array<array<string,string>>|null $errors List of errors returned in an HTTP * response or null. Defaults to []. */ public function __construct($message, $code = 0, ?Exception $previous = null, $errors = []) { if (\version_compare(\PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message, $code, $previous); } else { parent::__construct($message, $code); } $this->errors = $errors; } /** * An example of the possible errors returned. * * [ * { * "domain": "global", * "reason": "authError", * "message": "Invalid Credentials", * "locationType": "header", * "location": "Authorization", * } * ] * * @return array<array<string,string>>|null List of errors returned in an HTTP response or null. */ public function getErrors() { return $this->errors; } } vendor_prefixed/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php 0000644 00000001346 15174671617 0022364 0 ustar 00 <?php /** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\AuthHandler; /** * This supports Guzzle 7 */ class Guzzle7AuthHandler extends Guzzle6AuthHandler { } vendor_prefixed/google/apiclient/src/AuthHandler/AuthHandlerFactory.php 0000644 00000003243 15174671617 0022422 0 ustar 00 <?php /** * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\AuthHandler; use Exception; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; class AuthHandlerFactory { /** * Builds out a default http handler for the installed version of guzzle. * * @return Guzzle6AuthHandler|Guzzle7AuthHandler * @throws Exception */ public static function build($cache = null, array $cacheConfig = []) { $guzzleVersion = null; if (\defined('\\WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) { $guzzleVersion = ClientInterface::MAJOR_VERSION; } elseif (\defined('\\WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::VERSION')) { $guzzleVersion = (int) \substr(ClientInterface::VERSION, 0, 1); } switch ($guzzleVersion) { case 6: return new Guzzle6AuthHandler($cache, $cacheConfig); case 7: return new Guzzle7AuthHandler($cache, $cacheConfig); default: throw new Exception('Version not supported'); } } } vendor_prefixed/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php 0000644 00000006112 15174671617 0022357 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Google\AuthHandler; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Auth\Middleware\AuthTokenMiddleware; use WPMailSMTP\Vendor\Google\Auth\Middleware\ScopedAccessTokenMiddleware; use WPMailSMTP\Vendor\Google\Auth\Middleware\SimpleMiddleware; use WPMailSMTP\Vendor\GuzzleHttp\Client; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * This supports Guzzle 6 */ class Guzzle6AuthHandler { protected $cache; protected $cacheConfig; public function __construct(?CacheItemPoolInterface $cache = null, array $cacheConfig = []) { $this->cache = $cache; $this->cacheConfig = $cacheConfig; } public function attachCredentials(ClientInterface $http, CredentialsLoader $credentials, ?callable $tokenCallback = null) { // use the provided cache if ($this->cache) { $credentials = new FetchAuthTokenCache($credentials, $this->cacheConfig, $this->cache); } return $this->attachCredentialsCache($http, $credentials, $tokenCallback); } public function attachCredentialsCache(ClientInterface $http, FetchAuthTokenCache $credentials, ?callable $tokenCallback = null) { // if we end up needing to make an HTTP request to retrieve credentials, we // can use our existing one, but we need to throw exceptions so the error // bubbles up. $authHttp = $this->createAuthHttp($http); $authHttpHandler = HttpHandlerFactory::build($authHttp); $middleware = new AuthTokenMiddleware($credentials, $authHttpHandler, $tokenCallback); $config = $http->getConfig(); $config['handler']->remove('google_auth'); $config['handler']->push($middleware, 'google_auth'); $config['auth'] = 'google_auth'; $http = new Client($config); return $http; } public function attachToken(ClientInterface $http, array $token, array $scopes) { $tokenFunc = function ($scopes) use($token) { return $token['access_token']; }; $middleware = new ScopedAccessTokenMiddleware($tokenFunc, $scopes, $this->cacheConfig, $this->cache); $config = $http->getConfig(); $config['handler']->remove('google_auth'); $config['handler']->push($middleware, 'google_auth'); $config['auth'] = 'scoped'; $http = new Client($config); return $http; } public function attachKey(ClientInterface $http, $key) { $middleware = new SimpleMiddleware(['key' => $key]); $config = $http->getConfig(); $config['handler']->remove('google_auth'); $config['handler']->push($middleware, 'google_auth'); $config['auth'] = 'simple'; $http = new Client($config); return $http; } private function createAuthHttp(ClientInterface $http) { return new Client(['http_errors' => \true] + $http->getConfig()); } } vendor_prefixed/google/apiclient/src/Http/MediaFileUpload.php 0000644 00000023254 15174671617 0020403 0 ustar 00 <?php /** * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Http; use WPMailSMTP\Vendor\Google\Client; use WPMailSMTP\Vendor\Google\Exception as GoogleException; use WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Uri; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Manage large file uploads, which may be media but can be any type * of sizable data. */ class MediaFileUpload { const UPLOAD_MEDIA_TYPE = 'media'; const UPLOAD_MULTIPART_TYPE = 'multipart'; const UPLOAD_RESUMABLE_TYPE = 'resumable'; /** @var string $mimeType */ private $mimeType; /** @var string $data */ private $data; /** @var bool $resumable */ private $resumable; /** @var int $chunkSize */ private $chunkSize; /** @var int $size */ private $size; /** @var string $resumeUri */ private $resumeUri; /** @var int $progress */ private $progress; /** @var Client */ private $client; /** @var RequestInterface */ private $request; /** @var string */ private $boundary; // @phpstan-ignore-line /** * Result code from last HTTP call * @var int */ private $httpResultCode; /** * @param Client $client * @param RequestInterface $request * @param string $mimeType * @param string $data The bytes you want to upload. * @param bool $resumable * @param int $chunkSize File will be uploaded in chunks of this many bytes. * only used if resumable=True */ public function __construct(Client $client, RequestInterface $request, $mimeType, $data, $resumable = \false, $chunkSize = 0) { $this->client = $client; $this->request = $request; $this->mimeType = $mimeType; $this->data = $data; $this->resumable = $resumable; $this->chunkSize = $chunkSize; $this->progress = 0; $this->process(); } /** * Set the size of the file that is being uploaded. * @param int $size - int file size in bytes */ public function setFileSize($size) { $this->size = $size; } /** * Return the progress on the upload * @return int progress in bytes uploaded. */ public function getProgress() { return $this->progress; } /** * Send the next part of the file to upload. * @param string|bool $chunk Optional. The next set of bytes to send. If false will * use $data passed at construct time. */ public function nextChunk($chunk = \false) { $resumeUri = $this->getResumeUri(); if (\false == $chunk) { $chunk = \substr($this->data, $this->progress, $this->chunkSize); } $lastBytePos = $this->progress + \strlen($chunk) - 1; $headers = ['content-range' => "bytes {$this->progress}-{$lastBytePos}/{$this->size}", 'content-length' => (string) \strlen($chunk), 'expect' => '']; $request = new Request('PUT', $resumeUri, $headers, Psr7\Utils::streamFor($chunk)); return $this->makePutRequest($request); } /** * Return the HTTP result code from the last call made. * @return int code */ public function getHttpResultCode() { return $this->httpResultCode; } /** * Sends a PUT-Request to google drive and parses the response, * setting the appropiate variables from the response() * * @param RequestInterface $request the Request which will be send * * @return false|mixed false when the upload is unfinished or the decoded http response * */ private function makePutRequest(RequestInterface $request) { $response = $this->client->execute($request); $this->httpResultCode = $response->getStatusCode(); if (308 == $this->httpResultCode) { // Track the amount uploaded. $range = $response->getHeaderLine('range'); if ($range) { $range_array = \explode('-', $range); $this->progress = (int) $range_array[1] + 1; } // Allow for changing upload URLs. $location = $response->getHeaderLine('location'); if ($location) { $this->resumeUri = $location; } // No problems, but upload not complete. return \false; } return REST::decodeHttpResponse($response, $this->request); } /** * Resume a previously unfinished upload * @param string $resumeUri the resume-URI of the unfinished, resumable upload. */ public function resume($resumeUri) { $this->resumeUri = $resumeUri; $headers = ['content-range' => "bytes */{$this->size}", 'content-length' => '0']; $httpRequest = new Request('PUT', $this->resumeUri, $headers); return $this->makePutRequest($httpRequest); } /** * @return RequestInterface * @visible for testing */ private function process() { $this->transformToUploadUrl(); $request = $this->request; $postBody = ''; $contentType = \false; $meta = \json_decode((string) $request->getBody(), \true); $uploadType = $this->getUploadType($meta); $request = $request->withUri(Uri::withQueryValue($request->getUri(), 'uploadType', $uploadType)); $mimeType = $this->mimeType ?: $request->getHeaderLine('content-type'); if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) { $contentType = $mimeType; $postBody = \is_string($meta) ? $meta : \json_encode($meta); } elseif (self::UPLOAD_MEDIA_TYPE == $uploadType) { $contentType = $mimeType; $postBody = $this->data; } elseif (self::UPLOAD_MULTIPART_TYPE == $uploadType) { // This is a multipart/related upload. $boundary = $this->boundary ?: \mt_rand(); $boundary = \str_replace('"', '', $boundary); $contentType = 'multipart/related; boundary=' . $boundary; $related = "--{$boundary}\r\n"; $related .= "Content-Type: application/json; charset=UTF-8\r\n"; $related .= "\r\n" . \json_encode($meta) . "\r\n"; $related .= "--{$boundary}\r\n"; $related .= "Content-Type: {$mimeType}\r\n"; $related .= "Content-Transfer-Encoding: base64\r\n"; $related .= "\r\n" . \base64_encode($this->data) . "\r\n"; $related .= "--{$boundary}--"; $postBody = $related; } $request = $request->withBody(Psr7\Utils::streamFor($postBody)); if ($contentType) { $request = $request->withHeader('content-type', $contentType); } return $this->request = $request; } /** * Valid upload types: * - resumable (UPLOAD_RESUMABLE_TYPE) * - media (UPLOAD_MEDIA_TYPE) * - multipart (UPLOAD_MULTIPART_TYPE) * @param string|false $meta * @return string * @visible for testing */ public function getUploadType($meta) { if ($this->resumable) { return self::UPLOAD_RESUMABLE_TYPE; } if (\false == $meta && $this->data) { return self::UPLOAD_MEDIA_TYPE; } return self::UPLOAD_MULTIPART_TYPE; } public function getResumeUri() { if (null === $this->resumeUri) { $this->resumeUri = $this->fetchResumeUri(); } return $this->resumeUri; } private function fetchResumeUri() { $body = $this->request->getBody(); $headers = ['content-type' => 'application/json; charset=UTF-8', 'content-length' => $body->getSize(), 'x-upload-content-type' => $this->mimeType, 'x-upload-content-length' => $this->size, 'expect' => '']; foreach ($headers as $key => $value) { $this->request = $this->request->withHeader($key, $value); } $response = $this->client->execute($this->request, \false); $location = $response->getHeaderLine('location'); $code = $response->getStatusCode(); if (200 == $code && \true == $location) { return $location; } $message = $code; $body = \json_decode((string) $this->request->getBody(), \true); if (isset($body['error']['errors'])) { $message .= ': '; foreach ($body['error']['errors'] as $error) { $message .= "{$error['domain']}, {$error['message']};"; } $message = \rtrim($message, ';'); } $error = "Failed to start the resumable upload (HTTP {$message})"; $this->client->getLogger()->error($error); throw new GoogleException($error); } private function transformToUploadUrl() { $parts = \parse_url((string) $this->request->getUri()); if (!isset($parts['path'])) { $parts['path'] = ''; } $parts['path'] = '/upload' . $parts['path']; $uri = Uri::fromParts($parts); $this->request = $this->request->withUri($uri); } public function setChunkSize($chunkSize) { $this->chunkSize = $chunkSize; } public function getRequest() { return $this->request; } } vendor_prefixed/google/apiclient/src/Http/REST.php 0000644 00000014275 15174671617 0016177 0 ustar 00 <?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Http; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Service\Exception as GoogleServiceException; use WPMailSMTP\Vendor\Google\Task\Runner; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Response; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * This class implements the RESTful transport of apiServiceRequest()'s */ class REST { /** * Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries * when errors occur. * * @template T * @param ClientInterface $client * @param RequestInterface $request * @param class-string<T>|false|null $expectedClass * @param array $config * @param array $retryMap * @return mixed|T|null * @throws \Google\Service\Exception on server side error (ie: not authenticated, * invalid or malformed post body, invalid url) */ public static function execute(ClientInterface $client, RequestInterface $request, $expectedClass = null, $config = [], $retryMap = null) { $runner = new Runner($config, \sprintf('%s %s', $request->getMethod(), (string) $request->getUri()), [self::class, 'doExecute'], [$client, $request, $expectedClass]); if (null !== $retryMap) { $runner->setRetryMap($retryMap); } return $runner->run(); } /** * Executes a Psr\Http\Message\RequestInterface * * @template T * @param ClientInterface $client * @param RequestInterface $request * @param class-string<T>|false|null $expectedClass * @return mixed|T|null * @throws \Google\Service\Exception on server side error (ie: not authenticated, * invalid or malformed post body, invalid url) */ public static function doExecute(ClientInterface $client, RequestInterface $request, $expectedClass = null) { try { $httpHandler = HttpHandlerFactory::build($client); $response = $httpHandler($request); } catch (RequestException $e) { // if Guzzle throws an exception, catch it and handle the response if (!$e->hasResponse()) { throw $e; } $response = $e->getResponse(); // specific checking for Guzzle 5: convert to PSR7 response if (\interface_exists('WPMailSMTP\\Vendor\\GuzzleHttp\\Message\\ResponseInterface') && $response instanceof \WPMailSMTP\Vendor\GuzzleHttp\Message\ResponseInterface) { $response = new Response($response->getStatusCode(), $response->getHeaders() ?: [], $response->getBody(), $response->getProtocolVersion(), $response->getReasonPhrase()); } } return self::decodeHttpResponse($response, $request, $expectedClass); } /** * Decode an HTTP Response. * @static * * @template T * @param RequestInterface $response The http response to be decoded. * @param ResponseInterface $response * @param class-string<T>|false|null $expectedClass * @return mixed|T|null * @throws \Google\Service\Exception */ public static function decodeHttpResponse(ResponseInterface $response, ?RequestInterface $request = null, $expectedClass = null) { $code = $response->getStatusCode(); // retry strategy if (\intVal($code) >= 400) { // if we errored out, it should be safe to grab the response body $body = (string) $response->getBody(); // Check if we received errors, and add those to the Exception for convenience throw new GoogleServiceException($body, $code, null, self::getResponseErrors($body)); } // Ensure we only pull the entire body into memory if the request is not // of media type $body = self::decodeBody($response, $request); if ($expectedClass = self::determineExpectedClass($expectedClass, $request)) { $json = \json_decode($body, \true); return new $expectedClass($json); } return $response; } private static function decodeBody(ResponseInterface $response, ?RequestInterface $request = null) { if (self::isAltMedia($request)) { // don't decode the body, it's probably a really long string return ''; } return (string) $response->getBody(); } private static function determineExpectedClass($expectedClass, ?RequestInterface $request = null) { // "false" is used to explicitly prevent an expected class from being returned if (\false === $expectedClass) { return null; } // if we don't have a request, we just use what's passed in if (null === $request) { return $expectedClass; } // return what we have in the request header if one was not supplied return $expectedClass ?: $request->getHeaderLine('X-Php-Expected-Class'); } private static function getResponseErrors($body) { $json = \json_decode($body, \true); if (isset($json['error']['errors'])) { return $json['error']['errors']; } return null; } private static function isAltMedia(?RequestInterface $request = null) { if ($request && ($qs = $request->getUri()->getQuery())) { \parse_str($qs, $query); if (isset($query['alt']) && $query['alt'] == 'media') { return \true; } } return \false; } } vendor_prefixed/google/apiclient/src/Http/Batch.php 0000644 00000017245 15174671617 0016443 0 ustar 00 <?php /* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Http; use WPMailSMTP\Vendor\Google\Client; use WPMailSMTP\Vendor\Google\Service\Exception as GoogleServiceException; use WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Response; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; /** * Class to handle batched requests to the Google API service. * * Note that calls to `Google\Http\Batch::execute()` do not clear the queued * requests. To start a new batch, be sure to create a new instance of this * class. */ class Batch { const BATCH_PATH = 'batch'; private static $CONNECTION_ESTABLISHED_HEADERS = ["HTTP/1.0 200 Connection established\r\n\r\n", "HTTP/1.1 200 Connection established\r\n\r\n"]; /** @var string Multipart Boundary. */ private $boundary; /** @var array service requests to be executed. */ private $requests = []; /** @var Client */ private $client; private $rootUrl; private $batchPath; public function __construct(Client $client, $boundary = \false, $rootUrl = null, $batchPath = null) { $this->client = $client; $this->boundary = $boundary ?: \mt_rand(); $rootUrl = \rtrim($rootUrl ?: $this->client->getConfig('base_path'), '/'); $this->rootUrl = \str_replace('UNIVERSE_DOMAIN', $this->client->getUniverseDomain(), $rootUrl); $this->batchPath = $batchPath ?: self::BATCH_PATH; } public function add(RequestInterface $request, $key = \false) { if (\false == $key) { $key = \mt_rand(); } $this->requests[$key] = $request; } public function execute() { $body = ''; $classes = []; $batchHttpTemplate = <<<EOF --%s Content-Type: application/http Content-Transfer-Encoding: binary MIME-Version: 1.0 Content-ID: %s %s %s%s EOF; /** @var RequestInterface $request */ foreach ($this->requests as $key => $request) { $firstLine = \sprintf('%s %s HTTP/%s', $request->getMethod(), $request->getRequestTarget(), $request->getProtocolVersion()); $content = (string) $request->getBody(); $headers = ''; foreach ($request->getHeaders() as $name => $values) { $headers .= \sprintf("%s:%s\r\n", $name, \implode(', ', $values)); } $body .= \sprintf($batchHttpTemplate, $this->boundary, $key, $firstLine, $headers, $content ? "\n" . $content : ''); $classes['response-' . $key] = $request->getHeaderLine('X-Php-Expected-Class'); } $body .= "--{$this->boundary}--"; $body = \trim($body); $url = $this->rootUrl . '/' . $this->batchPath; $headers = ['Content-Type' => \sprintf('multipart/mixed; boundary=%s', $this->boundary), 'Content-Length' => (string) \strlen($body)]; $request = new Request('POST', $url, $headers, $body); $response = $this->client->execute($request); return $this->parseResponse($response, $classes); } public function parseResponse(ResponseInterface $response, $classes = []) { $contentType = $response->getHeaderLine('content-type'); $contentType = \explode(';', $contentType); $boundary = \false; foreach ($contentType as $part) { $part = \explode('=', $part, 2); if (isset($part[0]) && 'boundary' == \trim($part[0])) { $boundary = $part[1]; } } $body = (string) $response->getBody(); if (!empty($body)) { $body = \str_replace("--{$boundary}--", "--{$boundary}", $body); $parts = \explode("--{$boundary}", $body); $responses = []; $requests = \array_values($this->requests); foreach ($parts as $i => $part) { $part = \trim($part); if (!empty($part)) { list($rawHeaders, $part) = \explode("\r\n\r\n", $part, 2); $headers = $this->parseRawHeaders($rawHeaders); $status = \substr($part, 0, \strpos($part, "\n")); $status = \explode(" ", $status); $status = $status[1]; list($partHeaders, $partBody) = $this->parseHttpResponse($part, 0); $response = new Response((int) $status, $partHeaders, Psr7\Utils::streamFor($partBody)); // Need content id. $key = $headers['content-id']; try { $response = REST::decodeHttpResponse($response, $requests[$i - 1]); } catch (GoogleServiceException $e) { // Store the exception as the response, so successful responses // can be processed. $response = $e; } $responses[$key] = $response; } } return $responses; } return null; } private function parseRawHeaders($rawHeaders) { $headers = []; $responseHeaderLines = \explode("\r\n", $rawHeaders); foreach ($responseHeaderLines as $headerLine) { if ($headerLine && \strpos($headerLine, ':') !== \false) { list($header, $value) = \explode(': ', $headerLine, 2); $header = \strtolower($header); if (isset($headers[$header])) { $headers[$header] = \array_merge((array) $headers[$header], (array) $value); } else { $headers[$header] = $value; } } } return $headers; } /** * Used by the IO lib and also the batch processing. * * @param string $respData * @param int $headerSize * @return array */ private function parseHttpResponse($respData, $headerSize) { // check proxy header foreach (self::$CONNECTION_ESTABLISHED_HEADERS as $established_header) { if (\stripos($respData, $established_header) !== \false) { // existed, remove it $respData = \str_ireplace($established_header, '', $respData); // Subtract the proxy header size unless the cURL bug prior to 7.30.0 // is present which prevented the proxy header size from being taken into // account. // @TODO look into this // if (!$this->needsQuirk()) { // $headerSize -= strlen($established_header); // } break; } } if ($headerSize) { $responseBody = \substr($respData, $headerSize); $responseHeaders = \substr($respData, 0, $headerSize); } else { $responseSegments = \explode("\r\n\r\n", $respData, 2); $responseHeaders = $responseSegments[0]; $responseBody = isset($responseSegments[1]) ? $responseSegments[1] : null; } $responseHeaders = $this->parseRawHeaders($responseHeaders); return [$responseHeaders, $responseBody]; } } vendor_prefixed/google/apiclient/src/Model.php 0000644 00000024007 15174671617 0015535 0 ustar 00 <?php /* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google; use WPMailSMTP\Vendor\Google\Exception as GoogleException; use ReflectionObject; use ReflectionProperty; use stdClass; /** * This class defines attributes, valid values, and usage which is generated * from a given json schema. * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5 * */ #[\AllowDynamicProperties] class Model implements \ArrayAccess { /** * If you need to specify a NULL JSON value, use Google\Model::NULL_VALUE * instead - it will be replaced when converting to JSON with a real null. */ const NULL_VALUE = "{}gapi-php-null"; protected $internal_gapi_mappings = []; protected $modelData = []; protected $processed = []; /** * Polymorphic - accepts a variable number of arguments dependent * on the type of the model subclass. */ public final function __construct() { if (\func_num_args() == 1 && \is_array(\func_get_arg(0))) { // Initialize the model with the array's contents. $array = \func_get_arg(0); $this->mapTypes($array); } $this->gapiInit(); } /** * Getter that handles passthrough access to the data array, and lazy object creation. * @param string $key Property name. * @return mixed The value if any, or null. */ public function __get($key) { $keyType = $this->keyType($key); $keyDataType = $this->dataType($key); if ($keyType && !isset($this->processed[$key])) { if (isset($this->modelData[$key])) { $val = $this->modelData[$key]; } elseif ($keyDataType == 'array' || $keyDataType == 'map') { $val = []; } else { $val = null; } if ($this->isAssociativeArray($val)) { if ($keyDataType && 'map' == $keyDataType) { foreach ($val as $arrayKey => $arrayItem) { $this->modelData[$key][$arrayKey] = new $keyType($arrayItem); } } else { $this->modelData[$key] = new $keyType($val); } } elseif (\is_array($val)) { $arrayObject = []; foreach ($val as $arrayIndex => $arrayItem) { $arrayObject[$arrayIndex] = new $keyType($arrayItem); } $this->modelData[$key] = $arrayObject; } $this->processed[$key] = \true; } return isset($this->modelData[$key]) ? $this->modelData[$key] : null; } /** * Initialize this object's properties from an array. * * @param array $array Used to seed this object's properties. * @return void */ protected function mapTypes($array) { // Hard initialise simple types, lazy load more complex ones. foreach ($array as $key => $val) { if ($keyType = $this->keyType($key)) { $dataType = $this->dataType($key); if ($dataType == 'array' || $dataType == 'map') { $this->{$key} = []; foreach ($val as $itemKey => $itemVal) { if ($itemVal instanceof $keyType) { $this->{$key}[$itemKey] = $itemVal; } else { $this->{$key}[$itemKey] = new $keyType($itemVal); } } } elseif ($val instanceof $keyType) { $this->{$key} = $val; } else { $this->{$key} = new $keyType($val); } unset($array[$key]); } elseif (\property_exists($this, $key)) { $this->{$key} = $val; unset($array[$key]); } elseif (\property_exists($this, $camelKey = $this->camelCase($key))) { // This checks if property exists as camelCase, leaving it in array as snake_case // in case of backwards compatibility issues. $this->{$camelKey} = $val; } } $this->modelData = $array; } /** * Blank initialiser to be used in subclasses to do post-construction initialisation - this * avoids the need for subclasses to have to implement the variadics handling in their * constructors. */ protected function gapiInit() { return; } /** * Create a simplified object suitable for straightforward * conversion to JSON. This is relatively expensive * due to the usage of reflection, but shouldn't be called * a whole lot, and is the most straightforward way to filter. */ public function toSimpleObject() { $object = new stdClass(); // Process all other data. foreach ($this->modelData as $key => $val) { $result = $this->getSimpleValue($val); if ($result !== null) { $object->{$key} = $this->nullPlaceholderCheck($result); } } // Process all public properties. $reflect = new ReflectionObject($this); $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC); foreach ($props as $member) { $name = $member->getName(); $result = $this->getSimpleValue($this->{$name}); if ($result !== null) { $name = $this->getMappedName($name); $object->{$name} = $this->nullPlaceholderCheck($result); } } return $object; } /** * Handle different types of values, primarily * other objects and map and array data types. */ private function getSimpleValue($value) { if ($value instanceof Model) { return $value->toSimpleObject(); } elseif (\is_array($value)) { $return = []; foreach ($value as $key => $a_value) { $a_value = $this->getSimpleValue($a_value); if ($a_value !== null) { $key = $this->getMappedName($key); $return[$key] = $this->nullPlaceholderCheck($a_value); } } return $return; } return $value; } /** * Check whether the value is the null placeholder and return true null. */ private function nullPlaceholderCheck($value) { if ($value === self::NULL_VALUE) { return null; } return $value; } /** * If there is an internal name mapping, use that. */ private function getMappedName($key) { if (isset($this->internal_gapi_mappings, $this->internal_gapi_mappings[$key])) { $key = $this->internal_gapi_mappings[$key]; } return $key; } /** * Returns true only if the array is associative. * @param array $array * @return bool True if the array is associative. */ protected function isAssociativeArray($array) { if (!\is_array($array)) { return \false; } $keys = \array_keys($array); foreach ($keys as $key) { if (\is_string($key)) { return \true; } } return \false; } /** * Verify if $obj is an array. * @throws \Google\Exception Thrown if $obj isn't an array. * @param array $obj Items that should be validated. * @param string $method Method expecting an array as an argument. */ public function assertIsArray($obj, $method) { if ($obj && !\is_array($obj)) { throw new GoogleException("Incorrect parameter type passed to {$method}(). Expected an array."); } } /** @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->{$offset}) || isset($this->modelData[$offset]); } /** @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) { return isset($this->{$offset}) ? $this->{$offset} : $this->__get($offset); } /** @return void */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (\property_exists($this, $offset)) { $this->{$offset} = $value; } else { $this->modelData[$offset] = $value; $this->processed[$offset] = \true; } } /** @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->modelData[$offset]); } protected function keyType($key) { $keyType = $key . "Type"; // ensure keyType is a valid class if (\property_exists($this, $keyType) && $this->{$keyType} !== null && \class_exists($this->{$keyType})) { return $this->{$keyType}; } } protected function dataType($key) { $dataType = $key . "DataType"; if (\property_exists($this, $dataType)) { return $this->{$dataType}; } } public function __isset($key) { return isset($this->modelData[$key]); } public function __unset($key) { unset($this->modelData[$key]); } /** * Convert a string to camelCase * @param string $value * @return string */ private function camelCase($value) { $value = \ucwords(\str_replace(['-', '_'], ' ', $value)); $value = \str_replace(' ', '', $value); $value[0] = \strtolower($value[0]); return $value; } } vendor_prefixed/google/apiclient/src/Task/Retryable.php 0000644 00000001401 15174671617 0017321 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Task; /** * Interface for checking how many times a given task can be retried following * a failure. */ interface Retryable { } vendor_prefixed/google/apiclient/src/Task/Runner.php 0000644 00000017271 15174671617 0016655 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Task; use WPMailSMTP\Vendor\Google\Service\Exception as GoogleServiceException; use WPMailSMTP\Vendor\Google\Task\Exception as GoogleTaskException; /** * A task runner with exponential backoff support. * * @see https://developers.google.com/drive/web/handle-errors#implementing_exponential_backoff */ class Runner { const TASK_RETRY_NEVER = 0; const TASK_RETRY_ONCE = 1; const TASK_RETRY_ALWAYS = -1; /** * @var integer $maxDelay The max time (in seconds) to wait before a retry. */ private $maxDelay = 60; /** * @var integer $delay The previous delay from which the next is calculated. */ private $delay = 1; /** * @var integer $factor The base number for the exponential back off. */ private $factor = 2; /** * @var float $jitter A random number between -$jitter and $jitter will be * added to $factor on each iteration to allow for a better distribution of * retries. */ private $jitter = 0.5; /** * @var integer $attempts The number of attempts that have been tried so far. */ private $attempts = 0; /** * @var integer $maxAttempts The max number of attempts allowed. */ private $maxAttempts = 1; /** * @var callable $action The task to run and possibly retry. */ private $action; /** * @var array $arguments The task arguments. */ private $arguments; /** * @var array $retryMap Map of errors with retry counts. */ protected $retryMap = [ '500' => self::TASK_RETRY_ALWAYS, '503' => self::TASK_RETRY_ALWAYS, 'rateLimitExceeded' => self::TASK_RETRY_ALWAYS, 'userRateLimitExceeded' => self::TASK_RETRY_ALWAYS, 6 => self::TASK_RETRY_ALWAYS, // CURLE_COULDNT_RESOLVE_HOST 7 => self::TASK_RETRY_ALWAYS, // CURLE_COULDNT_CONNECT 28 => self::TASK_RETRY_ALWAYS, // CURLE_OPERATION_TIMEOUTED 35 => self::TASK_RETRY_ALWAYS, // CURLE_SSL_CONNECT_ERROR 52 => self::TASK_RETRY_ALWAYS, // CURLE_GOT_NOTHING 'lighthouseError' => self::TASK_RETRY_NEVER, ]; /** * Creates a new task runner with exponential backoff support. * * @param array $config The task runner config * @param string $name The name of the current task (used for logging) * @param callable $action The task to run and possibly retry * @param array $arguments The task arguments * @throws \Google\Task\Exception when misconfigured */ // @phpstan-ignore-next-line public function __construct($config, $name, $action, array $arguments = []) { if (isset($config['initial_delay'])) { if ($config['initial_delay'] < 0) { throw new GoogleTaskException('Task configuration `initial_delay` must not be negative.'); } $this->delay = $config['initial_delay']; } if (isset($config['max_delay'])) { if ($config['max_delay'] <= 0) { throw new GoogleTaskException('Task configuration `max_delay` must be greater than 0.'); } $this->maxDelay = $config['max_delay']; } if (isset($config['factor'])) { if ($config['factor'] <= 0) { throw new GoogleTaskException('Task configuration `factor` must be greater than 0.'); } $this->factor = $config['factor']; } if (isset($config['jitter'])) { if ($config['jitter'] <= 0) { throw new GoogleTaskException('Task configuration `jitter` must be greater than 0.'); } $this->jitter = $config['jitter']; } if (isset($config['retries'])) { if ($config['retries'] < 0) { throw new GoogleTaskException('Task configuration `retries` must not be negative.'); } $this->maxAttempts += $config['retries']; } if (!\is_callable($action)) { throw new GoogleTaskException('Task argument `$action` must be a valid callable.'); } $this->action = $action; $this->arguments = $arguments; } /** * Checks if a retry can be attempted. * * @return boolean */ public function canAttempt() { return $this->attempts < $this->maxAttempts; } /** * Runs the task and (if applicable) automatically retries when errors occur. * * @return mixed * @throws \Google\Service\Exception on failure when no retries are available. */ public function run() { while ($this->attempt()) { try { return \call_user_func_array($this->action, $this->arguments); } catch (GoogleServiceException $exception) { $allowedRetries = $this->allowedRetries($exception->getCode(), $exception->getErrors()); if (!$this->canAttempt() || !$allowedRetries) { throw $exception; } if ($allowedRetries > 0) { $this->maxAttempts = \min($this->maxAttempts, $this->attempts + $allowedRetries); } } } } /** * Runs a task once, if possible. This is useful for bypassing the `run()` * loop. * * NOTE: If this is not the first attempt, this function will sleep in * accordance to the backoff configurations before running the task. * * @return boolean */ public function attempt() { if (!$this->canAttempt()) { return \false; } if ($this->attempts > 0) { $this->backOff(); } $this->attempts++; return \true; } /** * Sleeps in accordance to the backoff configurations. */ private function backOff() { $delay = $this->getDelay(); \usleep((int) ($delay * 1000000)); } /** * Gets the delay (in seconds) for the current backoff period. * * @return int */ private function getDelay() { $jitter = $this->getJitter(); $factor = $this->attempts > 1 ? $this->factor + $jitter : 1 + \abs($jitter); return $this->delay = \min($this->maxDelay, $this->delay * $factor); } /** * Gets the current jitter (random number between -$this->jitter and * $this->jitter). * * @return float */ private function getJitter() { return $this->jitter * 2 * \mt_rand() / \mt_getrandmax() - $this->jitter; } /** * Gets the number of times the associated task can be retried. * * NOTE: -1 is returned if the task can be retried indefinitely * * @return integer */ public function allowedRetries($code, $errors = []) { if (isset($this->retryMap[$code])) { return $this->retryMap[$code]; } if (!empty($errors) && isset($errors[0]['reason'], $this->retryMap[$errors[0]['reason']])) { return $this->retryMap[$errors[0]['reason']]; } return 0; } public function setRetryMap($retryMap) { $this->retryMap = $retryMap; } } vendor_prefixed/google/apiclient/src/Task/Composer.php 0000644 00000006412 15174671617 0017166 0 ustar 00 <?php /* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ namespace WPMailSMTP\Vendor\Google\Task; use WPMailSMTP\Vendor\Composer\Script\Event; use InvalidArgumentException; use WPMailSMTP\Vendor\Symfony\Component\Filesystem\Filesystem; use WPMailSMTP\Vendor\Symfony\Component\Finder\Finder; class Composer { /** * @param Event $event Composer event passed in for any script method * @param Filesystem $filesystem Optional. Used for testing. */ public static function cleanup(Event $event, ?Filesystem $filesystem = null) { $composer = $event->getComposer(); $extra = $composer->getPackage()->getExtra(); $servicesToKeep = isset($extra['google/apiclient-services']) ? $extra['google/apiclient-services'] : []; if ($servicesToKeep) { $vendorDir = $composer->getConfig()->get('vendor-dir'); $serviceDir = \sprintf('%s/google/apiclient-services/src/Google/Service', $vendorDir); if (!\is_dir($serviceDir)) { // path for google/apiclient-services >= 0.200.0 $serviceDir = \sprintf('%s/google/apiclient-services/src', $vendorDir); } self::verifyServicesToKeep($serviceDir, $servicesToKeep); $finder = self::getServicesToRemove($serviceDir, $servicesToKeep); $filesystem = $filesystem ?: new Filesystem(); if (0 !== ($count = \count($finder))) { $event->getIO()->write(\sprintf('Removing %s google services', $count)); foreach ($finder as $file) { $realpath = $file->getRealPath(); $filesystem->remove($realpath); $filesystem->remove($realpath . '.php'); } } } } /** * @throws InvalidArgumentException when the service doesn't exist */ private static function verifyServicesToKeep($serviceDir, array $servicesToKeep) { $finder = (new Finder())->directories()->depth('== 0'); foreach ($servicesToKeep as $service) { if (!\preg_match('/^[a-zA-Z0-9]*$/', $service)) { throw new InvalidArgumentException(\sprintf('Invalid Google service name "%s"', $service)); } try { $finder->in($serviceDir . '/' . $service); } catch (InvalidArgumentException $e) { throw new InvalidArgumentException(\sprintf('Google service "%s" does not exist or was removed previously', $service)); } } } private static function getServicesToRemove($serviceDir, array $servicesToKeep) { // find all files in the current directory return (new Finder())->directories()->depth('== 0')->in($serviceDir)->exclude($servicesToKeep); } } vendor_prefixed/google/apiclient/src/Task/Exception.php 0000644 00000001353 15174671617 0017334 0 ustar 00 <?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Task; use WPMailSMTP\Vendor\Google\Exception as GoogleException; class Exception extends GoogleException { } vendor_prefixed/google/apiclient/src/Exception.php 0000644 00000001311 15174671617 0016424 0 ustar 00 <?php /* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google; use Exception as BaseException; class Exception extends BaseException { } vendor_prefixed/google/apiclient/src/Collection.php 0000644 00000005751 15174671617 0016575 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Google; /** * Extension to the regular Google\Model that automatically * exposes the items array for iteration, so you can just * iterate over the object rather than a reference inside. */ class Collection extends Model implements \Iterator, \Countable { protected $collection_key = 'items'; /** @return void */ #[\ReturnTypeWillChange] public function rewind() { if (isset($this->{$this->collection_key}) && \is_array($this->{$this->collection_key})) { \reset($this->{$this->collection_key}); } } /** @return mixed */ #[\ReturnTypeWillChange] public function current() { $this->coerceType($this->key()); if (\is_array($this->{$this->collection_key})) { return \current($this->{$this->collection_key}); } } /** @return mixed */ #[\ReturnTypeWillChange] public function key() { if (isset($this->{$this->collection_key}) && \is_array($this->{$this->collection_key})) { return \key($this->{$this->collection_key}); } } /** @return mixed */ #[\ReturnTypeWillChange] public function next() { return \next($this->{$this->collection_key}); } /** @return bool */ #[\ReturnTypeWillChange] public function valid() { $key = $this->key(); return $key !== null && $key !== \false; } /** @return int */ #[\ReturnTypeWillChange] public function count() { if (!isset($this->{$this->collection_key})) { return 0; } return \count($this->{$this->collection_key}); } /** @return bool */ #[\ReturnTypeWillChange] public function offsetExists($offset) { if (!\is_numeric($offset)) { return parent::offsetExists($offset); } return isset($this->{$this->collection_key}[$offset]); } /** @return mixed */ #[\ReturnTypeWillChange] public function offsetGet($offset) { if (!\is_numeric($offset)) { return parent::offsetGet($offset); } $this->coerceType($offset); return $this->{$this->collection_key}[$offset]; } /** @return void */ #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { if (!\is_numeric($offset)) { parent::offsetSet($offset, $value); } $this->{$this->collection_key}[$offset] = $value; } /** @return void */ #[\ReturnTypeWillChange] public function offsetUnset($offset) { if (!\is_numeric($offset)) { parent::offsetUnset($offset); } unset($this->{$this->collection_key}[$offset]); } private function coerceType($offset) { $keyType = $this->keyType($this->collection_key); if ($keyType && !\is_object($this->{$this->collection_key}[$offset])) { $this->{$this->collection_key}[$offset] = new $keyType($this->{$this->collection_key}[$offset]); } } } vendor_prefixed/google/apiclient/src/Service.php 0000644 00000003666 15174671617 0016105 0 ustar 00 <?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google; use WPMailSMTP\Vendor\Google\Http\Batch; use TypeError; class Service { public $batchPath; /** * Only used in getBatch */ public $rootUrl; public $rootUrlTemplate; public $version; public $servicePath; public $serviceName; public $availableScopes; public $resource; private $client; public function __construct($clientOrConfig = []) { if ($clientOrConfig instanceof Client) { $this->client = $clientOrConfig; } elseif (\is_array($clientOrConfig)) { $this->client = new Client($clientOrConfig ?: []); } else { $errorMessage = 'WPMailSMTP\\Vendor\\constructor must be array or instance of Google\\Client'; if (\class_exists('TypeError')) { throw new TypeError($errorMessage); } \trigger_error($errorMessage, \E_USER_ERROR); } } /** * Return the associated Google\Client class. * @return \Google\Client */ public function getClient() { return $this->client; } /** * Create a new HTTP Batch handler for this service * * @return Batch */ public function createBatch() { return new Batch($this->client, \false, $this->rootUrlTemplate ?? $this->rootUrl, $this->batchPath); } } vendor_prefixed/google/apiclient/src/AccessToken/Revoke.php 0000644 00000004445 15174671617 0020136 0 ustar 00 <?php /* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\AccessToken; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Client; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; /** * Wrapper around Google Access Tokens which provides convenience functions * */ class Revoke { /** * @var ClientInterface The http client */ private $http; /** * Instantiates the class, but does not initiate the login flow, leaving it * to the discretion of the caller. */ public function __construct(?ClientInterface $http = null) { $this->http = $http; } /** * Revoke an OAuth2 access token or refresh token. This method will revoke the current access * token, if a token isn't provided. * * @param string|array $token The token (access token or a refresh token) that should be revoked. * @return boolean Returns True if the revocation was successful, otherwise False. */ public function revokeToken($token) { if (\is_array($token)) { if (isset($token['refresh_token'])) { $token = $token['refresh_token']; } else { $token = $token['access_token']; } } $body = Psr7\Utils::streamFor(\http_build_query(['token' => $token])); $request = new Request('POST', Client::OAUTH2_REVOKE_URI, ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded'], $body); $httpHandler = HttpHandlerFactory::build($this->http); $response = $httpHandler($request); return $response->getStatusCode() == 200; } } vendor_prefixed/google/apiclient/src/AccessToken/Verify.php 0000644 00000020071 15174671617 0020140 0 ustar 00 <?php /* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\AccessToken; use DateTime; use DomainException; use Exception; use WPMailSMTP\Vendor\ExpiredException; use WPMailSMTP\Vendor\Firebase\JWT\ExpiredException as ExpiredExceptionV3; use WPMailSMTP\Vendor\Firebase\JWT\JWT; use WPMailSMTP\Vendor\Firebase\JWT\Key; use WPMailSMTP\Vendor\Firebase\JWT\SignatureInvalidException; use WPMailSMTP\Vendor\Google\Auth\Cache\MemoryCacheItemPool; use WPMailSMTP\Vendor\Google\Exception as GoogleException; use WPMailSMTP\Vendor\GuzzleHttp\Client; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use InvalidArgumentException; use LogicException; use WPMailSMTP\Vendor\phpseclib3\Crypt\AES; use WPMailSMTP\Vendor\phpseclib3\Crypt\PublicKeyLoader; use WPMailSMTP\Vendor\phpseclib3\Math\BigInteger; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * Wrapper around Google Access Tokens which provides convenience functions * */ class Verify { const FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs'; const OAUTH2_ISSUER = 'accounts.google.com'; const OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com'; /** * @var ClientInterface The http client */ private $http; /** * @var CacheItemPoolInterface cache class */ private $cache; /** * @var \Firebase\JWT\JWT */ public $jwt; /** * Instantiates the class, but does not initiate the login flow, leaving it * to the discretion of the caller. */ public function __construct(?ClientInterface $http = null, ?CacheItemPoolInterface $cache = null, $jwt = null) { if (null === $http) { $http = new Client(); } if (null === $cache) { $cache = new MemoryCacheItemPool(); } $this->http = $http; $this->cache = $cache; $this->jwt = $jwt ?: $this->getJwtService(); } /** * Verifies an id token and returns the authenticated apiLoginTicket. * Throws an exception if the id token is not valid. * The audience parameter can be used to control which id tokens are * accepted. By default, the id token must have been issued to this OAuth2 client. * * @param string $idToken the ID token in JWT format * @param string $audience Optional. The audience to verify against JWt "aud" * @return array|false the token payload, if successful */ public function verifyIdToken($idToken, $audience = null) { if (empty($idToken)) { throw new LogicException('id_token cannot be null'); } // set phpseclib constants if applicable $this->setPhpsecConstants(); // Check signature $certs = $this->getFederatedSignOnCerts(); foreach ($certs as $cert) { try { $args = [$idToken]; $publicKey = $this->getPublicKey($cert); if (\class_exists(Key::class)) { $args[] = new Key($publicKey, 'RS256'); } else { $args[] = $publicKey; $args[] = ['RS256']; } $payload = \call_user_func_array([$this->jwt, 'decode'], $args); if (\property_exists($payload, 'aud')) { if ($audience && $payload->aud != $audience) { return \false; } } // support HTTP and HTTPS issuers // @see https://developers.google.com/identity/sign-in/web/backend-auth $issuers = [self::OAUTH2_ISSUER, self::OAUTH2_ISSUER_HTTPS]; if (!isset($payload->iss) || !\in_array($payload->iss, $issuers)) { return \false; } return (array) $payload; } catch (ExpiredException $e) { // @phpstan-ignore-line return \false; } catch (ExpiredExceptionV3 $e) { return \false; } catch (SignatureInvalidException $e) { // continue } catch (DomainException $e) { // continue } } return \false; } private function getCache() { return $this->cache; } /** * Retrieve and cache a certificates file. * * @param string $url location * @throws \Google\Exception * @return array certificates */ private function retrieveCertsFromLocation($url) { // If we're retrieving a local file, just grab it. if (0 !== \strpos($url, 'http')) { if (!($file = \file_get_contents($url))) { throw new GoogleException("Failed to retrieve verification certificates: '" . $url . "'."); } return \json_decode($file, \true); } // @phpstan-ignore-next-line $response = $this->http->get($url); if ($response->getStatusCode() == 200) { return \json_decode((string) $response->getBody(), \true); } throw new GoogleException(\sprintf('Failed to retrieve verification certificates: "%s".', $response->getBody()->getContents()), $response->getStatusCode()); } // Gets federated sign-on certificates to use for verifying identity tokens. // Returns certs as array structure, where keys are key ids, and values // are PEM encoded certificates. private function getFederatedSignOnCerts() { $certs = null; if ($cache = $this->getCache()) { $cacheItem = $cache->getItem('federated_signon_certs_v3'); $certs = $cacheItem->get(); } if (!$certs) { $certs = $this->retrieveCertsFromLocation(self::FEDERATED_SIGNON_CERT_URL); if ($cache) { $cacheItem->expiresAt(new DateTime('+1 hour')); $cacheItem->set($certs); $cache->save($cacheItem); } } if (!isset($certs['keys'])) { throw new InvalidArgumentException('federated sign-on certs expects "keys" to be set'); } return $certs['keys']; } private function getJwtService() { $jwt = new JWT(); if ($jwt::$leeway < 1) { // Ensures JWT leeway is at least 1 // @see https://github.com/google/google-api-php-client/issues/827 $jwt::$leeway = 1; } return $jwt; } private function getPublicKey($cert) { $modulus = new BigInteger($this->jwt->urlsafeB64Decode($cert['n']), 256); $exponent = new BigInteger($this->jwt->urlsafeB64Decode($cert['e']), 256); $component = ['n' => $modulus, 'e' => $exponent]; $loader = PublicKeyLoader::load($component); return $loader->toString('PKCS8'); } /** * phpseclib calls "phpinfo" by default, which requires special * whitelisting in the AppEngine VM environment. This function * sets constants to bypass the need for phpseclib to check phpinfo * * @see phpseclib/Math/BigInteger * @see https://github.com/GoogleCloudPlatform/getting-started-php/issues/85 */ private function setPhpsecConstants() { if (\filter_var(\getenv('GAE_VM'), \FILTER_VALIDATE_BOOLEAN)) { if (!\defined('WPMailSMTP\\Vendor\\MATH_BIGINTEGER_OPENSSL_ENABLED')) { \define('WPMailSMTP\\Vendor\\MATH_BIGINTEGER_OPENSSL_ENABLED', \true); } if (!\defined('WPMailSMTP\\Vendor\\CRYPT_RSA_MODE')) { \define('WPMailSMTP\\Vendor\\CRYPT_RSA_MODE', AES::ENGINE_OPENSSL); } } } } vendor_prefixed/google/apiclient/src/aliases.php 0000644 00000007427 15174671617 0016125 0 ustar 00 <?php namespace WPMailSMTP\Vendor; if (\class_exists('WPMailSMTP\\Vendor\\Google_Client', \false)) { // Prevent error with preloading in PHP 7.4 // @see https://github.com/googleapis/google-api-php-client/issues/1976 return; } $classMap = ['WPMailSMTP\\Vendor\\Google\\Client' => 'Google_Client', 'WPMailSMTP\\Vendor\\Google\\Service' => 'Google_Service', 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Revoke' => 'Google_AccessToken_Revoke', 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Verify' => 'Google_AccessToken_Verify', 'WPMailSMTP\\Vendor\\Google\\Model' => 'Google_Model', 'WPMailSMTP\\Vendor\\Google\\Utils\\UriTemplate' => 'Google_Utils_UriTemplate', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\Guzzle6AuthHandler' => 'Google_AuthHandler_Guzzle6AuthHandler', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\Guzzle7AuthHandler' => 'Google_AuthHandler_Guzzle7AuthHandler', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\AuthHandlerFactory' => 'Google_AuthHandler_AuthHandlerFactory', 'WPMailSMTP\\Vendor\\Google\\Http\\Batch' => 'Google_Http_Batch', 'WPMailSMTP\\Vendor\\Google\\Http\\MediaFileUpload' => 'Google_Http_MediaFileUpload', 'WPMailSMTP\\Vendor\\Google\\Http\\REST' => 'Google_Http_REST', 'WPMailSMTP\\Vendor\\Google\\Task\\Retryable' => 'Google_Task_Retryable', 'WPMailSMTP\\Vendor\\Google\\Task\\Exception' => 'Google_Task_Exception', 'WPMailSMTP\\Vendor\\Google\\Task\\Runner' => 'Google_Task_Runner', 'WPMailSMTP\\Vendor\\Google\\Collection' => 'Google_Collection', 'WPMailSMTP\\Vendor\\Google\\Service\\Exception' => 'Google_Service_Exception', 'WPMailSMTP\\Vendor\\Google\\Service\\Resource' => 'Google_Service_Resource', 'WPMailSMTP\\Vendor\\Google\\Exception' => 'Google_Exception']; foreach ($classMap as $class => $alias) { \class_alias($class, 'WPMailSMTP\\Vendor\\' . $alias); } /** * This class needs to be defined explicitly as scripts must be recognized by * the autoloader. */ class Google_Task_Composer extends \WPMailSMTP\Vendor\Google\Task\Composer { } /** @phpstan-ignore-next-line */ if (\false) { class Google_AccessToken_Revoke extends \WPMailSMTP\Vendor\Google\AccessToken\Revoke { } class Google_AccessToken_Verify extends \WPMailSMTP\Vendor\Google\AccessToken\Verify { } class Google_AuthHandler_AuthHandlerFactory extends \WPMailSMTP\Vendor\Google\AuthHandler\AuthHandlerFactory { } class Google_AuthHandler_Guzzle6AuthHandler extends \WPMailSMTP\Vendor\Google\AuthHandler\Guzzle6AuthHandler { } class Google_AuthHandler_Guzzle7AuthHandler extends \WPMailSMTP\Vendor\Google\AuthHandler\Guzzle7AuthHandler { } class Google_Client extends \WPMailSMTP\Vendor\Google\Client { } class Google_Collection extends \WPMailSMTP\Vendor\Google\Collection { } class Google_Exception extends \WPMailSMTP\Vendor\Google\Exception { } class Google_Http_Batch extends \WPMailSMTP\Vendor\Google\Http\Batch { } class Google_Http_MediaFileUpload extends \WPMailSMTP\Vendor\Google\Http\MediaFileUpload { } class Google_Http_REST extends \WPMailSMTP\Vendor\Google\Http\REST { } class Google_Model extends \WPMailSMTP\Vendor\Google\Model { } class Google_Service extends \WPMailSMTP\Vendor\Google\Service { } class Google_Service_Exception extends \WPMailSMTP\Vendor\Google\Service\Exception { } class Google_Service_Resource extends \WPMailSMTP\Vendor\Google\Service\Resource { } class Google_Task_Exception extends \WPMailSMTP\Vendor\Google\Task\Exception { } interface Google_Task_Retryable extends \WPMailSMTP\Vendor\Google\Task\Retryable { } class Google_Task_Runner extends \WPMailSMTP\Vendor\Google\Task\Runner { } class Google_Utils_UriTemplate extends \WPMailSMTP\Vendor\Google\Utils\UriTemplate { } } vendor_prefixed/google/auth/LICENSE 0000644 00000024020 15174671617 0013166 0 ustar 00 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. vendor_prefixed/google/auth/autoload.php 0000644 00000002177 15174671617 0014513 0 ustar 00 <?php namespace WPMailSMTP\Vendor; /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ function oauth2client_php_autoload($className) { $classPath = \explode('_', $className); if ($classPath[0] != 'Google') { return; } if (\count($classPath) > 3) { // Maximum class file path depth in this project is 3. $classPath = \array_slice($classPath, 0, 3); } $filePath = \dirname(__FILE__) . '/src/' . \implode('/', $classPath) . '.php'; if (\file_exists($filePath)) { require_once $filePath; } } \spl_autoload_register('oauth2client_php_autoload'); vendor_prefixed/google/auth/src/FetchAuthTokenInterface.php 0000644 00000003224 15174671617 0020161 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * An interface implemented by objects that can fetch auth tokens. */ interface FetchAuthTokenInterface { /** * Fetches the auth tokens based on the current state. * * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> a hash of auth tokens */ public function fetchAuthToken(?callable $httpHandler = null); /** * Obtains a key that can used to cache the results of #fetchAuthToken. * * If the value is empty, the auth token is not cached. * * @return string a key that may be used to cache the auth token. */ public function getCacheKey(); /** * Returns an associative array with the token and * expiration time. * * @return null|array<mixed> { * The last received access token. * * @type string $access_token The access token string. * @type int $expires_at The time the token expires as a UNIX timestamp. * } */ public function getLastReceivedToken(); } vendor_prefixed/google/auth/src/UpdateMetadataInterface.php 0000644 00000002321 15174671617 0020165 0 ustar 00 <?php /* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * Describes a Credentials object which supports updating request metadata * (request headers). */ interface UpdateMetadataInterface { const AUTH_METADATA_KEY = 'authorization'; /** * Updates metadata with the authorization token. * * @param array<mixed> $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> updated metadata hashmap */ public function updateMetadata($metadata, $authUri = null, ?callable $httpHandler = null); } vendor_prefixed/google/auth/src/AccessToken.php 0000644 00000041434 15174671617 0015673 0 ustar 00 <?php /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use DateTime; use WPMailSMTP\Vendor\Firebase\JWT\ExpiredException; use WPMailSMTP\Vendor\Firebase\JWT\JWT; use WPMailSMTP\Vendor\Firebase\JWT\Key; use WPMailSMTP\Vendor\Firebase\JWT\SignatureInvalidException; use WPMailSMTP\Vendor\Google\Auth\Cache\MemoryCacheItemPool; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils; use InvalidArgumentException; use WPMailSMTP\Vendor\phpseclib3\Crypt\PublicKeyLoader; use WPMailSMTP\Vendor\phpseclib3\Crypt\RSA; use WPMailSMTP\Vendor\phpseclib3\Math\BigInteger; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; use RuntimeException; use WPMailSMTP\Vendor\SimpleJWT\InvalidTokenException; use WPMailSMTP\Vendor\SimpleJWT\JWT as SimpleJWT; use WPMailSMTP\Vendor\SimpleJWT\Keys\KeyFactory; use WPMailSMTP\Vendor\SimpleJWT\Keys\KeySet; use TypeError; use UnexpectedValueException; /** * Wrapper around Google Access Tokens which provides convenience functions. * * @experimental */ class AccessToken { const FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs'; const IAP_CERT_URL = 'https://www.gstatic.com/iap/verify/public_key-jwk'; const IAP_ISSUER = 'https://cloud.google.com/iap'; const OAUTH2_ISSUER = 'accounts.google.com'; const OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com'; const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke'; /** * @var callable */ private $httpHandler; /** * @var CacheItemPoolInterface */ private $cache; /** * @param callable $httpHandler [optional] An HTTP Handler to deliver PSR-7 requests. * @param CacheItemPoolInterface $cache [optional] A PSR-6 compatible cache implementation. */ public function __construct(?callable $httpHandler = null, ?CacheItemPoolInterface $cache = null) { $this->httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); $this->cache = $cache ?: new MemoryCacheItemPool(); } /** * Verifies an id token and returns the authenticated apiLoginTicket. * Throws an exception if the id token is not valid. * The audience parameter can be used to control which id tokens are * accepted. By default, the id token must have been issued to this OAuth2 client. * * @param string $token The JSON Web Token to be verified. * @param array<mixed> $options [optional] { * Configuration options. * @type string $audience The indended recipient of the token. * @type string $issuer The intended issuer of the token. * @type string $cacheKey The cache key of the cached certs. Defaults to * the sha1 of $certsLocation if provided, otherwise is set to * "federated_signon_certs_v3". * @type string $certsLocation The location (remote or local) from which * to retrieve certificates, if not cached. This value should only be * provided in limited circumstances in which you are sure of the * behavior. * @type bool $throwException Whether the function should throw an * exception if the verification fails. This is useful for * determining the reason verification failed. * } * @return array<mixed>|false the token payload, if successful, or false if not. * @throws InvalidArgumentException If certs could not be retrieved from a local file. * @throws InvalidArgumentException If received certs are in an invalid format. * @throws InvalidArgumentException If the cert alg is not supported. * @throws RuntimeException If certs could not be retrieved from a remote location. * @throws UnexpectedValueException If the token issuer does not match. * @throws UnexpectedValueException If the token audience does not match. */ public function verify($token, array $options = []) { $audience = $options['audience'] ?? null; $issuer = $options['issuer'] ?? null; $certsLocation = $options['certsLocation'] ?? self::FEDERATED_SIGNON_CERT_URL; $cacheKey = $options['cacheKey'] ?? $this->getCacheKeyFromCertLocation($certsLocation); $throwException = $options['throwException'] ?? \false; // for backwards compatibility // Check signature against each available cert. $certs = $this->getCerts($certsLocation, $cacheKey, $options); $alg = $this->determineAlg($certs); if (!\in_array($alg, ['RS256', 'ES256'])) { throw new InvalidArgumentException('unrecognized "alg" in certs, expected ES256 or RS256'); } try { if ($alg == 'RS256') { return $this->verifyRs256($token, $certs, $audience, $issuer); } return $this->verifyEs256($token, $certs, $audience, $issuer); } catch (ExpiredException $e) { // firebase/php-jwt 5+ } catch (SignatureInvalidException $e) { // firebase/php-jwt 5+ } catch (InvalidTokenException $e) { // simplejwt } catch (InvalidArgumentException $e) { } catch (UnexpectedValueException $e) { } if ($throwException) { throw $e; } return \false; } /** * Identifies the expected algorithm to verify by looking at the "alg" key * of the provided certs. * * @param array<mixed> $certs Certificate array according to the JWK spec (see * https://tools.ietf.org/html/rfc7517). * @return string The expected algorithm, such as "ES256" or "RS256". */ private function determineAlg(array $certs) { $alg = null; foreach ($certs as $cert) { if (empty($cert['alg'])) { throw new InvalidArgumentException('certs expects "alg" to be set'); } $alg = $alg ?: $cert['alg']; if ($alg != $cert['alg']) { throw new InvalidArgumentException('More than one alg detected in certs'); } } return $alg; } /** * Verifies an ES256-signed JWT. * * @param string $token The JSON Web Token to be verified. * @param array<mixed> $certs Certificate array according to the JWK spec (see * https://tools.ietf.org/html/rfc7517). * @param string|null $audience If set, returns false if the provided * audience does not match the "aud" claim on the JWT. * @param string|null $issuer If set, returns false if the provided * issuer does not match the "iss" claim on the JWT. * @return array<mixed> the token payload, if successful, or false if not. */ private function verifyEs256($token, array $certs, $audience = null, $issuer = null) { $this->checkSimpleJwt(); $jwkset = new KeySet(); foreach ($certs as $cert) { $jwkset->add(KeyFactory::create($cert, 'php')); } // Validate the signature using the key set and ES256 algorithm. $jwt = $this->callSimpleJwtDecode([$token, $jwkset, 'ES256']); $payload = $jwt->getClaims(); if ($audience) { if (!isset($payload['aud']) || $payload['aud'] != $audience) { throw new UnexpectedValueException('Audience does not match'); } } // @see https://cloud.google.com/iap/docs/signed-headers-howto#verifying_the_jwt_payload $issuer = $issuer ?: self::IAP_ISSUER; if (!isset($payload['iss']) || $payload['iss'] !== $issuer) { throw new UnexpectedValueException('Issuer does not match'); } return $payload; } /** * Verifies an RS256-signed JWT. * * @param string $token The JSON Web Token to be verified. * @param array<mixed> $certs Certificate array according to the JWK spec (see * https://tools.ietf.org/html/rfc7517). * @param string|null $audience If set, returns false if the provided * audience does not match the "aud" claim on the JWT. * @param string|null $issuer If set, returns false if the provided * issuer does not match the "iss" claim on the JWT. * @return array<mixed> the token payload, if successful, or false if not. */ private function verifyRs256($token, array $certs, $audience = null, $issuer = null) { $this->checkAndInitializePhpsec(); $keys = []; foreach ($certs as $cert) { if (empty($cert['kid'])) { throw new InvalidArgumentException('certs expects "kid" to be set'); } if (empty($cert['n']) || empty($cert['e'])) { throw new InvalidArgumentException('RSA certs expects "n" and "e" to be set'); } $publicKey = $this->loadPhpsecPublicKey($cert['n'], $cert['e']); // create an array of key IDs to certs for the JWT library $keys[$cert['kid']] = new Key($publicKey, 'RS256'); } $payload = $this->callJwtStatic('decode', [$token, $keys]); if ($audience) { if (!\property_exists($payload, 'aud') || $payload->aud != $audience) { throw new UnexpectedValueException('Audience does not match'); } } // support HTTP and HTTPS issuers // @see https://developers.google.com/identity/sign-in/web/backend-auth $issuers = $issuer ? [$issuer] : [self::OAUTH2_ISSUER, self::OAUTH2_ISSUER_HTTPS]; if (!isset($payload->iss) || !\in_array($payload->iss, $issuers)) { throw new UnexpectedValueException('Issuer does not match'); } return (array) $payload; } /** * Revoke an OAuth2 access token or refresh token. This method will revoke the current access * token, if a token isn't provided. * * @param string|array<mixed> $token The token (access token or a refresh token) that should be revoked. * @param array<mixed> $options [optional] Configuration options. * @return bool Returns True if the revocation was successful, otherwise False. */ public function revoke($token, array $options = []) { if (\is_array($token)) { if (isset($token['refresh_token'])) { $token = $token['refresh_token']; } else { $token = $token['access_token']; } } $body = Utils::streamFor(\http_build_query(['token' => $token])); $request = new Request('POST', self::OAUTH2_REVOKE_URI, ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded'], $body); $httpHandler = $this->httpHandler; $response = $httpHandler($request, $options); return $response->getStatusCode() == 200; } /** * Gets federated sign-on certificates to use for verifying identity tokens. * Returns certs as array structure, where keys are key ids, and values * are PEM encoded certificates. * * @param string $location The location from which to retrieve certs. * @param string $cacheKey The key under which to cache the retrieved certs. * @param array<mixed> $options [optional] Configuration options. * @return array<mixed> * @throws InvalidArgumentException If received certs are in an invalid format. */ private function getCerts($location, $cacheKey, array $options = []) { $cacheItem = $this->cache->getItem($cacheKey); $certs = $cacheItem ? $cacheItem->get() : null; $expireTime = null; if (!$certs) { list($certs, $expireTime) = $this->retrieveCertsFromLocation($location, $options); } if (!isset($certs['keys'])) { if ($location !== self::IAP_CERT_URL) { throw new InvalidArgumentException('federated sign-on certs expects "keys" to be set'); } throw new InvalidArgumentException('certs expects "keys" to be set'); } // Push caching off until after verifying certs are in a valid format. // Don't want to cache bad data. if ($expireTime) { $cacheItem->expiresAt(new DateTime($expireTime)); $cacheItem->set($certs); $this->cache->save($cacheItem); } return $certs['keys']; } /** * Retrieve and cache a certificates file. * * @param string $url location * @param array<mixed> $options [optional] Configuration options. * @return array{array<mixed>, string} * @throws InvalidArgumentException If certs could not be retrieved from a local file. * @throws RuntimeException If certs could not be retrieved from a remote location. */ private function retrieveCertsFromLocation($url, array $options = []) { // If we're retrieving a local file, just grab it. $expireTime = '+1 hour'; if (\strpos($url, 'http') !== 0) { if (!\file_exists($url)) { throw new InvalidArgumentException(\sprintf('Failed to retrieve verification certificates from path: %s.', $url)); } return [\json_decode((string) \file_get_contents($url), \true), $expireTime]; } $httpHandler = $this->httpHandler; $response = $httpHandler(new Request('GET', $url), $options); if ($response->getStatusCode() == 200) { if ($cacheControl = $response->getHeaderLine('Cache-Control')) { \array_map(function ($value) use(&$expireTime) { list($key, $value) = \explode('=', $value) + [null, null]; if (\trim($key) == 'max-age') { $expireTime = '+' . $value . ' seconds'; } }, \explode(',', $cacheControl)); } return [\json_decode((string) $response->getBody(), \true), $expireTime]; } throw new RuntimeException(\sprintf('Failed to retrieve verification certificates: "%s".', $response->getBody()->getContents()), $response->getStatusCode()); } /** * @return void */ private function checkAndInitializePhpsec() { if (!\class_exists(RSA::class)) { throw new RuntimeException('Please require phpseclib/phpseclib v3 to use this utility.'); } } /** * @return string * @throws TypeError If the key cannot be initialized to a string. */ private function loadPhpsecPublicKey(string $modulus, string $exponent) : string { $key = PublicKeyLoader::load(['n' => new BigInteger($this->callJwtStatic('urlsafeB64Decode', [$modulus]), 256), 'e' => new BigInteger($this->callJwtStatic('urlsafeB64Decode', [$exponent]), 256)]); $formattedPublicKey = $key->toString('PKCS8'); if (!\is_string($formattedPublicKey)) { throw new TypeError('Failed to initialize the key'); } return $formattedPublicKey; } /** * @return void */ private function checkSimpleJwt() { // @codeCoverageIgnoreStart if (!\class_exists(SimpleJwt::class)) { throw new RuntimeException('Please require kelvinmo/simplejwt ^0.2 to use this utility.'); } // @codeCoverageIgnoreEnd } /** * Provide a hook to mock calls to the JWT static methods. * * @param string $method * @param array<mixed> $args * @return mixed */ protected function callJwtStatic($method, array $args = []) { return \call_user_func_array([JWT::class, $method], $args); // @phpstan-ignore-line } /** * Provide a hook to mock calls to the JWT static methods. * * @param array<mixed> $args * @return mixed */ protected function callSimpleJwtDecode(array $args = []) { return \call_user_func_array([SimpleJwt::class, 'decode'], $args); } /** * Generate a cache key based on the cert location using sha1 with the * exception of using "federated_signon_certs_v3" to preserve BC. * * @param string $certsLocation * @return string */ private function getCacheKeyFromCertLocation($certsLocation) { $key = $certsLocation === self::FEDERATED_SIGNON_CERT_URL ? 'federated_signon_certs_v3' : \sha1($certsLocation); return 'google_auth_certs_cache|' . $key; } } vendor_prefixed/google/auth/src/Cache/Item.php 0000644 00000007353 15174671617 0015374 0 ustar 00 <?php /* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Cache; use DateTime; use DateTimeInterface; use DateTimeZone; use WPMailSMTP\Vendor\Psr\Cache\CacheItemInterface; use TypeError; /** * A cache item. * * This class will be used by MemoryCacheItemPool and SysVCacheItemPool * on PHP 7.4 and below. It is compatible with psr/cache 1.0 and 2.0 (PSR-6). * @see TypedItem for compatiblity with psr/cache 3.0. */ final class Item implements CacheItemInterface { /** * @var string */ private $key; /** * @var mixed */ private $value; /** * @var DateTimeInterface|null */ private $expiration; /** * @var bool */ private $isHit = \false; /** * @param string $key */ public function __construct($key) { $this->key = $key; } /** * {@inheritdoc} */ public function getKey() { return $this->key; } /** * {@inheritdoc} */ public function get() { return $this->isHit() ? $this->value : null; } /** * {@inheritdoc} */ public function isHit() { if (!$this->isHit) { return \false; } if ($this->expiration === null) { return \true; } return $this->currentTime()->getTimestamp() < $this->expiration->getTimestamp(); } /** * {@inheritdoc} */ public function set($value) { $this->isHit = \true; $this->value = $value; return $this; } /** * {@inheritdoc} */ public function expiresAt($expiration) { if ($this->isValidExpiration($expiration)) { $this->expiration = $expiration; return $this; } $error = \sprintf('Argument 1 passed to %s::expiresAt() must implement interface DateTimeInterface, %s given', \get_class($this), \gettype($expiration)); throw new TypeError($error); } /** * {@inheritdoc} */ public function expiresAfter($time) { if (\is_int($time)) { $this->expiration = $this->currentTime()->add(new \DateInterval("PT{$time}S")); } elseif ($time instanceof \DateInterval) { $this->expiration = $this->currentTime()->add($time); } elseif ($time === null) { $this->expiration = $time; } else { $message = 'Argument 1 passed to %s::expiresAfter() must be an ' . 'instance of DateInterval or of the type integer, %s given'; $error = \sprintf($message, \get_class($this), \gettype($time)); throw new TypeError($error); } return $this; } /** * Determines if an expiration is valid based on the rules defined by PSR6. * * @param mixed $expiration * @return bool */ private function isValidExpiration($expiration) { if ($expiration === null) { return \true; } if ($expiration instanceof DateTimeInterface) { return \true; } return \false; } /** * @return DateTime */ protected function currentTime() { return new DateTime('now', new DateTimeZone('UTC')); } } vendor_prefixed/google/auth/src/Cache/SysVCacheItemPool.php 0000644 00000014041 15174671617 0017767 0 ustar 00 <?php /** * Copyright 2018 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Cache; use WPMailSMTP\Vendor\Psr\Cache\CacheItemInterface; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * SystemV shared memory based CacheItemPool implementation. * * This CacheItemPool implementation can be used among multiple processes, but * it doesn't provide any locking mechanism. If multiple processes write to * this ItemPool, you have to avoid race condition manually in your code. */ class SysVCacheItemPool implements CacheItemPoolInterface { const VAR_KEY = 1; const DEFAULT_PROJ = 'A'; const DEFAULT_MEMSIZE = 10000; const DEFAULT_PERM = 0600; /** * @var int */ private $sysvKey; /** * @var CacheItemInterface[] */ private $items; /** * @var CacheItemInterface[] */ private $deferredItems; /** * @var array<mixed> */ private $options; /** * @var bool */ private $hasLoadedItems = \false; /** * Create a SystemV shared memory based CacheItemPool. * * @param array<mixed> $options { * [optional] Configuration options. * * @type int $variableKey The variable key for getting the data from the shared memory. **Defaults to** 1. * @type string $proj The project identifier for ftok. This needs to be a one character string. * **Defaults to** 'A'. * @type int $memsize The memory size in bytes for shm_attach. **Defaults to** 10000. * @type int $perm The permission for shm_attach. **Defaults to** 0600. * } */ public function __construct($options = []) { if (!\extension_loaded('sysvshm')) { throw new \RuntimeException('sysvshm extension is required to use this ItemPool'); } $this->options = $options + ['variableKey' => self::VAR_KEY, 'proj' => self::DEFAULT_PROJ, 'memsize' => self::DEFAULT_MEMSIZE, 'perm' => self::DEFAULT_PERM]; $this->items = []; $this->deferredItems = []; $this->sysvKey = \ftok(__FILE__, $this->options['proj']); } /** * @param mixed $key * @return CacheItemInterface */ public function getItem($key) : CacheItemInterface { $this->loadItems(); return \current($this->getItems([$key])); // @phpstan-ignore-line } /** * @param array<mixed> $keys * @return iterable<CacheItemInterface> */ public function getItems(array $keys = []) : iterable { $this->loadItems(); $items = []; $itemClass = \PHP_VERSION_ID >= 80000 ? TypedItem::class : Item::class; foreach ($keys as $key) { $items[$key] = $this->hasItem($key) ? clone $this->items[$key] : new $itemClass($key); } return $items; } /** * {@inheritdoc} */ public function hasItem($key) : bool { $this->loadItems(); return isset($this->items[$key]) && $this->items[$key]->isHit(); } /** * {@inheritdoc} */ public function clear() : bool { $this->items = []; $this->deferredItems = []; return $this->saveCurrentItems(); } /** * {@inheritdoc} */ public function deleteItem($key) : bool { return $this->deleteItems([$key]); } /** * {@inheritdoc} */ public function deleteItems(array $keys) : bool { if (!$this->hasLoadedItems) { $this->loadItems(); } foreach ($keys as $key) { unset($this->items[$key]); } return $this->saveCurrentItems(); } /** * {@inheritdoc} */ public function save(CacheItemInterface $item) : bool { if (!$this->hasLoadedItems) { $this->loadItems(); } $this->items[$item->getKey()] = $item; return $this->saveCurrentItems(); } /** * {@inheritdoc} */ public function saveDeferred(CacheItemInterface $item) : bool { $this->deferredItems[$item->getKey()] = $item; return \true; } /** * {@inheritdoc} */ public function commit() : bool { foreach ($this->deferredItems as $item) { if ($this->save($item) === \false) { return \false; } } $this->deferredItems = []; return \true; } /** * Save the current items. * * @return bool true when success, false upon failure */ private function saveCurrentItems() { $shmid = \shm_attach($this->sysvKey, $this->options['memsize'], $this->options['perm']); if ($shmid !== \false) { $ret = \shm_put_var($shmid, $this->options['variableKey'], $this->items); \shm_detach($shmid); return $ret; } return \false; } /** * Load the items from the shared memory. * * @return bool true when success, false upon failure */ private function loadItems() { $shmid = \shm_attach($this->sysvKey, $this->options['memsize'], $this->options['perm']); if ($shmid !== \false) { $data = @\shm_get_var($shmid, $this->options['variableKey']); if (!empty($data)) { $this->items = $data; } else { $this->items = []; } \shm_detach($shmid); $this->hasLoadedItems = \true; return \true; } return \false; } } vendor_prefixed/google/auth/src/Cache/TypedItem.php 0000644 00000007710 15174671617 0016377 0 ustar 00 <?php /* * Copyright 2022 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Cache; use WPMailSMTP\Vendor\Psr\Cache\CacheItemInterface; /** * A cache item. * * This class will be used by MemoryCacheItemPool and SysVCacheItemPool * on PHP 8.0 and above. It is compatible with psr/cache 3.0 (PSR-6). * @see Item for compatiblity with previous versions of PHP. */ final class TypedItem implements CacheItemInterface { /** * @var mixed */ private mixed $value; /** * @var \DateTimeInterface|null */ private ?\DateTimeInterface $expiration; /** * @var bool */ private bool $isHit = \false; /** * @param string $key */ public function __construct(private string $key) { $this->key = $key; $this->expiration = null; } /** * {@inheritdoc} */ public function getKey() : string { return $this->key; } /** * {@inheritdoc} */ public function get() : mixed { return $this->isHit() ? $this->value : null; } /** * {@inheritdoc} */ public function isHit() : bool { if (!$this->isHit) { return \false; } if ($this->expiration === null) { return \true; } return $this->currentTime()->getTimestamp() < $this->expiration->getTimestamp(); } /** * {@inheritdoc} */ public function set(mixed $value) : static { $this->isHit = \true; $this->value = $value; return $this; } /** * {@inheritdoc} */ public function expiresAt($expiration) : static { if ($this->isValidExpiration($expiration)) { $this->expiration = $expiration; return $this; } $error = \sprintf('Argument 1 passed to %s::expiresAt() must implement interface DateTimeInterface, %s given', \get_class($this), \gettype($expiration)); throw new \TypeError($error); } /** * {@inheritdoc} */ public function expiresAfter($time) : static { if (\is_int($time)) { $this->expiration = $this->currentTime()->add(new \DateInterval("PT{$time}S")); } elseif ($time instanceof \DateInterval) { $this->expiration = $this->currentTime()->add($time); } elseif ($time === null) { $this->expiration = $time; } else { $message = 'Argument 1 passed to %s::expiresAfter() must be an ' . 'instance of DateInterval or of the type integer, %s given'; $error = \sprintf($message, \get_class($this), \gettype($time)); throw new \TypeError($error); } return $this; } /** * Determines if an expiration is valid based on the rules defined by PSR6. * * @param mixed $expiration * @return bool */ private function isValidExpiration($expiration) { if ($expiration === null) { return \true; } // We test for two types here due to the fact the DateTimeInterface // was not introduced until PHP 5.5. Checking for the DateTime type as // well allows us to support 5.4. if ($expiration instanceof \DateTimeInterface) { return \true; } return \false; } /** * @return \DateTime */ protected function currentTime() { return new \DateTime('now', new \DateTimeZone('UTC')); } } vendor_prefixed/google/auth/src/Cache/MemoryCacheItemPool.php 0000644 00000010766 15174671617 0020345 0 ustar 00 <?php /* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Cache; use WPMailSMTP\Vendor\Psr\Cache\CacheItemInterface; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * Simple in-memory cache implementation. */ final class MemoryCacheItemPool implements CacheItemPoolInterface { /** * @var CacheItemInterface[] */ private $items; /** * @var CacheItemInterface[] */ private $deferredItems; /** * {@inheritdoc} * * @return CacheItemInterface The corresponding Cache Item. */ public function getItem($key) : CacheItemInterface { return \current($this->getItems([$key])); // @phpstan-ignore-line } /** * {@inheritdoc} * * @return iterable<CacheItemInterface> * A traversable collection of Cache Items keyed by the cache keys of * each item. A Cache item will be returned for each key, even if that * key is not found. However, if no keys are specified then an empty * traversable MUST be returned instead. */ public function getItems(array $keys = []) : iterable { $items = []; $itemClass = \PHP_VERSION_ID >= 80000 ? TypedItem::class : Item::class; foreach ($keys as $key) { $items[$key] = $this->hasItem($key) ? clone $this->items[$key] : new $itemClass($key); } return $items; } /** * {@inheritdoc} * * @return bool * True if item exists in the cache, false otherwise. */ public function hasItem($key) : bool { $this->isValidKey($key); return isset($this->items[$key]) && $this->items[$key]->isHit(); } /** * {@inheritdoc} * * @return bool * True if the pool was successfully cleared. False if there was an error. */ public function clear() : bool { $this->items = []; $this->deferredItems = []; return \true; } /** * {@inheritdoc} * * @return bool * True if the item was successfully removed. False if there was an error. */ public function deleteItem($key) : bool { return $this->deleteItems([$key]); } /** * {@inheritdoc} * * @return bool * True if the items were successfully removed. False if there was an error. */ public function deleteItems(array $keys) : bool { \array_walk($keys, [$this, 'isValidKey']); foreach ($keys as $key) { unset($this->items[$key]); } return \true; } /** * {@inheritdoc} * * @return bool * True if the item was successfully persisted. False if there was an error. */ public function save(CacheItemInterface $item) : bool { $this->items[$item->getKey()] = $item; return \true; } /** * {@inheritdoc} * * @return bool * False if the item could not be queued or if a commit was attempted and failed. True otherwise. */ public function saveDeferred(CacheItemInterface $item) : bool { $this->deferredItems[$item->getKey()] = $item; return \true; } /** * {@inheritdoc} * * @return bool * True if all not-yet-saved items were successfully saved or there were none. False otherwise. */ public function commit() : bool { foreach ($this->deferredItems as $item) { $this->save($item); } $this->deferredItems = []; return \true; } /** * Determines if the provided key is valid. * * @param string $key * @return bool * @throws InvalidArgumentException */ private function isValidKey($key) { $invalidCharacters = '{}()/\\\\@:'; if (!\is_string($key) || \preg_match("#[{$invalidCharacters}]#", $key)) { throw new InvalidArgumentException('The provided key is not valid: ' . \var_export($key, \true)); } return \true; } } vendor_prefixed/google/auth/src/Cache/InvalidArgumentException.php 0000644 00000001517 15174671617 0021442 0 ustar 00 <?php /* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Cache; use WPMailSMTP\Vendor\Psr\Cache\InvalidArgumentException as PsrInvalidArgumentException; class InvalidArgumentException extends \InvalidArgumentException implements PsrInvalidArgumentException { } vendor_prefixed/google/auth/src/ServiceAccountSignerTrait.php 0000644 00000003570 15174671617 0020561 0 ustar 00 <?php /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\phpseclib3\Crypt\PublicKeyLoader; use WPMailSMTP\Vendor\phpseclib3\Crypt\RSA; /** * Sign a string using a Service Account private key. */ trait ServiceAccountSignerTrait { /** * Sign a string using the service account private key. * * @param string $stringToSign * @param bool $forceOpenssl Whether to use OpenSSL regardless of * whether phpseclib is installed. **Defaults to** `false`. * @return string */ public function signBlob($stringToSign, $forceOpenssl = \false) { $privateKey = $this->auth->getSigningKey(); $signedString = ''; if (\class_exists(phpseclib3\Crypt\RSA::class) && !$forceOpenssl) { $key = PublicKeyLoader::load($privateKey); $rsa = $key->withHash('sha256')->withPadding(RSA::SIGNATURE_PKCS1); $signedString = $rsa->sign($stringToSign); } elseif (\extension_loaded('openssl')) { \openssl_sign($stringToSign, $signedString, $privateKey, 'sha256WithRSAEncryption'); } else { // @codeCoverageIgnoreStart throw new \RuntimeException('OpenSSL is not installed.'); } // @codeCoverageIgnoreEnd return \base64_encode($signedString); } } vendor_prefixed/google/auth/src/UpdateMetadataTrait.php 0000644 00000004043 15174671617 0017353 0 ustar 00 <?php /* * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * Provides shared methods for updating request metadata (request headers). * * Should implement {@see UpdateMetadataInterface} and {@see FetchAuthTokenInterface}. * * @internal */ trait UpdateMetadataTrait { /** * export a callback function which updates runtime metadata. * * @return callable updateMetadata function * @deprecated */ public function getUpdateMetadataFunc() { return [$this, 'updateMetadata']; } /** * Updates metadata with the authorization token. * * @param array<mixed> $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> updated metadata hashmap */ public function updateMetadata($metadata, $authUri = null, ?callable $httpHandler = null) { if (isset($metadata[self::AUTH_METADATA_KEY])) { // Auth metadata has already been set return $metadata; } $result = $this->fetchAuthToken($httpHandler); $metadata_copy = $metadata; if (isset($result['access_token'])) { $metadata_copy[self::AUTH_METADATA_KEY] = ['Bearer ' . $result['access_token']]; } elseif (isset($result['id_token'])) { $metadata_copy[self::AUTH_METADATA_KEY] = ['Bearer ' . $result['id_token']]; } return $metadata_copy; } } vendor_prefixed/google/auth/src/ProjectIdProviderInterface.php 0000644 00000001725 15174671617 0020707 0 ustar 00 <?php /* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * Describes a Credentials object which supports fetching the project ID. */ interface ProjectIdProviderInterface { /** * Get the project ID. * * @param callable $httpHandler Callback which delivers psr7 request * @return string|null */ public function getProjectId(?callable $httpHandler = null); } vendor_prefixed/google/auth/src/OAuth2.php 0000644 00000134245 15174671617 0014576 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\Firebase\JWT\JWT; use WPMailSMTP\Vendor\Firebase\JWT\Key; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils; use InvalidArgumentException; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; use WPMailSMTP\Vendor\Psr\Http\Message\UriInterface; /** * OAuth2 supports authentication by OAuth2 2-legged flows. * * It primary supports * - service account authorization * - authorization where a user already has an access token */ class OAuth2 implements FetchAuthTokenInterface { const DEFAULT_EXPIRY_SECONDS = 3600; // 1 hour const DEFAULT_SKEW_SECONDS = 60; // 1 minute const JWT_URN = 'urn:ietf:params:oauth:grant-type:jwt-bearer'; const STS_URN = 'urn:ietf:params:oauth:grant-type:token-exchange'; private const STS_REQUESTED_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; /** * TODO: determine known methods from the keys of JWT::methods. * * @var array<string> */ public static $knownSigningAlgorithms = ['HS256', 'HS512', 'HS384', 'RS256']; /** * The well known grant types. * * @var array<string> */ public static $knownGrantTypes = ['authorization_code', 'refresh_token', 'password', 'client_credentials']; /** * - authorizationUri * The authorization server's HTTP endpoint capable of * authenticating the end-user and obtaining authorization. * * @var ?UriInterface */ private $authorizationUri; /** * - tokenCredentialUri * The authorization server's HTTP endpoint capable of issuing * tokens and refreshing expired tokens. * * @var UriInterface */ private $tokenCredentialUri; /** * The redirection URI used in the initial request. * * @var ?string */ private $redirectUri; /** * A unique identifier issued to the client to identify itself to the * authorization server. * * @var string */ private $clientId; /** * A shared symmetric secret issued by the authorization server, which is * used to authenticate the client. * * @var string */ private $clientSecret; /** * The resource owner's username. * * @var ?string */ private $username; /** * The resource owner's password. * * @var ?string */ private $password; /** * The scope of the access request, expressed either as an Array or as a * space-delimited string. * * @var ?array<string> */ private $scope; /** * An arbitrary string designed to allow the client to maintain state. * * @var string */ private $state; /** * The authorization code issued to this client. * * Only used by the authorization code access grant type. * * @var ?string */ private $code; /** * The issuer ID when using assertion profile. * * @var ?string */ private $issuer; /** * The target audience for assertions. * * @var string */ private $audience; /** * The target sub when issuing assertions. * * @var string */ private $sub; /** * The number of seconds assertions are valid for. * * @var int */ private $expiry; /** * The signing key when using assertion profile. * * @var ?string */ private $signingKey; /** * The signing key id when using assertion profile. Param kid in jwt header * * @var string */ private $signingKeyId; /** * The signing algorithm when using an assertion profile. * * @var ?string */ private $signingAlgorithm; /** * The refresh token associated with the access token to be refreshed. * * @var ?string */ private $refreshToken; /** * The current access token. * * @var string */ private $accessToken; /** * The current ID token. * * @var string */ private $idToken; /** * The scopes granted to the current access token * * @var string */ private $grantedScope; /** * The lifetime in seconds of the current access token. * * @var ?int */ private $expiresIn; /** * The expiration time of the access token as a number of seconds since the * unix epoch. * * @var ?int */ private $expiresAt; /** * The issue time of the access token as a number of seconds since the unix * epoch. * * @var ?int */ private $issuedAt; /** * The current grant type. * * @var ?string */ private $grantType; /** * When using an extension grant type, this is the set of parameters used by * that extension. * * @var array<mixed> */ private $extensionParams; /** * When using the toJwt function, these claims will be added to the JWT * payload. * * @var array<mixed> */ private $additionalClaims; /** * The code verifier for PKCE for OAuth 2.0. When set, the authorization * URI will contain the Code Challenge and Code Challenge Method querystring * parameters, and the token URI will contain the Code Verifier parameter. * * @see https://datatracker.ietf.org/doc/html/rfc7636 * @var ?string */ private $codeVerifier; /** * For STS requests. * A URI that indicates the target service or resource where the client * intends to use the requested security token. */ private ?string $resource; /** * For STS requests. * A fetcher for the "subject_token", which is a security token that * represents the identity of the party on behalf of whom the request is * being made. */ private ?ExternalAccountCredentialSourceInterface $subjectTokenFetcher; /** * For STS requests. * An identifier, that indicates the type of the security token in the * subjectToken parameter. */ private ?string $subjectTokenType; /** * For STS requests. * A security token that represents the identity of the acting party. */ private ?string $actorToken; /** * For STS requests. * An identifier that indicates the type of the security token in the * actorToken parameter. */ private ?string $actorTokenType; /** * From STS response. * An identifier for the representation of the issued security token. */ private ?string $issuedTokenType = null; /** * From STS response. * An identifier for the representation of the issued security token. * * @var array<mixed> */ private array $additionalOptions; /** * Create a new OAuthCredentials. * * The configuration array accepts various options * * - authorizationUri * The authorization server's HTTP endpoint capable of * authenticating the end-user and obtaining authorization. * * - tokenCredentialUri * The authorization server's HTTP endpoint capable of issuing * tokens and refreshing expired tokens. * * - clientId * A unique identifier issued to the client to identify itself to the * authorization server. * * - clientSecret * A shared symmetric secret issued by the authorization server, * which is used to authenticate the client. * * - scope * The scope of the access request, expressed either as an Array * or as a space-delimited String. * * - state * An arbitrary string designed to allow the client to maintain state. * * - redirectUri * The redirection URI used in the initial request. * * - username * The resource owner's username. * * - password * The resource owner's password. * * - issuer * Issuer ID when using assertion profile * * - audience * Target audience for assertions * * - expiry * Number of seconds assertions are valid for * * - signingKey * Signing key when using assertion profile * * - signingKeyId * Signing key id when using assertion profile * * - refreshToken * The refresh token associated with the access token * to be refreshed. * * - accessToken * The current access token for this client. * * - idToken * The current ID token for this client. * * - extensionParams * When using an extension grant type, this is the set of parameters used * by that extension. * * - codeVerifier * The code verifier for PKCE for OAuth 2.0. * * - resource * The target service or resource where the client ntends to use the * requested security token. * * - subjectTokenFetcher * A fetcher for the "subject_token", which is a security token that * represents the identity of the party on behalf of whom the request is * being made. * * - subjectTokenType * An identifier that indicates the type of the security token in the * subjectToken parameter. * * - actorToken * A security token that represents the identity of the acting party. * * - actorTokenType * An identifier for the representation of the issued security token. * * @param array<mixed> $config Configuration array */ public function __construct(array $config) { $opts = \array_merge(['expiry' => self::DEFAULT_EXPIRY_SECONDS, 'extensionParams' => [], 'authorizationUri' => null, 'redirectUri' => null, 'tokenCredentialUri' => null, 'state' => null, 'username' => null, 'password' => null, 'clientId' => null, 'clientSecret' => null, 'issuer' => null, 'sub' => null, 'audience' => null, 'signingKey' => null, 'signingKeyId' => null, 'signingAlgorithm' => null, 'scope' => null, 'additionalClaims' => [], 'codeVerifier' => null, 'resource' => null, 'subjectTokenFetcher' => null, 'subjectTokenType' => null, 'actorToken' => null, 'actorTokenType' => null, 'additionalOptions' => []], $config); $this->setAuthorizationUri($opts['authorizationUri']); $this->setRedirectUri($opts['redirectUri']); $this->setTokenCredentialUri($opts['tokenCredentialUri']); $this->setState($opts['state']); $this->setUsername($opts['username']); $this->setPassword($opts['password']); $this->setClientId($opts['clientId']); $this->setClientSecret($opts['clientSecret']); $this->setIssuer($opts['issuer']); $this->setSub($opts['sub']); $this->setExpiry($opts['expiry']); $this->setAudience($opts['audience']); $this->setSigningKey($opts['signingKey']); $this->setSigningKeyId($opts['signingKeyId']); $this->setSigningAlgorithm($opts['signingAlgorithm']); $this->setScope($opts['scope']); $this->setExtensionParams($opts['extensionParams']); $this->setAdditionalClaims($opts['additionalClaims']); $this->setCodeVerifier($opts['codeVerifier']); // for STS $this->resource = $opts['resource']; $this->subjectTokenFetcher = $opts['subjectTokenFetcher']; $this->subjectTokenType = $opts['subjectTokenType']; $this->actorToken = $opts['actorToken']; $this->actorTokenType = $opts['actorTokenType']; $this->additionalOptions = $opts['additionalOptions']; $this->updateToken($opts); } /** * Verifies the idToken if present. * * - if none is present, return null * - if present, but invalid, raises DomainException. * - otherwise returns the payload in the idtoken as a PHP object. * * The behavior of this method varies depending on the version of * `firebase/php-jwt` you are using. In versions 6.0 and above, you cannot * provide multiple $allowed_algs, and instead must provide an array of Key * objects as the $publicKey. * * @param string|Key|Key[] $publicKey The public key to use to authenticate the token * @param string|array<string> $allowed_algs algorithm or array of supported verification algorithms. * Providing more than one algorithm will throw an exception. * @throws \DomainException if the token is missing an audience. * @throws \DomainException if the audience does not match the one set in * the OAuth2 class instance. * @throws \UnexpectedValueException If the token is invalid * @throws \InvalidArgumentException If more than one value for allowed_algs is supplied * @throws \Firebase\JWT\SignatureInvalidException If the signature is invalid. * @throws \Firebase\JWT\BeforeValidException If the token is not yet valid. * @throws \Firebase\JWT\ExpiredException If the token has expired. * @return null|object */ public function verifyIdToken($publicKey = null, $allowed_algs = []) { $idToken = $this->getIdToken(); if (\is_null($idToken)) { return null; } $resp = $this->jwtDecode($idToken, $publicKey, $allowed_algs); if (!\property_exists($resp, 'aud')) { throw new \DomainException('No audience found the id token'); } if ($resp->aud != $this->getAudience()) { throw new \DomainException('Wrong audience present in the id token'); } return $resp; } /** * Obtains the encoded jwt from the instance data. * * @param array<mixed> $config array optional configuration parameters * @return string */ public function toJwt(array $config = []) { if (\is_null($this->getSigningKey())) { throw new \DomainException('No signing key available'); } if (\is_null($this->getSigningAlgorithm())) { throw new \DomainException('No signing algorithm specified'); } $now = \time(); $opts = \array_merge(['skew' => self::DEFAULT_SKEW_SECONDS], $config); $assertion = ['iss' => $this->getIssuer(), 'exp' => $now + $this->getExpiry(), 'iat' => $now - $opts['skew']]; foreach ($assertion as $k => $v) { if (\is_null($v)) { throw new \DomainException($k . ' should not be null'); } } if (!\is_null($this->getAudience())) { $assertion['aud'] = $this->getAudience(); } if (!\is_null($this->getScope())) { $assertion['scope'] = $this->getScope(); } if (empty($assertion['scope']) && empty($assertion['aud'])) { throw new \DomainException('one of scope or aud should not be null'); } if (!\is_null($this->getSub())) { $assertion['sub'] = $this->getSub(); } $assertion += $this->getAdditionalClaims(); return JWT::encode($assertion, $this->getSigningKey(), $this->getSigningAlgorithm(), $this->getSigningKeyId()); } /** * Generates a request for token credentials. * * @param callable $httpHandler callback which delivers psr7 request * @return RequestInterface the authorization Url. */ public function generateCredentialsRequest(?callable $httpHandler = null) { $uri = $this->getTokenCredentialUri(); if (\is_null($uri)) { throw new \DomainException('No token credential URI was set.'); } $grantType = $this->getGrantType(); $params = ['grant_type' => $grantType]; switch ($grantType) { case 'authorization_code': $params['code'] = $this->getCode(); $params['redirect_uri'] = $this->getRedirectUri(); if ($this->codeVerifier) { $params['code_verifier'] = $this->codeVerifier; } $this->addClientCredentials($params); break; case 'password': $params['username'] = $this->getUsername(); $params['password'] = $this->getPassword(); $this->addClientCredentials($params); break; case 'refresh_token': $params['refresh_token'] = $this->getRefreshToken(); $this->addClientCredentials($params); break; case self::JWT_URN: $params['assertion'] = $this->toJwt(); break; case self::STS_URN: $token = $this->subjectTokenFetcher->fetchSubjectToken($httpHandler); $params['subject_token'] = $token; $params['subject_token_type'] = $this->subjectTokenType; $params += \array_filter(['resource' => $this->resource, 'audience' => $this->audience, 'scope' => $this->getScope(), 'requested_token_type' => self::STS_REQUESTED_TOKEN_TYPE, 'actor_token' => $this->actorToken, 'actor_token_type' => $this->actorTokenType]); if ($this->additionalOptions) { $params['options'] = \json_encode($this->additionalOptions); } break; default: if (!\is_null($this->getRedirectUri())) { # Grant type was supposed to be 'authorization_code', as there # is a redirect URI. throw new \DomainException('Missing authorization code'); } unset($params['grant_type']); if (!\is_null($grantType)) { $params['grant_type'] = $grantType; } $params = \array_merge($params, $this->getExtensionParams()); } $headers = ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded']; return new Request('POST', $uri, $headers, Query::build($params)); } /** * Fetches the auth tokens based on the current state. * * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> the response */ public function fetchAuthToken(?callable $httpHandler = null) { if (\is_null($httpHandler)) { $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient()); } $response = $httpHandler($this->generateCredentialsRequest($httpHandler)); $credentials = $this->parseTokenResponse($response); $this->updateToken($credentials); if (isset($credentials['scope'])) { $this->setGrantedScope($credentials['scope']); } return $credentials; } /** * Obtains a key that can used to cache the results of #fetchAuthToken. * * The key is derived from the scopes. * * @return ?string a key that may be used to cache the auth token. */ public function getCacheKey() { if (\is_array($this->scope)) { return \implode(':', $this->scope); } if ($this->audience) { return $this->audience; } // If scope has not set, return null to indicate no caching. return null; } /** * Parses the fetched tokens. * * @param ResponseInterface $resp the response. * @return array<mixed> the tokens parsed from the response body. * @throws \Exception */ public function parseTokenResponse(ResponseInterface $resp) { $body = (string) $resp->getBody(); if ($resp->hasHeader('Content-Type') && $resp->getHeaderLine('Content-Type') == 'application/x-www-form-urlencoded') { $res = []; \parse_str($body, $res); return $res; } // Assume it's JSON; if it's not throw an exception if (null === ($res = \json_decode($body, \true))) { throw new \Exception('Invalid JSON response'); } return $res; } /** * Updates an OAuth 2.0 client. * * Example: * ``` * $oauth->updateToken([ * 'refresh_token' => 'n4E9O119d', * 'access_token' => 'FJQbwq9', * 'expires_in' => 3600 * ]); * ``` * * @param array<mixed> $config * The configuration parameters related to the token. * * - refresh_token * The refresh token associated with the access token * to be refreshed. * * - access_token * The current access token for this client. * * - id_token * The current ID token for this client. * * - expires_in * The time in seconds until access token expiration. * * - expires_at * The time as an integer number of seconds since the Epoch * * - issued_at * The timestamp that the token was issued at. * @return void */ public function updateToken(array $config) { $opts = \array_merge(['extensionParams' => [], 'access_token' => null, 'id_token' => null, 'expires_in' => null, 'expires_at' => null, 'issued_at' => null, 'scope' => null], $config); $this->setExpiresAt($opts['expires_at']); $this->setExpiresIn($opts['expires_in']); // By default, the token is issued at `Time.now` when `expiresIn` is set, // but this can be used to supply a more precise time. if (!\is_null($opts['issued_at'])) { $this->setIssuedAt($opts['issued_at']); } $this->setAccessToken($opts['access_token']); $this->setIdToken($opts['id_token']); // The refresh token should only be updated if a value is explicitly // passed in, as some access token responses do not include a refresh // token. if (\array_key_exists('refresh_token', $opts)) { $this->setRefreshToken($opts['refresh_token']); } // Required for STS response. An identifier for the representation of // the issued security token. if (\array_key_exists('issued_token_type', $opts)) { $this->issuedTokenType = $opts['issued_token_type']; } } /** * Builds the authorization Uri that the user should be redirected to. * * @param array<mixed> $config configuration options that customize the return url. * @return UriInterface the authorization Url. * @throws InvalidArgumentException */ public function buildFullAuthorizationUri(array $config = []) { if (\is_null($this->getAuthorizationUri())) { throw new InvalidArgumentException('requires an authorizationUri to have been set'); } $params = \array_merge(['response_type' => 'code', 'access_type' => 'offline', 'client_id' => $this->clientId, 'redirect_uri' => $this->redirectUri, 'state' => $this->state, 'scope' => $this->getScope()], $config); // Validate the auth_params if (\is_null($params['client_id'])) { throw new InvalidArgumentException('missing the required client identifier'); } if (\is_null($params['redirect_uri'])) { throw new InvalidArgumentException('missing the required redirect URI'); } if (!empty($params['prompt']) && !empty($params['approval_prompt'])) { throw new InvalidArgumentException('prompt and approval_prompt are mutually exclusive'); } if ($this->codeVerifier) { $params['code_challenge'] = $this->getCodeChallenge($this->codeVerifier); $params['code_challenge_method'] = $this->getCodeChallengeMethod(); } // Construct the uri object; return it if it is valid. $result = clone $this->authorizationUri; $existingParams = Query::parse($result->getQuery()); $result = $result->withQuery(Query::build(\array_merge($existingParams, $params))); if ($result->getScheme() != 'https') { throw new InvalidArgumentException('Authorization endpoint must be protected by TLS'); } return $result; } /** * @return string|null */ public function getCodeVerifier() : ?string { return $this->codeVerifier; } /** * A cryptographically random string that is used to correlate the * authorization request to the token request. * * The code verifier for PKCE for OAuth 2.0. When set, the authorization * URI will contain the Code Challenge and Code Challenge Method querystring * parameters, and the token URI will contain the Code Verifier parameter. * * @see https://datatracker.ietf.org/doc/html/rfc7636 * * @param string|null $codeVerifier */ public function setCodeVerifier(?string $codeVerifier) : void { $this->codeVerifier = $codeVerifier; } /** * Generates a random 128-character string for the "code_verifier" parameter * in PKCE for OAuth 2.0. This is a cryptographically random string that is * determined using random_int, hashed using "hash" and sha256, and base64 * encoded. * * When this method is called, the code verifier is set on the object. * * @return string */ public function generateCodeVerifier() : string { return $this->codeVerifier = $this->generateRandomString(128); } private function getCodeChallenge(string $randomString) : string { return \rtrim(\strtr(\base64_encode(\hash('sha256', $randomString, \true)), '+/', '-_'), '='); } private function getCodeChallengeMethod() : string { return 'S256'; } private function generateRandomString(int $length) : string { $validChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~'; $validCharsLen = \strlen($validChars); $str = ''; $i = 0; while ($i++ < $length) { $str .= $validChars[\random_int(0, $validCharsLen - 1)]; } return $str; } /** * Sets the authorization server's HTTP endpoint capable of authenticating * the end-user and obtaining authorization. * * @param string $uri * @return void */ public function setAuthorizationUri($uri) { $this->authorizationUri = $this->coerceUri($uri); } /** * Gets the authorization server's HTTP endpoint capable of authenticating * the end-user and obtaining authorization. * * @return ?UriInterface */ public function getAuthorizationUri() { return $this->authorizationUri; } /** * Gets the authorization server's HTTP endpoint capable of issuing tokens * and refreshing expired tokens. * * @return ?UriInterface */ public function getTokenCredentialUri() { return $this->tokenCredentialUri; } /** * Sets the authorization server's HTTP endpoint capable of issuing tokens * and refreshing expired tokens. * * @param string $uri * @return void */ public function setTokenCredentialUri($uri) { $this->tokenCredentialUri = $this->coerceUri($uri); } /** * Gets the redirection URI used in the initial request. * * @return ?string */ public function getRedirectUri() { return $this->redirectUri; } /** * Sets the redirection URI used in the initial request. * * @param ?string $uri * @return void */ public function setRedirectUri($uri) { if (\is_null($uri)) { $this->redirectUri = null; return; } // redirect URI must be absolute if (!$this->isAbsoluteUri($uri)) { // "postmessage" is a reserved URI string in Google-land // @see https://developers.google.com/identity/sign-in/web/server-side-flow if ('postmessage' !== (string) $uri) { throw new InvalidArgumentException('Redirect URI must be absolute'); } } $this->redirectUri = (string) $uri; } /** * Gets the scope of the access requests as a space-delimited String. * * @return ?string */ public function getScope() { if (\is_null($this->scope)) { return $this->scope; } return \implode(' ', $this->scope); } /** * Sets the scope of the access request, expressed either as an Array or as * a space-delimited String. * * @param string|array<string>|null $scope * @return void * @throws InvalidArgumentException */ public function setScope($scope) { if (\is_null($scope)) { $this->scope = null; } elseif (\is_string($scope)) { $this->scope = \explode(' ', $scope); } elseif (\is_array($scope)) { foreach ($scope as $s) { $pos = \strpos($s, ' '); if ($pos !== \false) { throw new InvalidArgumentException('array scope values should not contain spaces'); } } $this->scope = $scope; } else { throw new InvalidArgumentException('scopes should be a string or array of strings'); } } /** * Gets the current grant type. * * @return ?string */ public function getGrantType() { if (!\is_null($this->grantType)) { return $this->grantType; } // Returns the inferred grant type, based on the current object instance // state. if (!\is_null($this->code)) { return 'authorization_code'; } if (!\is_null($this->refreshToken)) { return 'refresh_token'; } if (!\is_null($this->username) && !\is_null($this->password)) { return 'password'; } if (!\is_null($this->issuer) && !\is_null($this->signingKey)) { return self::JWT_URN; } if (!\is_null($this->subjectTokenFetcher) && !\is_null($this->subjectTokenType)) { return self::STS_URN; } return null; } /** * Sets the current grant type. * * @param string $grantType * @return void * @throws InvalidArgumentException */ public function setGrantType($grantType) { if (\in_array($grantType, self::$knownGrantTypes)) { $this->grantType = $grantType; } else { // validate URI if (!$this->isAbsoluteUri($grantType)) { throw new InvalidArgumentException('invalid grant type'); } $this->grantType = (string) $grantType; } } /** * Gets an arbitrary string designed to allow the client to maintain state. * * @return string */ public function getState() { return $this->state; } /** * Sets an arbitrary string designed to allow the client to maintain state. * * @param string $state * @return void */ public function setState($state) { $this->state = $state; } /** * Gets the authorization code issued to this client. * * @return string */ public function getCode() { return $this->code; } /** * Sets the authorization code issued to this client. * * @param string $code * @return void */ public function setCode($code) { $this->code = $code; } /** * Gets the resource owner's username. * * @return string */ public function getUsername() { return $this->username; } /** * Sets the resource owner's username. * * @param string $username * @return void */ public function setUsername($username) { $this->username = $username; } /** * Gets the resource owner's password. * * @return string */ public function getPassword() { return $this->password; } /** * Sets the resource owner's password. * * @param string $password * @return void */ public function setPassword($password) { $this->password = $password; } /** * Sets a unique identifier issued to the client to identify itself to the * authorization server. * * @return string */ public function getClientId() { return $this->clientId; } /** * Sets a unique identifier issued to the client to identify itself to the * authorization server. * * @param string $clientId * @return void */ public function setClientId($clientId) { $this->clientId = $clientId; } /** * Gets a shared symmetric secret issued by the authorization server, which * is used to authenticate the client. * * @return string */ public function getClientSecret() { return $this->clientSecret; } /** * Sets a shared symmetric secret issued by the authorization server, which * is used to authenticate the client. * * @param string $clientSecret * @return void */ public function setClientSecret($clientSecret) { $this->clientSecret = $clientSecret; } /** * Gets the Issuer ID when using assertion profile. * * @return ?string */ public function getIssuer() { return $this->issuer; } /** * Sets the Issuer ID when using assertion profile. * * @param string $issuer * @return void */ public function setIssuer($issuer) { $this->issuer = $issuer; } /** * Gets the target sub when issuing assertions. * * @return ?string */ public function getSub() { return $this->sub; } /** * Sets the target sub when issuing assertions. * * @param string $sub * @return void */ public function setSub($sub) { $this->sub = $sub; } /** * Gets the target audience when issuing assertions. * * @return ?string */ public function getAudience() { return $this->audience; } /** * Sets the target audience when issuing assertions. * * @param string $audience * @return void */ public function setAudience($audience) { $this->audience = $audience; } /** * Gets the signing key when using an assertion profile. * * @return ?string */ public function getSigningKey() { return $this->signingKey; } /** * Sets the signing key when using an assertion profile. * * @param string $signingKey * @return void */ public function setSigningKey($signingKey) { $this->signingKey = $signingKey; } /** * Gets the signing key id when using an assertion profile. * * @return ?string */ public function getSigningKeyId() { return $this->signingKeyId; } /** * Sets the signing key id when using an assertion profile. * * @param string $signingKeyId * @return void */ public function setSigningKeyId($signingKeyId) { $this->signingKeyId = $signingKeyId; } /** * Gets the signing algorithm when using an assertion profile. * * @return ?string */ public function getSigningAlgorithm() { return $this->signingAlgorithm; } /** * Sets the signing algorithm when using an assertion profile. * * @param ?string $signingAlgorithm * @return void */ public function setSigningAlgorithm($signingAlgorithm) { if (\is_null($signingAlgorithm)) { $this->signingAlgorithm = null; } elseif (!\in_array($signingAlgorithm, self::$knownSigningAlgorithms)) { throw new InvalidArgumentException('unknown signing algorithm'); } else { $this->signingAlgorithm = $signingAlgorithm; } } /** * Gets the set of parameters used by extension when using an extension * grant type. * * @return array<mixed> */ public function getExtensionParams() { return $this->extensionParams; } /** * Sets the set of parameters used by extension when using an extension * grant type. * * @param array<mixed> $extensionParams * @return void */ public function setExtensionParams($extensionParams) { $this->extensionParams = $extensionParams; } /** * Gets the number of seconds assertions are valid for. * * @return int */ public function getExpiry() { return $this->expiry; } /** * Sets the number of seconds assertions are valid for. * * @param int $expiry * @return void */ public function setExpiry($expiry) { $this->expiry = $expiry; } /** * Gets the lifetime of the access token in seconds. * * @return int */ public function getExpiresIn() { return $this->expiresIn; } /** * Sets the lifetime of the access token in seconds. * * @param ?int $expiresIn * @return void */ public function setExpiresIn($expiresIn) { if (\is_null($expiresIn)) { $this->expiresIn = null; $this->issuedAt = null; } else { $this->issuedAt = \time(); $this->expiresIn = (int) $expiresIn; } } /** * Gets the time the current access token expires at. * * @return ?int */ public function getExpiresAt() { if (!\is_null($this->expiresAt)) { return $this->expiresAt; } if (!\is_null($this->issuedAt) && !\is_null($this->expiresIn)) { return $this->issuedAt + $this->expiresIn; } return null; } /** * Returns true if the acccess token has expired. * * @return bool */ public function isExpired() { $expiration = $this->getExpiresAt(); $now = \time(); return !\is_null($expiration) && $now >= $expiration; } /** * Sets the time the current access token expires at. * * @param int $expiresAt * @return void */ public function setExpiresAt($expiresAt) { $this->expiresAt = $expiresAt; } /** * Gets the time the current access token was issued at. * * @return ?int */ public function getIssuedAt() { return $this->issuedAt; } /** * Sets the time the current access token was issued at. * * @param int $issuedAt * @return void */ public function setIssuedAt($issuedAt) { $this->issuedAt = $issuedAt; } /** * Gets the current access token. * * @return ?string */ public function getAccessToken() { return $this->accessToken; } /** * Sets the current access token. * * @param string $accessToken * @return void */ public function setAccessToken($accessToken) { $this->accessToken = $accessToken; } /** * Gets the current ID token. * * @return ?string */ public function getIdToken() { return $this->idToken; } /** * Sets the current ID token. * * @param string $idToken * @return void */ public function setIdToken($idToken) { $this->idToken = $idToken; } /** * Get the granted space-separated scopes (if they exist) for the last * fetched token. * * @return string|null */ public function getGrantedScope() { return $this->grantedScope; } /** * Sets the current ID token. * * @param string $grantedScope * @return void */ public function setGrantedScope($grantedScope) { $this->grantedScope = $grantedScope; } /** * Gets the refresh token associated with the current access token. * * @return ?string */ public function getRefreshToken() { return $this->refreshToken; } /** * Sets the refresh token associated with the current access token. * * @param string $refreshToken * @return void */ public function setRefreshToken($refreshToken) { $this->refreshToken = $refreshToken; } /** * Sets additional claims to be included in the JWT token * * @param array<mixed> $additionalClaims * @return void */ public function setAdditionalClaims(array $additionalClaims) { $this->additionalClaims = $additionalClaims; } /** * Gets the additional claims to be included in the JWT token. * * @return array<mixed> */ public function getAdditionalClaims() { return $this->additionalClaims; } /** * Gets the additional claims to be included in the JWT token. * * @return ?string */ public function getIssuedTokenType() { return $this->issuedTokenType; } /** * The expiration of the last received token. * * @return array<mixed>|null */ public function getLastReceivedToken() { if ($token = $this->getAccessToken()) { // the bare necessity of an auth token $authToken = ['access_token' => $token, 'expires_at' => $this->getExpiresAt()]; } elseif ($idToken = $this->getIdToken()) { $authToken = ['id_token' => $idToken, 'expires_at' => $this->getExpiresAt()]; } else { return null; } if ($expiresIn = $this->getExpiresIn()) { $authToken['expires_in'] = $expiresIn; } if ($issuedAt = $this->getIssuedAt()) { $authToken['issued_at'] = $issuedAt; } if ($refreshToken = $this->getRefreshToken()) { $authToken['refresh_token'] = $refreshToken; } return $authToken; } /** * Get the client ID. * * Alias of {@see Google\Auth\OAuth2::getClientId()}. * * @param callable $httpHandler * @return string * @access private */ public function getClientName(?callable $httpHandler = null) { return $this->getClientId(); } /** * @todo handle uri as array * * @param ?string $uri * @return null|UriInterface */ private function coerceUri($uri) { if (\is_null($uri)) { return null; } return Utils::uriFor($uri); } /** * @param string $idToken * @param Key|Key[]|string|string[] $publicKey * @param string|string[] $allowedAlgs * @return object */ private function jwtDecode($idToken, $publicKey, $allowedAlgs) { $keys = $this->getFirebaseJwtKeys($publicKey, $allowedAlgs); // Default exception if none are caught. We are using the same exception // class and message from firebase/php-jwt to preserve backwards // compatibility. $e = new \InvalidArgumentException('Key may not be empty'); foreach ($keys as $key) { try { return JWT::decode($idToken, $key); } catch (\Exception $e) { // try next alg } } throw $e; } /** * @param Key|Key[]|string|string[] $publicKey * @param string|string[] $allowedAlgs * @return Key[] */ private function getFirebaseJwtKeys($publicKey, $allowedAlgs) { // If $publicKey is instance of Key, return it if ($publicKey instanceof Key) { return [$publicKey]; } // If $allowedAlgs is empty, $publicKey must be Key or Key[]. if (empty($allowedAlgs)) { $keys = []; foreach ((array) $publicKey as $kid => $pubKey) { if (!$pubKey instanceof Key) { throw new \InvalidArgumentException(\sprintf('When allowed algorithms is empty, the public key must' . 'be an instance of %s or an array of %s objects', Key::class, Key::class)); } $keys[$kid] = $pubKey; } return $keys; } $allowedAlg = null; if (\is_string($allowedAlgs)) { $allowedAlg = $allowedAlgs; } elseif (\is_array($allowedAlgs)) { if (\count($allowedAlgs) > 1) { throw new \InvalidArgumentException('To have multiple allowed algorithms, You must provide an' . ' array of Firebase\\JWT\\Key objects.' . ' See https://github.com/firebase/php-jwt for more information.'); } $allowedAlg = \array_pop($allowedAlgs); } else { throw new \InvalidArgumentException('allowed algorithms must be a string or array.'); } if (\is_array($publicKey)) { // When publicKey is greater than 1, create keys with the single alg. $keys = []; foreach ($publicKey as $kid => $pubKey) { if ($pubKey instanceof Key) { $keys[$kid] = $pubKey; } else { $keys[$kid] = new Key($pubKey, $allowedAlg); } } return $keys; } return [new Key($publicKey, $allowedAlg)]; } /** * Determines if the URI is absolute based on its scheme and host or path * (RFC 3986). * * @param string $uri * @return bool */ private function isAbsoluteUri($uri) { $uri = $this->coerceUri($uri); return $uri->getScheme() && ($uri->getHost() || $uri->getPath()); } /** * @param array<mixed> $params * @return array<mixed> */ private function addClientCredentials(&$params) { $clientId = $this->getClientId(); $clientSecret = $this->getClientSecret(); if ($clientId && $clientSecret) { $params['client_id'] = $clientId; $params['client_secret'] = $clientSecret; } return $params; } } vendor_prefixed/google/auth/src/CredentialsLoader.php 0000644 00000022611 15174671617 0017051 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\Google\Auth\Credentials\ExternalAccountCredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\ImpersonatedServiceAccountCredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\InsecureCredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\ServiceAccountCredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\UserRefreshCredentials; use RuntimeException; use UnexpectedValueException; /** * CredentialsLoader contains the behaviour used to locate and find default * credentials files on the file system. */ abstract class CredentialsLoader implements GetUniverseDomainInterface, FetchAuthTokenInterface, UpdateMetadataInterface { use UpdateMetadataTrait; const TOKEN_CREDENTIAL_URI = 'https://oauth2.googleapis.com/token'; const ENV_VAR = 'GOOGLE_APPLICATION_CREDENTIALS'; const QUOTA_PROJECT_ENV_VAR = 'GOOGLE_CLOUD_QUOTA_PROJECT'; const WELL_KNOWN_PATH = 'gcloud/application_default_credentials.json'; const NON_WINDOWS_WELL_KNOWN_PATH_BASE = '.config'; const MTLS_WELL_KNOWN_PATH = '.secureConnect/context_aware_metadata.json'; const MTLS_CERT_ENV_VAR = 'GOOGLE_API_USE_CLIENT_CERTIFICATE'; /** * @param string $cause * @return string */ private static function unableToReadEnv($cause) { $msg = 'Unable to read the credential file specified by '; $msg .= ' GOOGLE_APPLICATION_CREDENTIALS: '; $msg .= $cause; return $msg; } /** * @return bool */ private static function isOnWindows() { return \strtoupper(\substr(\PHP_OS, 0, 3)) === 'WIN'; } /** * Load a JSON key from the path specified in the environment. * * Load a JSON key from the path specified in the environment * variable GOOGLE_APPLICATION_CREDENTIALS. Return null if * GOOGLE_APPLICATION_CREDENTIALS is not specified. * * @return array<mixed>|null JSON key | null */ public static function fromEnv() { $path = \getenv(self::ENV_VAR); if (empty($path)) { return null; } if (!\file_exists($path)) { $cause = 'file ' . $path . ' does not exist'; throw new \DomainException(self::unableToReadEnv($cause)); } $jsonKey = \file_get_contents($path); return \json_decode((string) $jsonKey, \true); } /** * Load a JSON key from a well known path. * * The well known path is OS dependent: * * * windows: %APPDATA%/gcloud/application_default_credentials.json * * others: $HOME/.config/gcloud/application_default_credentials.json * * If the file does not exist, this returns null. * * @return array<mixed>|null JSON key | null */ public static function fromWellKnownFile() { $rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME'; $path = [\getenv($rootEnv)]; if (!self::isOnWindows()) { $path[] = self::NON_WINDOWS_WELL_KNOWN_PATH_BASE; } $path[] = self::WELL_KNOWN_PATH; $path = \implode(\DIRECTORY_SEPARATOR, $path); if (!\file_exists($path)) { return null; } $jsonKey = \file_get_contents($path); return \json_decode((string) $jsonKey, \true); } /** * Create a new Credentials instance. * * @param string|string[] $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. * @param array<mixed> $jsonKey the JSON credentials. * @param string|string[] $defaultScope The default scope to use if no * user-defined scopes exist, expressed either as an Array or as a * space-delimited string. * * @return ServiceAccountCredentials|UserRefreshCredentials|ImpersonatedServiceAccountCredentials|ExternalAccountCredentials */ public static function makeCredentials($scope, array $jsonKey, $defaultScope = null) { if (!\array_key_exists('type', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the type field'); } if ($jsonKey['type'] == 'service_account') { // Do not pass $defaultScope to ServiceAccountCredentials return new ServiceAccountCredentials($scope, $jsonKey); } if ($jsonKey['type'] == 'authorized_user') { $anyScope = $scope ?: $defaultScope; return new UserRefreshCredentials($anyScope, $jsonKey); } if ($jsonKey['type'] == 'impersonated_service_account') { $anyScope = $scope ?: $defaultScope; return new ImpersonatedServiceAccountCredentials($anyScope, $jsonKey); } if ($jsonKey['type'] == 'external_account') { $anyScope = $scope ?: $defaultScope; return new ExternalAccountCredentials($anyScope, $jsonKey); } throw new \InvalidArgumentException('invalid value in the type field'); } /** * Create an authorized HTTP Client from an instance of FetchAuthTokenInterface. * * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token * @param array<mixed> $httpClientOptions (optional) Array of request options to apply. * @param callable $httpHandler (optional) http client to fetch the token. * @param callable $tokenCallback (optional) function to be called when a new token is fetched. * @return \GuzzleHttp\Client */ public static function makeHttpClient(FetchAuthTokenInterface $fetcher, array $httpClientOptions = [], ?callable $httpHandler = null, ?callable $tokenCallback = null) { $middleware = new Middleware\AuthTokenMiddleware($fetcher, $httpHandler, $tokenCallback); $stack = \WPMailSMTP\Vendor\GuzzleHttp\HandlerStack::create(); $stack->push($middleware); return new \WPMailSMTP\Vendor\GuzzleHttp\Client(['handler' => $stack, 'auth' => 'google_auth'] + $httpClientOptions); } /** * Create a new instance of InsecureCredentials. * * @return InsecureCredentials */ public static function makeInsecureCredentials() { return new InsecureCredentials(); } /** * Fetch a quota project from the environment variable * GOOGLE_CLOUD_QUOTA_PROJECT. Return null if * GOOGLE_CLOUD_QUOTA_PROJECT is not specified. * * @return string|null */ public static function quotaProjectFromEnv() { return \getenv(self::QUOTA_PROJECT_ENV_VAR) ?: null; } /** * Gets a callable which returns the default device certification. * * @throws UnexpectedValueException * @return callable|null */ public static function getDefaultClientCertSource() { if (!($clientCertSourceJson = self::loadDefaultClientCertSourceFile())) { return null; } $clientCertSourceCmd = $clientCertSourceJson['cert_provider_command']; return function () use($clientCertSourceCmd) { $cmd = \array_map('escapeshellarg', $clientCertSourceCmd); \exec(\implode(' ', $cmd), $output, $returnVar); if (0 === $returnVar) { return \implode(\PHP_EOL, $output); } throw new RuntimeException('"cert_provider_command" failed with a nonzero exit code'); }; } /** * Determines whether or not the default device certificate should be loaded. * * @return bool */ public static function shouldLoadClientCertSource() { return \filter_var(\getenv(self::MTLS_CERT_ENV_VAR), \FILTER_VALIDATE_BOOLEAN); } /** * @return array{cert_provider_command:string[]}|null */ private static function loadDefaultClientCertSourceFile() { $rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME'; $path = \sprintf('%s/%s', \getenv($rootEnv), self::MTLS_WELL_KNOWN_PATH); if (!\file_exists($path)) { return null; } $jsonKey = \file_get_contents($path); $clientCertSourceJson = \json_decode((string) $jsonKey, \true); if (!$clientCertSourceJson) { throw new UnexpectedValueException('Invalid client cert source JSON'); } if (!isset($clientCertSourceJson['cert_provider_command'])) { throw new UnexpectedValueException('cert source requires "cert_provider_command"'); } if (!\is_array($clientCertSourceJson['cert_provider_command'])) { throw new UnexpectedValueException('cert source expects "cert_provider_command" to be an array'); } return $clientCertSourceJson; } /** * Get the universe domain from the credential. Defaults to "googleapis.com" * for all credential types which do not support universe domain. * * @return string */ public function getUniverseDomain() : string { return self::DEFAULT_UNIVERSE_DOMAIN; } } vendor_prefixed/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php 0000644 00000011465 15174671617 0023105 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Middleware; use WPMailSMTP\Vendor\Google\Auth\CacheTrait; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * ScopedAccessTokenMiddleware is a Guzzle Middleware that adds an Authorization * header provided by a closure. * * The closure returns an access token, taking the scope, either a single * string or an array of strings, as its value. If provided, a cache will be * used to preserve the access token for a given lifetime. * * Requests will be accessed with the authorization header: * * 'authorization' 'Bearer <value of auth_token>' */ class ScopedAccessTokenMiddleware { use CacheTrait; const DEFAULT_CACHE_LIFETIME = 1500; /** * @var callable */ private $tokenFunc; /** * @var array<string>|string */ private $scopes; /** * Creates a new ScopedAccessTokenMiddleware. * * @param callable $tokenFunc a token generator function * @param array<string>|string $scopes the token authentication scopes * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache an implementation of CacheItemPoolInterface */ public function __construct(callable $tokenFunc, $scopes, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $this->tokenFunc = $tokenFunc; if (!(\is_string($scopes) || \is_array($scopes))) { throw new \InvalidArgumentException('wants scope should be string or array'); } $this->scopes = $scopes; if (!\is_null($cache)) { $this->cache = $cache; $this->cacheConfig = \array_merge(['lifetime' => self::DEFAULT_CACHE_LIFETIME, 'prefix' => ''], $cacheConfig); } } /** * Updates the request with an Authorization header when auth is 'scoped'. * * E.g this could be used to authenticate using the AppEngine * AppIdentityService. * * use google\appengine\api\app_identity\AppIdentityService; * use Google\Auth\Middleware\ScopedAccessTokenMiddleware; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $scope = 'https://www.googleapis.com/auth/taskqueue' * $middleware = new ScopedAccessTokenMiddleware( * 'AppIdentityService::getAccessToken', * $scope, * [ 'prefix' => 'Google\Auth\ScopedAccessToken::' ], * $cache = new Memcache() * ); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', * 'auth' => 'scoped' // authorize all requests * ]); * * $res = $client->get('myproject/taskqueues/myqueue'); * * @param callable $handler * @return \Closure */ public function __invoke(callable $handler) { return function (RequestInterface $request, array $options) use($handler) { // Requests using "auth"="scoped" will be authorized. if (!isset($options['auth']) || $options['auth'] !== 'scoped') { return $handler($request, $options); } $request = $request->withHeader('authorization', 'Bearer ' . $this->fetchToken()); return $handler($request, $options); }; } /** * @return string */ private function getCacheKey() { $key = null; if (\is_string($this->scopes)) { $key .= $this->scopes; } elseif (\is_array($this->scopes)) { $key .= \implode(':', $this->scopes); } return $key; } /** * Determine if token is available in the cache, if not call tokenFunc to * fetch it. * * @return string */ private function fetchToken() { $cacheKey = $this->getCacheKey(); $cached = $this->getCachedValue($cacheKey); if (!empty($cached)) { return $cached; } $token = \call_user_func($this->tokenFunc, $this->scopes); $this->setCachedValue($cacheKey, $token); return $token; } } vendor_prefixed/google/auth/src/Middleware/SimpleMiddleware.php 0000644 00000005526 15174671617 0020777 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Middleware; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Query; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * SimpleMiddleware is a Guzzle Middleware that implements Google's Simple API * access. * * Requests are accessed using the Simple API access developer key. */ class SimpleMiddleware { /** * @var array<mixed> */ private $config; /** * Create a new Simple plugin. * * The configuration array expects one option * - key: required, otherwise InvalidArgumentException is thrown * * @param array<mixed> $config Configuration array */ public function __construct(array $config) { if (!isset($config['key'])) { throw new \InvalidArgumentException('requires a key to have been set'); } $this->config = \array_merge(['key' => null], $config); } /** * Updates the request query with the developer key if auth is set to simple. * * use Google\Auth\Middleware\SimpleMiddleware; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $my_key = 'is not the same as yours'; * $middleware = new SimpleMiddleware(['key' => $my_key]); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/discovery/v1/', * 'auth' => 'simple' * ]); * * $res = $client->get('drive/v2/rest'); * * @param callable $handler * @return \Closure */ public function __invoke(callable $handler) { return function (RequestInterface $request, array $options) use($handler) { // Requests using "auth"="scoped" will be authorized. if (!isset($options['auth']) || $options['auth'] !== 'simple') { return $handler($request, $options); } $query = Query::parse($request->getUri()->getQuery()); $params = \array_merge($query, $this->config); $uri = $request->getUri()->withQuery(Query::build($params)); $request = $request->withUri($uri); return $handler($request, $options); }; } } vendor_prefixed/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php 0000644 00000011044 15174671617 0022502 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Middleware; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenInterface; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * ProxyAuthTokenMiddleware is a Guzzle Middleware that adds an Authorization header * provided by an object implementing FetchAuthTokenInterface. * * The FetchAuthTokenInterface#fetchAuthToken is used to obtain a hash; one of * the values value in that hash is added as the authorization header. * * Requests will be accessed with the authorization header: * * 'proxy-authorization' 'Bearer <value of auth_token>' */ class ProxyAuthTokenMiddleware { /** * @var callable */ private $httpHandler; /** * @var FetchAuthTokenInterface */ private $fetcher; /** * @var ?callable */ private $tokenCallback; /** * Creates a new ProxyAuthTokenMiddleware. * * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token * @param callable $httpHandler (optional) callback which delivers psr7 request * @param callable $tokenCallback (optional) function to be called when a new token is fetched. */ public function __construct(FetchAuthTokenInterface $fetcher, ?callable $httpHandler = null, ?callable $tokenCallback = null) { $this->fetcher = $fetcher; $this->httpHandler = $httpHandler; $this->tokenCallback = $tokenCallback; } /** * Updates the request with an Authorization header when auth is 'google_auth'. * * use Google\Auth\Middleware\ProxyAuthTokenMiddleware; * use Google\Auth\OAuth2; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $config = [..<oauth config param>.]; * $oauth2 = new OAuth2($config) * $middleware = new ProxyAuthTokenMiddleware($oauth2); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', * 'proxy_auth' => 'google_auth' // authorize all requests * ]); * * $res = $client->get('myproject/taskqueues/myqueue'); * * @param callable $handler * @return \Closure */ public function __invoke(callable $handler) { return function (RequestInterface $request, array $options) use($handler) { // Requests using "proxy_auth"="google_auth" will be authorized. if (!isset($options['proxy_auth']) || $options['proxy_auth'] !== 'google_auth') { return $handler($request, $options); } $request = $request->withHeader('proxy-authorization', 'Bearer ' . $this->fetchToken()); if ($quotaProject = $this->getQuotaProject()) { $request = $request->withHeader(GetQuotaProjectInterface::X_GOOG_USER_PROJECT_HEADER, $quotaProject); } return $handler($request, $options); }; } /** * Call fetcher to fetch the token. * * @return string|null */ private function fetchToken() { $auth_tokens = $this->fetcher->fetchAuthToken($this->httpHandler); if (\array_key_exists('access_token', $auth_tokens)) { // notify the callback if applicable if ($this->tokenCallback) { \call_user_func($this->tokenCallback, $this->fetcher->getCacheKey(), $auth_tokens['access_token']); } return $auth_tokens['access_token']; } if (\array_key_exists('id_token', $auth_tokens)) { return $auth_tokens['id_token']; } return null; } /** * @return string|null; */ private function getQuotaProject() { if ($this->fetcher instanceof GetQuotaProjectInterface) { return $this->fetcher->getQuotaProject(); } return null; } } vendor_prefixed/google/auth/src/Middleware/AuthTokenMiddleware.php 0000644 00000012263 15174671617 0021444 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Middleware; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenCache; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenInterface; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Google\Auth\UpdateMetadataInterface; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * AuthTokenMiddleware is a Guzzle Middleware that adds an Authorization header * provided by an object implementing FetchAuthTokenInterface. * * The FetchAuthTokenInterface#fetchAuthToken is used to obtain a hash; one of * the values value in that hash is added as the authorization header. * * Requests will be accessed with the authorization header: * * 'authorization' 'Bearer <value of auth_token>' */ class AuthTokenMiddleware { /** * @var callable */ private $httpHandler; /** * It must be an implementation of FetchAuthTokenInterface. * It may also implement UpdateMetadataInterface allowing direct * retrieval of auth related headers * @var FetchAuthTokenInterface */ private $fetcher; /** * @var ?callable */ private $tokenCallback; /** * Creates a new AuthTokenMiddleware. * * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token * @param callable $httpHandler (optional) callback which delivers psr7 request * @param callable $tokenCallback (optional) function to be called when a new token is fetched. */ public function __construct(FetchAuthTokenInterface $fetcher, ?callable $httpHandler = null, ?callable $tokenCallback = null) { $this->fetcher = $fetcher; $this->httpHandler = $httpHandler; $this->tokenCallback = $tokenCallback; } /** * Updates the request with an Authorization header when auth is 'google_auth'. * * use Google\Auth\Middleware\AuthTokenMiddleware; * use Google\Auth\OAuth2; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $config = [..<oauth config param>.]; * $oauth2 = new OAuth2($config) * $middleware = new AuthTokenMiddleware($oauth2); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', * 'auth' => 'google_auth' // authorize all requests * ]); * * $res = $client->get('myproject/taskqueues/myqueue'); * * @param callable $handler * @return \Closure */ public function __invoke(callable $handler) { return function (RequestInterface $request, array $options) use($handler) { // Requests using "auth"="google_auth" will be authorized. if (!isset($options['auth']) || $options['auth'] !== 'google_auth') { return $handler($request, $options); } $request = $this->addAuthHeaders($request); if ($quotaProject = $this->getQuotaProject()) { $request = $request->withHeader(GetQuotaProjectInterface::X_GOOG_USER_PROJECT_HEADER, $quotaProject); } return $handler($request, $options); }; } /** * Adds auth related headers to the request. * * @param RequestInterface $request * @return RequestInterface */ private function addAuthHeaders(RequestInterface $request) { if (!$this->fetcher instanceof UpdateMetadataInterface || $this->fetcher instanceof FetchAuthTokenCache && !$this->fetcher->getFetcher() instanceof UpdateMetadataInterface) { $token = $this->fetcher->fetchAuthToken(); $request = $request->withHeader('authorization', 'Bearer ' . ($token['access_token'] ?? $token['id_token'] ?? '')); } else { $headers = $this->fetcher->updateMetadata($request->getHeaders(), null, $this->httpHandler); $request = Utils::modifyRequest($request, ['set_headers' => $headers]); } if ($this->tokenCallback && ($token = $this->fetcher->getLastReceivedToken())) { if (\array_key_exists('access_token', $token)) { \call_user_func($this->tokenCallback, $this->fetcher->getCacheKey(), $token['access_token']); } } return $request; } /** * @return string|null */ private function getQuotaProject() { if ($this->fetcher instanceof GetQuotaProjectInterface) { return $this->fetcher->getQuotaProject(); } return null; } } vendor_prefixed/google/auth/src/ExternalAccountCredentialSourceInterface.php 0000644 00000001412 15174671617 0023555 0 ustar 00 <?php /* * Copyright 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; interface ExternalAccountCredentialSourceInterface { public function fetchSubjectToken(?callable $httpHandler = null) : string; } vendor_prefixed/google/auth/src/HttpHandler/Guzzle6HttpHandler.php 0000644 00000003467 15174671617 0021416 0 ustar 00 <?php /** * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\HttpHandler; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; class Guzzle6HttpHandler { /** * @var ClientInterface */ private $client; /** * @param ClientInterface $client */ public function __construct(ClientInterface $client) { $this->client = $client; } /** * Accepts a PSR-7 request and an array of options and returns a PSR-7 response. * * @param RequestInterface $request * @param array<mixed> $options * @return ResponseInterface */ public function __invoke(RequestInterface $request, array $options = []) { return $this->client->send($request, $options); } /** * Accepts a PSR-7 request and an array of options and returns a PromiseInterface * * @param RequestInterface $request * @param array<mixed> $options * * @return \GuzzleHttp\Promise\PromiseInterface */ public function async(RequestInterface $request, array $options = []) { return $this->client->sendAsync($request, $options); } } vendor_prefixed/google/auth/src/HttpHandler/HttpClientCache.php 0000644 00000002561 15174671617 0020706 0 ustar 00 <?php /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\HttpHandler; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; /** * Stores an HTTP Client in order to prevent multiple instantiations. */ class HttpClientCache { /** * @var ClientInterface|null */ private static $httpClient; /** * Cache an HTTP Client for later calls. * * Passing null will unset the cached client. * * @param ClientInterface|null $client * @return void */ public static function setHttpClient(?ClientInterface $client = null) { self::$httpClient = $client; } /** * Get the stored HTTP Client, or null. * * @return ClientInterface|null */ public static function getHttpClient() { return self::$httpClient; } } vendor_prefixed/google/auth/src/HttpHandler/Guzzle7HttpHandler.php 0000644 00000001311 15174671617 0021401 0 ustar 00 <?php /** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\HttpHandler; class Guzzle7HttpHandler extends Guzzle6HttpHandler { } vendor_prefixed/google/auth/src/HttpHandler/HttpHandlerFactory.php 0000644 00000004476 15174671617 0021460 0 ustar 00 <?php /** * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\HttpHandler; use WPMailSMTP\Vendor\GuzzleHttp\BodySummarizer; use WPMailSMTP\Vendor\GuzzleHttp\Client; use WPMailSMTP\Vendor\GuzzleHttp\ClientInterface; use WPMailSMTP\Vendor\GuzzleHttp\HandlerStack; use WPMailSMTP\Vendor\GuzzleHttp\Middleware; class HttpHandlerFactory { /** * Builds out a default http handler for the installed version of guzzle. * * @param ClientInterface $client * @return Guzzle6HttpHandler|Guzzle7HttpHandler * @throws \Exception */ public static function build(?ClientInterface $client = null) { if (\is_null($client)) { $stack = null; if (\class_exists(BodySummarizer::class)) { // double the # of characters before truncation by default $bodySummarizer = new BodySummarizer(240); $stack = HandlerStack::create(); $stack->remove('http_errors'); $stack->unshift(Middleware::httpErrors($bodySummarizer), 'http_errors'); } $client = new Client(['handler' => $stack]); } $version = null; if (\defined('WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) { $version = ClientInterface::MAJOR_VERSION; } elseif (\defined('WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface::VERSION')) { $version = (int) \substr(ClientInterface::VERSION, 0, 1); } switch ($version) { case 6: return new Guzzle6HttpHandler($client); case 7: return new Guzzle7HttpHandler($client); default: throw new \Exception('Version not supported'); } } } vendor_prefixed/google/auth/src/IamSignerTrait.php 0000644 00000004613 15174671617 0016351 0 ustar 00 <?php /* * Copyright 2022 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use Exception; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; trait IamSignerTrait { /** * @var Iam|null */ private $iam; /** * Sign a string using the default service account private key. * * This implementation uses IAM's signBlob API. * * @see https://cloud.google.com/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob SignBlob * * @param string $stringToSign The string to sign. * @param bool $forceOpenSsl [optional] Does not apply to this credentials * type. * @param string $accessToken The access token to use to sign the blob. If * provided, saves a call to the metadata server for a new access * token. **Defaults to** `null`. * @return string * @throws Exception */ public function signBlob($stringToSign, $forceOpenSsl = \false, $accessToken = null) { $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient()); // Providing a signer is useful for testing, but it's undocumented // because it's not something a user would generally need to do. $signer = $this->iam; if (!$signer) { $signer = $this instanceof GetUniverseDomainInterface ? new Iam($httpHandler, $this->getUniverseDomain()) : new Iam($httpHandler); } $email = $this->getClientName($httpHandler); if (\is_null($accessToken)) { $previousToken = $this->getLastReceivedToken(); $accessToken = $previousToken ? $previousToken['access_token'] : $this->fetchAuthToken($httpHandler)['access_token']; } return $signer->signBlob($email, $accessToken, $stringToSign); } } vendor_prefixed/google/auth/src/GetQuotaProjectInterface.php 0000644 00000001704 15174671617 0020366 0 ustar 00 <?php /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * An interface implemented by objects that can get quota projects. */ interface GetQuotaProjectInterface { const X_GOOG_USER_PROJECT_HEADER = 'X-Goog-User-Project'; /** * Get the quota project used for this API request * * @return string|null */ public function getQuotaProject(); } vendor_prefixed/google/auth/src/CredentialSource/FileSource.php 0000644 00000004633 15174671617 0020764 0 ustar 00 <?php /* * Copyright 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\CredentialSource; use WPMailSMTP\Vendor\Google\Auth\ExternalAccountCredentialSourceInterface; use InvalidArgumentException; use UnexpectedValueException; /** * Retrieve a token from a file. */ class FileSource implements ExternalAccountCredentialSourceInterface { private string $file; private ?string $format; private ?string $subjectTokenFieldName; /** * @param string $file The file to read the subject token from. * @param string $format The format of the token in the file. Can be null or "json". * @param string $subjectTokenFieldName The name of the field containing the token in the file. This is required * when format is "json". */ public function __construct(string $file, ?string $format = null, ?string $subjectTokenFieldName = null) { $this->file = $file; if ($format === 'json' && \is_null($subjectTokenFieldName)) { throw new InvalidArgumentException('subject_token_field_name must be set when format is JSON'); } $this->format = $format; $this->subjectTokenFieldName = $subjectTokenFieldName; } public function fetchSubjectToken(?callable $httpHandler = null) : string { $contents = \file_get_contents($this->file); if ($this->format === 'json') { if (!($json = \json_decode((string) $contents, \true))) { throw new UnexpectedValueException('Unable to decode JSON file'); } if (!isset($json[$this->subjectTokenFieldName])) { throw new UnexpectedValueException('subject_token_field_name not found in JSON file'); } $contents = $json[$this->subjectTokenFieldName]; } return $contents; } } vendor_prefixed/google/auth/src/CredentialSource/AwsNativeSource.php 0000644 00000031166 15174671617 0022007 0 ustar 00 <?php /* * Copyright 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\CredentialSource; use WPMailSMTP\Vendor\Google\Auth\ExternalAccountCredentialSourceInterface; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; /** * Authenticates requests using AWS credentials. */ class AwsNativeSource implements ExternalAccountCredentialSourceInterface { private const CRED_VERIFICATION_QUERY = 'Action=GetCallerIdentity&Version=2011-06-15'; private string $audience; private string $regionalCredVerificationUrl; private ?string $regionUrl; private ?string $securityCredentialsUrl; private ?string $imdsv2SessionTokenUrl; /** * @param string $audience The audience for the credential. * @param string $regionalCredVerificationUrl The regional AWS GetCallerIdentity action URL used to determine the * AWS account ID and its roles. This is not called by this library, but * is sent in the subject token to be called by the STS token server. * @param string|null $regionUrl This URL should be used to determine the current AWS region needed for the signed * request construction. * @param string|null $securityCredentialsUrl The AWS metadata server URL used to retrieve the access key, secret * key and security token needed to sign the GetCallerIdentity request. * @param string|null $imdsv2SessionTokenUrl Presence of this URL enforces the auth libraries to fetch a Session * Token from AWS. This field is required for EC2 instances using IMDSv2. */ public function __construct(string $audience, string $regionalCredVerificationUrl, ?string $regionUrl = null, ?string $securityCredentialsUrl = null, ?string $imdsv2SessionTokenUrl = null) { $this->audience = $audience; $this->regionalCredVerificationUrl = $regionalCredVerificationUrl; $this->regionUrl = $regionUrl; $this->securityCredentialsUrl = $securityCredentialsUrl; $this->imdsv2SessionTokenUrl = $imdsv2SessionTokenUrl; } public function fetchSubjectToken(?callable $httpHandler = null) : string { if (\is_null($httpHandler)) { $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient()); } $headers = []; if ($this->imdsv2SessionTokenUrl) { $headers = ['X-aws-ec2-metadata-token' => self::getImdsV2SessionToken($this->imdsv2SessionTokenUrl, $httpHandler)]; } if (!($signingVars = self::getSigningVarsFromEnv())) { if (!$this->securityCredentialsUrl) { throw new \LogicException('Unable to get credentials from ENV, and no security credentials URL provided'); } $signingVars = self::getSigningVarsFromUrl($httpHandler, $this->securityCredentialsUrl, self::getRoleName($httpHandler, $this->securityCredentialsUrl, $headers), $headers); } if (!($region = self::getRegionFromEnv())) { if (!$this->regionUrl) { throw new \LogicException('Unable to get region from ENV, and no region URL provided'); } $region = self::getRegionFromUrl($httpHandler, $this->regionUrl, $headers); } $url = \str_replace('{region}', $region, $this->regionalCredVerificationUrl); $host = \parse_url($url)['host'] ?? ''; // From here we use the signing vars to create the signed request to receive a token [$accessKeyId, $secretAccessKey, $securityToken] = $signingVars; $headers = self::getSignedRequestHeaders($region, $host, $accessKeyId, $secretAccessKey, $securityToken); // Inject x-goog-cloud-target-resource into header $headers['x-goog-cloud-target-resource'] = $this->audience; // Format headers as they're expected in the subject token $formattedHeaders = \array_map(fn($k, $v) => ['key' => $k, 'value' => $v], \array_keys($headers), $headers); $request = ['headers' => $formattedHeaders, 'method' => 'POST', 'url' => $url]; return \urlencode(\json_encode($request) ?: ''); } /** * @internal */ public static function getImdsV2SessionToken(string $imdsV2Url, callable $httpHandler) : string { $headers = ['X-aws-ec2-metadata-token-ttl-seconds' => '21600']; $request = new Request('PUT', $imdsV2Url, $headers); $response = $httpHandler($request); return (string) $response->getBody(); } /** * @see http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html * * @internal * * @return array<string, string> */ public static function getSignedRequestHeaders(string $region, string $host, string $accessKeyId, string $secretAccessKey, ?string $securityToken) : array { $service = 'sts'; # Create a date for headers and the credential string in ISO-8601 format $amzdate = \gmdate('Ymd\\THis\\Z'); $datestamp = \gmdate('Ymd'); # Date w/o time, used in credential scope # Create the canonical headers and signed headers. Header names # must be trimmed and lowercase, and sorted in code point order from # low to high. Note that there is a trailing \n. $canonicalHeaders = \sprintf("host:%s\nx-amz-date:%s\n", $host, $amzdate); if ($securityToken) { $canonicalHeaders .= \sprintf("x-amz-security-token:%s\n", $securityToken); } # Step 5: Create the list of signed headers. This lists the headers # in the canonicalHeaders list, delimited with ";" and in alpha order. # Note: The request can include any headers; $canonicalHeaders and # $signedHeaders lists those that you want to be included in the # hash of the request. "Host" and "x-amz-date" are always required. $signedHeaders = 'host;x-amz-date'; if ($securityToken) { $signedHeaders .= ';x-amz-security-token'; } # Step 6: Create payload hash (hash of the request body content). For GET # requests, the payload is an empty string (""). $payloadHash = \hash('sha256', ''); # Step 7: Combine elements to create canonical request $canonicalRequest = \implode("\n", [ 'POST', // method '/', // canonical URL self::CRED_VERIFICATION_QUERY, // query string $canonicalHeaders, $signedHeaders, $payloadHash, ]); # ************* TASK 2: CREATE THE STRING TO SIGN************* # Match the algorithm to the hashing algorithm you use, either SHA-1 or # SHA-256 (recommended) $algorithm = 'AWS4-HMAC-SHA256'; $scope = \implode('/', [$datestamp, $region, $service, 'aws4_request']); $stringToSign = \implode("\n", [$algorithm, $amzdate, $scope, \hash('sha256', $canonicalRequest)]); # ************* TASK 3: CALCULATE THE SIGNATURE ************* # Create the signing key using the function defined above. // (done above) $signingKey = self::getSignatureKey($secretAccessKey, $datestamp, $region, $service); # Sign the string_to_sign using the signing_key $signature = \bin2hex(self::hmacSign($signingKey, $stringToSign)); # ************* TASK 4: ADD SIGNING INFORMATION TO THE REQUEST ************* # The signing information can be either in a query string value or in # a header named Authorization. This code shows how to use a header. # Create authorization header and add to request headers $authorizationHeader = \sprintf('%s Credential=%s/%s, SignedHeaders=%s, Signature=%s', $algorithm, $accessKeyId, $scope, $signedHeaders, $signature); # The request can include any headers, but MUST include "host", "x-amz-date", # and (for this scenario) "Authorization". "host" and "x-amz-date" must # be included in the canonical_headers and signed_headers, as noted # earlier. Order here is not significant. $headers = ['host' => $host, 'x-amz-date' => $amzdate, 'Authorization' => $authorizationHeader]; if ($securityToken) { $headers['x-amz-security-token'] = $securityToken; } return $headers; } /** * @internal */ public static function getRegionFromEnv() : ?string { $region = \getenv('AWS_REGION'); if (empty($region)) { $region = \getenv('AWS_DEFAULT_REGION'); } return $region ?: null; } /** * @internal * * @param callable $httpHandler * @param string $regionUrl * @param array<string, string|string[]> $headers Request headers to send in with the request. */ public static function getRegionFromUrl(callable $httpHandler, string $regionUrl, array $headers) : string { // get the region/zone from the region URL $regionRequest = new Request('GET', $regionUrl, $headers); $regionResponse = $httpHandler($regionRequest); // Remove last character. For example, if us-east-2b is returned, // the region would be us-east-2. return \substr((string) $regionResponse->getBody(), 0, -1); } /** * @internal * * @param callable $httpHandler * @param string $securityCredentialsUrl * @param array<string, string|string[]> $headers Request headers to send in with the request. */ public static function getRoleName(callable $httpHandler, string $securityCredentialsUrl, array $headers) : string { // Get the AWS role name $roleRequest = new Request('GET', $securityCredentialsUrl, $headers); $roleResponse = $httpHandler($roleRequest); $roleName = (string) $roleResponse->getBody(); return $roleName; } /** * @internal * * @param callable $httpHandler * @param string $securityCredentialsUrl * @param array<string, string|string[]> $headers Request headers to send in with the request. * @return array{string, string, ?string} */ public static function getSigningVarsFromUrl(callable $httpHandler, string $securityCredentialsUrl, string $roleName, array $headers) : array { // Get the AWS credentials $credsRequest = new Request('GET', $securityCredentialsUrl . '/' . $roleName, $headers); $credsResponse = $httpHandler($credsRequest); $awsCreds = \json_decode((string) $credsResponse->getBody(), \true); return [ $awsCreds['AccessKeyId'], // accessKeyId $awsCreds['SecretAccessKey'], // secretAccessKey $awsCreds['Token'], ]; } /** * @internal * * @return array{string, string, ?string} */ public static function getSigningVarsFromEnv() : ?array { $accessKeyId = \getenv('AWS_ACCESS_KEY_ID'); $secretAccessKey = \getenv('AWS_SECRET_ACCESS_KEY'); if ($accessKeyId && $secretAccessKey) { return [$accessKeyId, $secretAccessKey, \getenv('AWS_SESSION_TOKEN') ?: null]; } return null; } /** * Return HMAC hash in binary string */ private static function hmacSign(string $key, string $msg) : string { return \hash_hmac('sha256', self::utf8Encode($msg), $key, \true); } /** * @TODO add a fallback when mbstring is not available */ private static function utf8Encode(string $string) : string { return \mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1'); } private static function getSignatureKey(string $key, string $dateStamp, string $regionName, string $serviceName) : string { $kDate = self::hmacSign(self::utf8Encode('AWS4' . $key), $dateStamp); $kRegion = self::hmacSign($kDate, $regionName); $kService = self::hmacSign($kRegion, $serviceName); $kSigning = self::hmacSign($kService, 'aws4_request'); return $kSigning; } } vendor_prefixed/google/auth/src/CredentialSource/UrlSource.php 0000644 00000006075 15174671617 0020651 0 ustar 00 <?php /* * Copyright 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\CredentialSource; use WPMailSMTP\Vendor\Google\Auth\ExternalAccountCredentialSourceInterface; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use InvalidArgumentException; use UnexpectedValueException; /** * Retrieve a token from a URL. */ class UrlSource implements ExternalAccountCredentialSourceInterface { private string $url; private ?string $format; private ?string $subjectTokenFieldName; /** * @var array<string, string|string[]> */ private ?array $headers; /** * @param string $url The URL to fetch the subject token from. * @param string $format The format of the token in the response. Can be null or "json". * @param string $subjectTokenFieldName The name of the field containing the token in the response. This is required * when format is "json". * @param array<string, string|string[]> $headers Request headers to send in with the request to the URL. */ public function __construct(string $url, ?string $format = null, ?string $subjectTokenFieldName = null, ?array $headers = null) { $this->url = $url; if ($format === 'json' && \is_null($subjectTokenFieldName)) { throw new InvalidArgumentException('subject_token_field_name must be set when format is JSON'); } $this->format = $format; $this->subjectTokenFieldName = $subjectTokenFieldName; $this->headers = $headers; } public function fetchSubjectToken(?callable $httpHandler = null) : string { if (\is_null($httpHandler)) { $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient()); } $request = new Request('GET', $this->url, $this->headers ?: []); $response = $httpHandler($request); $body = (string) $response->getBody(); if ($this->format === 'json') { if (!($json = \json_decode((string) $body, \true))) { throw new UnexpectedValueException('Unable to decode JSON response'); } if (!isset($json[$this->subjectTokenFieldName])) { throw new UnexpectedValueException('subject_token_field_name not found in JSON file'); } $body = $json[$this->subjectTokenFieldName]; } return $body; } } vendor_prefixed/google/auth/src/FetchAuthTokenCache.php 0000644 00000024125 15174671617 0017267 0 ustar 00 <?php /* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * A class to implement caching for any object implementing * FetchAuthTokenInterface */ class FetchAuthTokenCache implements FetchAuthTokenInterface, GetQuotaProjectInterface, GetUniverseDomainInterface, SignBlobInterface, ProjectIdProviderInterface, UpdateMetadataInterface { use CacheTrait; /** * @var FetchAuthTokenInterface */ private $fetcher; /** * @var int */ private $eagerRefreshThresholdSeconds = 10; /** * @param FetchAuthTokenInterface $fetcher A credentials fetcher * @param array<mixed> $cacheConfig Configuration for the cache * @param CacheItemPoolInterface $cache */ public function __construct(FetchAuthTokenInterface $fetcher, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $this->fetcher = $fetcher; $this->cache = $cache; $this->cacheConfig = \array_merge(['lifetime' => 1500, 'prefix' => '', 'cacheUniverseDomain' => $fetcher instanceof Credentials\GCECredentials], (array) $cacheConfig); } /** * @return FetchAuthTokenInterface */ public function getFetcher() { return $this->fetcher; } /** * Implements FetchAuthTokenInterface#fetchAuthToken. * * Checks the cache for a valid auth token and fetches the auth tokens * from the supplied fetcher. * * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> the response * @throws \Exception */ public function fetchAuthToken(?callable $httpHandler = null) { if ($cached = $this->fetchAuthTokenFromCache()) { return $cached; } $auth_token = $this->fetcher->fetchAuthToken($httpHandler); $this->saveAuthTokenInCache($auth_token); return $auth_token; } /** * @return string */ public function getCacheKey() { return $this->getFullCacheKey($this->fetcher->getCacheKey()); } /** * @return array<mixed>|null */ public function getLastReceivedToken() { return $this->fetcher->getLastReceivedToken(); } /** * Get the client name from the fetcher. * * @param callable $httpHandler An HTTP handler to deliver PSR7 requests. * @return string */ public function getClientName(?callable $httpHandler = null) { if (!$this->fetcher instanceof SignBlobInterface) { throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\SignBlobInterface'); } return $this->fetcher->getClientName($httpHandler); } /** * Sign a blob using the fetcher. * * @param string $stringToSign The string to sign. * @param bool $forceOpenSsl Require use of OpenSSL for local signing. Does * not apply to signing done using external services. **Defaults to** * `false`. * @return string The resulting signature. * @throws \RuntimeException If the fetcher does not implement * `Google\Auth\SignBlobInterface`. */ public function signBlob($stringToSign, $forceOpenSsl = \false) { if (!$this->fetcher instanceof SignBlobInterface) { throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\SignBlobInterface'); } // Pass the access token from cache for credentials that sign blobs // using the IAM API. This saves a call to fetch an access token when a // cached token exists. if ($this->fetcher instanceof Credentials\GCECredentials || $this->fetcher instanceof Credentials\ImpersonatedServiceAccountCredentials) { $cached = $this->fetchAuthTokenFromCache(); $accessToken = $cached['access_token'] ?? null; return $this->fetcher->signBlob($stringToSign, $forceOpenSsl, $accessToken); } return $this->fetcher->signBlob($stringToSign, $forceOpenSsl); } /** * Get the quota project used for this API request from the credentials * fetcher. * * @return string|null */ public function getQuotaProject() { if ($this->fetcher instanceof GetQuotaProjectInterface) { return $this->fetcher->getQuotaProject(); } return null; } /* * Get the Project ID from the fetcher. * * @param callable $httpHandler Callback which delivers psr7 request * @return string|null * @throws \RuntimeException If the fetcher does not implement * `Google\Auth\ProvidesProjectIdInterface`. */ public function getProjectId(?callable $httpHandler = null) { if (!$this->fetcher instanceof ProjectIdProviderInterface) { throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\ProvidesProjectIdInterface'); } // Pass the access token from cache for credentials that require an // access token to fetch the project ID. This saves a call to fetch an // access token when a cached token exists. if ($this->fetcher instanceof Credentials\ExternalAccountCredentials) { $cached = $this->fetchAuthTokenFromCache(); $accessToken = $cached['access_token'] ?? null; return $this->fetcher->getProjectId($httpHandler, $accessToken); } return $this->fetcher->getProjectId($httpHandler); } /* * Get the Universe Domain from the fetcher. * * @return string */ public function getUniverseDomain() : string { if ($this->fetcher instanceof GetUniverseDomainInterface) { if ($this->cacheConfig['cacheUniverseDomain']) { return $this->getCachedUniverseDomain($this->fetcher); } return $this->fetcher->getUniverseDomain(); } return GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN; } /** * Updates metadata with the authorization token. * * @param array<mixed> $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> updated metadata hashmap * @throws \RuntimeException If the fetcher does not implement * `Google\Auth\UpdateMetadataInterface`. */ public function updateMetadata($metadata, $authUri = null, ?callable $httpHandler = null) { if (!$this->fetcher instanceof UpdateMetadataInterface) { throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\UpdateMetadataInterface'); } $cached = $this->fetchAuthTokenFromCache($authUri); if ($cached) { // Set the access token in the `Authorization` metadata header so // the downstream call to updateMetadata know they don't need to // fetch another token. if (isset($cached['access_token'])) { $metadata[self::AUTH_METADATA_KEY] = ['Bearer ' . $cached['access_token']]; } elseif (isset($cached['id_token'])) { $metadata[self::AUTH_METADATA_KEY] = ['Bearer ' . $cached['id_token']]; } } $newMetadata = $this->fetcher->updateMetadata($metadata, $authUri, $httpHandler); if (!$cached && ($token = $this->fetcher->getLastReceivedToken())) { $this->saveAuthTokenInCache($token, $authUri); } return $newMetadata; } /** * @param string|null $authUri * @return array<mixed>|null */ private function fetchAuthTokenFromCache($authUri = null) { // Use the cached value if its available. // // TODO: correct caching; update the call to setCachedValue to set the expiry // to the value returned with the auth token. // // TODO: correct caching; enable the cache to be cleared. // if $authUri is set, use it as the cache key $cacheKey = $authUri ? $this->getFullCacheKey($authUri) : $this->fetcher->getCacheKey(); $cached = $this->getCachedValue($cacheKey); if (\is_array($cached)) { if (empty($cached['expires_at'])) { // If there is no expiration data, assume token is not expired. // (for JwtAccess and ID tokens) return $cached; } if (\time() + $this->eagerRefreshThresholdSeconds < $cached['expires_at']) { // access token is not expired return $cached; } } return null; } /** * @param array<mixed> $authToken * @param string|null $authUri * @return void */ private function saveAuthTokenInCache($authToken, $authUri = null) { if (isset($authToken['access_token']) || isset($authToken['id_token'])) { // if $authUri is set, use it as the cache key $cacheKey = $authUri ? $this->getFullCacheKey($authUri) : $this->fetcher->getCacheKey(); $this->setCachedValue($cacheKey, $authToken); } } private function getCachedUniverseDomain(GetUniverseDomainInterface $fetcher) : string { $cacheKey = $this->getFullCacheKey($fetcher->getCacheKey() . 'universe_domain'); // @phpstan-ignore-line if ($universeDomain = $this->getCachedValue($cacheKey)) { return $universeDomain; } $universeDomain = $fetcher->getUniverseDomain(); $this->setCachedValue($cacheKey, $universeDomain); return $universeDomain; } } vendor_prefixed/google/auth/src/CacheTrait.php 0000644 00000005121 15174671617 0015471 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; trait CacheTrait { /** * @var int */ private $maxKeyLength = 64; /** * @var array<mixed> */ private $cacheConfig; /** * @var ?CacheItemPoolInterface */ private $cache; /** * Gets the cached value if it is present in the cache when that is * available. * * @param mixed $k * * @return mixed */ private function getCachedValue($k) { if (\is_null($this->cache)) { return null; } $key = $this->getFullCacheKey($k); if (\is_null($key)) { return null; } $cacheItem = $this->cache->getItem($key); if ($cacheItem->isHit()) { return $cacheItem->get(); } } /** * Saves the value in the cache when that is available. * * @param mixed $k * @param mixed $v * @return mixed */ private function setCachedValue($k, $v) { if (\is_null($this->cache)) { return null; } $key = $this->getFullCacheKey($k); if (\is_null($key)) { return null; } $cacheItem = $this->cache->getItem($key); $cacheItem->set($v); $cacheItem->expiresAfter($this->cacheConfig['lifetime']); return $this->cache->save($cacheItem); } /** * @param null|string $key * @return null|string */ private function getFullCacheKey($key) { if (\is_null($key)) { return null; } $key = $this->cacheConfig['prefix'] . $key; // ensure we do not have illegal characters $key = \preg_replace('|[^a-zA-Z0-9_\\.!]|', '', $key); // Hash keys if they exceed $maxKeyLength (defaults to 64) if ($this->maxKeyLength && \strlen($key) > $this->maxKeyLength) { $key = \substr(\hash('sha256', $key), 0, $this->maxKeyLength); } return $key; } } vendor_prefixed/google/auth/src/Iam.php 0000644 00000006643 15174671617 0014202 0 ustar 00 <?php /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\GuzzleHttp\Psr7; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Utils; /** * Tools for using the IAM API. * * @see https://cloud.google.com/iam/docs IAM Documentation */ class Iam { /** * @deprecated */ const IAM_API_ROOT = 'https://iamcredentials.googleapis.com/v1'; const SIGN_BLOB_PATH = '%s:signBlob?alt=json'; const SERVICE_ACCOUNT_NAME = 'projects/-/serviceAccounts/%s'; private const IAM_API_ROOT_TEMPLATE = 'https://iamcredentials.UNIVERSE_DOMAIN/v1'; /** * @var callable */ private $httpHandler; private string $universeDomain; /** * @param callable $httpHandler [optional] The HTTP Handler to send requests. */ public function __construct(?callable $httpHandler = null, string $universeDomain = GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN) { $this->httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); $this->universeDomain = $universeDomain; } /** * Sign a string using the IAM signBlob API. * * Note that signing using IAM requires your service account to have the * `iam.serviceAccounts.signBlob` permission, part of the "Service Account * Token Creator" IAM role. * * @param string $email The service account email. * @param string $accessToken An access token from the service account. * @param string $stringToSign The string to be signed. * @param array<string> $delegates [optional] A list of service account emails to * add to the delegate chain. If omitted, the value of `$email` will * be used. * @return string The signed string, base64-encoded. */ public function signBlob($email, $accessToken, $stringToSign, array $delegates = []) { $httpHandler = $this->httpHandler; $name = \sprintf(self::SERVICE_ACCOUNT_NAME, $email); $apiRoot = \str_replace('UNIVERSE_DOMAIN', $this->universeDomain, self::IAM_API_ROOT_TEMPLATE); $uri = $apiRoot . '/' . \sprintf(self::SIGN_BLOB_PATH, $name); if ($delegates) { foreach ($delegates as &$delegate) { $delegate = \sprintf(self::SERVICE_ACCOUNT_NAME, $delegate); } } else { $delegates = [$name]; } $body = ['delegates' => $delegates, 'payload' => \base64_encode($stringToSign)]; $headers = ['Authorization' => 'Bearer ' . $accessToken]; $request = new Psr7\Request('POST', $uri, $headers, Utils::streamFor(\json_encode($body))); $res = $httpHandler($request); $body = \json_decode((string) $res->getBody(), \true); return $body['signedBlob']; } } vendor_prefixed/google/auth/src/SignBlobInterface.php 0000644 00000003016 15174671617 0017003 0 ustar 00 <?php /* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * Describes a class which supports signing arbitrary strings. */ interface SignBlobInterface extends FetchAuthTokenInterface { /** * Sign a string using the method which is best for a given credentials type. * * @param string $stringToSign The string to sign. * @param bool $forceOpenssl Require use of OpenSSL for local signing. Does * not apply to signing done using external services. **Defaults to** * `false`. * @return string The resulting signature. Value should be base64-encoded. */ public function signBlob($stringToSign, $forceOpenssl = \false); /** * Returns the current Client Name. * * @param callable $httpHandler callback which delivers psr7 request, if * one is required to obtain a client name. * @return string */ public function getClientName(?callable $httpHandler = null); } vendor_prefixed/google/auth/src/GCECache.php 0000644 00000004471 15174671617 0015013 0 ustar 00 <?php /* * Copyright 2020 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use WPMailSMTP\Vendor\Google\Auth\Credentials\GCECredentials; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * A class to implement caching for calls to GCECredentials::onGce. This class * is used automatically when you pass a `Psr\Cache\CacheItemPoolInterface` * cache object to `ApplicationDefaultCredentials::getCredentials`. * * ``` * $sysvCache = new Google\Auth\SysvCacheItemPool(); * $creds = Google\Auth\ApplicationDefaultCredentials::getCredentials( * $scope, * null, * null, * $sysvCache * ); * ``` */ class GCECache { const GCE_CACHE_KEY = 'google_auth_on_gce_cache'; use CacheTrait; /** * @param array<mixed> $cacheConfig Configuration for the cache * @param CacheItemPoolInterface $cache */ public function __construct(?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $this->cache = $cache; $this->cacheConfig = \array_merge(['lifetime' => 1500, 'prefix' => ''], (array) $cacheConfig); } /** * Caches the result of onGce so the metadata server is not called multiple * times. * * @param callable $httpHandler callback which delivers psr7 request * @return bool True if this a GCEInstance, false otherwise */ public function onGce(?callable $httpHandler = null) { if (\is_null($this->cache)) { return GCECredentials::onGce($httpHandler); } $cacheKey = self::GCE_CACHE_KEY; $onGce = $this->getCachedValue($cacheKey); if (\is_null($onGce)) { $onGce = GCECredentials::onGce($httpHandler); $this->setCachedValue($cacheKey, $onGce); } return $onGce; } } vendor_prefixed/google/auth/src/GetUniverseDomainInterface.php 0000644 00000002117 15174671617 0020675 0 ustar 00 <?php /* * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; /** * An interface implemented by objects that can get universe domain for Google Cloud APIs. */ interface GetUniverseDomainInterface { const DEFAULT_UNIVERSE_DOMAIN = 'googleapis.com'; /** * Get the universe domain from the credential. This should always return * a string, and default to "googleapis.com" if no universe domain is * configured. * * @return string */ public function getUniverseDomain() : string; } vendor_prefixed/google/auth/src/ApplicationDefaultCredentials.php 0000644 00000033221 15174671617 0021412 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth; use DomainException; use WPMailSMTP\Vendor\Google\Auth\Credentials\AppIdentityCredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\GCECredentials; use WPMailSMTP\Vendor\Google\Auth\Credentials\ServiceAccountCredentials; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Auth\Middleware\AuthTokenMiddleware; use WPMailSMTP\Vendor\Google\Auth\Middleware\ProxyAuthTokenMiddleware; use WPMailSMTP\Vendor\Google\Auth\Subscriber\AuthTokenSubscriber; use WPMailSMTP\Vendor\GuzzleHttp\Client; use InvalidArgumentException; use WPMailSMTP\Vendor\Psr\Cache\CacheItemPoolInterface; /** * ApplicationDefaultCredentials obtains the default credentials for * authorizing a request to a Google service. * * Application Default Credentials are described here: * https://developers.google.com/accounts/docs/application-default-credentials * * This class implements the search for the application default credentials as * described in the link. * * It provides three factory methods: * - #get returns the computed credentials object * - #getSubscriber returns an AuthTokenSubscriber built from the credentials object * - #getMiddleware returns an AuthTokenMiddleware built from the credentials object * * This allows it to be used as follows with GuzzleHttp\Client: * * ``` * use Google\Auth\ApplicationDefaultCredentials; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $middleware = ApplicationDefaultCredentials::getMiddleware( * 'https://www.googleapis.com/auth/taskqueue' * ); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', * 'auth' => 'google_auth' // authorize all requests * ]); * * $res = $client->get('myproject/taskqueues/myqueue'); * ``` */ class ApplicationDefaultCredentials { /** * @deprecated * * Obtains an AuthTokenSubscriber that uses the default FetchAuthTokenInterface * implementation to use in this environment. * * If supplied, $scope is used to in creating the credentials instance if * this does not fallback to the compute engine defaults. * * @param string|string[] $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. * @param callable $httpHandler callback which delivers psr7 request * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache A cache implementation, may be * provided if you have one already available for use. * @return AuthTokenSubscriber * @throws DomainException if no implementation can be obtained. */ public static function getSubscriber( // @phpstan-ignore-line $scope = null, ?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null ) { $creds = self::getCredentials($scope, $httpHandler, $cacheConfig, $cache); /** @phpstan-ignore-next-line */ return new AuthTokenSubscriber($creds, $httpHandler); } /** * Obtains an AuthTokenMiddleware that uses the default FetchAuthTokenInterface * implementation to use in this environment. * * If supplied, $scope is used to in creating the credentials instance if * this does not fallback to the compute engine defaults. * * @param string|string[] $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. * @param callable $httpHandler callback which delivers psr7 request * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache A cache implementation, may be * provided if you have one already available for use. * @param string $quotaProject specifies a project to bill for access * charges associated with the request. * @return AuthTokenMiddleware * @throws DomainException if no implementation can be obtained. */ public static function getMiddleware($scope = null, ?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null, $quotaProject = null) { $creds = self::getCredentials($scope, $httpHandler, $cacheConfig, $cache, $quotaProject); return new AuthTokenMiddleware($creds, $httpHandler); } /** * Obtains the default FetchAuthTokenInterface implementation to use * in this environment. * * @param string|string[] $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. * @param callable $httpHandler callback which delivers psr7 request * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache A cache implementation, may be * provided if you have one already available for use. * @param string $quotaProject specifies a project to bill for access * charges associated with the request. * @param string|string[] $defaultScope The default scope to use if no * user-defined scopes exist, expressed either as an Array or as a * space-delimited string. * @param string $universeDomain Specifies a universe domain to use for the * calling client library * * @return FetchAuthTokenInterface * @throws DomainException if no implementation can be obtained. */ public static function getCredentials($scope = null, ?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null, $quotaProject = null, $defaultScope = null, ?string $universeDomain = null) { $creds = null; $jsonKey = CredentialsLoader::fromEnv() ?: CredentialsLoader::fromWellKnownFile(); $anyScope = $scope ?: $defaultScope; if (!$httpHandler) { if (!($client = HttpClientCache::getHttpClient())) { $client = new Client(); HttpClientCache::setHttpClient($client); } $httpHandler = HttpHandlerFactory::build($client); } if (\is_null($quotaProject)) { // if a quota project isn't specified, try to get one from the env var $quotaProject = CredentialsLoader::quotaProjectFromEnv(); } if (!\is_null($jsonKey)) { if ($quotaProject) { $jsonKey['quota_project_id'] = $quotaProject; } if ($universeDomain) { $jsonKey['universe_domain'] = $universeDomain; } $creds = CredentialsLoader::makeCredentials($scope, $jsonKey, $defaultScope); } elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) { $creds = new AppIdentityCredentials($anyScope); } elseif (self::onGce($httpHandler, $cacheConfig, $cache)) { $creds = new GCECredentials(null, $anyScope, null, $quotaProject, null, $universeDomain); $creds->setIsOnGce(\true); // save the credentials a trip to the metadata server } if (\is_null($creds)) { throw new DomainException(self::notFound()); } if (!\is_null($cache)) { $creds = new FetchAuthTokenCache($creds, $cacheConfig, $cache); } return $creds; } /** * Obtains an AuthTokenMiddleware which will fetch an ID token to use in the * Authorization header. The middleware is configured with the default * FetchAuthTokenInterface implementation to use in this environment. * * If supplied, $targetAudience is used to set the "aud" on the resulting * ID token. * * @param string $targetAudience The audience for the ID token. * @param callable $httpHandler callback which delivers psr7 request * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache A cache implementation, may be * provided if you have one already available for use. * @return AuthTokenMiddleware * @throws DomainException if no implementation can be obtained. */ public static function getIdTokenMiddleware($targetAudience, ?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $creds = self::getIdTokenCredentials($targetAudience, $httpHandler, $cacheConfig, $cache); return new AuthTokenMiddleware($creds, $httpHandler); } /** * Obtains an ProxyAuthTokenMiddleware which will fetch an ID token to use in the * Authorization header. The middleware is configured with the default * FetchAuthTokenInterface implementation to use in this environment. * * If supplied, $targetAudience is used to set the "aud" on the resulting * ID token. * * @param string $targetAudience The audience for the ID token. * @param callable $httpHandler callback which delivers psr7 request * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache A cache implementation, may be * provided if you have one already available for use. * @return ProxyAuthTokenMiddleware * @throws DomainException if no implementation can be obtained. */ public static function getProxyIdTokenMiddleware($targetAudience, ?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $creds = self::getIdTokenCredentials($targetAudience, $httpHandler, $cacheConfig, $cache); return new ProxyAuthTokenMiddleware($creds, $httpHandler); } /** * Obtains the default FetchAuthTokenInterface implementation to use * in this environment, configured with a $targetAudience for fetching an ID * token. * * @param string $targetAudience The audience for the ID token. * @param callable $httpHandler callback which delivers psr7 request * @param array<mixed> $cacheConfig configuration for the cache when it's present * @param CacheItemPoolInterface $cache A cache implementation, may be * provided if you have one already available for use. * @return FetchAuthTokenInterface * @throws DomainException if no implementation can be obtained. * @throws InvalidArgumentException if JSON "type" key is invalid */ public static function getIdTokenCredentials($targetAudience, ?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $creds = null; $jsonKey = CredentialsLoader::fromEnv() ?: CredentialsLoader::fromWellKnownFile(); if (!$httpHandler) { if (!($client = HttpClientCache::getHttpClient())) { $client = new Client(); HttpClientCache::setHttpClient($client); } $httpHandler = HttpHandlerFactory::build($client); } if (!\is_null($jsonKey)) { if (!\array_key_exists('type', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the type field'); } if ($jsonKey['type'] == 'authorized_user') { throw new InvalidArgumentException('ID tokens are not supported for end user credentials'); } if ($jsonKey['type'] != 'service_account') { throw new InvalidArgumentException('invalid value in the type field'); } $creds = new ServiceAccountCredentials(null, $jsonKey, null, $targetAudience); } elseif (self::onGce($httpHandler, $cacheConfig, $cache)) { $creds = new GCECredentials(null, null, $targetAudience); $creds->setIsOnGce(\true); // save the credentials a trip to the metadata server } if (\is_null($creds)) { throw new DomainException(self::notFound()); } if (!\is_null($cache)) { $creds = new FetchAuthTokenCache($creds, $cacheConfig, $cache); } return $creds; } /** * @return string */ private static function notFound() { $msg = 'Your default credentials were not found. To set up '; $msg .= 'Application Default Credentials, see '; $msg .= 'https://cloud.google.com/docs/authentication/external/set-up-adc'; return $msg; } /** * @param callable $httpHandler * @param array<mixed> $cacheConfig * @param CacheItemPoolInterface $cache * @return bool */ private static function onGce(?callable $httpHandler = null, ?array $cacheConfig = null, ?CacheItemPoolInterface $cache = null) { $gceCacheConfig = []; foreach (['lifetime', 'prefix'] as $key) { if (isset($cacheConfig['gce_' . $key])) { $gceCacheConfig[$key] = $cacheConfig['gce_' . $key]; } } return (new GCECache($gceCacheConfig, $cache))->onGce($httpHandler); } } vendor_prefixed/google/auth/src/Credentials/IAMCredentials.php 0000644 00000004577 15174671617 0020521 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; /** * Authenticates requests using IAM credentials. */ class IAMCredentials { const SELECTOR_KEY = 'x-goog-iam-authority-selector'; const TOKEN_KEY = 'x-goog-iam-authorization-token'; /** * @var string */ private $selector; /** * @var string */ private $token; /** * @param string $selector the IAM selector * @param string $token the IAM token */ public function __construct($selector, $token) { if (!\is_string($selector)) { throw new \InvalidArgumentException('selector must be a string'); } if (!\is_string($token)) { throw new \InvalidArgumentException('token must be a string'); } $this->selector = $selector; $this->token = $token; } /** * export a callback function which updates runtime metadata. * * @return callable updateMetadata function */ public function getUpdateMetadataFunc() { return [$this, 'updateMetadata']; } /** * Updates metadata with the appropriate header metadata. * * @param array<mixed> $metadata metadata hashmap * @param string $unusedAuthUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request * Note: this param is unused here, only included here for * consistency with other credentials class * * @return array<mixed> updated metadata hashmap */ public function updateMetadata($metadata, $unusedAuthUri = null, ?callable $httpHandler = null) { $metadata_copy = $metadata; $metadata_copy[self::SELECTOR_KEY] = $this->selector; $metadata_copy[self::TOKEN_KEY] = $this->token; return $metadata_copy; } } vendor_prefixed/google/auth/src/Credentials/ExternalAccountCredentials.php 0000644 00000025367 15174671617 0023212 0 ustar 00 <?php /* * Copyright 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\CredentialSource\AwsNativeSource; use WPMailSMTP\Vendor\Google\Auth\CredentialSource\FileSource; use WPMailSMTP\Vendor\Google\Auth\CredentialSource\UrlSource; use WPMailSMTP\Vendor\Google\Auth\ExternalAccountCredentialSourceInterface; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenInterface; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Google\Auth\GetUniverseDomainInterface; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Auth\OAuth2; use WPMailSMTP\Vendor\Google\Auth\ProjectIdProviderInterface; use WPMailSMTP\Vendor\Google\Auth\UpdateMetadataInterface; use WPMailSMTP\Vendor\Google\Auth\UpdateMetadataTrait; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use InvalidArgumentException; class ExternalAccountCredentials implements FetchAuthTokenInterface, UpdateMetadataInterface, GetQuotaProjectInterface, GetUniverseDomainInterface, ProjectIdProviderInterface { use UpdateMetadataTrait; private const EXTERNAL_ACCOUNT_TYPE = 'external_account'; private const CLOUD_RESOURCE_MANAGER_URL = 'https://cloudresourcemanager.UNIVERSE_DOMAIN/v1/projects/%s'; private OAuth2 $auth; private ?string $quotaProject; private ?string $serviceAccountImpersonationUrl; private ?string $workforcePoolUserProject; private ?string $projectId; private string $universeDomain; /** * @param string|string[] $scope The scope of the access request, expressed either as an array * or as a space-delimited string. * @param array<mixed> $jsonKey JSON credentials as an associative array. */ public function __construct($scope, array $jsonKey) { if (!\array_key_exists('type', $jsonKey)) { throw new InvalidArgumentException('json key is missing the type field'); } if ($jsonKey['type'] !== self::EXTERNAL_ACCOUNT_TYPE) { throw new InvalidArgumentException(\sprintf('expected "%s" type but received "%s"', self::EXTERNAL_ACCOUNT_TYPE, $jsonKey['type'])); } if (!\array_key_exists('token_url', $jsonKey)) { throw new InvalidArgumentException('json key is missing the token_url field'); } if (!\array_key_exists('audience', $jsonKey)) { throw new InvalidArgumentException('json key is missing the audience field'); } if (!\array_key_exists('subject_token_type', $jsonKey)) { throw new InvalidArgumentException('json key is missing the subject_token_type field'); } if (!\array_key_exists('credential_source', $jsonKey)) { throw new InvalidArgumentException('json key is missing the credential_source field'); } if (\array_key_exists('service_account_impersonation_url', $jsonKey)) { $this->serviceAccountImpersonationUrl = $jsonKey['service_account_impersonation_url']; } $this->quotaProject = $jsonKey['quota_project_id'] ?? null; $this->workforcePoolUserProject = $jsonKey['workforce_pool_user_project'] ?? null; $this->universeDomain = $jsonKey['universe_domain'] ?? GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN; $this->auth = new OAuth2(['tokenCredentialUri' => $jsonKey['token_url'], 'audience' => $jsonKey['audience'], 'scope' => $scope, 'subjectTokenType' => $jsonKey['subject_token_type'], 'subjectTokenFetcher' => self::buildCredentialSource($jsonKey), 'additionalOptions' => $this->workforcePoolUserProject ? ['userProject' => $this->workforcePoolUserProject] : []]); if (!$this->isWorkforcePool() && $this->workforcePoolUserProject) { throw new InvalidArgumentException('workforce_pool_user_project should not be set for non-workforce pool credentials.'); } } /** * @param array<mixed> $jsonKey */ private static function buildCredentialSource(array $jsonKey) : ExternalAccountCredentialSourceInterface { $credentialSource = $jsonKey['credential_source']; if (isset($credentialSource['file'])) { return new FileSource($credentialSource['file'], $credentialSource['format']['type'] ?? null, $credentialSource['format']['subject_token_field_name'] ?? null); } if (isset($credentialSource['environment_id']) && 1 === \preg_match('/^aws(\\d+)$/', $credentialSource['environment_id'], $matches)) { if ($matches[1] !== '1') { throw new InvalidArgumentException("aws version \"{$matches[1]}\" is not supported in the current build."); } if (!\array_key_exists('regional_cred_verification_url', $credentialSource)) { throw new InvalidArgumentException('The regional_cred_verification_url field is required for aws1 credential source.'); } if (!\array_key_exists('audience', $jsonKey)) { throw new InvalidArgumentException('aws1 credential source requires an audience to be set in the JSON file.'); } return new AwsNativeSource( $jsonKey['audience'], $credentialSource['regional_cred_verification_url'], // $regionalCredVerificationUrl $credentialSource['region_url'] ?? null, // $regionUrl $credentialSource['url'] ?? null, // $securityCredentialsUrl $credentialSource['imdsv2_session_token_url'] ?? null ); } if (isset($credentialSource['url'])) { return new UrlSource($credentialSource['url'], $credentialSource['format']['type'] ?? null, $credentialSource['format']['subject_token_field_name'] ?? null, $credentialSource['headers'] ?? null); } throw new InvalidArgumentException('Unable to determine credential source from json key.'); } /** * @param string $stsToken * @param callable $httpHandler * * @return array<mixed> { * A set of auth related metadata, containing the following * * @type string $access_token * @type int $expires_at * } */ private function getImpersonatedAccessToken(string $stsToken, ?callable $httpHandler = null) : array { if (!isset($this->serviceAccountImpersonationUrl)) { throw new InvalidArgumentException('service_account_impersonation_url must be set in JSON credentials.'); } $request = new Request('POST', $this->serviceAccountImpersonationUrl, ['Content-Type' => 'application/json', 'Authorization' => 'Bearer ' . $stsToken], (string) \json_encode(['lifetime' => \sprintf('%ss', OAuth2::DEFAULT_EXPIRY_SECONDS), 'scope' => \explode(' ', $this->auth->getScope())])); if (\is_null($httpHandler)) { $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient()); } $response = $httpHandler($request); $body = \json_decode((string) $response->getBody(), \true); return ['access_token' => $body['accessToken'], 'expires_at' => \strtotime($body['expireTime'])]; } /** * @param callable $httpHandler * * @return array<mixed> { * A set of auth related metadata, containing the following * * @type string $access_token * @type int $expires_at (impersonated service accounts only) * @type int $expires_in (identity pool only) * @type string $issued_token_type (identity pool only) * @type string $token_type (identity pool only) * } */ public function fetchAuthToken(?callable $httpHandler = null) { $stsToken = $this->auth->fetchAuthToken($httpHandler); if (isset($this->serviceAccountImpersonationUrl)) { return $this->getImpersonatedAccessToken($stsToken['access_token'], $httpHandler); } return $stsToken; } public function getCacheKey() { return $this->auth->getCacheKey(); } public function getLastReceivedToken() { return $this->auth->getLastReceivedToken(); } /** * Get the quota project used for this API request * * @return string|null */ public function getQuotaProject() { return $this->quotaProject; } /** * Get the universe domain used for this API request * * @return string */ public function getUniverseDomain() : string { return $this->universeDomain; } /** * Get the project ID. * * @param callable $httpHandler Callback which delivers psr7 request * @param string $accessToken The access token to use to sign the blob. If * provided, saves a call to the metadata server for a new access * token. **Defaults to** `null`. * @return string|null */ public function getProjectId(?callable $httpHandler = null, ?string $accessToken = null) { if (isset($this->projectId)) { return $this->projectId; } $projectNumber = $this->getProjectNumber() ?: $this->workforcePoolUserProject; if (!$projectNumber) { return null; } if (\is_null($httpHandler)) { $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient()); } $url = \str_replace('UNIVERSE_DOMAIN', $this->getUniverseDomain(), \sprintf(self::CLOUD_RESOURCE_MANAGER_URL, $projectNumber)); if (\is_null($accessToken)) { $accessToken = $this->fetchAuthToken($httpHandler)['access_token']; } $request = new Request('GET', $url, ['authorization' => 'Bearer ' . $accessToken]); $response = $httpHandler($request); $body = \json_decode((string) $response->getBody(), \true); return $this->projectId = $body['projectId']; } private function getProjectNumber() : ?string { $parts = \explode('/', $this->auth->getAudience()); $i = \array_search('projects', $parts); return $parts[$i + 1] ?? null; } private function isWorkforcePool() : bool { $regex = '#//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/#'; return \preg_match($regex, $this->auth->getAudience()) === 1; } } vendor_prefixed/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php 0000644 00000014032 15174671617 0024622 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Google\Auth\OAuth2; use WPMailSMTP\Vendor\Google\Auth\ProjectIdProviderInterface; use WPMailSMTP\Vendor\Google\Auth\ServiceAccountSignerTrait; use WPMailSMTP\Vendor\Google\Auth\SignBlobInterface; /** * Authenticates requests using Google's Service Account credentials via * JWT Access. * * This class allows authorizing requests for service accounts directly * from credentials from a json key file downloaded from the developer * console (via 'Generate new Json Key'). It is not part of any OAuth2 * flow, rather it creates a JWT and sends that as a credential. */ class ServiceAccountJwtAccessCredentials extends CredentialsLoader implements GetQuotaProjectInterface, SignBlobInterface, ProjectIdProviderInterface { use ServiceAccountSignerTrait; /** * The OAuth2 instance used to conduct authorization. * * @var OAuth2 */ protected $auth; /** * The quota project associated with the JSON credentials * * @var string */ protected $quotaProject; /** * @var string */ public $projectId; /** * Create a new ServiceAccountJwtAccessCredentials. * * @param string|array<mixed> $jsonKey JSON credential file path or JSON credentials * as an associative array * @param string|string[] $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. */ public function __construct($jsonKey, $scope = null) { if (\is_string($jsonKey)) { if (!\file_exists($jsonKey)) { throw new \InvalidArgumentException('file does not exist'); } $jsonKeyStream = \file_get_contents($jsonKey); if (!($jsonKey = \json_decode((string) $jsonKeyStream, \true))) { throw new \LogicException('invalid json for auth config'); } } if (!\array_key_exists('client_email', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the client_email field'); } if (!\array_key_exists('private_key', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the private_key field'); } if (\array_key_exists('quota_project_id', $jsonKey)) { $this->quotaProject = (string) $jsonKey['quota_project_id']; } $this->auth = new OAuth2(['issuer' => $jsonKey['client_email'], 'sub' => $jsonKey['client_email'], 'signingAlgorithm' => 'RS256', 'signingKey' => $jsonKey['private_key'], 'scope' => $scope]); $this->projectId = $jsonKey['project_id'] ?? null; } /** * Updates metadata with the authorization token. * * @param array<mixed> $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> updated metadata hashmap */ public function updateMetadata($metadata, $authUri = null, ?callable $httpHandler = null) { $scope = $this->auth->getScope(); if (empty($authUri) && empty($scope)) { return $metadata; } $this->auth->setAudience($authUri); return parent::updateMetadata($metadata, $authUri, $httpHandler); } /** * Implements FetchAuthTokenInterface#fetchAuthToken. * * @param callable $httpHandler * * @return null|array{access_token:string} A set of auth related metadata */ public function fetchAuthToken(?callable $httpHandler = null) { $audience = $this->auth->getAudience(); $scope = $this->auth->getScope(); if (empty($audience) && empty($scope)) { return null; } if (!empty($audience) && !empty($scope)) { throw new \UnexpectedValueException('Cannot sign both audience and scope in JwtAccess'); } $access_token = $this->auth->toJwt(); // Set the self-signed access token in OAuth2 for getLastReceivedToken $this->auth->setAccessToken($access_token); return ['access_token' => $access_token, 'expires_in' => $this->auth->getExpiry(), 'token_type' => 'Bearer']; } /** * @return string */ public function getCacheKey() { return $this->auth->getCacheKey(); } /** * @return array<mixed> */ public function getLastReceivedToken() { return $this->auth->getLastReceivedToken(); } /** * Get the project ID from the service account keyfile. * * Returns null if the project ID does not exist in the keyfile. * * @param callable $httpHandler Not used by this credentials type. * @return string|null */ public function getProjectId(?callable $httpHandler = null) { return $this->projectId; } /** * Get the client name from the keyfile. * * In this case, it returns the keyfile's client_email key. * * @param callable $httpHandler Not used by this credentials type. * @return string */ public function getClientName(?callable $httpHandler = null) { return $this->auth->getIssuer(); } /** * Get the quota project used for this API request * * @return string|null */ public function getQuotaProject() { return $this->quotaProject; } } vendor_prefixed/google/auth/src/Credentials/AppIdentityCredentials.php 0000644 00000015540 15174671617 0022335 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; /* * The AppIdentityService class is automatically defined on App Engine, * so including this dependency is not necessary, and will result in a * PHP fatal error in the App Engine environment. */ use WPMailSMTP\Vendor\google\appengine\api\app_identity\AppIdentityService; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\ProjectIdProviderInterface; use WPMailSMTP\Vendor\Google\Auth\SignBlobInterface; /** * @deprecated * * AppIdentityCredentials supports authorization on Google App Engine. * * It can be used to authorize requests using the AuthTokenMiddleware or * AuthTokenSubscriber, but will only succeed if being run on App Engine: * * Example: * ``` * use Google\Auth\Credentials\AppIdentityCredentials; * use Google\Auth\Middleware\AuthTokenMiddleware; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $gae = new AppIdentityCredentials('https://www.googleapis.com/auth/books'); * $middleware = new AuthTokenMiddleware($gae); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/books/v1', * 'auth' => 'google_auth' * ]); * * $res = $client->get('volumes?q=Henry+David+Thoreau&country=US'); * ``` */ class AppIdentityCredentials extends CredentialsLoader implements SignBlobInterface, ProjectIdProviderInterface { /** * Result of fetchAuthToken. * * @var array<mixed> */ protected $lastReceivedToken; /** * Array of OAuth2 scopes to be requested. * * @var string[] */ private $scope; /** * @var string */ private $clientName; /** * @param string|string[] $scope One or more scopes. */ public function __construct($scope = []) { $this->scope = \is_array($scope) ? $scope : \explode(' ', (string) $scope); } /** * Determines if this an App Engine instance, by accessing the * SERVER_SOFTWARE environment variable (prod) or the APPENGINE_RUNTIME * environment variable (dev). * * @return bool true if this an App Engine Instance, false otherwise */ public static function onAppEngine() { $appEngineProduction = isset($_SERVER['SERVER_SOFTWARE']) && 0 === \strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine'); if ($appEngineProduction) { return \true; } $appEngineDevAppServer = isset($_SERVER['APPENGINE_RUNTIME']) && $_SERVER['APPENGINE_RUNTIME'] == 'php'; if ($appEngineDevAppServer) { return \true; } return \false; } /** * Implements FetchAuthTokenInterface#fetchAuthToken. * * Fetches the auth tokens using the AppIdentityService if available. * As the AppIdentityService uses protobufs to fetch the access token, * the GuzzleHttp\ClientInterface instance passed in will not be used. * * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> { * A set of auth related metadata, containing the following * * @type string $access_token * @type string $expiration_time * } */ public function fetchAuthToken(?callable $httpHandler = null) { try { $this->checkAppEngineContext(); } catch (\Exception $e) { return []; } /** @phpstan-ignore-next-line */ $token = AppIdentityService::getAccessToken($this->scope); $this->lastReceivedToken = $token; return $token; } /** * Sign a string using AppIdentityService. * * @param string $stringToSign The string to sign. * @param bool $forceOpenSsl [optional] Does not apply to this credentials * type. * @return string The signature, base64-encoded. * @throws \Exception If AppEngine SDK or mock is not available. */ public function signBlob($stringToSign, $forceOpenSsl = \false) { $this->checkAppEngineContext(); /** @phpstan-ignore-next-line */ return \base64_encode(AppIdentityService::signForApp($stringToSign)['signature']); } /** * Get the project ID from AppIdentityService. * * Returns null if AppIdentityService is unavailable. * * @param callable $httpHandler Not used by this type. * @return string|null */ public function getProjectId(?callable $httpHandler = null) { try { $this->checkAppEngineContext(); } catch (\Exception $e) { return null; } /** @phpstan-ignore-next-line */ return AppIdentityService::getApplicationId(); } /** * Get the client name from AppIdentityService. * * Subsequent calls to this method will return a cached value. * * @param callable $httpHandler Not used in this implementation. * @return string * @throws \Exception If AppEngine SDK or mock is not available. */ public function getClientName(?callable $httpHandler = null) { $this->checkAppEngineContext(); if (!$this->clientName) { /** @phpstan-ignore-next-line */ $this->clientName = AppIdentityService::getServiceAccountName(); } return $this->clientName; } /** * @return array{access_token:string,expires_at:int}|null */ public function getLastReceivedToken() { if ($this->lastReceivedToken) { return ['access_token' => $this->lastReceivedToken['access_token'], 'expires_at' => $this->lastReceivedToken['expiration_time']]; } return null; } /** * Caching is handled by the underlying AppIdentityService, return empty string * to prevent caching. * * @return string */ public function getCacheKey() { return ''; } /** * @return void */ private function checkAppEngineContext() { if (!self::onAppEngine() || !\class_exists('WPMailSMTP\\Vendor\\google\\appengine\\api\\app_identity\\AppIdentityService')) { throw new \Exception('This class must be run in App Engine, or you must include the AppIdentityService ' . 'mock class defined in tests/mocks/AppIdentityService.php'); } } } vendor_prefixed/google/auth/src/Credentials/GCECredentials.php 0000644 00000043445 15174671617 0020506 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpClientCache; use WPMailSMTP\Vendor\Google\Auth\HttpHandler\HttpHandlerFactory; use WPMailSMTP\Vendor\Google\Auth\Iam; use WPMailSMTP\Vendor\Google\Auth\IamSignerTrait; use WPMailSMTP\Vendor\Google\Auth\ProjectIdProviderInterface; use WPMailSMTP\Vendor\Google\Auth\SignBlobInterface; use WPMailSMTP\Vendor\GuzzleHttp\Exception\ClientException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\ConnectException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\RequestException; use WPMailSMTP\Vendor\GuzzleHttp\Exception\ServerException; use WPMailSMTP\Vendor\GuzzleHttp\Psr7\Request; use InvalidArgumentException; /** * GCECredentials supports authorization on Google Compute Engine. * * It can be used to authorize requests using the AuthTokenMiddleware, but will * only succeed if being run on GCE: * * use Google\Auth\Credentials\GCECredentials; * use Google\Auth\Middleware\AuthTokenMiddleware; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $gce = new GCECredentials(); * $middleware = new AuthTokenMiddleware($gce); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', * 'auth' => 'google_auth' * ]); * * $res = $client->get('myproject/taskqueues/myqueue'); */ class GCECredentials extends CredentialsLoader implements SignBlobInterface, ProjectIdProviderInterface, GetQuotaProjectInterface { use IamSignerTrait; // phpcs:disable const cacheKey = 'GOOGLE_AUTH_PHP_GCE'; // phpcs:enable /** * The metadata IP address on appengine instances. * * The IP is used instead of the domain 'metadata' to avoid slow responses * when not on Compute Engine. */ const METADATA_IP = '169.254.169.254'; /** * The metadata path of the default token. */ const TOKEN_URI_PATH = 'v1/instance/service-accounts/default/token'; /** * The metadata path of the default id token. */ const ID_TOKEN_URI_PATH = 'v1/instance/service-accounts/default/identity'; /** * The metadata path of the client ID. */ const CLIENT_ID_URI_PATH = 'v1/instance/service-accounts/default/email'; /** * The metadata path of the project ID. */ const PROJECT_ID_URI_PATH = 'v1/project/project-id'; /** * The metadata path of the project ID. */ const UNIVERSE_DOMAIN_URI_PATH = 'v1/universe/universe_domain'; /** * The header whose presence indicates GCE presence. */ const FLAVOR_HEADER = 'Metadata-Flavor'; /** * The Linux file which contains the product name. */ private const GKE_PRODUCT_NAME_FILE = '/sys/class/dmi/id/product_name'; /** * Note: the explicit `timeout` and `tries` below is a workaround. The underlying * issue is that resolving an unknown host on some networks will take * 20-30 seconds; making this timeout short fixes the issue, but * could lead to false negatives in the event that we are on GCE, but * the metadata resolution was particularly slow. The latter case is * "unlikely" since the expected 4-nines time is about 0.5 seconds. * This allows us to limit the total ping maximum timeout to 1.5 seconds * for developer desktop scenarios. */ const MAX_COMPUTE_PING_TRIES = 3; const COMPUTE_PING_CONNECTION_TIMEOUT_S = 0.5; /** * Flag used to ensure that the onGCE test is only done once;. * * @var bool */ private $hasCheckedOnGce = \false; /** * Flag that stores the value of the onGCE check. * * @var bool */ private $isOnGce = \false; /** * Result of fetchAuthToken. * * @var array<mixed> */ protected $lastReceivedToken; /** * @var string|null */ private $clientName; /** * @var string|null */ private $projectId; /** * @var string */ private $tokenUri; /** * @var string */ private $targetAudience; /** * @var string|null */ private $quotaProject; /** * @var string|null */ private $serviceAccountIdentity; /** * @var string */ private ?string $universeDomain; /** * @param Iam $iam [optional] An IAM instance. * @param string|string[] $scope [optional] the scope of the access request, * expressed either as an array or as a space-delimited string. * @param string $targetAudience [optional] The audience for the ID token. * @param string $quotaProject [optional] Specifies a project to bill for access * charges associated with the request. * @param string $serviceAccountIdentity [optional] Specify a service * account identity name to use instead of "default". * @param string $universeDomain [optional] Specify a universe domain to use * instead of fetching one from the metadata server. */ public function __construct(?Iam $iam = null, $scope = null, $targetAudience = null, $quotaProject = null, $serviceAccountIdentity = null, ?string $universeDomain = null) { $this->iam = $iam; if ($scope && $targetAudience) { throw new InvalidArgumentException('Scope and targetAudience cannot both be supplied'); } $tokenUri = self::getTokenUri($serviceAccountIdentity); if ($scope) { if (\is_string($scope)) { $scope = \explode(' ', $scope); } $scope = \implode(',', $scope); $tokenUri = $tokenUri . '?scopes=' . $scope; } elseif ($targetAudience) { $tokenUri = self::getIdTokenUri($serviceAccountIdentity); $tokenUri = $tokenUri . '?audience=' . $targetAudience; $this->targetAudience = $targetAudience; } $this->tokenUri = $tokenUri; $this->quotaProject = $quotaProject; $this->serviceAccountIdentity = $serviceAccountIdentity; $this->universeDomain = $universeDomain; } /** * The full uri for accessing the default token. * * @param string $serviceAccountIdentity [optional] Specify a service * account identity name to use instead of "default". * @return string */ public static function getTokenUri($serviceAccountIdentity = null) { $base = 'http://' . self::METADATA_IP . '/computeMetadata/'; $base .= self::TOKEN_URI_PATH; if ($serviceAccountIdentity) { return \str_replace('/default/', '/' . $serviceAccountIdentity . '/', $base); } return $base; } /** * The full uri for accessing the default service account. * * @param string $serviceAccountIdentity [optional] Specify a service * account identity name to use instead of "default". * @return string */ public static function getClientNameUri($serviceAccountIdentity = null) { $base = 'http://' . self::METADATA_IP . '/computeMetadata/'; $base .= self::CLIENT_ID_URI_PATH; if ($serviceAccountIdentity) { return \str_replace('/default/', '/' . $serviceAccountIdentity . '/', $base); } return $base; } /** * The full uri for accesesing the default identity token. * * @param string $serviceAccountIdentity [optional] Specify a service * account identity name to use instead of "default". * @return string */ private static function getIdTokenUri($serviceAccountIdentity = null) { $base = 'http://' . self::METADATA_IP . '/computeMetadata/'; $base .= self::ID_TOKEN_URI_PATH; if ($serviceAccountIdentity) { return \str_replace('/default/', '/' . $serviceAccountIdentity . '/', $base); } return $base; } /** * The full uri for accessing the default project ID. * * @return string */ private static function getProjectIdUri() { $base = 'http://' . self::METADATA_IP . '/computeMetadata/'; return $base . self::PROJECT_ID_URI_PATH; } /** * The full uri for accessing the default universe domain. * * @return string */ private static function getUniverseDomainUri() { $base = 'http://' . self::METADATA_IP . '/computeMetadata/'; return $base . self::UNIVERSE_DOMAIN_URI_PATH; } /** * Determines if this an App Engine Flexible instance, by accessing the * GAE_INSTANCE environment variable. * * @return bool true if this an App Engine Flexible Instance, false otherwise */ public static function onAppEngineFlexible() { return \substr((string) \getenv('GAE_INSTANCE'), 0, 4) === 'aef-'; } /** * Determines if this a GCE instance, by accessing the expected metadata * host. * If $httpHandler is not specified a the default HttpHandler is used. * * @param callable $httpHandler callback which delivers psr7 request * @return bool True if this a GCEInstance, false otherwise */ public static function onGce(?callable $httpHandler = null) { $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); $checkUri = 'http://' . self::METADATA_IP; for ($i = 1; $i <= self::MAX_COMPUTE_PING_TRIES; $i++) { try { // Comment from: oauth2client/client.py // // Note: the explicit `timeout` below is a workaround. The underlying // issue is that resolving an unknown host on some networks will take // 20-30 seconds; making this timeout short fixes the issue, but // could lead to false negatives in the event that we are on GCE, but // the metadata resolution was particularly slow. The latter case is // "unlikely". $resp = $httpHandler(new Request('GET', $checkUri, [self::FLAVOR_HEADER => 'Google']), ['timeout' => self::COMPUTE_PING_CONNECTION_TIMEOUT_S]); return $resp->getHeaderLine(self::FLAVOR_HEADER) == 'Google'; } catch (ClientException $e) { } catch (ServerException $e) { } catch (RequestException $e) { } catch (ConnectException $e) { } } if (\PHP_OS === 'Windows') { // @TODO: implement GCE residency detection on Windows return \false; } // Detect GCE residency on Linux return self::detectResidencyLinux(self::GKE_PRODUCT_NAME_FILE); } private static function detectResidencyLinux(string $productNameFile) : bool { if (\file_exists($productNameFile)) { $productName = \trim((string) \file_get_contents($productNameFile)); return 0 === \strpos($productName, 'Google'); } return \false; } /** * Implements FetchAuthTokenInterface#fetchAuthToken. * * Fetches the auth tokens from the GCE metadata host if it is available. * If $httpHandler is not specified a the default HttpHandler is used. * * @param callable $httpHandler callback which delivers psr7 request * * @return array<mixed> { * A set of auth related metadata, based on the token type. * * @type string $access_token for access tokens * @type int $expires_in for access tokens * @type string $token_type for access tokens * @type string $id_token for ID tokens * } * @throws \Exception */ public function fetchAuthToken(?callable $httpHandler = null) { $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); if (!$this->hasCheckedOnGce) { $this->isOnGce = self::onGce($httpHandler); $this->hasCheckedOnGce = \true; } if (!$this->isOnGce) { return []; // return an empty array with no access token } $response = $this->getFromMetadata($httpHandler, $this->tokenUri); if ($this->targetAudience) { return $this->lastReceivedToken = ['id_token' => $response]; } if (null === ($json = \json_decode($response, \true))) { throw new \Exception('Invalid JSON response'); } $json['expires_at'] = \time() + $json['expires_in']; // store this so we can retrieve it later $this->lastReceivedToken = $json; return $json; } /** * @return string */ public function getCacheKey() { return self::cacheKey; } /** * @return array<mixed>|null */ public function getLastReceivedToken() { if ($this->lastReceivedToken) { if (\array_key_exists('id_token', $this->lastReceivedToken)) { return $this->lastReceivedToken; } return ['access_token' => $this->lastReceivedToken['access_token'], 'expires_at' => $this->lastReceivedToken['expires_at']]; } return null; } /** * Get the client name from GCE metadata. * * Subsequent calls will return a cached value. * * @param callable $httpHandler callback which delivers psr7 request * @return string */ public function getClientName(?callable $httpHandler = null) { if ($this->clientName) { return $this->clientName; } $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); if (!$this->hasCheckedOnGce) { $this->isOnGce = self::onGce($httpHandler); $this->hasCheckedOnGce = \true; } if (!$this->isOnGce) { return ''; } $this->clientName = $this->getFromMetadata($httpHandler, self::getClientNameUri($this->serviceAccountIdentity)); return $this->clientName; } /** * Fetch the default Project ID from compute engine. * * Returns null if called outside GCE. * * @param callable $httpHandler Callback which delivers psr7 request * @return string|null */ public function getProjectId(?callable $httpHandler = null) { if ($this->projectId) { return $this->projectId; } $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); if (!$this->hasCheckedOnGce) { $this->isOnGce = self::onGce($httpHandler); $this->hasCheckedOnGce = \true; } if (!$this->isOnGce) { return null; } $this->projectId = $this->getFromMetadata($httpHandler, self::getProjectIdUri()); return $this->projectId; } /** * Fetch the default universe domain from the metadata server. * * @param callable $httpHandler Callback which delivers psr7 request * @return string */ public function getUniverseDomain(?callable $httpHandler = null) : string { if (null !== $this->universeDomain) { return $this->universeDomain; } $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient()); if (!$this->hasCheckedOnGce) { $this->isOnGce = self::onGce($httpHandler); $this->hasCheckedOnGce = \true; } try { $this->universeDomain = $this->getFromMetadata($httpHandler, self::getUniverseDomainUri()); } catch (ClientException $e) { // If the metadata server exists, but returns a 404 for the universe domain, the auth // libraries should safely assume this is an older metadata server running in GCU, and // should return the default universe domain. if (!$e->hasResponse() || 404 != $e->getResponse()->getStatusCode()) { throw $e; } $this->universeDomain = self::DEFAULT_UNIVERSE_DOMAIN; } // We expect in some cases the metadata server will return an empty string for the universe // domain. In this case, the auth library MUST return the default universe domain. if ('' === $this->universeDomain) { $this->universeDomain = self::DEFAULT_UNIVERSE_DOMAIN; } return $this->universeDomain; } /** * Fetch the value of a GCE metadata server URI. * * @param callable $httpHandler An HTTP Handler to deliver PSR7 requests. * @param string $uri The metadata URI. * @return string */ private function getFromMetadata(callable $httpHandler, $uri) { $resp = $httpHandler(new Request('GET', $uri, [self::FLAVOR_HEADER => 'Google'])); return (string) $resp->getBody(); } /** * Get the quota project used for this API request * * @return string|null */ public function getQuotaProject() { return $this->quotaProject; } /** * Set whether or not we've already checked the GCE environment. * * @param bool $isOnGce * * @return void */ public function setIsOnGce($isOnGce) { // Implicitly set hasCheckedGce to true $this->hasCheckedOnGce = \true; // Set isOnGce $this->isOnGce = $isOnGce; } } vendor_prefixed/google/auth/src/Credentials/UserRefreshCredentials.php 0000644 00000010430 15174671617 0022331 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Google\Auth\OAuth2; /** * Authenticates requests using User Refresh credentials. * * This class allows authorizing requests from user refresh tokens. * * This the end of the result of a 3LO flow. E.g, the end result of * 'gcloud auth login' saves a file with these contents in well known * location * * @see [Application Default Credentials](http://goo.gl/mkAHpZ) */ class UserRefreshCredentials extends CredentialsLoader implements GetQuotaProjectInterface { /** * The OAuth2 instance used to conduct authorization. * * @var OAuth2 */ protected $auth; /** * The quota project associated with the JSON credentials * * @var string */ protected $quotaProject; /** * Create a new UserRefreshCredentials. * * @param string|string[] $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. * @param string|array<mixed> $jsonKey JSON credential file path or JSON credentials * as an associative array */ public function __construct($scope, $jsonKey) { if (\is_string($jsonKey)) { if (!\file_exists($jsonKey)) { throw new \InvalidArgumentException('file does not exist'); } $json = \file_get_contents($jsonKey); if (!($jsonKey = \json_decode((string) $json, \true))) { throw new \LogicException('invalid json for auth config'); } } if (!\array_key_exists('client_id', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the client_id field'); } if (!\array_key_exists('client_secret', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the client_secret field'); } if (!\array_key_exists('refresh_token', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the refresh_token field'); } $this->auth = new OAuth2(['clientId' => $jsonKey['client_id'], 'clientSecret' => $jsonKey['client_secret'], 'refresh_token' => $jsonKey['refresh_token'], 'scope' => $scope, 'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI]); if (\array_key_exists('quota_project_id', $jsonKey)) { $this->quotaProject = (string) $jsonKey['quota_project_id']; } } /** * @param callable $httpHandler * * @return array<mixed> { * A set of auth related metadata, containing the following * * @type string $access_token * @type int $expires_in * @type string $scope * @type string $token_type * @type string $id_token * } */ public function fetchAuthToken(?callable $httpHandler = null) { return $this->auth->fetchAuthToken($httpHandler); } /** * @return string */ public function getCacheKey() { return $this->auth->getClientId() . ':' . $this->auth->getCacheKey(); } /** * @return array<mixed> */ public function getLastReceivedToken() { return $this->auth->getLastReceivedToken(); } /** * Get the quota project used for this API request * * @return string|null */ public function getQuotaProject() { return $this->quotaProject; } /** * Get the granted scopes (if they exist) for the last fetched token. * * @return string|null */ public function getGrantedScope() { return $this->auth->getGrantedScope(); } } vendor_prefixed/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php 0000644 00000010633 15174671617 0025371 0 ustar 00 <?php /* * Copyright 2022 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\IamSignerTrait; use WPMailSMTP\Vendor\Google\Auth\SignBlobInterface; class ImpersonatedServiceAccountCredentials extends CredentialsLoader implements SignBlobInterface { use IamSignerTrait; /** * @var string */ protected $impersonatedServiceAccountName; /** * @var UserRefreshCredentials */ protected $sourceCredentials; /** * Instantiate an instance of ImpersonatedServiceAccountCredentials from a credentials file that * has be created with the --impersonated-service-account flag. * * @param string|string[] $scope The scope of the access request, expressed either as an * array or as a space-delimited string. * @param string|array<mixed> $jsonKey JSON credential file path or JSON credentials * as an associative array. */ public function __construct($scope, $jsonKey) { if (\is_string($jsonKey)) { if (!\file_exists($jsonKey)) { throw new \InvalidArgumentException('file does not exist'); } $json = \file_get_contents($jsonKey); if (!($jsonKey = \json_decode((string) $json, \true))) { throw new \LogicException('invalid json for auth config'); } } if (!\array_key_exists('service_account_impersonation_url', $jsonKey)) { throw new \LogicException('json key is missing the service_account_impersonation_url field'); } if (!\array_key_exists('source_credentials', $jsonKey)) { throw new \LogicException('json key is missing the source_credentials field'); } $this->impersonatedServiceAccountName = $this->getImpersonatedServiceAccountNameFromUrl($jsonKey['service_account_impersonation_url']); $this->sourceCredentials = new UserRefreshCredentials($scope, $jsonKey['source_credentials']); } /** * Helper function for extracting the Server Account Name from the URL saved in the account * credentials file. * * @param $serviceAccountImpersonationUrl string URL from "service_account_impersonation_url" * @return string Service account email or ID. */ private function getImpersonatedServiceAccountNameFromUrl(string $serviceAccountImpersonationUrl) : string { $fields = \explode('/', $serviceAccountImpersonationUrl); $lastField = \end($fields); $splitter = \explode(':', $lastField); return $splitter[0]; } /** * Get the client name from the keyfile * * In this implementation, it will return the issuers email from the oauth token. * * @param callable|null $unusedHttpHandler not used by this credentials type. * @return string Token issuer email */ public function getClientName(?callable $unusedHttpHandler = null) { return $this->impersonatedServiceAccountName; } /** * @param callable $httpHandler * * @return array<mixed> { * A set of auth related metadata, containing the following * * @type string $access_token * @type int $expires_in * @type string $scope * @type string $token_type * @type string $id_token * } */ public function fetchAuthToken(?callable $httpHandler = null) { return $this->sourceCredentials->fetchAuthToken($httpHandler); } /** * @return string */ public function getCacheKey() { return $this->sourceCredentials->getCacheKey(); } /** * @return array<mixed> */ public function getLastReceivedToken() { return $this->sourceCredentials->getLastReceivedToken(); } } vendor_prefixed/google/auth/src/Credentials/InsecureCredentials.php 0000644 00000003502 15174671617 0021653 0 ustar 00 <?php /* * Copyright 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\FetchAuthTokenInterface; /** * Provides a set of credentials that will always return an empty access token. * This is useful for APIs which do not require authentication, for local * service emulators, and for testing. */ class InsecureCredentials implements FetchAuthTokenInterface { /** * @var array{access_token:string} */ private $token = ['access_token' => '']; /** * Fetches the auth token. In this case it returns an empty string. * * @param callable $httpHandler * @return array{access_token:string} A set of auth related metadata */ public function fetchAuthToken(?callable $httpHandler = null) { return $this->token; } /** * Returns the cache key. In this case it returns a null value, disabling * caching. * * @return string|null */ public function getCacheKey() { return null; } /** * Fetches the last received token. In this case, it returns the same empty string * auth token. * * @return array{access_token:string} */ public function getLastReceivedToken() { return $this->token; } } vendor_prefixed/google/auth/src/Credentials/ServiceAccountCredentials.php 0000644 00000026534 15174671617 0023025 0 ustar 00 <?php /* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace WPMailSMTP\Vendor\Google\Auth\Credentials; use WPMailSMTP\Vendor\Google\Auth\CredentialsLoader; use WPMailSMTP\Vendor\Google\Auth\GetQuotaProjectInterface; use WPMailSMTP\Vendor\Google\Auth\OAuth2; use WPMailSMTP\Vendor\Google\Auth\ProjectIdProviderInterface; use WPMailSMTP\Vendor\Google\Auth\ServiceAccountSignerTrait; use WPMailSMTP\Vendor\Google\Auth\SignBlobInterface; use InvalidArgumentException; /** * ServiceAccountCredentials supports authorization using a Google service * account. * * (cf https://developers.google.com/accounts/docs/OAuth2ServiceAccount) * * It's initialized using the json key file that's downloadable from developer * console, which should contain a private_key and client_email fields that it * uses. * * Use it with AuthTokenMiddleware to authorize http requests: * * use Google\Auth\Credentials\ServiceAccountCredentials; * use Google\Auth\Middleware\AuthTokenMiddleware; * use GuzzleHttp\Client; * use GuzzleHttp\HandlerStack; * * $sa = new ServiceAccountCredentials( * 'https://www.googleapis.com/auth/taskqueue', * '/path/to/your/json/key_file.json' * ); * $middleware = new AuthTokenMiddleware($sa); * $stack = HandlerStack::create(); * $stack->push($middleware); * * $client = new Client([ * 'handler' => $stack, * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/', * 'auth' => 'google_auth' // authorize all requests * ]); * * $res = $client->get('myproject/taskqueues/myqueue'); */ class ServiceAccountCredentials extends CredentialsLoader implements GetQuotaProjectInterface, SignBlobInterface, ProjectIdProviderInterface { use ServiceAccountSignerTrait; /** * The OAuth2 instance used to conduct authorization. * * @var OAuth2 */ protected $auth; /** * The quota project associated with the JSON credentials * * @var string */ protected $quotaProject; /** * @var string|null */ protected $projectId; /** * @var array<mixed>|null */ private $lastReceivedJwtAccessToken; /** * @var bool */ private $useJwtAccessWithScope = \false; /** * @var ServiceAccountJwtAccessCredentials|null */ private $jwtAccessCredentials; /** * @var string */ private string $universeDomain; /** * Create a new ServiceAccountCredentials. * * @param string|string[]|null $scope the scope of the access request, expressed * either as an Array or as a space-delimited String. * @param string|array<mixed> $jsonKey JSON credential file path or JSON credentials * as an associative array * @param string $sub an email address account to impersonate, in situations when * the service account has been delegated domain wide access. * @param string $targetAudience The audience for the ID token. */ public function __construct($scope, $jsonKey, $sub = null, $targetAudience = null) { if (\is_string($jsonKey)) { if (!\file_exists($jsonKey)) { throw new \InvalidArgumentException('file does not exist'); } $jsonKeyStream = \file_get_contents($jsonKey); if (!($jsonKey = \json_decode((string) $jsonKeyStream, \true))) { throw new \LogicException('invalid json for auth config'); } } if (!\array_key_exists('client_email', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the client_email field'); } if (!\array_key_exists('private_key', $jsonKey)) { throw new \InvalidArgumentException('json key is missing the private_key field'); } if (\array_key_exists('quota_project_id', $jsonKey)) { $this->quotaProject = (string) $jsonKey['quota_project_id']; } if ($scope && $targetAudience) { throw new InvalidArgumentException('Scope and targetAudience cannot both be supplied'); } $additionalClaims = []; if ($targetAudience) { $additionalClaims = ['target_audience' => $targetAudience]; } $this->auth = new OAuth2(['audience' => self::TOKEN_CREDENTIAL_URI, 'issuer' => $jsonKey['client_email'], 'scope' => $scope, 'signingAlgorithm' => 'RS256', 'signingKey' => $jsonKey['private_key'], 'sub' => $sub, 'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI, 'additionalClaims' => $additionalClaims]); $this->projectId = $jsonKey['project_id'] ?? null; $this->universeDomain = $jsonKey['universe_domain'] ?? self::DEFAULT_UNIVERSE_DOMAIN; } /** * When called, the ServiceAccountCredentials will use an instance of * ServiceAccountJwtAccessCredentials to fetch (self-sign) an access token * even when only scopes are supplied. Otherwise, * ServiceAccountJwtAccessCredentials is only called when no scopes and an * authUrl (audience) is suppled. * * @return void */ public function useJwtAccessWithScope() { $this->useJwtAccessWithScope = \true; } /** * @param callable $httpHandler * * @return array<mixed> { * A set of auth related metadata, containing the following * * @type string $access_token * @type int $expires_in * @type string $token_type * } */ public function fetchAuthToken(?callable $httpHandler = null) { if ($this->useSelfSignedJwt()) { $jwtCreds = $this->createJwtAccessCredentials(); $accessToken = $jwtCreds->fetchAuthToken($httpHandler); if ($lastReceivedToken = $jwtCreds->getLastReceivedToken()) { // Keep self-signed JWTs in memory as the last received token $this->lastReceivedJwtAccessToken = $lastReceivedToken; } return $accessToken; } return $this->auth->fetchAuthToken($httpHandler); } /** * @return string */ public function getCacheKey() { $key = $this->auth->getIssuer() . ':' . $this->auth->getCacheKey(); if ($sub = $this->auth->getSub()) { $key .= ':' . $sub; } return $key; } /** * @return array<mixed> */ public function getLastReceivedToken() { // If self-signed JWTs are being used, fetch the last received token // from memory. Else, fetch it from OAuth2 return $this->useSelfSignedJwt() ? $this->lastReceivedJwtAccessToken : $this->auth->getLastReceivedToken(); } /** * Get the project ID from the service account keyfile. * * Returns null if the project ID does not exist in the keyfile. * * @param callable $httpHandler Not used by this credentials type. * @return string|null */ public function getProjectId(?callable $httpHandler = null) { return $this->projectId; } /** * Updates metadata with the authorization token. * * @param array<mixed> $metadata metadata hashmap * @param string $authUri optional auth uri * @param callable $httpHandler callback which delivers psr7 request * @return array<mixed> updated metadata hashmap */ public function updateMetadata($metadata, $authUri = null, ?callable $httpHandler = null) { // scope exists. use oauth implementation if (!$this->useSelfSignedJwt()) { return parent::updateMetadata($metadata, $authUri, $httpHandler); } $jwtCreds = $this->createJwtAccessCredentials(); if ($this->auth->getScope()) { // Prefer user-provided "scope" to "audience" $updatedMetadata = $jwtCreds->updateMetadata($metadata, null, $httpHandler); } else { $updatedMetadata = $jwtCreds->updateMetadata($metadata, $authUri, $httpHandler); } if ($lastReceivedToken = $jwtCreds->getLastReceivedToken()) { // Keep self-signed JWTs in memory as the last received token $this->lastReceivedJwtAccessToken = $lastReceivedToken; } return $updatedMetadata; } /** * @return ServiceAccountJwtAccessCredentials */ private function createJwtAccessCredentials() { if (!$this->jwtAccessCredentials) { // Create credentials for self-signing a JWT (JwtAccess) $credJson = ['private_key' => $this->auth->getSigningKey(), 'client_email' => $this->auth->getIssuer()]; $this->jwtAccessCredentials = new ServiceAccountJwtAccessCredentials($credJson, $this->auth->getScope()); } return $this->jwtAccessCredentials; } /** * @param string $sub an email address account to impersonate, in situations when * the service account has been delegated domain wide access. * @return void */ public function setSub($sub) { $this->auth->setSub($sub); } /** * Get the client name from the keyfile. * * In this case, it returns the keyfile's client_email key. * * @param callable $httpHandler Not used by this credentials type. * @return string */ public function getClientName(?callable $httpHandler = null) { return $this->auth->getIssuer(); } /** * Get the quota project used for this API request * * @return string|null */ public function getQuotaProject() { return $this->quotaProject; } /** * Get the universe domain configured in the JSON credential. * * @return string */ public function getUniverseDomain() : string { return $this->universeDomain; } /** * @return bool */ private function useSelfSignedJwt() { // When a sub is supplied, the user is using domain-wide delegation, which not available // with self-signed JWTs if (null !== $this->auth->getSub()) { // If we are outside the GDU, we can't use domain-wide delegation if ($this->getUniverseDomain() !== self::DEFAULT_UNIVERSE_DOMAIN) { throw new \LogicException(\sprintf('Service Account subject is configured for the credential. Domain-wide ' . 'delegation is not supported in universes other than %s.', self::DEFAULT_UNIVERSE_DOMAIN)); } return \false; } // If claims are set, this call is for "id_tokens" if ($this->auth->getAdditionalClaims()) { return \false; } // When true, ServiceAccountCredentials will always use JwtAccess for access tokens if ($this->useJwtAccessWithScope) { return \true; } // If the universe domain is outside the GDU, use JwtAccess for access tokens if ($this->getUniverseDomain() !== self::DEFAULT_UNIVERSE_DOMAIN) { return \true; } return \is_null($this->auth->getScope()); } } vendor_prefixed/psr/http-message/LICENSE 0000644 00000002075 15174671617 0014164 0 ustar 00 Copyright (c) 2014 PHP Framework Interoperability Group 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_prefixed/psr/http-message/src/ServerRequestInterface.php 0000644 00000024113 15174671617 0021114 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * Representation of an incoming, server-side HTTP request. * * Per the HTTP specification, this interface includes properties for * each of the following: * * - Protocol version * - HTTP method * - URI * - Headers * - Message body * * Additionally, it encapsulates all data as it has arrived to the * application from the CGI and/or PHP environment, including: * * - The values represented in $_SERVER. * - Any cookies provided (generally via $_COOKIE) * - Query string arguments (generally via $_GET, or as parsed via parse_str()) * - Upload files, if any (as represented by $_FILES) * - Deserialized body parameters (generally from $_POST) * * $_SERVER values MUST be treated as immutable, as they represent application * state at the time of request; as such, no methods are provided to allow * modification of those values. The other values provide such methods, as they * can be restored from $_SERVER or the request body, and may need treatment * during the application (e.g., body parameters may be deserialized based on * content type). * * Additionally, this interface recognizes the utility of introspecting a * request to derive and match additional parameters (e.g., via URI path * matching, decrypting cookie values, deserializing non-form-encoded body * content, matching authorization headers to users, etc). These parameters * are stored in an "attributes" property. * * Requests are considered immutable; all methods that might change state MUST * be implemented such that they retain the internal state of the current * message and return an instance that contains the changed state. */ interface ServerRequestInterface extends RequestInterface { /** * Retrieve server parameters. * * Retrieves data related to the incoming request environment, * typically derived from PHP's $_SERVER superglobal. The data IS NOT * REQUIRED to originate from $_SERVER. * * @return array */ public function getServerParams() : array; /** * Retrieve cookies. * * Retrieves cookies sent by the client to the server. * * The data MUST be compatible with the structure of the $_COOKIE * superglobal. * * @return array */ public function getCookieParams() : array; /** * Return an instance with the specified cookies. * * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST * be compatible with the structure of $_COOKIE. Typically, this data will * be injected at instantiation. * * This method MUST NOT update the related Cookie header of the request * instance, nor related values in the server params. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated cookie values. * * @param array $cookies Array of key/value pairs representing cookies. * @return static */ public function withCookieParams(array $cookies) : ServerRequestInterface; /** * Retrieve query string arguments. * * Retrieves the deserialized query string arguments, if any. * * Note: the query params might not be in sync with the URI or server * params. If you need to ensure you are only getting the original * values, you may need to parse the query string from `getUri()->getQuery()` * or from the `QUERY_STRING` server param. * * @return array */ public function getQueryParams() : array; /** * Return an instance with the specified query string arguments. * * These values SHOULD remain immutable over the course of the incoming * request. They MAY be injected during instantiation, such as from PHP's * $_GET superglobal, or MAY be derived from some other value such as the * URI. In cases where the arguments are parsed from the URI, the data * MUST be compatible with what PHP's parse_str() would return for * purposes of how duplicate query parameters are handled, and how nested * sets are handled. * * Setting query string arguments MUST NOT change the URI stored by the * request, nor the values in the server params. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated query string arguments. * * @param array $query Array of query string arguments, typically from * $_GET. * @return static */ public function withQueryParams(array $query) : ServerRequestInterface; /** * Retrieve normalized file upload data. * * This method returns upload metadata in a normalized tree, with each leaf * an instance of Psr\Http\Message\UploadedFileInterface. * * These values MAY be prepared from $_FILES or the message body during * instantiation, or MAY be injected via withUploadedFiles(). * * @return array An array tree of UploadedFileInterface instances; an empty * array MUST be returned if no data is present. */ public function getUploadedFiles() : array; /** * Create a new instance with the specified uploaded files. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated body parameters. * * @param array $uploadedFiles An array tree of UploadedFileInterface instances. * @return static * @throws \InvalidArgumentException if an invalid structure is provided. */ public function withUploadedFiles(array $uploadedFiles) : ServerRequestInterface; /** * Retrieve any parameters provided in the request body. * * If the request Content-Type is either application/x-www-form-urlencoded * or multipart/form-data, and the request method is POST, this method MUST * return the contents of $_POST. * * Otherwise, this method may return any results of deserializing * the request body content; as parsing returns structured content, the * potential types MUST be arrays or objects only. A null value indicates * the absence of body content. * * @return null|array|object The deserialized body parameters, if any. * These will typically be an array or object. */ public function getParsedBody(); /** * Return an instance with the specified body parameters. * * These MAY be injected during instantiation. * * If the request Content-Type is either application/x-www-form-urlencoded * or multipart/form-data, and the request method is POST, use this method * ONLY to inject the contents of $_POST. * * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of * deserializing the request body content. Deserialization/parsing returns * structured data, and, as such, this method ONLY accepts arrays or objects, * or a null value if nothing was available to parse. * * As an example, if content negotiation determines that the request data * is a JSON payload, this method could be used to create a request * instance with the deserialized parameters. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated body parameters. * * @param null|array|object $data The deserialized body data. This will * typically be in an array or object. * @return static * @throws \InvalidArgumentException if an unsupported argument type is * provided. */ public function withParsedBody($data) : ServerRequestInterface; /** * Retrieve attributes derived from the request. * * The request "attributes" may be used to allow injection of any * parameters derived from the request: e.g., the results of path * match operations; the results of decrypting cookies; the results of * deserializing non-form-encoded message bodies; etc. Attributes * will be application and request specific, and CAN be mutable. * * @return array Attributes derived from the request. */ public function getAttributes() : array; /** * Retrieve a single derived request attribute. * * Retrieves a single derived request attribute as described in * getAttributes(). If the attribute has not been previously set, returns * the default value as provided. * * This method obviates the need for a hasAttribute() method, as it allows * specifying a default value to return if the attribute is not found. * * @see getAttributes() * @param string $name The attribute name. * @param mixed $default Default value to return if the attribute does not exist. * @return mixed */ public function getAttribute(string $name, $default = null); /** * Return an instance with the specified derived request attribute. * * This method allows setting a single derived request attribute as * described in getAttributes(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated attribute. * * @see getAttributes() * @param string $name The attribute name. * @param mixed $value The value of the attribute. * @return static */ public function withAttribute(string $name, $value) : ServerRequestInterface; /** * Return an instance that removes the specified derived request attribute. * * This method allows removing a single derived request attribute as * described in getAttributes(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that removes * the attribute. * * @see getAttributes() * @param string $name The attribute name. * @return static */ public function withoutAttribute(string $name) : ServerRequestInterface; } vendor_prefixed/psr/http-message/src/UploadedFileInterface.php 0000644 00000011217 15174671617 0020633 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * Value object representing a file uploaded through an HTTP request. * * Instances of this interface are considered immutable; all methods that * might change state MUST be implemented such that they retain the internal * state of the current instance and return an instance that contains the * changed state. */ interface UploadedFileInterface { /** * Retrieve a stream representing the uploaded file. * * This method MUST return a StreamInterface instance, representing the * uploaded file. The purpose of this method is to allow utilizing native PHP * stream functionality to manipulate the file upload, such as * stream_copy_to_stream() (though the result will need to be decorated in a * native PHP stream wrapper to work with such functions). * * If the moveTo() method has been called previously, this method MUST raise * an exception. * * @return StreamInterface Stream representation of the uploaded file. * @throws \RuntimeException in cases when no stream is available or can be * created. */ public function getStream() : StreamInterface; /** * Move the uploaded file to a new location. * * Use this method as an alternative to move_uploaded_file(). This method is * guaranteed to work in both SAPI and non-SAPI environments. * Implementations must determine which environment they are in, and use the * appropriate method (move_uploaded_file(), rename(), or a stream * operation) to perform the operation. * * $targetPath may be an absolute path, or a relative path. If it is a * relative path, resolution should be the same as used by PHP's rename() * function. * * The original file or stream MUST be removed on completion. * * If this method is called more than once, any subsequent calls MUST raise * an exception. * * When used in an SAPI environment where $_FILES is populated, when writing * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be * used to ensure permissions and upload status are verified correctly. * * If you wish to move to a stream, use getStream(), as SAPI operations * cannot guarantee writing to stream destinations. * * @see http://php.net/is_uploaded_file * @see http://php.net/move_uploaded_file * @param string $targetPath Path to which to move the uploaded file. * @throws \InvalidArgumentException if the $targetPath specified is invalid. * @throws \RuntimeException on any error during the move operation, or on * the second or subsequent call to the method. */ public function moveTo(string $targetPath) : void; /** * Retrieve the file size. * * Implementations SHOULD return the value stored in the "size" key of * the file in the $_FILES array if available, as PHP calculates this based * on the actual size transmitted. * * @return int|null The file size in bytes or null if unknown. */ public function getSize() : ?int; /** * Retrieve the error associated with the uploaded file. * * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants. * * If the file was uploaded successfully, this method MUST return * UPLOAD_ERR_OK. * * Implementations SHOULD return the value stored in the "error" key of * the file in the $_FILES array. * * @see http://php.net/manual/en/features.file-upload.errors.php * @return int One of PHP's UPLOAD_ERR_XXX constants. */ public function getError() : int; /** * Retrieve the filename sent by the client. * * Do not trust the value returned by this method. A client could send * a malicious filename with the intention to corrupt or hack your * application. * * Implementations SHOULD return the value stored in the "name" key of * the file in the $_FILES array. * * @return string|null The filename sent by the client or null if none * was provided. */ public function getClientFilename() : ?string; /** * Retrieve the media type sent by the client. * * Do not trust the value returned by this method. A client could send * a malicious media type with the intention to corrupt or hack your * application. * * Implementations SHOULD return the value stored in the "type" key of * the file in the $_FILES array. * * @return string|null The media type sent by the client or null if none * was provided. */ public function getClientMediaType() : ?string; } vendor_prefixed/psr/http-message/src/StreamInterface.php 0000644 00000011416 15174671617 0017532 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * Describes a data stream. * * Typically, an instance will wrap a PHP stream; this interface provides * a wrapper around the most common operations, including serialization of * the entire stream to a string. */ interface StreamInterface { /** * Reads all data from the stream into a string, from the beginning to end. * * This method MUST attempt to seek to the beginning of the stream before * reading data and read the stream until the end is reached. * * Warning: This could attempt to load a large amount of data into memory. * * This method MUST NOT raise an exception in order to conform with PHP's * string casting operations. * * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring * @return string */ public function __toString() : string; /** * Closes the stream and any underlying resources. * * @return void */ public function close() : void; /** * Separates any underlying resources from the stream. * * After the stream has been detached, the stream is in an unusable state. * * @return resource|null Underlying PHP stream, if any */ public function detach(); /** * Get the size of the stream if known. * * @return int|null Returns the size in bytes if known, or null if unknown. */ public function getSize() : ?int; /** * Returns the current position of the file read/write pointer * * @return int Position of the file pointer * @throws \RuntimeException on error. */ public function tell() : int; /** * Returns true if the stream is at the end of the stream. * * @return bool */ public function eof() : bool; /** * Returns whether or not the stream is seekable. * * @return bool */ public function isSeekable() : bool; /** * Seek to a position in the stream. * * @link http://www.php.net/manual/en/function.fseek.php * @param int $offset Stream offset * @param int $whence Specifies how the cursor position will be calculated * based on the seek offset. Valid values are identical to the built-in * PHP $whence values for `fseek()`. SEEK_SET: Set position equal to * offset bytes SEEK_CUR: Set position to current location plus offset * SEEK_END: Set position to end-of-stream plus offset. * @throws \RuntimeException on failure. */ public function seek(int $offset, int $whence = \SEEK_SET) : void; /** * Seek to the beginning of the stream. * * If the stream is not seekable, this method will raise an exception; * otherwise, it will perform a seek(0). * * @see seek() * @link http://www.php.net/manual/en/function.fseek.php * @throws \RuntimeException on failure. */ public function rewind() : void; /** * Returns whether or not the stream is writable. * * @return bool */ public function isWritable() : bool; /** * Write data to the stream. * * @param string $string The string that is to be written. * @return int Returns the number of bytes written to the stream. * @throws \RuntimeException on failure. */ public function write(string $string) : int; /** * Returns whether or not the stream is readable. * * @return bool */ public function isReadable() : bool; /** * Read data from the stream. * * @param int $length Read up to $length bytes from the object and return * them. Fewer than $length bytes may be returned if underlying stream * call returns fewer bytes. * @return string Returns the data read from the stream, or an empty string * if no bytes are available. * @throws \RuntimeException if an error occurs. */ public function read(int $length) : string; /** * Returns the remaining contents in a string * * @return string * @throws \RuntimeException if unable to read or an error occurs while * reading. */ public function getContents() : string; /** * Get stream metadata as an associative array or retrieve a specific key. * * The keys returned are identical to the keys returned from PHP's * stream_get_meta_data() function. * * @link http://php.net/manual/en/function.stream-get-meta-data.php * @param string|null $key Specific metadata to retrieve. * @return array|mixed|null Returns an associative array if no key is * provided. Returns a specific key value if a key is provided and the * value is found, or null if the key is not found. */ public function getMetadata(?string $key = null); } vendor_prefixed/psr/http-message/src/MessageInterface.php 0000644 00000015721 15174671617 0017666 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * HTTP messages consist of requests from a client to a server and responses * from a server to a client. This interface defines the methods common to * each. * * Messages are considered immutable; all methods that might change state MUST * be implemented such that they retain the internal state of the current * message and return an instance that contains the changed state. * * @link http://www.ietf.org/rfc/rfc7230.txt * @link http://www.ietf.org/rfc/rfc7231.txt */ interface MessageInterface { /** * Retrieves the HTTP protocol version as a string. * * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). * * @return string HTTP protocol version. */ public function getProtocolVersion() : string; /** * Return an instance with the specified HTTP protocol version. * * The version string MUST contain only the HTTP version number (e.g., * "1.1", "1.0"). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new protocol version. * * @param string $version HTTP protocol version * @return static */ public function withProtocolVersion(string $version) : MessageInterface; /** * Retrieves all message header values. * * The keys represent the header name as it will be sent over the wire, and * each value is an array of strings associated with the header. * * // Represent the headers as a string * foreach ($message->getHeaders() as $name => $values) { * echo $name . ": " . implode(", ", $values); * } * * // Emit headers iteratively: * foreach ($message->getHeaders() as $name => $values) { * foreach ($values as $value) { * header(sprintf('%s: %s', $name, $value), false); * } * } * * While header names are not case-sensitive, getHeaders() will preserve the * exact case in which headers were originally specified. * * @return string[][] Returns an associative array of the message's headers. Each * key MUST be a header name, and each value MUST be an array of strings * for that header. */ public function getHeaders() : array; /** * Checks if a header exists by the given case-insensitive name. * * @param string $name Case-insensitive header field name. * @return bool Returns true if any header names match the given header * name using a case-insensitive string comparison. Returns false if * no matching header name is found in the message. */ public function hasHeader(string $name) : bool; /** * Retrieves a message header value by the given case-insensitive name. * * This method returns an array of all the header values of the given * case-insensitive header name. * * If the header does not appear in the message, this method MUST return an * empty array. * * @param string $name Case-insensitive header field name. * @return string[] An array of string values as provided for the given * header. If the header does not appear in the message, this method MUST * return an empty array. */ public function getHeader(string $name) : array; /** * Retrieves a comma-separated string of the values for a single header. * * This method returns all of the header values of the given * case-insensitive header name as a string concatenated together using * a comma. * * NOTE: Not all header values may be appropriately represented using * comma concatenation. For such headers, use getHeader() instead * and supply your own delimiter when concatenating. * * If the header does not appear in the message, this method MUST return * an empty string. * * @param string $name Case-insensitive header field name. * @return string A string of values as provided for the given header * concatenated together using a comma. If the header does not appear in * the message, this method MUST return an empty string. */ public function getHeaderLine(string $name) : string; /** * Return an instance with the provided value replacing the specified header. * * While header names are case-insensitive, the casing of the header will * be preserved by this function, and returned from getHeaders(). * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new and/or updated header and value. * * @param string $name Case-insensitive header field name. * @param string|string[] $value Header value(s). * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withHeader(string $name, $value) : MessageInterface; /** * Return an instance with the specified header appended with the given value. * * Existing values for the specified header will be maintained. The new * value(s) will be appended to the existing list. If the header did not * exist previously, it will be added. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new header and/or value. * * @param string $name Case-insensitive header field name to add. * @param string|string[] $value Header value(s). * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withAddedHeader(string $name, $value) : MessageInterface; /** * Return an instance without the specified header. * * Header resolution MUST be done without case-sensitivity. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that removes * the named header. * * @param string $name Case-insensitive header field name to remove. * @return static */ public function withoutHeader(string $name) : MessageInterface; /** * Gets the body of the message. * * @return StreamInterface Returns the body as a stream. */ public function getBody() : StreamInterface; /** * Return an instance with the specified message body. * * The body MUST be a StreamInterface object. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return a new instance that has the * new body stream. * * @param StreamInterface $body Body. * @return static * @throws \InvalidArgumentException When the body is not valid. */ public function withBody(StreamInterface $body) : MessageInterface; } vendor_prefixed/psr/http-message/src/ResponseInterface.php 0000644 00000005135 15174671617 0020076 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * Representation of an outgoing, server-side response. * * Per the HTTP specification, this interface includes properties for * each of the following: * * - Protocol version * - Status code and reason phrase * - Headers * - Message body * * Responses are considered immutable; all methods that might change state MUST * be implemented such that they retain the internal state of the current * message and return an instance that contains the changed state. */ interface ResponseInterface extends MessageInterface { /** * Gets the response status code. * * The status code is a 3-digit integer result code of the server's attempt * to understand and satisfy the request. * * @return int Status code. */ public function getStatusCode() : int; /** * Return an instance with the specified status code and, optionally, reason phrase. * * If no reason phrase is specified, implementations MAY choose to default * to the RFC 7231 or IANA recommended reason phrase for the response's * status code. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * updated status and reason phrase. * * @link http://tools.ietf.org/html/rfc7231#section-6 * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml * @param int $code The 3-digit integer result code to set. * @param string $reasonPhrase The reason phrase to use with the * provided status code; if none is provided, implementations MAY * use the defaults as suggested in the HTTP specification. * @return static * @throws \InvalidArgumentException For invalid status code arguments. */ public function withStatus(int $code, string $reasonPhrase = '') : ResponseInterface; /** * Gets the response reason phrase associated with the status code. * * Because a reason phrase is not a required element in a response * status line, the reason phrase value MAY be null. Implementations MAY * choose to return the default RFC 7231 recommended reason phrase (or those * listed in the IANA HTTP Status Code Registry) for the response's * status code. * * @link http://tools.ietf.org/html/rfc7231#section-6 * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml * @return string Reason phrase; must return an empty string if none present. */ public function getReasonPhrase() : string; } vendor_prefixed/psr/http-message/src/UriInterface.php 0000644 00000031062 15174671617 0017035 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * Value object representing a URI. * * This interface is meant to represent URIs according to RFC 3986 and to * provide methods for most common operations. Additional functionality for * working with URIs can be provided on top of the interface or externally. * Its primary use is for HTTP requests, but may also be used in other * contexts. * * Instances of this interface are considered immutable; all methods that * might change state MUST be implemented such that they retain the internal * state of the current instance and return an instance that contains the * changed state. * * Typically the Host header will be also be present in the request message. * For server-side requests, the scheme will typically be discoverable in the * server parameters. * * @link http://tools.ietf.org/html/rfc3986 (the URI specification) */ interface UriInterface { /** * Retrieve the scheme component of the URI. * * If no scheme is present, this method MUST return an empty string. * * The value returned MUST be normalized to lowercase, per RFC 3986 * Section 3.1. * * The trailing ":" character is not part of the scheme and MUST NOT be * added. * * @see https://tools.ietf.org/html/rfc3986#section-3.1 * @return string The URI scheme. */ public function getScheme() : string; /** * Retrieve the authority component of the URI. * * If no authority information is present, this method MUST return an empty * string. * * The authority syntax of the URI is: * * <pre> * [user-info@]host[:port] * </pre> * * If the port component is not set or is the standard port for the current * scheme, it SHOULD NOT be included. * * @see https://tools.ietf.org/html/rfc3986#section-3.2 * @return string The URI authority, in "[user-info@]host[:port]" format. */ public function getAuthority() : string; /** * Retrieve the user information component of the URI. * * If no user information is present, this method MUST return an empty * string. * * If a user is present in the URI, this will return that value; * additionally, if the password is also present, it will be appended to the * user value, with a colon (":") separating the values. * * The trailing "@" character is not part of the user information and MUST * NOT be added. * * @return string The URI user information, in "username[:password]" format. */ public function getUserInfo() : string; /** * Retrieve the host component of the URI. * * If no host is present, this method MUST return an empty string. * * The value returned MUST be normalized to lowercase, per RFC 3986 * Section 3.2.2. * * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 * @return string The URI host. */ public function getHost() : string; /** * Retrieve the port component of the URI. * * If a port is present, and it is non-standard for the current scheme, * this method MUST return it as an integer. If the port is the standard port * used with the current scheme, this method SHOULD return null. * * If no port is present, and no scheme is present, this method MUST return * a null value. * * If no port is present, but a scheme is present, this method MAY return * the standard port for that scheme, but SHOULD return null. * * @return null|int The URI port. */ public function getPort() : ?int; /** * Retrieve the path component of the URI. * * The path can either be empty or absolute (starting with a slash) or * rootless (not starting with a slash). Implementations MUST support all * three syntaxes. * * Normally, the empty path "" and absolute path "/" are considered equal as * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically * do this normalization because in contexts with a trimmed base path, e.g. * the front controller, this difference becomes significant. It's the task * of the user to handle both "" and "/". * * The value returned MUST be percent-encoded, but MUST NOT double-encode * any characters. To determine what characters to encode, please refer to * RFC 3986, Sections 2 and 3.3. * * As an example, if the value should include a slash ("/") not intended as * delimiter between path segments, that value MUST be passed in encoded * form (e.g., "%2F") to the instance. * * @see https://tools.ietf.org/html/rfc3986#section-2 * @see https://tools.ietf.org/html/rfc3986#section-3.3 * @return string The URI path. */ public function getPath() : string; /** * Retrieve the query string of the URI. * * If no query string is present, this method MUST return an empty string. * * The leading "?" character is not part of the query and MUST NOT be * added. * * The value returned MUST be percent-encoded, but MUST NOT double-encode * any characters. To determine what characters to encode, please refer to * RFC 3986, Sections 2 and 3.4. * * As an example, if a value in a key/value pair of the query string should * include an ampersand ("&") not intended as a delimiter between values, * that value MUST be passed in encoded form (e.g., "%26") to the instance. * * @see https://tools.ietf.org/html/rfc3986#section-2 * @see https://tools.ietf.org/html/rfc3986#section-3.4 * @return string The URI query string. */ public function getQuery() : string; /** * Retrieve the fragment component of the URI. * * If no fragment is present, this method MUST return an empty string. * * The leading "#" character is not part of the fragment and MUST NOT be * added. * * The value returned MUST be percent-encoded, but MUST NOT double-encode * any characters. To determine what characters to encode, please refer to * RFC 3986, Sections 2 and 3.5. * * @see https://tools.ietf.org/html/rfc3986#section-2 * @see https://tools.ietf.org/html/rfc3986#section-3.5 * @return string The URI fragment. */ public function getFragment() : string; /** * Return an instance with the specified scheme. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified scheme. * * Implementations MUST support the schemes "http" and "https" case * insensitively, and MAY accommodate other schemes if required. * * An empty scheme is equivalent to removing the scheme. * * @param string $scheme The scheme to use with the new instance. * @return static A new instance with the specified scheme. * @throws \InvalidArgumentException for invalid or unsupported schemes. */ public function withScheme(string $scheme) : UriInterface; /** * Return an instance with the specified user information. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified user information. * * Password is optional, but the user information MUST include the * user; an empty string for the user is equivalent to removing user * information. * * @param string $user The user name to use for authority. * @param null|string $password The password associated with $user. * @return static A new instance with the specified user information. */ public function withUserInfo(string $user, ?string $password = null) : UriInterface; /** * Return an instance with the specified host. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified host. * * An empty host value is equivalent to removing the host. * * @param string $host The hostname to use with the new instance. * @return static A new instance with the specified host. * @throws \InvalidArgumentException for invalid hostnames. */ public function withHost(string $host) : UriInterface; /** * Return an instance with the specified port. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified port. * * Implementations MUST raise an exception for ports outside the * established TCP and UDP port ranges. * * A null value provided for the port is equivalent to removing the port * information. * * @param null|int $port The port to use with the new instance; a null value * removes the port information. * @return static A new instance with the specified port. * @throws \InvalidArgumentException for invalid ports. */ public function withPort(?int $port) : UriInterface; /** * Return an instance with the specified path. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified path. * * The path can either be empty or absolute (starting with a slash) or * rootless (not starting with a slash). Implementations MUST support all * three syntaxes. * * If the path is intended to be domain-relative rather than path relative then * it must begin with a slash ("/"). Paths not starting with a slash ("/") * are assumed to be relative to some base path known to the application or * consumer. * * Users can provide both encoded and decoded path characters. * Implementations ensure the correct encoding as outlined in getPath(). * * @param string $path The path to use with the new instance. * @return static A new instance with the specified path. * @throws \InvalidArgumentException for invalid paths. */ public function withPath(string $path) : UriInterface; /** * Return an instance with the specified query string. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified query string. * * Users can provide both encoded and decoded query characters. * Implementations ensure the correct encoding as outlined in getQuery(). * * An empty query string value is equivalent to removing the query string. * * @param string $query The query string to use with the new instance. * @return static A new instance with the specified query string. * @throws \InvalidArgumentException for invalid query strings. */ public function withQuery(string $query) : UriInterface; /** * Return an instance with the specified URI fragment. * * This method MUST retain the state of the current instance, and return * an instance that contains the specified URI fragment. * * Users can provide both encoded and decoded fragment characters. * Implementations ensure the correct encoding as outlined in getFragment(). * * An empty fragment value is equivalent to removing the fragment. * * @param string $fragment The fragment to use with the new instance. * @return static A new instance with the specified fragment. */ public function withFragment(string $fragment) : UriInterface; /** * Return the string representation as a URI reference. * * Depending on which components of the URI are present, the resulting * string is either a full URI or relative reference according to RFC 3986, * Section 4.1. The method concatenates the various components of the URI, * using the appropriate delimiters: * * - If a scheme is present, it MUST be suffixed by ":". * - If an authority is present, it MUST be prefixed by "//". * - The path can be concatenated without delimiters. But there are two * cases where the path has to be adjusted to make the URI reference * valid as PHP does not allow to throw an exception in __toString(): * - If the path is rootless and an authority is present, the path MUST * be prefixed by "/". * - If the path is starting with more than one "/" and no authority is * present, the starting slashes MUST be reduced to one. * - If a query is present, it MUST be prefixed by "?". * - If a fragment is present, it MUST be prefixed by "#". * * @see http://tools.ietf.org/html/rfc3986#section-4.1 * @return string */ public function __toString() : string; } vendor_prefixed/psr/http-message/src/RequestInterface.php 0000644 00000011512 15174671617 0017724 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; /** * Representation of an outgoing, client-side request. * * Per the HTTP specification, this interface includes properties for * each of the following: * * - Protocol version * - HTTP method * - URI * - Headers * - Message body * * During construction, implementations MUST attempt to set the Host header from * a provided URI if no Host header is provided. * * Requests are considered immutable; all methods that might change state MUST * be implemented such that they retain the internal state of the current * message and return an instance that contains the changed state. */ interface RequestInterface extends MessageInterface { /** * Retrieves the message's request target. * * Retrieves the message's request-target either as it will appear (for * clients), as it appeared at request (for servers), or as it was * specified for the instance (see withRequestTarget()). * * In most cases, this will be the origin-form of the composed URI, * unless a value was provided to the concrete implementation (see * withRequestTarget() below). * * If no URI is available, and no request-target has been specifically * provided, this method MUST return the string "/". * * @return string */ public function getRequestTarget() : string; /** * Return an instance with the specific request-target. * * If the request needs a non-origin-form request-target — e.g., for * specifying an absolute-form, authority-form, or asterisk-form — * this method may be used to create an instance with the specified * request-target, verbatim. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * changed request target. * * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various * request-target forms allowed in request messages) * @param string $requestTarget * @return static */ public function withRequestTarget(string $requestTarget) : RequestInterface; /** * Retrieves the HTTP method of the request. * * @return string Returns the request method. */ public function getMethod() : string; /** * Return an instance with the provided HTTP method. * * While HTTP method names are typically all uppercase characters, HTTP * method names are case-sensitive and thus implementations SHOULD NOT * modify the given string. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * changed request method. * * @param string $method Case-sensitive method. * @return static * @throws \InvalidArgumentException for invalid HTTP methods. */ public function withMethod(string $method) : RequestInterface; /** * Retrieves the URI instance. * * This method MUST return a UriInterface instance. * * @link http://tools.ietf.org/html/rfc3986#section-4.3 * @return UriInterface Returns a UriInterface instance * representing the URI of the request. */ public function getUri() : UriInterface; /** * Returns an instance with the provided URI. * * This method MUST update the Host header of the returned request by * default if the URI contains a host component. If the URI does not * contain a host component, any pre-existing Host header MUST be carried * over to the returned request. * * You can opt-in to preserving the original state of the Host header by * setting `$preserveHost` to `true`. When `$preserveHost` is set to * `true`, this method interacts with the Host header in the following ways: * * - If the Host header is missing or empty, and the new URI contains * a host component, this method MUST update the Host header in the returned * request. * - If the Host header is missing or empty, and the new URI does not contain a * host component, this method MUST NOT update the Host header in the returned * request. * - If a Host header is present and non-empty, this method MUST NOT update * the Host header in the returned request. * * This method MUST be implemented in such a way as to retain the * immutability of the message, and MUST return an instance that has the * new UriInterface instance. * * @link http://tools.ietf.org/html/rfc3986#section-4.3 * @param UriInterface $uri New request URI to use. * @param bool $preserveHost Preserve the original state of the Host header. * @return static */ public function withUri(UriInterface $uri, bool $preserveHost = \false) : RequestInterface; } vendor_prefixed/psr/http-client/LICENSE 0000644 00000002075 15174671617 0014016 0 ustar 00 Copyright (c) 2017 PHP Framework Interoperability Group 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_prefixed/psr/http-client/src/RequestExceptionInterface.php 0000644 00000001156 15174671617 0021440 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Client; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Exception for when a request failed. * * Examples: * - Request is invalid (e.g. method is missing) * - Runtime request errors (e.g. the body stream is not seekable) */ interface RequestExceptionInterface extends ClientExceptionInterface { /** * Returns the request. * * The request object MAY be a different object from the one passed to ClientInterface::sendRequest() * * @return RequestInterface */ public function getRequest() : RequestInterface; } vendor_prefixed/psr/http-client/src/ClientInterface.php 0000644 00000001052 15174671617 0017342 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Client; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; use WPMailSMTP\Vendor\Psr\Http\Message\ResponseInterface; interface ClientInterface { /** * Sends a PSR-7 request and returns a PSR-7 response. * * @param RequestInterface $request * * @return ResponseInterface * * @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request. */ public function sendRequest(RequestInterface $request) : ResponseInterface; } vendor_prefixed/psr/http-client/src/NetworkExceptionInterface.php 0000644 00000001266 15174671617 0021443 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Client; use WPMailSMTP\Vendor\Psr\Http\Message\RequestInterface; /** * Thrown when the request cannot be completed because of network issues. * * There is no response object as this exception is thrown when no response has been received. * * Example: the target host name can not be resolved or the connection failed. */ interface NetworkExceptionInterface extends ClientExceptionInterface { /** * Returns the request. * * The request object MAY be a different object from the one passed to ClientInterface::sendRequest() * * @return RequestInterface */ public function getRequest() : RequestInterface; } vendor_prefixed/psr/http-client/src/ClientExceptionInterface.php 0000644 00000000275 15174671617 0021227 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Client; /** * Every HTTP client related exception MUST implement this interface. */ interface ClientExceptionInterface extends \Throwable { } vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php 0000644 00000006541 15174671617 0015562 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * This is a simple Logger trait that classes unable to extend AbstractLogger * (because they extend another class, etc) can include. * * It simply delegates all log-level-specific methods to the `log` method to * reduce boilerplate code that a simple Logger that does the same thing with * messages regardless of the error level has to implement. */ trait LoggerTrait { /** * System is unusable. * * @param string $message * @param array $context * * @return void */ public function emergency($message, array $context = array()) { $this->log(LogLevel::EMERGENCY, $message, $context); } /** * Action must be taken immediately. * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * * @param string $message * @param array $context * * @return void */ public function alert($message, array $context = array()) { $this->log(LogLevel::ALERT, $message, $context); } /** * Critical conditions. * * Example: Application component unavailable, unexpected exception. * * @param string $message * @param array $context * * @return void */ public function critical($message, array $context = array()) { $this->log(LogLevel::CRITICAL, $message, $context); } /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. * * @param string $message * @param array $context * * @return void */ public function error($message, array $context = array()) { $this->log(LogLevel::ERROR, $message, $context); } /** * Exceptional occurrences that are not errors. * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * * @param string $message * @param array $context * * @return void */ public function warning($message, array $context = array()) { $this->log(LogLevel::WARNING, $message, $context); } /** * Normal but significant events. * * @param string $message * @param array $context * * @return void */ public function notice($message, array $context = array()) { $this->log(LogLevel::NOTICE, $message, $context); } /** * Interesting events. * * Example: User logs in, SQL logs. * * @param string $message * @param array $context * * @return void */ public function info($message, array $context = array()) { $this->log(LogLevel::INFO, $message, $context); } /** * Detailed debug information. * * @param string $message * @param array $context * * @return void */ public function debug($message, array $context = array()) { $this->log(LogLevel::DEBUG, $message, $context); } /** * Logs with an arbitrary level. * * @param mixed $level * @param string $message * @param array $context * * @return void * * @throws \Psr\Log\InvalidArgumentException */ public abstract function log($level, $message, array $context = array()); } vendor_prefixed/psr/log/Psr/Log/LoggerInterface.php 0000644 00000006064 15174671617 0016377 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * Describes a logger instance. * * The message MUST be a string or object implementing __toString(). * * The message MAY contain placeholders in the form: {foo} where foo * will be replaced by the context data in key "foo". * * The context array can contain arbitrary data. The only assumption that * can be made by implementors is that if an Exception instance is given * to produce a stack trace, it MUST be in a key named "exception". * * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md * for the full interface specification. */ interface LoggerInterface { /** * System is unusable. * * @param string $message * @param mixed[] $context * * @return void */ public function emergency($message, array $context = array()); /** * Action must be taken immediately. * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * * @param string $message * @param mixed[] $context * * @return void */ public function alert($message, array $context = array()); /** * Critical conditions. * * Example: Application component unavailable, unexpected exception. * * @param string $message * @param mixed[] $context * * @return void */ public function critical($message, array $context = array()); /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. * * @param string $message * @param mixed[] $context * * @return void */ public function error($message, array $context = array()); /** * Exceptional occurrences that are not errors. * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * * @param string $message * @param mixed[] $context * * @return void */ public function warning($message, array $context = array()); /** * Normal but significant events. * * @param string $message * @param mixed[] $context * * @return void */ public function notice($message, array $context = array()); /** * Interesting events. * * Example: User logs in, SQL logs. * * @param string $message * @param mixed[] $context * * @return void */ public function info($message, array $context = array()); /** * Detailed debug information. * * @param string $message * @param mixed[] $context * * @return void */ public function debug($message, array $context = array()); /** * Logs with an arbitrary level. * * @param mixed $level * @param string $message * @param mixed[] $context * * @return void * * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()); } vendor_prefixed/psr/log/Psr/Log/AbstractLogger.php 0000644 00000006053 15174671617 0016240 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * This is a simple Logger implementation that other Loggers can inherit from. * * It simply delegates all log-level-specific methods to the `log` method to * reduce boilerplate code that a simple Logger that does the same thing with * messages regardless of the error level has to implement. */ abstract class AbstractLogger implements LoggerInterface { /** * System is unusable. * * @param string $message * @param mixed[] $context * * @return void */ public function emergency($message, array $context = array()) { $this->log(LogLevel::EMERGENCY, $message, $context); } /** * Action must be taken immediately. * * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * * @param string $message * @param mixed[] $context * * @return void */ public function alert($message, array $context = array()) { $this->log(LogLevel::ALERT, $message, $context); } /** * Critical conditions. * * Example: Application component unavailable, unexpected exception. * * @param string $message * @param mixed[] $context * * @return void */ public function critical($message, array $context = array()) { $this->log(LogLevel::CRITICAL, $message, $context); } /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. * * @param string $message * @param mixed[] $context * * @return void */ public function error($message, array $context = array()) { $this->log(LogLevel::ERROR, $message, $context); } /** * Exceptional occurrences that are not errors. * * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * * @param string $message * @param mixed[] $context * * @return void */ public function warning($message, array $context = array()) { $this->log(LogLevel::WARNING, $message, $context); } /** * Normal but significant events. * * @param string $message * @param mixed[] $context * * @return void */ public function notice($message, array $context = array()) { $this->log(LogLevel::NOTICE, $message, $context); } /** * Interesting events. * * Example: User logs in, SQL logs. * * @param string $message * @param mixed[] $context * * @return void */ public function info($message, array $context = array()) { $this->log(LogLevel::INFO, $message, $context); } /** * Detailed debug information. * * @param string $message * @param mixed[] $context * * @return void */ public function debug($message, array $context = array()) { $this->log(LogLevel::DEBUG, $message, $context); } } vendor_prefixed/psr/log/Psr/Log/NullLogger.php 0000644 00000001325 15174671617 0015404 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * This Logger can be used to avoid conditional log calls. * * Logging should always be optional, and if no logger is provided to your * library creating a NullLogger instance to have something to throw logs at * is a good way to avoid littering your code with `if ($this->logger) { }` * blocks. */ class NullLogger extends AbstractLogger { /** * Logs with an arbitrary level. * * @param mixed $level * @param string $message * @param array $context * * @return void * * @throws \Psr\Log\InvalidArgumentException */ public function log($level, $message, array $context = array()) { // noop } } vendor_prefixed/psr/log/Psr/Log/LoggerAwareTrait.php 0000644 00000000643 15174671617 0016537 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * Basic Implementation of LoggerAwareInterface. */ trait LoggerAwareTrait { /** * The logger instance. * * @var LoggerInterface|null */ protected $logger; /** * Sets a logger. * * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger) { $this->logger = $logger; } } vendor_prefixed/psr/log/Psr/Log/LogLevel.php 0000644 00000000513 15174671617 0015041 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * Describes log levels. */ class LogLevel { const EMERGENCY = 'emergency'; const ALERT = 'alert'; const CRITICAL = 'critical'; const ERROR = 'error'; const WARNING = 'warning'; const NOTICE = 'notice'; const INFO = 'info'; const DEBUG = 'debug'; } vendor_prefixed/psr/log/Psr/Log/InvalidArgumentException.php 0000644 00000000162 15174671617 0020300 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; class InvalidArgumentException extends \InvalidArgumentException { } vendor_prefixed/psr/log/Psr/Log/LoggerAwareInterface.php 0000644 00000000473 15174671617 0017355 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Log; /** * Describes a logger-aware instance. */ interface LoggerAwareInterface { /** * Sets a logger instance on the object. * * @param LoggerInterface $logger * * @return void */ public function setLogger(LoggerInterface $logger); } vendor_prefixed/psr/log/LICENSE 0000644 00000002075 15174671617 0012344 0 ustar 00 Copyright (c) 2012 PHP Framework Interoperability Group 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_prefixed/psr/cache/src/CacheItemPoolInterface.php 0000644 00000010456 15174671617 0017420 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Cache; /** * CacheItemPoolInterface generates CacheItemInterface objects. * * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from * the Calling Library and return the associated Cache\CacheItemInterface object. * It is also the primary point of interaction with the entire cache collection. * All configuration and initialization of the Pool is left up to an * Implementing Library. */ interface CacheItemPoolInterface { /** * Returns a Cache Item representing the specified key. * * This method must always return a CacheItemInterface object, even in case of * a cache miss. It MUST NOT return null. * * @param string $key * The key for which to return the corresponding Cache Item. * * @throws InvalidArgumentException * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException * MUST be thrown. * * @return CacheItemInterface * The corresponding Cache Item. */ public function getItem($key); /** * Returns a traversable set of cache items. * * @param string[] $keys * An indexed array of keys of items to retrieve. * * @throws InvalidArgumentException * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException * MUST be thrown. * * @return array|\Traversable * A traversable collection of Cache Items keyed by the cache keys of * each item. A Cache item will be returned for each key, even if that * key is not found. However, if no keys are specified then an empty * traversable MUST be returned instead. */ public function getItems(array $keys = array()); /** * Confirms if the cache contains specified cache item. * * Note: This method MAY avoid retrieving the cached value for performance reasons. * This could result in a race condition with CacheItemInterface::get(). To avoid * such situation use CacheItemInterface::isHit() instead. * * @param string $key * The key for which to check existence. * * @throws InvalidArgumentException * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException * MUST be thrown. * * @return bool * True if item exists in the cache, false otherwise. */ public function hasItem($key); /** * Deletes all items in the pool. * * @return bool * True if the pool was successfully cleared. False if there was an error. */ public function clear(); /** * Removes the item from the pool. * * @param string $key * The key to delete. * * @throws InvalidArgumentException * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException * MUST be thrown. * * @return bool * True if the item was successfully removed. False if there was an error. */ public function deleteItem($key); /** * Removes multiple items from the pool. * * @param string[] $keys * An array of keys that should be removed from the pool. * @throws InvalidArgumentException * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException * MUST be thrown. * * @return bool * True if the items were successfully removed. False if there was an error. */ public function deleteItems(array $keys); /** * Persists a cache item immediately. * * @param CacheItemInterface $item * The cache item to save. * * @return bool * True if the item was successfully persisted. False if there was an error. */ public function save(CacheItemInterface $item); /** * Sets a cache item to be persisted later. * * @param CacheItemInterface $item * The cache item to save. * * @return bool * False if the item could not be queued or if a commit was attempted and failed. True otherwise. */ public function saveDeferred(CacheItemInterface $item); /** * Persists any deferred cache items. * * @return bool * True if all not-yet-saved items were successfully saved or there were none. False otherwise. */ public function commit(); } vendor_prefixed/psr/cache/src/CacheException.php 0000644 00000000241 15174671617 0015774 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Cache; /** * Exception interface for all exceptions thrown by an Implementing Library. */ interface CacheException { } vendor_prefixed/psr/cache/src/CacheItemInterface.php 0000644 00000007311 15174671617 0016562 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Cache; /** * CacheItemInterface defines an interface for interacting with objects inside a cache. * * Each Item object MUST be associated with a specific key, which can be set * according to the implementing system and is typically passed by the * Cache\CacheItemPoolInterface object. * * The Cache\CacheItemInterface object encapsulates the storage and retrieval of * cache items. Each Cache\CacheItemInterface is generated by a * Cache\CacheItemPoolInterface object, which is responsible for any required * setup as well as associating the object with a unique Key. * Cache\CacheItemInterface objects MUST be able to store and retrieve any type * of PHP value defined in the Data section of the specification. * * Calling Libraries MUST NOT instantiate Item objects themselves. They may only * be requested from a Pool object via the getItem() method. Calling Libraries * SHOULD NOT assume that an Item created by one Implementing Library is * compatible with a Pool from another Implementing Library. */ interface CacheItemInterface { /** * Returns the key for the current cache item. * * The key is loaded by the Implementing Library, but should be available to * the higher level callers when needed. * * @return string * The key string for this cache item. */ public function getKey(); /** * Retrieves the value of the item from the cache associated with this object's key. * * The value returned must be identical to the value originally stored by set(). * * If isHit() returns false, this method MUST return null. Note that null * is a legitimate cached value, so the isHit() method SHOULD be used to * differentiate between "null value was found" and "no value was found." * * @return mixed * The value corresponding to this cache item's key, or null if not found. */ public function get(); /** * Confirms if the cache item lookup resulted in a cache hit. * * Note: This method MUST NOT have a race condition between calling isHit() * and calling get(). * * @return bool * True if the request resulted in a cache hit. False otherwise. */ public function isHit(); /** * Sets the value represented by this cache item. * * The $value argument may be any item that can be serialized by PHP, * although the method of serialization is left up to the Implementing * Library. * * @param mixed $value * The serializable value to be stored. * * @return static * The invoked object. */ public function set($value); /** * Sets the expiration time for this cache item. * * @param \DateTimeInterface|null $expiration * The point in time after which the item MUST be considered expired. * If null is passed explicitly, a default value MAY be used. If none is set, * the value should be stored permanently or for as long as the * implementation allows. * * @return static * The called object. */ public function expiresAt($expiration); /** * Sets the expiration time for this cache item. * * @param int|\DateInterval|null $time * The period of time from the present after which the item MUST be considered * expired. An integer parameter is understood to be the time in seconds until * expiration. If null is passed explicitly, a default value MAY be used. * If none is set, the value should be stored permanently or for as long as the * implementation allows. * * @return static * The called object. */ public function expiresAfter($time); } vendor_prefixed/psr/cache/src/InvalidArgumentException.php 0000644 00000000475 15174671617 0020073 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Cache; /** * Exception interface for invalid cache arguments. * * Any time an invalid argument is passed into a method it must throw an * exception class which implements Psr\Cache\InvalidArgumentException. */ interface InvalidArgumentException extends CacheException { } vendor_prefixed/psr/http-factory/LICENSE 0000644 00000002050 15174671617 0014200 0 ustar 00 MIT License Copyright (c) 2018 PHP-FIG 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_prefixed/psr/http-factory/src/UriFactoryInterface.php 0000644 00000000530 15174671617 0020404 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; interface UriFactoryInterface { /** * Create a new URI. * * @param string $uri * * @return UriInterface * * @throws \InvalidArgumentException If the given URI cannot be parsed. */ public function createUri(string $uri = '') : UriInterface; } vendor_prefixed/psr/http-factory/src/RequestFactoryInterface.php 0000644 00000001006 15174671617 0021274 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; interface RequestFactoryInterface { /** * Create a new request. * * @param string $method The HTTP method associated with the request. * @param UriInterface|string $uri The URI associated with the request. If * the value is a string, the factory MUST create a UriInterface * instance based on it. * * @return RequestInterface */ public function createRequest(string $method, $uri) : RequestInterface; } vendor_prefixed/psr/http-factory/src/ServerRequestFactoryInterface.php 0000644 00000001662 15174671617 0022473 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; interface ServerRequestFactoryInterface { /** * Create a new server request. * * Note that server-params are taken precisely as given - no parsing/processing * of the given values is performed, and, in particular, no attempt is made to * determine the HTTP method or URI, which must be provided explicitly. * * @param string $method The HTTP method associated with the request. * @param UriInterface|string $uri The URI associated with the request. If * the value is a string, the factory MUST create a UriInterface * instance based on it. * @param array $serverParams Array of SAPI parameters with which to seed * the generated request instance. * * @return ServerRequestInterface */ public function createServerRequest(string $method, $uri, array $serverParams = []) : ServerRequestInterface; } vendor_prefixed/psr/http-factory/src/ResponseFactoryInterface.php 0000644 00000001065 15174671617 0021447 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; interface ResponseFactoryInterface { /** * Create a new response. * * @param int $code HTTP status code; defaults to 200 * @param string $reasonPhrase Reason phrase to associate with status code * in generated response; if none is provided implementations MAY use * the defaults as suggested in the HTTP specification. * * @return ResponseInterface */ public function createResponse(int $code = 200, string $reasonPhrase = '') : ResponseInterface; } vendor_prefixed/psr/http-factory/src/StreamFactoryInterface.php 0000644 00000002635 15174671617 0021110 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; interface StreamFactoryInterface { /** * Create a new stream from a string. * * The stream SHOULD be created with a temporary resource. * * @param string $content String content with which to populate the stream. * * @return StreamInterface */ public function createStream(string $content = '') : StreamInterface; /** * Create a stream from an existing file. * * The file MUST be opened using the given mode, which may be any mode * supported by the `fopen` function. * * The `$filename` MAY be any string supported by `fopen()`. * * @param string $filename Filename or stream URI to use as basis of stream. * @param string $mode Mode with which to open the underlying filename/stream. * * @return StreamInterface * @throws \RuntimeException If the file cannot be opened. * @throws \InvalidArgumentException If the mode is invalid. */ public function createStreamFromFile(string $filename, string $mode = 'r') : StreamInterface; /** * Create a new stream from an existing resource. * * The stream MUST be readable and may be writable. * * @param resource $resource PHP resource to use as basis of stream. * * @return StreamInterface */ public function createStreamFromResource($resource) : StreamInterface; } vendor_prefixed/psr/http-factory/src/UploadedFileFactoryInterface.php 0000644 00000002115 15174671617 0022203 0 ustar 00 <?php namespace WPMailSMTP\Vendor\Psr\Http\Message; interface UploadedFileFactoryInterface { /** * Create a new uploaded file. * * If a size is not provided it will be determined by checking the size of * the file. * * @see http://php.net/manual/features.file-upload.post-method.php * @see http://php.net/manual/features.file-upload.errors.php * * @param StreamInterface $stream Underlying stream representing the * uploaded file content. * @param int|null $size in bytes * @param int $error PHP file upload error * @param string|null $clientFilename Filename as provided by the client, if any. * @param string|null $clientMediaType Media type as provided by the client, if any. * * @return UploadedFileInterface * * @throws \InvalidArgumentException If the file resource is not readable. */ public function createUploadedFile(StreamInterface $stream, ?int $size = null, int $error = \UPLOAD_ERR_OK, ?string $clientFilename = null, ?string $clientMediaType = null) : UploadedFileInterface; } vendor_prefixed/paragonie/constant_time_encoding/LICENSE.txt 0000644 00000004545 15174671617 0020263 0 ustar 00 The MIT License (MIT) Copyright (c) 2016 - 2022 Paragon Initiative Enterprises 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. ------------------------------------------------------------------------------ This library was based on the work of Steve "Sc00bz" Thomas. ------------------------------------------------------------------------------ The MIT License (MIT) Copyright (c) 2014 Steve Thomas 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_prefixed/paragonie/constant_time_encoding/src/Base64DotSlash.php 0000644 00000005720 15174671617 0022422 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use function pack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Base64DotSlash * ./[A-Z][a-z][0-9] * * @package ParagonIE\ConstantTime */ abstract class Base64DotSlash extends Base64 { /** * Uses bitwise operators instead of table-lookups to turn 6-bit integers * into 8-bit integers. * * Base64 character set: * ./ [A-Z] [a-z] [0-9] * 0x2e-0x2f, 0x41-0x5a, 0x61-0x7a, 0x30-0x39 * * @param int $src * @return int */ protected static function decode6Bits(int $src) : int { $ret = -1; // if ($src > 0x2d && $src < 0x30) ret += $src - 0x2e + 1; // -45 $ret += (0x2d - $src & $src - 0x30) >> 8 & $src - 45; // if ($src > 0x40 && $src < 0x5b) ret += $src - 0x41 + 2 + 1; // -62 $ret += (0x40 - $src & $src - 0x5b) >> 8 & $src - 62; // if ($src > 0x60 && $src < 0x7b) ret += $src - 0x61 + 28 + 1; // -68 $ret += (0x60 - $src & $src - 0x7b) >> 8 & $src - 68; // if ($src > 0x2f && $src < 0x3a) ret += $src - 0x30 + 54 + 1; // 7 $ret += (0x2f - $src & $src - 0x3a) >> 8 & $src + 7; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 6-bit integers. * * @param int $src * @return string */ protected static function encode6Bits(int $src) : string { $src += 0x2e; // if ($src > 0x2f) $src += 0x41 - 0x30; // 17 $src += 0x2f - $src >> 8 & 17; // if ($src > 0x5a) $src += 0x61 - 0x5b; // 6 $src += 0x5a - $src >> 8 & 6; // if ($src > 0x7a) $src += 0x30 - 0x7b; // -75 $src -= 0x7a - $src >> 8 & 75; return pack('C', $src); } } vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php 0000644 00000011257 15174671617 0020676 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use TypeError; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class RFC4648 * * This class conforms strictly to the RFC * * @package ParagonIE\ConstantTime */ abstract class RFC4648 { /** * RFC 4648 Base64 encoding * * "foo" -> "Zm9v" * * @param string $str * @return string * * @throws TypeError */ public static function base64Encode( #[\SensitiveParameter] string $str ) : string { return Base64::encode($str); } /** * RFC 4648 Base64 decoding * * "Zm9v" -> "foo" * * @param string $str * @return string * * @throws TypeError */ public static function base64Decode( #[\SensitiveParameter] string $str ) : string { return Base64::decode($str, \true); } /** * RFC 4648 Base64 (URL Safe) encoding * * "foo" -> "Zm9v" * * @param string $str * @return string * * @throws TypeError */ public static function base64UrlSafeEncode( #[\SensitiveParameter] string $str ) : string { return Base64UrlSafe::encode($str); } /** * RFC 4648 Base64 (URL Safe) decoding * * "Zm9v" -> "foo" * * @param string $str * @return string * * @throws TypeError */ public static function base64UrlSafeDecode( #[\SensitiveParameter] string $str ) : string { return Base64UrlSafe::decode($str, \true); } /** * RFC 4648 Base32 encoding * * "foo" -> "MZXW6===" * * @param string $str * @return string * * @throws TypeError */ public static function base32Encode( #[\SensitiveParameter] string $str ) : string { return Base32::encodeUpper($str); } /** * RFC 4648 Base32 encoding * * "MZXW6===" -> "foo" * * @param string $str * @return string * * @throws TypeError */ public static function base32Decode( #[\SensitiveParameter] string $str ) : string { return Base32::decodeUpper($str, \true); } /** * RFC 4648 Base32-Hex encoding * * "foo" -> "CPNMU===" * * @param string $str * @return string * * @throws TypeError */ public static function base32HexEncode( #[\SensitiveParameter] string $str ) : string { return Base32::encodeUpper($str); } /** * RFC 4648 Base32-Hex decoding * * "CPNMU===" -> "foo" * * @param string $str * @return string * * @throws TypeError */ public static function base32HexDecode( #[\SensitiveParameter] string $str ) : string { return Base32::decodeUpper($str, \true); } /** * RFC 4648 Base16 decoding * * "foo" -> "666F6F" * * @param string $str * @return string * * @throws TypeError */ public static function base16Encode( #[\SensitiveParameter] string $str ) : string { return Hex::encodeUpper($str); } /** * RFC 4648 Base16 decoding * * "666F6F" -> "foo" * * @param string $str * @return string */ public static function base16Decode( #[\SensitiveParameter] string $str ) : string { return Hex::decode($str, \true); } } vendor_prefixed/paragonie/constant_time_encoding/src/Base32Hex.php 0000644 00000006515 15174671617 0021423 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use function pack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Base32Hex * [0-9][A-V] * * @package ParagonIE\ConstantTime */ abstract class Base32Hex extends Base32 { /** * Uses bitwise operators instead of table-lookups to turn 5-bit integers * into 8-bit integers. * * @param int $src * @return int */ protected static function decode5Bits(int $src) : int { $ret = -1; // if ($src > 0x30 && $src < 0x3a) ret += $src - 0x2e + 1; // -47 $ret += (0x2f - $src & $src - 0x3a) >> 8 & $src - 47; // if ($src > 0x60 && $src < 0x77) ret += $src - 0x61 + 10 + 1; // -86 $ret += (0x60 - $src & $src - 0x77) >> 8 & $src - 86; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 5-bit integers * into 8-bit integers. * * @param int $src * @return int */ protected static function decode5BitsUpper(int $src) : int { $ret = -1; // if ($src > 0x30 && $src < 0x3a) ret += $src - 0x2e + 1; // -47 $ret += (0x2f - $src & $src - 0x3a) >> 8 & $src - 47; // if ($src > 0x40 && $src < 0x57) ret += $src - 0x41 + 10 + 1; // -54 $ret += (0x40 - $src & $src - 0x57) >> 8 & $src - 54; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 5-bit integers. * * @param int $src * @return string */ protected static function encode5Bits(int $src) : string { $src += 0x30; // if ($src > 0x39) $src += 0x61 - 0x3a; // 39 $src += 0x39 - $src >> 8 & 39; return pack('C', $src); } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 5-bit integers. * * Uppercase variant. * * @param int $src * @return string */ protected static function encode5BitsUpper(int $src) : string { $src += 0x30; // if ($src > 0x39) $src += 0x41 - 0x3a; // 7 $src += 0x39 - $src >> 8 & 7; return pack('C', $src); } } vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php 0000644 00000027474 15174671617 0020772 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use InvalidArgumentException; use RangeException; use SensitiveParameter; use SodiumException; use TypeError; use function extension_loaded; use function pack; use function rtrim; use function sodium_base642bin; use function sodium_bin2base64; use function unpack; use const SODIUM_BASE64_VARIANT_ORIGINAL; use const SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING; use const SODIUM_BASE64_VARIANT_URLSAFE; use const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Base64 * [A-Z][a-z][0-9]+/ * * @package ParagonIE\ConstantTime */ abstract class Base64 implements EncoderInterface { /** * Encode into Base64 * * Base64 character set "[A-Z][a-z][0-9]+/" * * @param string $binString * @return string * * @throws TypeError */ public static function encode( #[SensitiveParameter] string $binString ) : string { if (extension_loaded('sodium')) { switch (static::class) { case Base64::class: $variant = SODIUM_BASE64_VARIANT_ORIGINAL; break; case Base64UrlSafe::class: $variant = SODIUM_BASE64_VARIANT_URLSAFE; break; default: $variant = 0; } if ($variant > 0) { try { return sodium_bin2base64($binString, $variant); } catch (SodiumException $ex) { throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); } } } return static::doEncode($binString, \true); } /** * Encode into Base64, no = padding * * Base64 character set "[A-Z][a-z][0-9]+/" * * @param string $src * @return string * * @throws TypeError */ public static function encodeUnpadded( #[SensitiveParameter] string $src ) : string { if (extension_loaded('sodium')) { switch (static::class) { case Base64::class: $variant = SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING; break; case Base64UrlSafe::class: $variant = SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING; break; default: $variant = 0; } if ($variant > 0) { try { return sodium_bin2base64($src, $variant); } catch (SodiumException $ex) { throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); } } } return static::doEncode($src, \false); } /** * @param string $src * @param bool $pad Include = padding? * @return string * * @throws TypeError */ protected static function doEncode( #[SensitiveParameter] string $src, bool $pad = \true ) : string { $dest = ''; $srcLen = Binary::safeStrlen($src); // Main loop (no padding): for ($i = 0; $i + 3 <= $srcLen; $i += 3) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($src, $i, 3)); $b0 = $chunk[1]; $b1 = $chunk[2]; $b2 = $chunk[3]; $dest .= static::encode6Bits($b0 >> 2) . static::encode6Bits(($b0 << 4 | $b1 >> 4) & 63) . static::encode6Bits(($b1 << 2 | $b2 >> 6) & 63) . static::encode6Bits($b2 & 63); } // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); $b0 = $chunk[1]; if ($i + 1 < $srcLen) { $b1 = $chunk[2]; $dest .= static::encode6Bits($b0 >> 2) . static::encode6Bits(($b0 << 4 | $b1 >> 4) & 63) . static::encode6Bits($b1 << 2 & 63); if ($pad) { $dest .= '='; } } else { $dest .= static::encode6Bits($b0 >> 2) . static::encode6Bits($b0 << 4 & 63); if ($pad) { $dest .= '=='; } } } return $dest; } /** * decode from base64 into binary * * Base64 character set "./[A-Z][a-z][0-9]" * * @param string $encodedString * @param bool $strictPadding * @return string * * @throws RangeException * @throws TypeError */ public static function decode( #[SensitiveParameter] string $encodedString, bool $strictPadding = \false ) : string { // Remove padding $srcLen = Binary::safeStrlen($encodedString); if ($srcLen === 0) { return ''; } if ($strictPadding) { if (($srcLen & 3) === 0) { if ($encodedString[$srcLen - 1] === '=') { $srcLen--; if ($encodedString[$srcLen - 1] === '=') { $srcLen--; } } } if (($srcLen & 3) === 1) { throw new RangeException('Incorrect padding'); } if ($encodedString[$srcLen - 1] === '=') { throw new RangeException('Incorrect padding'); } if (extension_loaded('sodium')) { switch (static::class) { case Base64::class: $variant = SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING; break; case Base64UrlSafe::class: $variant = SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING; break; default: $variant = 0; } if ($variant > 0) { try { return sodium_base642bin(Binary::safeSubstr($encodedString, 0, $srcLen), $variant); } catch (SodiumException $ex) { throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); } } } } else { $encodedString = rtrim($encodedString, '='); $srcLen = Binary::safeStrlen($encodedString); } $err = 0; $dest = ''; // Main loop (no padding): for ($i = 0; $i + 4 <= $srcLen; $i += 4) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($encodedString, $i, 4)); $c0 = static::decode6Bits($chunk[1]); $c1 = static::decode6Bits($chunk[2]); $c2 = static::decode6Bits($chunk[3]); $c3 = static::decode6Bits($chunk[4]); $dest .= pack('CCC', ($c0 << 2 | $c1 >> 4) & 0xff, ($c1 << 4 | $c2 >> 2) & 0xff, ($c2 << 6 | $c3) & 0xff); $err |= ($c0 | $c1 | $c2 | $c3) >> 8; } // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($encodedString, $i, $srcLen - $i)); $c0 = static::decode6Bits($chunk[1]); if ($i + 2 < $srcLen) { $c1 = static::decode6Bits($chunk[2]); $c2 = static::decode6Bits($chunk[3]); $dest .= pack('CC', ($c0 << 2 | $c1 >> 4) & 0xff, ($c1 << 4 | $c2 >> 2) & 0xff); $err |= ($c0 | $c1 | $c2) >> 8; if ($strictPadding) { $err |= $c2 << 6 & 0xff; } } elseif ($i + 1 < $srcLen) { $c1 = static::decode6Bits($chunk[2]); $dest .= pack('C', ($c0 << 2 | $c1 >> 4) & 0xff); $err |= ($c0 | $c1) >> 8; if ($strictPadding) { $err |= $c1 << 4 & 0xff; } } elseif ($strictPadding) { $err |= 1; } } $check = $err === 0; if (!$check) { throw new RangeException('Base64::decode() only expects characters in the correct base64 alphabet'); } return $dest; } /** * @param string $encodedString * @return string */ public static function decodeNoPadding( #[SensitiveParameter] string $encodedString ) : string { $srcLen = Binary::safeStrlen($encodedString); if ($srcLen === 0) { return ''; } if (($srcLen & 3) === 0) { // If $strLen is not zero, and it is divisible by 4, then it's at least 4. if ($encodedString[$srcLen - 1] === '=' || $encodedString[$srcLen - 2] === '=') { throw new InvalidArgumentException("decodeNoPadding() doesn't tolerate padding"); } } return static::decode($encodedString, \true); } /** * Uses bitwise operators instead of table-lookups to turn 6-bit integers * into 8-bit integers. * * Base64 character set: * [A-Z] [a-z] [0-9] + / * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f * * @param int $src * @return int */ protected static function decode6Bits(int $src) : int { $ret = -1; // if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64 $ret += (0x40 - $src & $src - 0x5b) >> 8 & $src - 64; // if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70 $ret += (0x60 - $src & $src - 0x7b) >> 8 & $src - 70; // if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5 $ret += (0x2f - $src & $src - 0x3a) >> 8 & $src + 5; // if ($src == 0x2b) $ret += 62 + 1; $ret += (0x2a - $src & $src - 0x2c) >> 8 & 63; // if ($src == 0x2f) ret += 63 + 1; $ret += (0x2e - $src & $src - 0x30) >> 8 & 64; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 6-bit integers. * * @param int $src * @return string */ protected static function encode6Bits(int $src) : string { $diff = 0x41; // if ($src > 25) $diff += 0x61 - 0x41 - 26; // 6 $diff += 25 - $src >> 8 & 6; // if ($src > 51) $diff += 0x30 - 0x61 - 26; // -75 $diff -= 51 - $src >> 8 & 75; // if ($src > 61) $diff += 0x2b - 0x30 - 10; // -15 $diff -= 61 - $src >> 8 & 15; // if ($src > 62) $diff += 0x2f - 0x2b - 1; // 3 $diff += 62 - $src >> 8 & 3; return pack('C', $src + $diff); } } vendor_prefixed/paragonie/constant_time_encoding/src/Base64UrlSafe.php 0000644 00000006202 15174671617 0022236 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use function pack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Base64UrlSafe * [A-Z][a-z][0-9]\-_ * * @package ParagonIE\ConstantTime */ abstract class Base64UrlSafe extends Base64 { /** * Uses bitwise operators instead of table-lookups to turn 6-bit integers * into 8-bit integers. * * Base64 character set: * [A-Z] [a-z] [0-9] - _ * 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2d, 0x5f * * @param int $src * @return int */ protected static function decode6Bits(int $src) : int { $ret = -1; // if ($src > 0x40 && $src < 0x5b) $ret += $src - 0x41 + 1; // -64 $ret += (0x40 - $src & $src - 0x5b) >> 8 & $src - 64; // if ($src > 0x60 && $src < 0x7b) $ret += $src - 0x61 + 26 + 1; // -70 $ret += (0x60 - $src & $src - 0x7b) >> 8 & $src - 70; // if ($src > 0x2f && $src < 0x3a) $ret += $src - 0x30 + 52 + 1; // 5 $ret += (0x2f - $src & $src - 0x3a) >> 8 & $src + 5; // if ($src == 0x2c) $ret += 62 + 1; $ret += (0x2c - $src & $src - 0x2e) >> 8 & 63; // if ($src == 0x5f) ret += 63 + 1; $ret += (0x5e - $src & $src - 0x60) >> 8 & 64; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 6-bit integers. * * @param int $src * @return string */ protected static function encode6Bits(int $src) : string { $diff = 0x41; // if ($src > 25) $diff += 0x61 - 0x41 - 26; // 6 $diff += 25 - $src >> 8 & 6; // if ($src > 51) $diff += 0x30 - 0x61 - 26; // -75 $diff -= 51 - $src >> 8 & 75; // if ($src > 61) $diff += 0x2d - 0x30 - 10; // -13 $diff -= 61 - $src >> 8 & 13; // if ($src > 62) $diff += 0x5f - 0x2b - 1; // 3 $diff += 62 - $src >> 8 & 49; return pack('C', $src + $diff); } } vendor_prefixed/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php 0000644 00000005337 15174671617 0023733 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use function pack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Base64DotSlashOrdered * ./[0-9][A-Z][a-z] * * @package ParagonIE\ConstantTime */ abstract class Base64DotSlashOrdered extends Base64 { /** * Uses bitwise operators instead of table-lookups to turn 6-bit integers * into 8-bit integers. * * Base64 character set: * [.-9] [A-Z] [a-z] * 0x2e-0x39, 0x41-0x5a, 0x61-0x7a * * @param int $src * @return int */ protected static function decode6Bits(int $src) : int { $ret = -1; // if ($src > 0x2d && $src < 0x3a) ret += $src - 0x2e + 1; // -45 $ret += (0x2d - $src & $src - 0x3a) >> 8 & $src - 45; // if ($src > 0x40 && $src < 0x5b) ret += $src - 0x41 + 12 + 1; // -52 $ret += (0x40 - $src & $src - 0x5b) >> 8 & $src - 52; // if ($src > 0x60 && $src < 0x7b) ret += $src - 0x61 + 38 + 1; // -58 $ret += (0x60 - $src & $src - 0x7b) >> 8 & $src - 58; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 6-bit integers. * * @param int $src * @return string */ protected static function encode6Bits(int $src) : string { $src += 0x2e; // if ($src > 0x39) $src += 0x41 - 0x3a; // 7 $src += 0x39 - $src >> 8 & 7; // if ($src > 0x5a) $src += 0x61 - 0x5b; // 6 $src += 0x5a - $src >> 8 & 6; return pack('C', $src); } } vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php 0000644 00000012235 15174671617 0020457 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use RangeException; use SensitiveParameter; use SodiumException; use TypeError; use function extension_loaded; use function pack; use function sodium_bin2hex; use function sodium_hex2bin; use function unpack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Hex * @package ParagonIE\ConstantTime */ abstract class Hex implements EncoderInterface { /** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $binString (raw binary) * @return string * @throws TypeError */ public static function encode( #[SensitiveParameter] string $binString ) : string { if (extension_loaded('sodium')) { try { return sodium_bin2hex($binString); } catch (SodiumException $ex) { throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); } } $hex = ''; $len = Binary::safeStrlen($binString); for ($i = 0; $i < $len; ++$i) { /** @var array<int, int> $chunk */ $chunk = unpack('C', $binString[$i]); $c = $chunk[1] & 0xf; $b = $chunk[1] >> 4; $hex .= pack('CC', 87 + $b + ($b - 10 >> 8 & ~38), 87 + $c + ($c - 10 >> 8 & ~38)); } return $hex; } /** * Convert a binary string into a hexadecimal string without cache-timing * leaks, returning uppercase letters (as per RFC 4648) * * @param string $binString (raw binary) * @return string * @throws TypeError */ public static function encodeUpper( #[SensitiveParameter] string $binString ) : string { $hex = ''; $len = Binary::safeStrlen($binString); for ($i = 0; $i < $len; ++$i) { /** @var array<int, int> $chunk */ $chunk = unpack('C', $binString[$i]); $c = $chunk[1] & 0xf; $b = $chunk[1] >> 4; $hex .= pack('CC', 55 + $b + ($b - 10 >> 8 & ~6), 55 + $c + ($c - 10 >> 8 & ~6)); } return $hex; } /** * Convert a hexadecimal string into a binary string without cache-timing * leaks * * @param string $encodedString * @param bool $strictPadding * @return string (raw binary) * @throws RangeException */ public static function decode( #[SensitiveParameter] string $encodedString, bool $strictPadding = \false ) : string { if (extension_loaded('sodium') && $strictPadding) { try { return sodium_hex2bin($encodedString); } catch (SodiumException $ex) { throw new RangeException($ex->getMessage(), $ex->getCode(), $ex); } } $hex_pos = 0; $bin = ''; $c_acc = 0; $hex_len = Binary::safeStrlen($encodedString); $state = 0; if (($hex_len & 1) !== 0) { if ($strictPadding) { throw new RangeException('Expected an even number of hexadecimal characters'); } else { $encodedString = '0' . $encodedString; ++$hex_len; } } /** @var array<int, int> $chunk */ $chunk = unpack('C*', $encodedString); while ($hex_pos < $hex_len) { ++$hex_pos; $c = $chunk[$hex_pos]; $c_num = $c ^ 48; $c_num0 = $c_num - 10 >> 8; $c_alpha = ($c & ~32) - 55; $c_alpha0 = ($c_alpha - 10 ^ $c_alpha - 16) >> 8; if (($c_num0 | $c_alpha0) === 0) { throw new RangeException('Expected hexadecimal character'); } $c_val = $c_num0 & $c_num | $c_alpha & $c_alpha0; if ($state === 0) { $c_acc = $c_val * 16; } else { $bin .= pack('C', $c_acc | $c_val); } $state ^= 1; } return $bin; } } vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php 0000644 00000005572 15174671617 0021165 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use TypeError; use function function_exists; use function mb_strlen; use function mb_substr; use function strlen; use function substr; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Binary * * Binary string operators that don't choke on * mbstring.func_overload * * @package ParagonIE\ConstantTime */ abstract class Binary { /** * Safe string length * * @ref mbstring.func_overload * * @param string $str * @return int */ public static function safeStrlen( #[\SensitiveParameter] string $str ) : int { if (function_exists('mb_strlen')) { // mb_strlen in PHP 7.x can return false. /** @psalm-suppress RedundantCast */ return (int) mb_strlen($str, '8bit'); } else { return strlen($str); } } /** * Safe substring * * @ref mbstring.func_overload * * @staticvar boolean $exists * @param string $str * @param int $start * @param ?int $length * @return string * * @throws TypeError */ public static function safeSubstr( #[\SensitiveParameter] string $str, int $start = 0, $length = null ) : string { if ($length === 0) { return ''; } if (function_exists('mb_substr')) { return mb_substr($str, $start, $length, '8bit'); } // Unlike mb_substr(), substr() doesn't accept NULL for length if ($length !== null) { return substr($str, $start, $length); } else { return substr($str, $start); } } } vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php 0000644 00000036702 15174671617 0020757 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use InvalidArgumentException; use RangeException; use SensitiveParameter; use TypeError; use function pack; use function unpack; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Base32 * [A-Z][2-7] * * @package ParagonIE\ConstantTime */ abstract class Base32 implements EncoderInterface { /** * Decode a Base32-encoded string into raw binary * * @param string $encodedString * @param bool $strictPadding * @return string */ public static function decode( #[SensitiveParameter] string $encodedString, bool $strictPadding = \false ) : string { return static::doDecode($encodedString, \false, $strictPadding); } /** * Decode an uppercase Base32-encoded string into raw binary * * @param string $src * @param bool $strictPadding * @return string */ public static function decodeUpper( #[SensitiveParameter] string $src, bool $strictPadding = \false ) : string { return static::doDecode($src, \true, $strictPadding); } /** * Encode into Base32 (RFC 4648) * * @param string $binString * @return string * @throws TypeError */ public static function encode( #[SensitiveParameter] string $binString ) : string { return static::doEncode($binString, \false, \true); } /** * Encode into Base32 (RFC 4648) * * @param string $src * @return string * @throws TypeError */ public static function encodeUnpadded( #[SensitiveParameter] string $src ) : string { return static::doEncode($src, \false, \false); } /** * Encode into uppercase Base32 (RFC 4648) * * @param string $src * @return string * @throws TypeError */ public static function encodeUpper( #[SensitiveParameter] string $src ) : string { return static::doEncode($src, \true, \true); } /** * Encode into uppercase Base32 (RFC 4648) * * @param string $src * @return string * @throws TypeError */ public static function encodeUpperUnpadded( #[SensitiveParameter] string $src ) : string { return static::doEncode($src, \true, \false); } /** * Uses bitwise operators instead of table-lookups to turn 5-bit integers * into 8-bit integers. * * @param int $src * @return int */ protected static function decode5Bits(int $src) : int { $ret = -1; // if ($src > 96 && $src < 123) $ret += $src - 97 + 1; // -64 $ret += (0x60 - $src & $src - 0x7b) >> 8 & $src - 96; // if ($src > 0x31 && $src < 0x38) $ret += $src - 24 + 1; // -23 $ret += (0x31 - $src & $src - 0x38) >> 8 & $src - 23; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 5-bit integers * into 8-bit integers. * * Uppercase variant. * * @param int $src * @return int */ protected static function decode5BitsUpper(int $src) : int { $ret = -1; // if ($src > 64 && $src < 91) $ret += $src - 65 + 1; // -64 $ret += (0x40 - $src & $src - 0x5b) >> 8 & $src - 64; // if ($src > 0x31 && $src < 0x38) $ret += $src - 24 + 1; // -23 $ret += (0x31 - $src & $src - 0x38) >> 8 & $src - 23; return $ret; } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 5-bit integers. * * @param int $src * @return string */ protected static function encode5Bits(int $src) : string { $diff = 0x61; // if ($src > 25) $ret -= 72; $diff -= 25 - $src >> 8 & 73; return pack('C', $src + $diff); } /** * Uses bitwise operators instead of table-lookups to turn 8-bit integers * into 5-bit integers. * * Uppercase variant. * * @param int $src * @return string */ protected static function encode5BitsUpper(int $src) : string { $diff = 0x41; // if ($src > 25) $ret -= 40; $diff -= 25 - $src >> 8 & 41; return pack('C', $src + $diff); } /** * @param string $encodedString * @param bool $upper * @return string */ public static function decodeNoPadding( #[SensitiveParameter] string $encodedString, bool $upper = \false ) : string { $srcLen = Binary::safeStrlen($encodedString); if ($srcLen === 0) { return ''; } if (($srcLen & 7) === 0) { for ($j = 0; $j < 7 && $j < $srcLen; ++$j) { if ($encodedString[$srcLen - $j - 1] === '=') { throw new InvalidArgumentException("decodeNoPadding() doesn't tolerate padding"); } } } return static::doDecode($encodedString, $upper, \true); } /** * Base32 decoding * * @param string $src * @param bool $upper * @param bool $strictPadding * @return string * * @throws TypeError */ protected static function doDecode( #[SensitiveParameter] string $src, bool $upper = \false, bool $strictPadding = \false ) : string { // We do this to reduce code duplication: $method = $upper ? 'decode5BitsUpper' : 'decode5Bits'; // Remove padding $srcLen = Binary::safeStrlen($src); if ($srcLen === 0) { return ''; } if ($strictPadding) { if (($srcLen & 7) === 0) { for ($j = 0; $j < 7; ++$j) { if ($src[$srcLen - 1] === '=') { $srcLen--; } else { break; } } } if (($srcLen & 7) === 1) { throw new RangeException('Incorrect padding'); } } else { $src = \rtrim($src, '='); $srcLen = Binary::safeStrlen($src); } $err = 0; $dest = ''; // Main loop (no padding): for ($i = 0; $i + 8 <= $srcLen; $i += 8) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($src, $i, 8)); /** @var int $c0 */ $c0 = static::$method($chunk[1]); /** @var int $c1 */ $c1 = static::$method($chunk[2]); /** @var int $c2 */ $c2 = static::$method($chunk[3]); /** @var int $c3 */ $c3 = static::$method($chunk[4]); /** @var int $c4 */ $c4 = static::$method($chunk[5]); /** @var int $c5 */ $c5 = static::$method($chunk[6]); /** @var int $c6 */ $c6 = static::$method($chunk[7]); /** @var int $c7 */ $c7 = static::$method($chunk[8]); $dest .= pack('CCCCC', ($c0 << 3 | $c1 >> 2) & 0xff, ($c1 << 6 | $c2 << 1 | $c3 >> 4) & 0xff, ($c3 << 4 | $c4 >> 1) & 0xff, ($c4 << 7 | $c5 << 2 | $c6 >> 3) & 0xff, ($c6 << 5 | $c7) & 0xff); $err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5 | $c6 | $c7) >> 8; } // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); /** @var int $c0 */ $c0 = static::$method($chunk[1]); if ($i + 6 < $srcLen) { /** @var int $c1 */ $c1 = static::$method($chunk[2]); /** @var int $c2 */ $c2 = static::$method($chunk[3]); /** @var int $c3 */ $c3 = static::$method($chunk[4]); /** @var int $c4 */ $c4 = static::$method($chunk[5]); /** @var int $c5 */ $c5 = static::$method($chunk[6]); /** @var int $c6 */ $c6 = static::$method($chunk[7]); $dest .= pack('CCCC', ($c0 << 3 | $c1 >> 2) & 0xff, ($c1 << 6 | $c2 << 1 | $c3 >> 4) & 0xff, ($c3 << 4 | $c4 >> 1) & 0xff, ($c4 << 7 | $c5 << 2 | $c6 >> 3) & 0xff); $err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5 | $c6) >> 8; if ($strictPadding) { $err |= $c6 << 5 & 0xff; } } elseif ($i + 5 < $srcLen) { /** @var int $c1 */ $c1 = static::$method($chunk[2]); /** @var int $c2 */ $c2 = static::$method($chunk[3]); /** @var int $c3 */ $c3 = static::$method($chunk[4]); /** @var int $c4 */ $c4 = static::$method($chunk[5]); /** @var int $c5 */ $c5 = static::$method($chunk[6]); $dest .= pack('CCCC', ($c0 << 3 | $c1 >> 2) & 0xff, ($c1 << 6 | $c2 << 1 | $c3 >> 4) & 0xff, ($c3 << 4 | $c4 >> 1) & 0xff, ($c4 << 7 | $c5 << 2) & 0xff); $err |= ($c0 | $c1 | $c2 | $c3 | $c4 | $c5) >> 8; } elseif ($i + 4 < $srcLen) { /** @var int $c1 */ $c1 = static::$method($chunk[2]); /** @var int $c2 */ $c2 = static::$method($chunk[3]); /** @var int $c3 */ $c3 = static::$method($chunk[4]); /** @var int $c4 */ $c4 = static::$method($chunk[5]); $dest .= pack('CCC', ($c0 << 3 | $c1 >> 2) & 0xff, ($c1 << 6 | $c2 << 1 | $c3 >> 4) & 0xff, ($c3 << 4 | $c4 >> 1) & 0xff); $err |= ($c0 | $c1 | $c2 | $c3 | $c4) >> 8; if ($strictPadding) { $err |= $c4 << 7 & 0xff; } } elseif ($i + 3 < $srcLen) { /** @var int $c1 */ $c1 = static::$method($chunk[2]); /** @var int $c2 */ $c2 = static::$method($chunk[3]); /** @var int $c3 */ $c3 = static::$method($chunk[4]); $dest .= pack('CC', ($c0 << 3 | $c1 >> 2) & 0xff, ($c1 << 6 | $c2 << 1 | $c3 >> 4) & 0xff); $err |= ($c0 | $c1 | $c2 | $c3) >> 8; if ($strictPadding) { $err |= $c3 << 4 & 0xff; } } elseif ($i + 2 < $srcLen) { /** @var int $c1 */ $c1 = static::$method($chunk[2]); /** @var int $c2 */ $c2 = static::$method($chunk[3]); $dest .= pack('CC', ($c0 << 3 | $c1 >> 2) & 0xff, ($c1 << 6 | $c2 << 1) & 0xff); $err |= ($c0 | $c1 | $c2) >> 8; if ($strictPadding) { $err |= $c2 << 6 & 0xff; } } elseif ($i + 1 < $srcLen) { /** @var int $c1 */ $c1 = static::$method($chunk[2]); $dest .= pack('C', ($c0 << 3 | $c1 >> 2) & 0xff); $err |= ($c0 | $c1) >> 8; if ($strictPadding) { $err |= $c1 << 6 & 0xff; } } else { $dest .= pack('C', $c0 << 3 & 0xff); $err |= $c0 >> 8; } } $check = $err === 0; if (!$check) { throw new RangeException('Base32::doDecode() only expects characters in the correct base32 alphabet'); } return $dest; } /** * Base32 Encoding * * @param string $src * @param bool $upper * @param bool $pad * @return string * @throws TypeError */ protected static function doEncode( #[SensitiveParameter] string $src, bool $upper = \false, $pad = \true ) : string { // We do this to reduce code duplication: $method = $upper ? 'encode5BitsUpper' : 'encode5Bits'; $dest = ''; $srcLen = Binary::safeStrlen($src); // Main loop (no padding): for ($i = 0; $i + 5 <= $srcLen; $i += 5) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($src, $i, 5)); $b0 = $chunk[1]; $b1 = $chunk[2]; $b2 = $chunk[3]; $b3 = $chunk[4]; $b4 = $chunk[5]; $dest .= static::$method($b0 >> 3 & 31) . static::$method(($b0 << 2 | $b1 >> 6) & 31) . static::$method($b1 >> 1 & 31) . static::$method(($b1 << 4 | $b2 >> 4) & 31) . static::$method(($b2 << 1 | $b3 >> 7) & 31) . static::$method($b3 >> 2 & 31) . static::$method(($b3 << 3 | $b4 >> 5) & 31) . static::$method($b4 & 31); } // The last chunk, which may have padding: if ($i < $srcLen) { /** @var array<int, int> $chunk */ $chunk = unpack('C*', Binary::safeSubstr($src, $i, $srcLen - $i)); $b0 = $chunk[1]; if ($i + 3 < $srcLen) { $b1 = $chunk[2]; $b2 = $chunk[3]; $b3 = $chunk[4]; $dest .= static::$method($b0 >> 3 & 31) . static::$method(($b0 << 2 | $b1 >> 6) & 31) . static::$method($b1 >> 1 & 31) . static::$method(($b1 << 4 | $b2 >> 4) & 31) . static::$method(($b2 << 1 | $b3 >> 7) & 31) . static::$method($b3 >> 2 & 31) . static::$method($b3 << 3 & 31); if ($pad) { $dest .= '='; } } elseif ($i + 2 < $srcLen) { $b1 = $chunk[2]; $b2 = $chunk[3]; $dest .= static::$method($b0 >> 3 & 31) . static::$method(($b0 << 2 | $b1 >> 6) & 31) . static::$method($b1 >> 1 & 31) . static::$method(($b1 << 4 | $b2 >> 4) & 31) . static::$method($b2 << 1 & 31); if ($pad) { $dest .= '==='; } } elseif ($i + 1 < $srcLen) { $b1 = $chunk[2]; $dest .= static::$method($b0 >> 3 & 31) . static::$method(($b0 << 2 | $b1 >> 6) & 31) . static::$method($b1 >> 1 & 31) . static::$method($b1 << 4 & 31); if ($pad) { $dest .= '===='; } } else { $dest .= static::$method($b0 >> 3 & 31) . static::$method($b0 << 2 & 31); if ($pad) { $dest .= '======'; } } } return $dest; } } vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php 0000644 00000016301 15174671617 0021457 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; use SensitiveParameter; use TypeError; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Class Encoding * @package ParagonIE\ConstantTime */ abstract class Encoding { /** * RFC 4648 Base32 encoding * * @param string $str * @return string * @throws TypeError */ public static function base32Encode( #[SensitiveParameter] string $str ) : string { return Base32::encode($str); } /** * RFC 4648 Base32 encoding * * @param string $str * @return string * @throws TypeError */ public static function base32EncodeUpper( #[SensitiveParameter] string $str ) : string { return Base32::encodeUpper($str); } /** * RFC 4648 Base32 decoding * * @param string $str * @return string * @throws TypeError */ public static function base32Decode( #[SensitiveParameter] string $str ) : string { return Base32::decode($str); } /** * RFC 4648 Base32 decoding * * @param string $str * @return string * @throws TypeError */ public static function base32DecodeUpper( #[SensitiveParameter] string $str ) : string { return Base32::decodeUpper($str); } /** * RFC 4648 Base32 encoding * * @param string $str * @return string * @throws TypeError */ public static function base32HexEncode( #[SensitiveParameter] string $str ) : string { return Base32Hex::encode($str); } /** * RFC 4648 Base32Hex encoding * * @param string $str * @return string * @throws TypeError */ public static function base32HexEncodeUpper( #[SensitiveParameter] string $str ) : string { return Base32Hex::encodeUpper($str); } /** * RFC 4648 Base32Hex decoding * * @param string $str * @return string * @throws TypeError */ public static function base32HexDecode( #[SensitiveParameter] string $str ) : string { return Base32Hex::decode($str); } /** * RFC 4648 Base32Hex decoding * * @param string $str * @return string * @throws TypeError */ public static function base32HexDecodeUpper( #[SensitiveParameter] string $str ) : string { return Base32Hex::decodeUpper($str); } /** * RFC 4648 Base64 encoding * * @param string $str * @return string * @throws TypeError */ public static function base64Encode( #[SensitiveParameter] string $str ) : string { return Base64::encode($str); } /** * RFC 4648 Base64 decoding * * @param string $str * @return string * @throws TypeError */ public static function base64Decode( #[SensitiveParameter] string $str ) : string { return Base64::decode($str); } /** * Encode into Base64 * * Base64 character set "./[A-Z][a-z][0-9]" * @param string $str * @return string * @throws TypeError */ public static function base64EncodeDotSlash( #[SensitiveParameter] string $str ) : string { return Base64DotSlash::encode($str); } /** * Decode from base64 to raw binary * * Base64 character set "./[A-Z][a-z][0-9]" * * @param string $str * @return string * @throws \RangeException * @throws TypeError */ public static function base64DecodeDotSlash( #[SensitiveParameter] string $str ) : string { return Base64DotSlash::decode($str); } /** * Encode into Base64 * * Base64 character set "[.-9][A-Z][a-z]" or "./[0-9][A-Z][a-z]" * @param string $str * @return string * @throws TypeError */ public static function base64EncodeDotSlashOrdered( #[SensitiveParameter] string $str ) : string { return Base64DotSlashOrdered::encode($str); } /** * Decode from base64 to raw binary * * Base64 character set "[.-9][A-Z][a-z]" or "./[0-9][A-Z][a-z]" * * @param string $str * @return string * @throws \RangeException * @throws TypeError */ public static function base64DecodeDotSlashOrdered( #[SensitiveParameter] string $str ) : string { return Base64DotSlashOrdered::decode($str); } /** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $bin_string (raw binary) * @return string * @throws TypeError */ public static function hexEncode( #[SensitiveParameter] string $bin_string ) : string { return Hex::encode($bin_string); } /** * Convert a hexadecimal string into a binary string without cache-timing * leaks * * @param string $hex_string * @return string (raw binary) * @throws \RangeException */ public static function hexDecode( #[SensitiveParameter] string $hex_string ) : string { return Hex::decode($hex_string); } /** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $bin_string (raw binary) * @return string * @throws TypeError */ public static function hexEncodeUpper( #[SensitiveParameter] string $bin_string ) : string { return Hex::encodeUpper($bin_string); } /** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $bin_string (raw binary) * @return string */ public static function hexDecodeUpper( #[SensitiveParameter] string $bin_string ) : string { return Hex::decode($bin_string); } } vendor_prefixed/paragonie/constant_time_encoding/src/EncoderInterface.php 0000644 00000003725 15174671617 0023137 0 ustar 00 <?php declare (strict_types=1); namespace WPMailSMTP\Vendor\ParagonIE\ConstantTime; /** * Copyright (c) 2016 - 2022 Paragon Initiative Enterprises. * Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) * * 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. */ /** * Interface EncoderInterface * @package ParagonIE\ConstantTime */ interface EncoderInterface { /** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $binString (raw binary) * @return string */ public static function encode(string $binString) : string; /** * Convert a binary string into a hexadecimal string without cache-timing * leaks * * @param string $encodedString * @param bool $strictPadding Error on invalid padding * @return string (raw binary) */ public static function decode(string $encodedString, bool $strictPadding = \false) : string; } vendor/paragonie/random_compat/lib/random.php 0000644 00000002457 15174671617 0015417 0 ustar 00 <?php /** * Random_* Compatibility Library * for using the new PHP 7 random_* API in PHP 5 projects * * @version 2.99.99 * @released 2018-06-06 * * The MIT License (MIT) * * Copyright (c) 2015 - 2018 Paragon Initiative Enterprises * * 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. */ // NOP vendor/paragonie/random_compat/LICENSE 0000644 00000002112 15174671617 0013651 0 ustar 00 The MIT License (MIT) Copyright (c) 2015 Paragon Initiative Enterprises 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/paragonie/random_compat/other/build_phar.php 0000644 00000003141 15174671617 0016612 0 ustar 00 <?php $dist = dirname(__DIR__).'/dist'; if (!is_dir($dist)) { mkdir($dist, 0755); } if (file_exists($dist.'/random_compat.phar')) { unlink($dist.'/random_compat.phar'); } $phar = new Phar( $dist.'/random_compat.phar', FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::KEY_AS_FILENAME, 'random_compat.phar' ); rename( dirname(__DIR__).'/lib/random.php', dirname(__DIR__).'/lib/index.php' ); $phar->buildFromDirectory(dirname(__DIR__).'/lib'); rename( dirname(__DIR__).'/lib/index.php', dirname(__DIR__).'/lib/random.php' ); /** * If we pass an (optional) path to a private key as a second argument, we will * sign the Phar with OpenSSL. * * If you leave this out, it will produce an unsigned .phar! */ if ($argc > 1) { if (!@is_readable($argv[1])) { echo 'Could not read the private key file:', $argv[1], "\n"; exit(255); } $pkeyFile = file_get_contents($argv[1]); $private = openssl_get_privatekey($pkeyFile); if ($private !== false) { $pkey = ''; openssl_pkey_export($private, $pkey); $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); /** * Save the corresponding public key to the file */ if (!@is_readable($dist.'/random_compat.phar.pubkey')) { $details = openssl_pkey_get_details($private); file_put_contents( $dist.'/random_compat.phar.pubkey', $details['key'] ); } } else { echo 'An error occurred reading the private key from OpenSSL.', "\n"; exit(255); } } vendor/paragonie/random_compat/psalm-autoload.php 0000644 00000000347 15174671617 0016307 0 ustar 00 <?php require_once 'lib/byte_safe_strings.php'; require_once 'lib/cast_to_int.php'; require_once 'lib/error_polyfill.php'; require_once 'other/ide_stubs/libsodium.php'; require_once 'lib/random.php'; $int = random_int(0, 65536); vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc 0000644 00000000750 15174671617 0021357 0 ustar 00 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg 1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= =B6+8 -----END PGP SIGNATURE----- vendor/paragonie/random_compat/dist/random_compat.phar.pubkey 0000644 00000000327 15174671617 0020612 0 ustar 00 -----BEGIN PUBLIC KEY----- MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p +h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc -----END PUBLIC KEY----- vendor/ralouphie/getallheaders/LICENSE 0000644 00000002070 15174671617 0013660 0 ustar 00 The MIT License (MIT) Copyright (c) 2014 Ralph Khattar 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/ralouphie/getallheaders/src/getallheaders.php 0000644 00000003150 15174671617 0016757 0 ustar 00 <?php if (!function_exists('getallheaders')) { /** * Get all HTTP header key/values as an associative array for the current request. * * @return string[string] The HTTP header key/value pairs. */ function getallheaders() { $headers = array(); $copy_server = array( 'CONTENT_TYPE' => 'Content-Type', 'CONTENT_LENGTH' => 'Content-Length', 'CONTENT_MD5' => 'Content-Md5', ); foreach ($_SERVER as $key => $value) { if (substr($key, 0, 5) === 'HTTP_') { $key = substr($key, 5); if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); $headers[$key] = $value; } } elseif (isset($copy_server[$key])) { $headers[$copy_server[$key]] = $value; } } if (!isset($headers['Authorization'])) { if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; } elseif (isset($_SERVER['PHP_AUTH_USER'])) { $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; } } return $headers; } } vendor/composer/autoload_namespaces.php 0000644 00000000213 15174671617 0014423 0 ustar 00 <?php // autoload_namespaces.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( ); vendor/composer/autoload_files.php 0000644 00000001121 15174671617 0013405 0 ustar 00 <?php // autoload_files.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( '2bb094e40611cb5eccea789f32aff634' => $baseDir . '/vendor_prefixed/symfony/polyfill-mbstring/bootstrap.php', '606299e0d90ec13f1e6b53164b8387df' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap.php', '2d822e735b5b1897d96a7a28221d6513' => $baseDir . '/vendor_prefixed/symfony/deprecation-contracts/function.php', '6fe0d6ea1deb6acc74bbe64573a83e1c' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/functions_include.php', ); vendor/composer/autoload_psr4.php 0000644 00000000431 15174671617 0013176 0 ustar 00 <?php // autoload_psr4.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'WPMailSMTP\\' => array($baseDir . '/src'), 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'), ); vendor/composer/installed.php 0000644 00000024560 15174671617 0012406 0 ustar 00 <?php return array( 'root' => array( 'name' => 'awesomemotive/wp-mail-smtp', 'pretty_version' => 'dev-4.7.1-release', 'version' => 'dev-4.7.1-release', 'reference' => '506120d166a112b714a33e187203859455e4f74f', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => false, ), 'versions' => array( 'awesomemotive/wp-mail-smtp' => array( 'pretty_version' => 'dev-4.7.1-release', 'version' => 'dev-4.7.1-release', 'reference' => '506120d166a112b714a33e187203859455e4f74f', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'composer/installers' => array( 'pretty_version' => 'v2.3.0', 'version' => '2.3.0.0', 'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), 'dev_requirement' => false, ), 'firebase/php-jwt' => array( 'pretty_version' => 'v6.10.0', 'version' => '6.10.0.0', 'reference' => 'a49db6f0a5033aef5143295342f1c95521b075ff', 'type' => 'library', 'install_path' => __DIR__ . '/../firebase/php-jwt', 'aliases' => array(), 'dev_requirement' => false, ), 'google/apiclient' => array( 'pretty_version' => 'v2.16.1', 'version' => '2.16.1.0', 'reference' => 'd7066f3a205aaeb83cce439613770e69394a43c8', 'type' => 'library', 'install_path' => __DIR__ . '/../google/apiclient', 'aliases' => array(), 'dev_requirement' => false, ), 'google/apiclient-services' => array( 'pretty_version' => 'v0.355.0', 'version' => '0.355.0.0', 'reference' => '235e6a45ecafd77accc102b5ab6d529aab54da23', 'type' => 'library', 'install_path' => __DIR__ . '/../google/apiclient-services', 'aliases' => array(), 'dev_requirement' => false, ), 'google/auth' => array( 'pretty_version' => 'v1.37.2', 'version' => '1.37.2.0', 'reference' => '25eed0045d8cf107424a8b9010c9fdcc0734ceb0', 'type' => 'library', 'install_path' => __DIR__ . '/../google/auth', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( 'pretty_version' => '7.10.0', 'version' => '7.10.0.0', 'reference' => 'b51ac707cfa420b7bfd4e4d5e510ba8008e822b4', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( 'pretty_version' => '2.3.0', 'version' => '2.3.0.0', 'reference' => '481557b130ef3790cf82b713667b43030dc9c957', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( 'pretty_version' => '2.8.0', 'version' => '2.8.0.0', 'reference' => '21dc724a0583619cd1652f673303492272778051', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => false, ), 'monolog/monolog' => array( 'pretty_version' => '2.10.0', 'version' => '2.10.0.0', 'reference' => '5cf826f2991858b54d5c3809bee745560a1042a7', 'type' => 'library', 'install_path' => __DIR__ . '/../monolog/monolog', 'aliases' => array(), 'dev_requirement' => false, ), 'paragonie/constant_time_encoding' => array( 'pretty_version' => 'v2.8.2', 'version' => '2.8.2.0', 'reference' => 'e30811f7bc69e4b5b6d5783e712c06c8eabf0226', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding', 'aliases' => array(), 'dev_requirement' => false, ), 'paragonie/random_compat' => array( 'pretty_version' => 'v9.99.100', 'version' => '9.99.100.0', 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/random_compat', 'aliases' => array(), 'dev_requirement' => false, ), 'phpseclib/phpseclib' => array( 'pretty_version' => '3.0.43', 'version' => '3.0.43.0', 'reference' => '709ec107af3cb2f385b9617be72af8cf62441d02', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/phpseclib', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/cache' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/http-client' => array( 'pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/http-client-implementation' => array( 'dev_requirement' => false, 'provided' => array( 0 => '1.0', ), ), 'psr/http-factory' => array( 'pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/http-factory-implementation' => array( 'dev_requirement' => false, 'provided' => array( 0 => '1.0', ), ), 'psr/http-message' => array( 'pretty_version' => '2.0', 'version' => '2.0.0.0', 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/http-message-implementation' => array( 'dev_requirement' => false, 'provided' => array( 0 => '1.0', ), ), 'psr/log' => array( 'pretty_version' => '1.1.4', 'version' => '1.1.4.0', 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => false, ), 'psr/log-implementation' => array( 'dev_requirement' => false, 'provided' => array( 0 => '1.0.0 || 2.0.0 || 3.0.0', ), ), 'ralouphie/getallheaders' => array( 'pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/deprecation-contracts' => array( 'pretty_version' => 'v2.5.4', 'version' => '2.5.4.0', 'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => 'c36586dcf89a12315939e00ec9b4474adcb1d773', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '3833d7255cc303546435cb650316bff708a1c75c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( 'pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '85181ba99b2345b0ef10ce42ecac37612d9fd341', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => false, ), 'wikimedia/composer-merge-plugin' => array( 'pretty_version' => 'v2.1.0', 'version' => '2.1.0.0', 'reference' => 'a03d426c8e9fb2c9c569d9deeb31a083292788bc', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../wikimedia/composer-merge-plugin', 'aliases' => array(), 'dev_requirement' => false, ), 'woocommerce/action-scheduler' => array( 'pretty_version' => '3.9.3', 'version' => '3.9.3.0', 'reference' => 'c58cdbab17651303d406cd3b22cf9d75c71c986c', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../woocommerce/action-scheduler', 'aliases' => array(), 'dev_requirement' => false, ), ), ); vendor/composer/autoload_static.php 0000644 00000326044 15174671617 0013610 0 ustar 00 <?php // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInitcff0bec3e1c1cc5d8ab7965adacb1549 { public static $files = array ( '2bb094e40611cb5eccea789f32aff634' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-mbstring/bootstrap.php', '606299e0d90ec13f1e6b53164b8387df' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/bootstrap.php', '2d822e735b5b1897d96a7a28221d6513' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/deprecation-contracts/function.php', '6fe0d6ea1deb6acc74bbe64573a83e1c' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/functions_include.php', ); public static $prefixLengthsPsr4 = array ( 'W' => array ( 'WPMailSMTP\\' => 11, ), 'C' => array ( 'Composer\\Installers\\' => 20, ), ); public static $prefixDirsPsr4 = array ( 'WPMailSMTP\\' => array ( 0 => __DIR__ . '/../..' . '/src', ), 'Composer\\Installers\\' => array ( 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', ), ); public static $classMap = array ( 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php', 'Composer\\Installers\\AkauntingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php', 'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php', 'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php', 'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php', 'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php', 'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php', 'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php', 'Composer\\Installers\\BotbleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BotbleInstaller.php', 'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php', 'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php', 'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php', 'Composer\\Installers\\ClanCatsFrameworkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php', 'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php', 'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php', 'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php', 'Composer\\Installers\\ConcreteCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php', 'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php', 'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php', 'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php', 'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php', 'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php', 'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php', 'Composer\\Installers\\ElggInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ElggInstaller.php', 'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php', 'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php', 'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php', 'Composer\\Installers\\ForkCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php', 'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php', 'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php', 'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php', 'Composer\\Installers\\HuradInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/HuradInstaller.php', 'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php', 'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php', 'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php', 'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php', 'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php', 'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php', 'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php', 'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php', 'Composer\\Installers\\LaravelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LaravelInstaller.php', 'Composer\\Installers\\LavaLiteInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php', 'Composer\\Installers\\LithiumInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LithiumInstaller.php', 'Composer\\Installers\\MODULEWorkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php', 'Composer\\Installers\\MODXEvoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php', 'Composer\\Installers\\MagentoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MagentoInstaller.php', 'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php', 'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php', 'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php', 'Composer\\Installers\\MatomoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MatomoInstaller.php', 'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php', 'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php', 'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php', 'Composer\\Installers\\MiaoxingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php', 'Composer\\Installers\\MicroweberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php', 'Composer\\Installers\\ModxInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ModxInstaller.php', 'Composer\\Installers\\MoodleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MoodleInstaller.php', 'Composer\\Installers\\OctoberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OctoberInstaller.php', 'Composer\\Installers\\OntoWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php', 'Composer\\Installers\\OsclassInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OsclassInstaller.php', 'Composer\\Installers\\OxidInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OxidInstaller.php', 'Composer\\Installers\\PPIInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PPIInstaller.php', 'Composer\\Installers\\PantheonInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PantheonInstaller.php', 'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php', 'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php', 'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php', 'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php', 'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php', 'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php', 'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php', 'Composer\\Installers\\ProcessWireInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php', 'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php', 'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php', 'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php', 'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php', 'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php', 'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php', 'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php', 'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php', 'Composer\\Installers\\ShopwareInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php', 'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php', 'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php', 'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php', 'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php', 'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php', 'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php', 'Composer\\Installers\\TastyIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php', 'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php', 'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php', 'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php', 'Composer\\Installers\\VanillaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VanillaInstaller.php', 'Composer\\Installers\\VgmcpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php', 'Composer\\Installers\\WHMCSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php', 'Composer\\Installers\\WinterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WinterInstaller.php', 'Composer\\Installers\\WolfCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php', 'Composer\\Installers\\WordPressInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WordPressInstaller.php', 'Composer\\Installers\\YawikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/YawikInstaller.php', 'Composer\\Installers\\ZendInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZendInstaller.php', 'Composer\\Installers\\ZikulaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php', 'WPMailSMTP\\AbstractConnection' => __DIR__ . '/../..' . '/src/AbstractConnection.php', 'WPMailSMTP\\Admin\\AdminBarMenu' => __DIR__ . '/../..' . '/src/Admin/AdminBarMenu.php', 'WPMailSMTP\\Admin\\Area' => __DIR__ . '/../..' . '/src/Admin/Area.php', 'WPMailSMTP\\Admin\\ConnectionSettings' => __DIR__ . '/../..' . '/src/Admin/ConnectionSettings.php', 'WPMailSMTP\\Admin\\DashboardWidget' => __DIR__ . '/../..' . '/src/Admin/DashboardWidget.php', 'WPMailSMTP\\Admin\\DebugEvents\\DebugEvents' => __DIR__ . '/../..' . '/src/Admin/DebugEvents/DebugEvents.php', 'WPMailSMTP\\Admin\\DebugEvents\\Event' => __DIR__ . '/../..' . '/src/Admin/DebugEvents/Event.php', 'WPMailSMTP\\Admin\\DebugEvents\\EventsCollection' => __DIR__ . '/../..' . '/src/Admin/DebugEvents/EventsCollection.php', 'WPMailSMTP\\Admin\\DebugEvents\\Migration' => __DIR__ . '/../..' . '/src/Admin/DebugEvents/Migration.php', 'WPMailSMTP\\Admin\\DebugEvents\\Table' => __DIR__ . '/../..' . '/src/Admin/DebugEvents/Table.php', 'WPMailSMTP\\Admin\\DomainChecker' => __DIR__ . '/../..' . '/src/Admin/DomainChecker.php', 'WPMailSMTP\\Admin\\Education' => __DIR__ . '/../..' . '/src/Admin/Education.php', 'WPMailSMTP\\Admin\\FlyoutMenu' => __DIR__ . '/../..' . '/src/Admin/FlyoutMenu.php', 'WPMailSMTP\\Admin\\Notifications' => __DIR__ . '/../..' . '/src/Admin/Notifications.php', 'WPMailSMTP\\Admin\\PageAbstract' => __DIR__ . '/../..' . '/src/Admin/PageAbstract.php', 'WPMailSMTP\\Admin\\PageInterface' => __DIR__ . '/../..' . '/src/Admin/PageInterface.php', 'WPMailSMTP\\Admin\\Pages\\About' => __DIR__ . '/../..' . '/src/Admin/Pages/About.php', 'WPMailSMTP\\Admin\\Pages\\AboutTab' => __DIR__ . '/../..' . '/src/Admin/Pages/AboutTab.php', 'WPMailSMTP\\Admin\\Pages\\ActionSchedulerTab' => __DIR__ . '/../..' . '/src/Admin/Pages/ActionSchedulerTab.php', 'WPMailSMTP\\Admin\\Pages\\AdditionalConnectionsTab' => __DIR__ . '/../..' . '/src/Admin/Pages/AdditionalConnectionsTab.php', 'WPMailSMTP\\Admin\\Pages\\AlertsTab' => __DIR__ . '/../..' . '/src/Admin/Pages/AlertsTab.php', 'WPMailSMTP\\Admin\\Pages\\AuthTab' => __DIR__ . '/../..' . '/src/Admin/Pages/AuthTab.php', 'WPMailSMTP\\Admin\\Pages\\ControlTab' => __DIR__ . '/../..' . '/src/Admin/Pages/ControlTab.php', 'WPMailSMTP\\Admin\\Pages\\DebugEventsTab' => __DIR__ . '/../..' . '/src/Admin/Pages/DebugEventsTab.php', 'WPMailSMTP\\Admin\\Pages\\EmailReports' => __DIR__ . '/../..' . '/src/Admin/Pages/EmailReports.php', 'WPMailSMTP\\Admin\\Pages\\EmailReportsTab' => __DIR__ . '/../..' . '/src/Admin/Pages/EmailReportsTab.php', 'WPMailSMTP\\Admin\\Pages\\ExportTab' => __DIR__ . '/../..' . '/src/Admin/Pages/ExportTab.php', 'WPMailSMTP\\Admin\\Pages\\Logs' => __DIR__ . '/../..' . '/src/Admin/Pages/Logs.php', 'WPMailSMTP\\Admin\\Pages\\LogsTab' => __DIR__ . '/../..' . '/src/Admin/Pages/LogsTab.php', 'WPMailSMTP\\Admin\\Pages\\MiscTab' => __DIR__ . '/../..' . '/src/Admin/Pages/MiscTab.php', 'WPMailSMTP\\Admin\\Pages\\SettingsTab' => __DIR__ . '/../..' . '/src/Admin/Pages/SettingsTab.php', 'WPMailSMTP\\Admin\\Pages\\SmartRoutingTab' => __DIR__ . '/../..' . '/src/Admin/Pages/SmartRoutingTab.php', 'WPMailSMTP\\Admin\\Pages\\TestTab' => __DIR__ . '/../..' . '/src/Admin/Pages/TestTab.php', 'WPMailSMTP\\Admin\\Pages\\Tools' => __DIR__ . '/../..' . '/src/Admin/Pages/Tools.php', 'WPMailSMTP\\Admin\\Pages\\VersusTab' => __DIR__ . '/../..' . '/src/Admin/Pages/VersusTab.php', 'WPMailSMTP\\Admin\\ParentPageAbstract' => __DIR__ . '/../..' . '/src/Admin/ParentPageAbstract.php', 'WPMailSMTP\\Admin\\PluginsInstallSkin' => __DIR__ . '/../..' . '/src/Admin/PluginsInstallSkin.php', 'WPMailSMTP\\Admin\\Review' => __DIR__ . '/../..' . '/src/Admin/Review.php', 'WPMailSMTP\\Admin\\SetupWizard' => __DIR__ . '/../..' . '/src/Admin/SetupWizard.php', 'WPMailSMTP\\Compatibility\\Compatibility' => __DIR__ . '/../..' . '/src/Compatibility/Compatibility.php', 'WPMailSMTP\\Compatibility\\Plugin\\Admin2020' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/Admin2020.php', 'WPMailSMTP\\Compatibility\\Plugin\\PluginAbstract' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/PluginAbstract.php', 'WPMailSMTP\\Compatibility\\Plugin\\PluginInterface' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/PluginInterface.php', 'WPMailSMTP\\Compatibility\\Plugin\\Polylang' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/Polylang.php', 'WPMailSMTP\\Compatibility\\Plugin\\PolylangPro' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/PolylangPro.php', 'WPMailSMTP\\Compatibility\\Plugin\\WPForms' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/WPForms.php', 'WPMailSMTP\\Compatibility\\Plugin\\WPFormsLite' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/WPFormsLite.php', 'WPMailSMTP\\Compatibility\\Plugin\\WPML' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/WPML.php', 'WPMailSMTP\\Compatibility\\Plugin\\WooCommerce' => __DIR__ . '/../..' . '/src/Compatibility/Plugin/WooCommerce.php', 'WPMailSMTP\\Conflicts' => __DIR__ . '/../..' . '/src/Conflicts.php', 'WPMailSMTP\\Connect' => __DIR__ . '/../..' . '/src/Connect.php', 'WPMailSMTP\\Connection' => __DIR__ . '/../..' . '/src/Connection.php', 'WPMailSMTP\\ConnectionInterface' => __DIR__ . '/../..' . '/src/ConnectionInterface.php', 'WPMailSMTP\\ConnectionsManager' => __DIR__ . '/../..' . '/src/ConnectionsManager.php', 'WPMailSMTP\\Core' => __DIR__ . '/../..' . '/src/Core.php', 'WPMailSMTP\\DBRepair' => __DIR__ . '/../..' . '/src/DBRepair.php', 'WPMailSMTP\\Debug' => __DIR__ . '/../..' . '/src/Debug.php', 'WPMailSMTP\\Geo' => __DIR__ . '/../..' . '/src/Geo.php', 'WPMailSMTP\\Helpers\\Crypto' => __DIR__ . '/../..' . '/src/Helpers/Crypto.php', 'WPMailSMTP\\Helpers\\DB' => __DIR__ . '/../..' . '/src/Helpers/DB.php', 'WPMailSMTP\\Helpers\\Helpers' => __DIR__ . '/../..' . '/src/Helpers/Helpers.php', 'WPMailSMTP\\Helpers\\PluginImportDataRetriever' => __DIR__ . '/../..' . '/src/Helpers/PluginImportDataRetriever.php', 'WPMailSMTP\\Helpers\\UI' => __DIR__ . '/../..' . '/src/Helpers/UI.php', 'WPMailSMTP\\MailCatcher' => __DIR__ . '/../..' . '/src/MailCatcher.php', 'WPMailSMTP\\MailCatcherInterface' => __DIR__ . '/../..' . '/src/MailCatcherInterface.php', 'WPMailSMTP\\MailCatcherTrait' => __DIR__ . '/../..' . '/src/MailCatcherTrait.php', 'WPMailSMTP\\MailCatcherV6' => __DIR__ . '/../..' . '/src/MailCatcherV6.php', 'WPMailSMTP\\Migration' => __DIR__ . '/../..' . '/src/Migration.php', 'WPMailSMTP\\MigrationAbstract' => __DIR__ . '/../..' . '/src/MigrationAbstract.php', 'WPMailSMTP\\Migrations' => __DIR__ . '/../..' . '/src/Migrations.php', 'WPMailSMTP\\OptimizedEmailSending' => __DIR__ . '/../..' . '/src/OptimizedEmailSending.php', 'WPMailSMTP\\Options' => __DIR__ . '/../..' . '/src/Options.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\AdditionalConnections' => __DIR__ . '/../..' . '/src/Pro/AdditionalConnections/AdditionalConnections.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/Pro/AdditionalConnections/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\Admin\\TestTab' => __DIR__ . '/../..' . '/src/Pro/AdditionalConnections/Admin/TestTab.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\Connection' => __DIR__ . '/../..' . '/src/Pro/AdditionalConnections/Connection.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\ConnectionOptions' => __DIR__ . '/../..' . '/src/Pro/AdditionalConnections/ConnectionOptions.php', 'WPMailSMTP\\Pro\\Admin\\Area' => __DIR__ . '/../..' . '/src/Pro/Admin/Area.php', 'WPMailSMTP\\Pro\\Admin\\DashboardWidget' => __DIR__ . '/../..' . '/src/Pro/Admin/DashboardWidget.php', 'WPMailSMTP\\Pro\\Admin\\Pages\\MiscTab' => __DIR__ . '/../..' . '/src/Pro/Admin/Pages/MiscTab.php', 'WPMailSMTP\\Pro\\Admin\\PluginsList' => __DIR__ . '/../..' . '/src/Pro/Admin/PluginsList.php', 'WPMailSMTP\\Pro\\Alerts\\AbstractOptions' => __DIR__ . '/../..' . '/src/Pro/Alerts/AbstractOptions.php', 'WPMailSMTP\\Pro\\Alerts\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/Pro/Alerts/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\Alerts\\Alert' => __DIR__ . '/../..' . '/src/Pro/Alerts/Alert.php', 'WPMailSMTP\\Pro\\Alerts\\Alerts' => __DIR__ . '/../..' . '/src/Pro/Alerts/Alerts.php', 'WPMailSMTP\\Pro\\Alerts\\Handlers\\HandlerInterface' => __DIR__ . '/../..' . '/src/Pro/Alerts/Handlers/HandlerInterface.php', 'WPMailSMTP\\Pro\\Alerts\\Loader' => __DIR__ . '/../..' . '/src/Pro/Alerts/Loader.php', 'WPMailSMTP\\Pro\\Alerts\\Notifier' => __DIR__ . '/../..' . '/src/Pro/Alerts/Notifier.php', 'WPMailSMTP\\Pro\\Alerts\\OptionsInterface' => __DIR__ . '/../..' . '/src/Pro/Alerts/OptionsInterface.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/CustomWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/CustomWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/DiscordWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/DiscordWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Email/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Email/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Push\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Push/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Push\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Push/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Push\\Provider' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/Push/Provider.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\SlackWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/SlackWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\SlackWebhook\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/SlackWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TeamsWebhook\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/TeamsWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TeamsWebhook\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/TeamsWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TwilioSMS\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/TwilioSMS/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TwilioSMS\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/TwilioSMS/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\WhatsApp\\Handler' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/WhatsApp/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\WhatsApp\\Options' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/WhatsApp/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\WhatsApp\\Provider' => __DIR__ . '/../..' . '/src/Pro/Alerts/Providers/WhatsApp/Provider.php', 'WPMailSMTP\\Pro\\BackupConnections\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/Pro/BackupConnections/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\BackupConnections\\BackupConnections' => __DIR__ . '/../..' . '/src/Pro/BackupConnections/BackupConnections.php', 'WPMailSMTP\\Pro\\ConditionalLogic\\CanProcessConditionalLogicTrait' => __DIR__ . '/../..' . '/src/Pro/ConditionalLogic/CanProcessConditionalLogicTrait.php', 'WPMailSMTP\\Pro\\ConditionalLogic\\ConditionalLogicSettings' => __DIR__ . '/../..' . '/src/Pro/ConditionalLogic/ConditionalLogicSettings.php', 'WPMailSMTP\\Pro\\ConnectionsManager' => __DIR__ . '/../..' . '/src/Pro/ConnectionsManager.php', 'WPMailSMTP\\Pro\\DBRepair' => __DIR__ . '/../..' . '/src/Pro/DBRepair.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/Pro/Emails/Control/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Control' => __DIR__ . '/../..' . '/src/Pro/Emails/Control/Control.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Reload' => __DIR__ . '/../..' . '/src/Pro/Emails/Control/Reload.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Switcher' => __DIR__ . '/../..' . '/src/Pro/Emails/Control/Switcher.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\ArchivePage' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Admin/ArchivePage.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\PageAbstract' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Admin/PageAbstract.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\PrintPreview' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Admin/PrintPreview.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\SinglePage' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Admin/SinglePage.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\Table' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Admin/Table.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Attachment' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Attachments/Attachment.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Attachments' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Attachments/Attachments.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Cleanup' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Attachments/Cleanup.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Migration' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Attachments/Migration.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\CanResendEmailTrait' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/CanResendEmailTrait.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\AbstractDeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/AbstractDeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryStatus' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryStatus.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryVerification' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryVerification.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\ElasticEmail\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/ElasticEmail/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\MailerSend\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/MailerSend/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailgun\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Mailgun/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailjet\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Mailjet/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mandrill\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Mandrill/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Postmark\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Postmark/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Resend\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Resend/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTP2GO\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/SMTP2GO/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTPcom\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/SMTPcom/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Sendinblue\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Sendinblue/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Sendlayer\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/Sendlayer/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SparkPost\\DeliveryVerifier' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/DeliveryVerification/SparkPost/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Email' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Email.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\EmailsCollection' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/EmailsCollection.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\AbstractData' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/AbstractData.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Admin' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/Admin.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\CanRemoveExportFileTrait' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/CanRemoveExportFileTrait.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\EMLData' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/EMLData.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Export' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/Export.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\File' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/File.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Handler' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/Handler.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Request' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/Request.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\TableData' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Export/TableData.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterAbstract' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/ImporterAbstract.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/ImporterInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterTabAbstract' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/ImporterTabAbstract.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterTabAbstractInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/ImporterTabAbstractInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\Importers' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/Importers.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\WPMailLogging\\Importer' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/WPMailLogging/Importer.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\WPMailLogging\\Tab' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Importers/WPMailLogging/Tab.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Logs' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Logs.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Migration' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Migration.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Providers\\Common' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Providers/Common.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Providers\\SMTP' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Providers/SMTP.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\RecheckDeliveryStatus' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/RecheckDeliveryStatus.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Admin' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Reports/Admin.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Emails\\Summary' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Reports/Emails/Summary.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Report' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Reports/Report.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Reports' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Reports/Reports.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Table' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Reports/Table.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Resend' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Resend.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Cleanup' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Cleanup.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\AbstractEvent' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/AbstractEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\EventFactory' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/EventFactory.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\EventInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/EventInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Events' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/Events.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Injectable\\AbstractInjectableEvent' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/Injectable/AbstractInjectableEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Injectable\\ClickLinkEvent' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/Injectable/ClickLinkEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Injectable\\OpenEmailEvent' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Events/Injectable/OpenEmailEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Migration' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Migration.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Tracking' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Tracking/Tracking.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\AbstractProcessor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/AbstractProcessor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\AbstractProvider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/AbstractProvider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\AbstractSubscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/AbstractSubscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Events\\Delivered' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Events/Delivered.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Events\\EventInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Events/EventInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\ProcessorInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/ProcessorInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\ProviderInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/ProviderInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Events\\Failed' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Processor' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Provider' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Subscriber' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\SubscriberInterface' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/SubscriberInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Webhooks' => __DIR__ . '/../..' . '/src/Pro/Emails/Logs/Webhooks/Webhooks.php', 'WPMailSMTP\\Pro\\Emails\\RateLimiting\\RateLimiting' => __DIR__ . '/../..' . '/src/Pro/Emails/RateLimiting/RateLimiting.php', 'WPMailSMTP\\Pro\\Emails\\TestEmail' => __DIR__ . '/../..' . '/src/Pro/Emails/TestEmail.php', 'WPMailSMTP\\Pro\\License\\License' => __DIR__ . '/../..' . '/src/Pro/License/License.php', 'WPMailSMTP\\Pro\\License\\Updater' => __DIR__ . '/../..' . '/src/Pro/License/Updater.php', 'WPMailSMTP\\Pro\\MailCatcher' => __DIR__ . '/../..' . '/src/Pro/MailCatcher.php', 'WPMailSMTP\\Pro\\MailCatcherTrait' => __DIR__ . '/../..' . '/src/Pro/MailCatcherTrait.php', 'WPMailSMTP\\Pro\\MailCatcherV6' => __DIR__ . '/../..' . '/src/Pro/MailCatcherV6.php', 'WPMailSMTP\\Pro\\Migration' => __DIR__ . '/../..' . '/src/Pro/Migration.php', 'WPMailSMTP\\Pro\\Multisite' => __DIR__ . '/../..' . '/src/Pro/Multisite.php', 'WPMailSMTP\\Pro\\Pro' => __DIR__ . '/../..' . '/src/Pro/Pro.php', 'WPMailSMTP\\Pro\\ProductApi\\Client' => __DIR__ . '/../..' . '/src/Pro/ProductApi/Client.php', 'WPMailSMTP\\Pro\\ProductApi\\Credentials' => __DIR__ . '/../..' . '/src/Pro/ProductApi/Credentials.php', 'WPMailSMTP\\Pro\\ProductApi\\CredentialsGenerationNonce' => __DIR__ . '/../..' . '/src/Pro/ProductApi/CredentialsGenerationNonce.php', 'WPMailSMTP\\Pro\\ProductApi\\CredentialsGenerator' => __DIR__ . '/../..' . '/src/Pro/ProductApi/CredentialsGenerator.php', 'WPMailSMTP\\Pro\\ProductApi\\CredentialsRepository' => __DIR__ . '/../..' . '/src/Pro/ProductApi/CredentialsRepository.php', 'WPMailSMTP\\Pro\\ProductApi\\ProductApi' => __DIR__ . '/../..' . '/src/Pro/ProductApi/ProductApi.php', 'WPMailSMTP\\Pro\\ProductApi\\Response' => __DIR__ . '/../..' . '/src/Pro/ProductApi/Response.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Auth' => __DIR__ . '/../..' . '/src/Pro/Providers/AmazonSES/Auth.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\IdentitiesTable' => __DIR__ . '/../..' . '/src/Pro/Providers/AmazonSES/IdentitiesTable.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Identity' => __DIR__ . '/../..' . '/src/Pro/Providers/AmazonSES/Identity.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Mailer' => __DIR__ . '/../..' . '/src/Pro/Providers/AmazonSES/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Options' => __DIR__ . '/../..' . '/src/Pro/Providers/AmazonSES/Options.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\Client' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Api/Client.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\OneTimeToken' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Api/OneTimeToken.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\Response' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Api/Response.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\SiteId' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Api/SiteId.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Auth' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Mailer' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Options' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Options.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Provider' => __DIR__ . '/../..' . '/src/Pro/Providers/Gmail/Provider.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\AttachmentsUploader' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/AttachmentsUploader.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Auth' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Mailer' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Auth' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/OneClick/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Auth\\Client' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/OneClick/Auth/Client.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Auth\\Response' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/OneClick/Auth/Response.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Options' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/OneClick/Options.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Options' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/Options.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Provider' => __DIR__ . '/../..' . '/src/Pro/Providers/Outlook/Provider.php', 'WPMailSMTP\\Pro\\Providers\\Providers' => __DIR__ . '/../..' . '/src/Pro/Providers/Providers.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Auth' => __DIR__ . '/../..' . '/src/Pro/Providers/Zoho/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Auth\\Zoho' => __DIR__ . '/../..' . '/src/Pro/Providers/Zoho/Auth/Zoho.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Auth\\ZohoUser' => __DIR__ . '/../..' . '/src/Pro/Providers/Zoho/Auth/ZohoUser.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Mailer' => __DIR__ . '/../..' . '/src/Pro/Providers/Zoho/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Options' => __DIR__ . '/../..' . '/src/Pro/Providers/Zoho/Options.php', 'WPMailSMTP\\Pro\\SiteHealth' => __DIR__ . '/../..' . '/src/Pro/SiteHealth.php', 'WPMailSMTP\\Pro\\SmartRouting\\Admin\\SettingsTab' => __DIR__ . '/../..' . '/src/Pro/SmartRouting/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\SmartRouting\\ConditionalLogic' => __DIR__ . '/../..' . '/src/Pro/SmartRouting/ConditionalLogic.php', 'WPMailSMTP\\Pro\\SmartRouting\\SmartRouting' => __DIR__ . '/../..' . '/src/Pro/SmartRouting/SmartRouting.php', 'WPMailSMTP\\Pro\\Tasks\\EmailLogCleanupTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/EmailLogCleanupTask.php', 'WPMailSMTP\\Pro\\Tasks\\LicenseCheckTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/LicenseCheckTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\BulkVerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/BulkVerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\ElasticEmail\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/ElasticEmail/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\ExportCleanupTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/ExportCleanupTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\MailerSend\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/MailerSend/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailgun\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Mailgun/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailjet\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Mailjet/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Mandrill\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Mandrill/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Postmark\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Postmark/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\ResendTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/ResendTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Resend\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Resend/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\SMTP2GO\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/SMTP2GO/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\SMTPcom\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/SMTPcom/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Sendinblue\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Sendinblue/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Sendlayer\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/Sendlayer/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\SparkPost\\VerifySentStatusTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/SparkPost/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\VerifySentStatusTaskAbstract' => __DIR__ . '/../..' . '/src/Pro/Tasks/Logs/VerifySentStatusTaskAbstract.php', 'WPMailSMTP\\Pro\\Tasks\\Migrations\\EmailLogMigration11' => __DIR__ . '/../..' . '/src/Pro/Tasks/Migrations/EmailLogMigration11.php', 'WPMailSMTP\\Pro\\Tasks\\Migrations\\EmailLogMigration4' => __DIR__ . '/../..' . '/src/Pro/Tasks/Migrations/EmailLogMigration4.php', 'WPMailSMTP\\Pro\\Tasks\\Migrations\\EmailLogMigration5' => __DIR__ . '/../..' . '/src/Pro/Tasks/Migrations/EmailLogMigration5.php', 'WPMailSMTP\\Pro\\Tasks\\NotifierTask' => __DIR__ . '/../..' . '/src/Pro/Tasks/NotifierTask.php', 'WPMailSMTP\\Pro\\Translations' => __DIR__ . '/../..' . '/src/Pro/Translations.php', 'WPMailSMTP\\Pro\\Upgrade' => __DIR__ . '/../..' . '/src/Pro/Upgrade.php', 'WPMailSMTP\\Processor' => __DIR__ . '/../..' . '/src/Processor.php', 'WPMailSMTP\\Providers\\AmazonSES\\Options' => __DIR__ . '/../..' . '/src/Providers/AmazonSES/Options.php', 'WPMailSMTP\\Providers\\AuthAbstract' => __DIR__ . '/../..' . '/src/Providers/AuthAbstract.php', 'WPMailSMTP\\Providers\\AuthInterface' => __DIR__ . '/../..' . '/src/Providers/AuthInterface.php', 'WPMailSMTP\\Providers\\ElasticEmail\\Mailer' => __DIR__ . '/../..' . '/src/Providers/ElasticEmail/Mailer.php', 'WPMailSMTP\\Providers\\ElasticEmail\\Options' => __DIR__ . '/../..' . '/src/Providers/ElasticEmail/Options.php', 'WPMailSMTP\\Providers\\Gmail\\Auth' => __DIR__ . '/../..' . '/src/Providers/Gmail/Auth.php', 'WPMailSMTP\\Providers\\Gmail\\Logger' => __DIR__ . '/../..' . '/src/Providers/Gmail/Logger.php', 'WPMailSMTP\\Providers\\Gmail\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Gmail/Mailer.php', 'WPMailSMTP\\Providers\\Gmail\\Options' => __DIR__ . '/../..' . '/src/Providers/Gmail/Options.php', 'WPMailSMTP\\Providers\\Loader' => __DIR__ . '/../..' . '/src/Providers/Loader.php', 'WPMailSMTP\\Providers\\Mail\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Mail/Mailer.php', 'WPMailSMTP\\Providers\\Mail\\Options' => __DIR__ . '/../..' . '/src/Providers/Mail/Options.php', 'WPMailSMTP\\Providers\\MailerAbstract' => __DIR__ . '/../..' . '/src/Providers/MailerAbstract.php', 'WPMailSMTP\\Providers\\MailerInterface' => __DIR__ . '/../..' . '/src/Providers/MailerInterface.php', 'WPMailSMTP\\Providers\\MailerSend\\Mailer' => __DIR__ . '/../..' . '/src/Providers/MailerSend/Mailer.php', 'WPMailSMTP\\Providers\\MailerSend\\Options' => __DIR__ . '/../..' . '/src/Providers/MailerSend/Options.php', 'WPMailSMTP\\Providers\\Mailgun\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Mailgun/Mailer.php', 'WPMailSMTP\\Providers\\Mailgun\\Options' => __DIR__ . '/../..' . '/src/Providers/Mailgun/Options.php', 'WPMailSMTP\\Providers\\Mailjet\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Mailjet/Mailer.php', 'WPMailSMTP\\Providers\\Mailjet\\Options' => __DIR__ . '/../..' . '/src/Providers/Mailjet/Options.php', 'WPMailSMTP\\Providers\\Mandrill\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Mandrill/Mailer.php', 'WPMailSMTP\\Providers\\Mandrill\\Options' => __DIR__ . '/../..' . '/src/Providers/Mandrill/Options.php', 'WPMailSMTP\\Providers\\OptionsAbstract' => __DIR__ . '/../..' . '/src/Providers/OptionsAbstract.php', 'WPMailSMTP\\Providers\\OptionsInterface' => __DIR__ . '/../..' . '/src/Providers/OptionsInterface.php', 'WPMailSMTP\\Providers\\Outlook\\Options' => __DIR__ . '/../..' . '/src/Providers/Outlook/Options.php', 'WPMailSMTP\\Providers\\Outlook\\Provider' => __DIR__ . '/../..' . '/src/Providers/Outlook/Provider.php', 'WPMailSMTP\\Providers\\PepipostAPI\\Mailer' => __DIR__ . '/../..' . '/src/Providers/PepipostAPI/Mailer.php', 'WPMailSMTP\\Providers\\PepipostAPI\\Options' => __DIR__ . '/../..' . '/src/Providers/PepipostAPI/Options.php', 'WPMailSMTP\\Providers\\Pepipost\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Pepipost/Mailer.php', 'WPMailSMTP\\Providers\\Pepipost\\Options' => __DIR__ . '/../..' . '/src/Providers/Pepipost/Options.php', 'WPMailSMTP\\Providers\\Postmark\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Postmark/Mailer.php', 'WPMailSMTP\\Providers\\Postmark\\Options' => __DIR__ . '/../..' . '/src/Providers/Postmark/Options.php', 'WPMailSMTP\\Providers\\Resend\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Resend/Mailer.php', 'WPMailSMTP\\Providers\\Resend\\Options' => __DIR__ . '/../..' . '/src/Providers/Resend/Options.php', 'WPMailSMTP\\Providers\\SMTP2GO\\Mailer' => __DIR__ . '/../..' . '/src/Providers/SMTP2GO/Mailer.php', 'WPMailSMTP\\Providers\\SMTP2GO\\Options' => __DIR__ . '/../..' . '/src/Providers/SMTP2GO/Options.php', 'WPMailSMTP\\Providers\\SMTP\\Mailer' => __DIR__ . '/../..' . '/src/Providers/SMTP/Mailer.php', 'WPMailSMTP\\Providers\\SMTP\\Options' => __DIR__ . '/../..' . '/src/Providers/SMTP/Options.php', 'WPMailSMTP\\Providers\\SMTPcom\\Mailer' => __DIR__ . '/../..' . '/src/Providers/SMTPcom/Mailer.php', 'WPMailSMTP\\Providers\\SMTPcom\\Options' => __DIR__ . '/../..' . '/src/Providers/SMTPcom/Options.php', 'WPMailSMTP\\Providers\\Sendgrid\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Sendgrid/Mailer.php', 'WPMailSMTP\\Providers\\Sendgrid\\Options' => __DIR__ . '/../..' . '/src/Providers/Sendgrid/Options.php', 'WPMailSMTP\\Providers\\Sendinblue\\Api' => __DIR__ . '/../..' . '/src/Providers/Sendinblue/Api.php', 'WPMailSMTP\\Providers\\Sendinblue\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Sendinblue/Mailer.php', 'WPMailSMTP\\Providers\\Sendinblue\\Options' => __DIR__ . '/../..' . '/src/Providers/Sendinblue/Options.php', 'WPMailSMTP\\Providers\\Sendlayer\\Mailer' => __DIR__ . '/../..' . '/src/Providers/Sendlayer/Mailer.php', 'WPMailSMTP\\Providers\\Sendlayer\\Options' => __DIR__ . '/../..' . '/src/Providers/Sendlayer/Options.php', 'WPMailSMTP\\Providers\\SparkPost\\Mailer' => __DIR__ . '/../..' . '/src/Providers/SparkPost/Mailer.php', 'WPMailSMTP\\Providers\\SparkPost\\Options' => __DIR__ . '/../..' . '/src/Providers/SparkPost/Options.php', 'WPMailSMTP\\Providers\\Zoho\\Options' => __DIR__ . '/../..' . '/src/Providers/Zoho/Options.php', 'WPMailSMTP\\Queue\\Attachments' => __DIR__ . '/../..' . '/src/Queue/Attachments.php', 'WPMailSMTP\\Queue\\Email' => __DIR__ . '/../..' . '/src/Queue/Email.php', 'WPMailSMTP\\Queue\\Migration' => __DIR__ . '/../..' . '/src/Queue/Migration.php', 'WPMailSMTP\\Queue\\Queue' => __DIR__ . '/../..' . '/src/Queue/Queue.php', 'WPMailSMTP\\Reports\\Emails\\Summary' => __DIR__ . '/../..' . '/src/Reports/Emails/Summary.php', 'WPMailSMTP\\Reports\\Reports' => __DIR__ . '/../..' . '/src/Reports/Reports.php', 'WPMailSMTP\\SiteHealth' => __DIR__ . '/../..' . '/src/SiteHealth.php', 'WPMailSMTP\\Tasks\\DebugEventsCleanupTask' => __DIR__ . '/../..' . '/src/Tasks/DebugEventsCleanupTask.php', 'WPMailSMTP\\Tasks\\Meta' => __DIR__ . '/../..' . '/src/Tasks/Meta.php', 'WPMailSMTP\\Tasks\\NotificationsUpdateTask' => __DIR__ . '/../..' . '/src/Tasks/NotificationsUpdateTask.php', 'WPMailSMTP\\Tasks\\Queue\\CleanupQueueTask' => __DIR__ . '/../..' . '/src/Tasks/Queue/CleanupQueueTask.php', 'WPMailSMTP\\Tasks\\Queue\\ProcessQueueTask' => __DIR__ . '/../..' . '/src/Tasks/Queue/ProcessQueueTask.php', 'WPMailSMTP\\Tasks\\Queue\\SendEnqueuedEmailTask' => __DIR__ . '/../..' . '/src/Tasks/Queue/SendEnqueuedEmailTask.php', 'WPMailSMTP\\Tasks\\Reports\\SummaryEmailTask' => __DIR__ . '/../..' . '/src/Tasks/Reports/SummaryEmailTask.php', 'WPMailSMTP\\Tasks\\Task' => __DIR__ . '/../..' . '/src/Tasks/Task.php', 'WPMailSMTP\\Tasks\\Tasks' => __DIR__ . '/../..' . '/src/Tasks/Tasks.php', 'WPMailSMTP\\Upgrade' => __DIR__ . '/../..' . '/src/Upgrade.php', 'WPMailSMTP\\Uploads' => __DIR__ . '/../..' . '/src/Uploads.php', 'WPMailSMTP\\UsageTracking\\SendUsageTask' => __DIR__ . '/../..' . '/src/UsageTracking/SendUsageTask.php', 'WPMailSMTP\\UsageTracking\\UsageTracking' => __DIR__ . '/../..' . '/src/UsageTracking/UsageTracking.php', 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Revoke' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/AccessToken/Revoke.php', 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Verify' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/AccessToken/Verify.php', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\AuthHandlerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/AuthHandler/AuthHandlerFactory.php', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\Guzzle6AuthHandler' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\Guzzle7AuthHandler' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\AccessToken' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/AccessToken.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ApplicationDefaultCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/ApplicationDefaultCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CacheTrait' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/CacheTrait.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\InvalidArgumentException' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Cache/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\Item' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Cache/Item.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\MemoryCacheItemPool' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Cache/MemoryCacheItemPool.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\SysVCacheItemPool' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Cache/SysVCacheItemPool.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\TypedItem' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Cache/TypedItem.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialSource\\AwsNativeSource' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/CredentialSource/AwsNativeSource.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialSource\\FileSource' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/CredentialSource/FileSource.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialSource\\UrlSource' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/CredentialSource/UrlSource.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialsLoader' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/CredentialsLoader.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\AppIdentityCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/AppIdentityCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ExternalAccountCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/ExternalAccountCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\GCECredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/GCECredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\IAMCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/IAMCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ImpersonatedServiceAccountCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\InsecureCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/InsecureCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ServiceAccountCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/ServiceAccountCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ServiceAccountJwtAccessCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\UserRefreshCredentials' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Credentials/UserRefreshCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ExternalAccountCredentialSourceInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/ExternalAccountCredentialSourceInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\FetchAuthTokenCache' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/FetchAuthTokenCache.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\FetchAuthTokenInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/FetchAuthTokenInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\GCECache' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/GCECache.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\GetQuotaProjectInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/GetQuotaProjectInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\GetUniverseDomainInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/GetUniverseDomainInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\Guzzle6HttpHandler' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/HttpHandler/Guzzle6HttpHandler.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\Guzzle7HttpHandler' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/HttpHandler/Guzzle7HttpHandler.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\HttpClientCache' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/HttpHandler/HttpClientCache.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\HttpHandlerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/HttpHandler/HttpHandlerFactory.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Iam' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Iam.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\IamSignerTrait' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/IamSignerTrait.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\AuthTokenMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Middleware/AuthTokenMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\ProxyAuthTokenMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\ScopedAccessTokenMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\SimpleMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/Middleware/SimpleMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\OAuth2' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/OAuth2.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ProjectIdProviderInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/ProjectIdProviderInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ServiceAccountSignerTrait' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/ServiceAccountSignerTrait.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\SignBlobInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/SignBlobInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\UpdateMetadataInterface' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/UpdateMetadataInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\UpdateMetadataTrait' => __DIR__ . '/../..' . '/vendor_prefixed/google/auth/src/UpdateMetadataTrait.php', 'WPMailSMTP\\Vendor\\Google\\Client' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Client.php', 'WPMailSMTP\\Vendor\\Google\\Collection' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Collection.php', 'WPMailSMTP\\Vendor\\Google\\Exception' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Exception.php', 'WPMailSMTP\\Vendor\\Google\\Http\\Batch' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Http/Batch.php', 'WPMailSMTP\\Vendor\\Google\\Http\\MediaFileUpload' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Http/MediaFileUpload.php', 'WPMailSMTP\\Vendor\\Google\\Http\\REST' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Http/REST.php', 'WPMailSMTP\\Vendor\\Google\\Model' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Model.php', 'WPMailSMTP\\Vendor\\Google\\Service' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Service.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Exception' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Service/Exception.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\AutoForwarding' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/AutoForwarding.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\BatchDeleteMessagesRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/BatchDeleteMessagesRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\BatchModifyMessagesRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/BatchModifyMessagesRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\CseIdentity' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/CseIdentity.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\CseKeyPair' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/CseKeyPair.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\CsePrivateKeyMetadata' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/CsePrivateKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Delegate' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Delegate.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\DisableCseKeyPairRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/DisableCseKeyPairRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Draft' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Draft.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\EnableCseKeyPairRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/EnableCseKeyPairRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Filter' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Filter.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\FilterAction' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/FilterAction.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\FilterCriteria' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/FilterCriteria.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ForwardingAddress' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ForwardingAddress.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HardwareKeyMetadata' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/HardwareKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\History' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/History.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryLabelAdded' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryLabelAdded.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryLabelRemoved' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryLabelRemoved.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryMessageAdded' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryMessageAdded.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryMessageDeleted' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryMessageDeleted.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ImapSettings' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ImapSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\KaclsKeyMetadata' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/KaclsKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Label' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Label.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\LabelColor' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/LabelColor.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\LanguageSettings' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/LanguageSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListCseIdentitiesResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListCseIdentitiesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListCseKeyPairsResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListCseKeyPairsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListDelegatesResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListDelegatesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListDraftsResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListDraftsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListFiltersResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListFiltersResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListForwardingAddressesResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListForwardingAddressesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListHistoryResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListHistoryResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListLabelsResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListLabelsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListMessagesResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListMessagesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListSendAsResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListSendAsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListSmimeInfoResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListSmimeInfoResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListThreadsResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListThreadsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Message' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Message.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\MessagePart' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePart.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\MessagePartBody' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartBody.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\MessagePartHeader' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartHeader.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ModifyMessageRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ModifyMessageRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ModifyThreadRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ModifyThreadRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ObliterateCseKeyPairRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/ObliterateCseKeyPairRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\PivKeyMetadata' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/PivKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\PopSettings' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/PopSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Profile' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Profile.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\Users' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/Users.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersDrafts' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersDrafts.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersHistory' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersHistory.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersLabels' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersLabels.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersMessages' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersMessages.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersMessagesAttachments' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersMessagesAttachments.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettings' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsCse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsCseIdentities' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCseIdentities.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsCseKeypairs' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCseKeypairs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsDelegates' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsDelegates.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsFilters' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsFilters.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsForwardingAddresses' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsForwardingAddresses.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsSendAs' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsSendAs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsSendAsSmimeInfo' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsSendAsSmimeInfo.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersThreads' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersThreads.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SendAs' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/SendAs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SignAndEncryptKeyPairs' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/SignAndEncryptKeyPairs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SmimeInfo' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/SmimeInfo.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SmtpMsa' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/SmtpMsa.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Thread' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/Thread.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\VacationSettings' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/VacationSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\WatchRequest' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/WatchRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\WatchResponse' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient-services/src/Gmail/WatchResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Resource' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Service/Resource.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Composer' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Task/Composer.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Exception' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Task/Exception.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Retryable' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Task/Retryable.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Runner' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Task/Runner.php', 'WPMailSMTP\\Vendor\\Google\\Utils\\UriTemplate' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/Utils/UriTemplate.php', 'WPMailSMTP\\Vendor\\Google_AccessToken_Revoke' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AccessToken_Verify' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AuthHandler_AuthHandlerFactory' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AuthHandler_Guzzle6AuthHandler' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AuthHandler_Guzzle7AuthHandler' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Client' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Collection' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Exception' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Http_Batch' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Http_MediaFileUpload' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Http_REST' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Model' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Service' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Service_Exception' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Service_Resource' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Composer' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Exception' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Retryable' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Runner' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Utils_UriTemplate' => __DIR__ . '/../..' . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\BodySummarizer' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\BodySummarizerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizerInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Client' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Client.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\ClientTrait' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/ClientTrait.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SetCookie.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ClientException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/GuzzleException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\InvalidArgumentException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ServerException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/TransferException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\HandlerStack' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/HandlerStack.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlMultiHandler' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\EasyHandle' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/EasyHandle.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\HeaderProcessor' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\MockHandler' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\Proxy' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/Proxy.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\StreamHandler' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\MessageFormatter' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatter.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\MessageFormatterInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Middleware' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Middleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Pool' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Pool.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\PrepareBodyMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/AggregateException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/CancellationException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Coroutine.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Create' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Create.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Each' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Each.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/EachPromise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/FulfilledPromise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Is' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Is.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Promise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Promise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/PromiseInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/PromisorInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\RejectedPromise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/RejectedPromise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/RejectionException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueue.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueueInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Utils' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Utils.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/AppendStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/BufferStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/CachingStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Exception\\MalformedUriException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Exception/MalformedUriException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/FnStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Header' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Header.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\HttpFactory' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/HttpFactory.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/InflateStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/LazyOpenStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/LimitStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Message' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Message.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/MessageTrait.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MimeType' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/MimeType.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/MultipartStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/NoSeekStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/PumpStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Query' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Query.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Request' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Request.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Response' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Response.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Rfc7230.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/ServerRequest.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Stream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/StreamDecoratorTrait.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/StreamWrapper.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/UploadedFile.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Uri.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriComparator' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/UriComparator.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/UriNormalizer.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/UriResolver.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Utils.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/RedirectMiddleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\RequestOptions' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/RequestOptions.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\RetryMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\TransferStats' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/TransferStats.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Utils' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/Utils.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base32' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base32Hex' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base32Hex.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64DotSlash' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64DotSlash.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64DotSlashOrdered' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64UrlSafe' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64UrlSafe.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Binary' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\EncoderInterface' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/EncoderInterface.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Encoding' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Hex' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\RFC4648' => __DIR__ . '/../..' . '/vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\CacheException' => __DIR__ . '/../..' . '/vendor_prefixed/psr/cache/src/CacheException.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\CacheItemInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/cache/src/CacheItemInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\CacheItemPoolInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/cache/src/CacheItemPoolInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\InvalidArgumentException' => __DIR__ . '/../..' . '/vendor_prefixed/psr/cache/src/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\ClientExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/ClientExceptionInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\ClientInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/ClientInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\NetworkExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/NetworkExceptionInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\RequestExceptionInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-client/src/RequestExceptionInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/MessageInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\RequestFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/RequestFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/RequestInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ResponseFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/ResponseFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/ResponseInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ServerRequestFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/ServerRequestFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\StreamFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/StreamFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/StreamInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UploadedFileFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/UploadedFileFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/UploadedFileInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-factory/src/UriFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UriInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/http-message/src/UriInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\AbstractLogger' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/AbstractLogger.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\InvalidArgumentException' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LogLevel' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LogLevel.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareTrait.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerInterface' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerTrait' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\NullLogger' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/NullLogger.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\Test\\DummyTest' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/Test/DummyTest.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\Test\\TestLogger' => __DIR__ . '/../..' . '/vendor_prefixed/psr/log/Psr/Log/Test/TestLogger.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/Idn.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/Info.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/Regex.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/../..' . '/vendor_prefixed/symfony/polyfill-mbstring/Mbstring.php', 'WPMailSMTP\\WP' => __DIR__ . '/../..' . '/src/WP.php', 'WPMailSMTP\\WPMailArgs' => __DIR__ . '/../..' . '/src/WPMailArgs.php', 'WPMailSMTP\\WPMailInitiator' => __DIR__ . '/../..' . '/src/WPMailInitiator.php', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInitcff0bec3e1c1cc5d8ab7965adacb1549::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInitcff0bec3e1c1cc5d8ab7965adacb1549::$prefixDirsPsr4; $loader->classMap = ComposerStaticInitcff0bec3e1c1cc5d8ab7965adacb1549::$classMap; }, null, ClassLoader::class); } } vendor/composer/autoload_classmap.php 0000644 00000276617 15174671617 0014136 0 ustar 00 <?php // autoload_classmap.php @generated by Composer $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php', 'Composer\\Installers\\AkauntingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php', 'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php', 'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php', 'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php', 'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php', 'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php', 'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php', 'Composer\\Installers\\BotbleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BotbleInstaller.php', 'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php', 'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php', 'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php', 'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php', 'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php', 'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php', 'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php', 'Composer\\Installers\\ConcreteCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php', 'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php', 'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php', 'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php', 'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php', 'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php', 'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php', 'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php', 'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php', 'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php', 'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php', 'Composer\\Installers\\ForkCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php', 'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php', 'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php', 'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php', 'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php', 'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php', 'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php', 'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php', 'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php', 'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php', 'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php', 'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php', 'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php', 'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php', 'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php', 'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php', 'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php', 'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php', 'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php', 'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php', 'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php', 'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php', 'Composer\\Installers\\MatomoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MatomoInstaller.php', 'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php', 'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php', 'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php', 'Composer\\Installers\\MiaoxingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MiaoxingInstaller.php', 'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php', 'Composer\\Installers\\ModxInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php', 'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php', 'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php', 'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php', 'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php', 'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php', 'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php', 'Composer\\Installers\\PantheonInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php', 'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php', 'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php', 'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php', 'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php', 'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php', 'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php', 'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php', 'Composer\\Installers\\ProcessWireInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ProcessWireInstaller.php', 'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php', 'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php', 'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php', 'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php', 'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php', 'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php', 'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php', 'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php', 'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php', 'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php', 'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php', 'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php', 'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php', 'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php', 'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php', 'Composer\\Installers\\TastyIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php', 'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php', 'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php', 'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php', 'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php', 'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php', 'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php', 'Composer\\Installers\\WinterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WinterInstaller.php', 'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php', 'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php', 'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php', 'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php', 'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php', 'WPMailSMTP\\AbstractConnection' => $baseDir . '/src/AbstractConnection.php', 'WPMailSMTP\\Admin\\AdminBarMenu' => $baseDir . '/src/Admin/AdminBarMenu.php', 'WPMailSMTP\\Admin\\Area' => $baseDir . '/src/Admin/Area.php', 'WPMailSMTP\\Admin\\ConnectionSettings' => $baseDir . '/src/Admin/ConnectionSettings.php', 'WPMailSMTP\\Admin\\DashboardWidget' => $baseDir . '/src/Admin/DashboardWidget.php', 'WPMailSMTP\\Admin\\DebugEvents\\DebugEvents' => $baseDir . '/src/Admin/DebugEvents/DebugEvents.php', 'WPMailSMTP\\Admin\\DebugEvents\\Event' => $baseDir . '/src/Admin/DebugEvents/Event.php', 'WPMailSMTP\\Admin\\DebugEvents\\EventsCollection' => $baseDir . '/src/Admin/DebugEvents/EventsCollection.php', 'WPMailSMTP\\Admin\\DebugEvents\\Migration' => $baseDir . '/src/Admin/DebugEvents/Migration.php', 'WPMailSMTP\\Admin\\DebugEvents\\Table' => $baseDir . '/src/Admin/DebugEvents/Table.php', 'WPMailSMTP\\Admin\\DomainChecker' => $baseDir . '/src/Admin/DomainChecker.php', 'WPMailSMTP\\Admin\\Education' => $baseDir . '/src/Admin/Education.php', 'WPMailSMTP\\Admin\\FlyoutMenu' => $baseDir . '/src/Admin/FlyoutMenu.php', 'WPMailSMTP\\Admin\\Notifications' => $baseDir . '/src/Admin/Notifications.php', 'WPMailSMTP\\Admin\\PageAbstract' => $baseDir . '/src/Admin/PageAbstract.php', 'WPMailSMTP\\Admin\\PageInterface' => $baseDir . '/src/Admin/PageInterface.php', 'WPMailSMTP\\Admin\\Pages\\About' => $baseDir . '/src/Admin/Pages/About.php', 'WPMailSMTP\\Admin\\Pages\\AboutTab' => $baseDir . '/src/Admin/Pages/AboutTab.php', 'WPMailSMTP\\Admin\\Pages\\ActionSchedulerTab' => $baseDir . '/src/Admin/Pages/ActionSchedulerTab.php', 'WPMailSMTP\\Admin\\Pages\\AdditionalConnectionsTab' => $baseDir . '/src/Admin/Pages/AdditionalConnectionsTab.php', 'WPMailSMTP\\Admin\\Pages\\AlertsTab' => $baseDir . '/src/Admin/Pages/AlertsTab.php', 'WPMailSMTP\\Admin\\Pages\\AuthTab' => $baseDir . '/src/Admin/Pages/AuthTab.php', 'WPMailSMTP\\Admin\\Pages\\ControlTab' => $baseDir . '/src/Admin/Pages/ControlTab.php', 'WPMailSMTP\\Admin\\Pages\\DebugEventsTab' => $baseDir . '/src/Admin/Pages/DebugEventsTab.php', 'WPMailSMTP\\Admin\\Pages\\EmailReports' => $baseDir . '/src/Admin/Pages/EmailReports.php', 'WPMailSMTP\\Admin\\Pages\\EmailReportsTab' => $baseDir . '/src/Admin/Pages/EmailReportsTab.php', 'WPMailSMTP\\Admin\\Pages\\ExportTab' => $baseDir . '/src/Admin/Pages/ExportTab.php', 'WPMailSMTP\\Admin\\Pages\\Logs' => $baseDir . '/src/Admin/Pages/Logs.php', 'WPMailSMTP\\Admin\\Pages\\LogsTab' => $baseDir . '/src/Admin/Pages/LogsTab.php', 'WPMailSMTP\\Admin\\Pages\\MiscTab' => $baseDir . '/src/Admin/Pages/MiscTab.php', 'WPMailSMTP\\Admin\\Pages\\SettingsTab' => $baseDir . '/src/Admin/Pages/SettingsTab.php', 'WPMailSMTP\\Admin\\Pages\\SmartRoutingTab' => $baseDir . '/src/Admin/Pages/SmartRoutingTab.php', 'WPMailSMTP\\Admin\\Pages\\TestTab' => $baseDir . '/src/Admin/Pages/TestTab.php', 'WPMailSMTP\\Admin\\Pages\\Tools' => $baseDir . '/src/Admin/Pages/Tools.php', 'WPMailSMTP\\Admin\\Pages\\VersusTab' => $baseDir . '/src/Admin/Pages/VersusTab.php', 'WPMailSMTP\\Admin\\ParentPageAbstract' => $baseDir . '/src/Admin/ParentPageAbstract.php', 'WPMailSMTP\\Admin\\PluginsInstallSkin' => $baseDir . '/src/Admin/PluginsInstallSkin.php', 'WPMailSMTP\\Admin\\Review' => $baseDir . '/src/Admin/Review.php', 'WPMailSMTP\\Admin\\SetupWizard' => $baseDir . '/src/Admin/SetupWizard.php', 'WPMailSMTP\\Compatibility\\Compatibility' => $baseDir . '/src/Compatibility/Compatibility.php', 'WPMailSMTP\\Compatibility\\Plugin\\Admin2020' => $baseDir . '/src/Compatibility/Plugin/Admin2020.php', 'WPMailSMTP\\Compatibility\\Plugin\\PluginAbstract' => $baseDir . '/src/Compatibility/Plugin/PluginAbstract.php', 'WPMailSMTP\\Compatibility\\Plugin\\PluginInterface' => $baseDir . '/src/Compatibility/Plugin/PluginInterface.php', 'WPMailSMTP\\Compatibility\\Plugin\\Polylang' => $baseDir . '/src/Compatibility/Plugin/Polylang.php', 'WPMailSMTP\\Compatibility\\Plugin\\PolylangPro' => $baseDir . '/src/Compatibility/Plugin/PolylangPro.php', 'WPMailSMTP\\Compatibility\\Plugin\\WPForms' => $baseDir . '/src/Compatibility/Plugin/WPForms.php', 'WPMailSMTP\\Compatibility\\Plugin\\WPFormsLite' => $baseDir . '/src/Compatibility/Plugin/WPFormsLite.php', 'WPMailSMTP\\Compatibility\\Plugin\\WPML' => $baseDir . '/src/Compatibility/Plugin/WPML.php', 'WPMailSMTP\\Compatibility\\Plugin\\WooCommerce' => $baseDir . '/src/Compatibility/Plugin/WooCommerce.php', 'WPMailSMTP\\Conflicts' => $baseDir . '/src/Conflicts.php', 'WPMailSMTP\\Connect' => $baseDir . '/src/Connect.php', 'WPMailSMTP\\Connection' => $baseDir . '/src/Connection.php', 'WPMailSMTP\\ConnectionInterface' => $baseDir . '/src/ConnectionInterface.php', 'WPMailSMTP\\ConnectionsManager' => $baseDir . '/src/ConnectionsManager.php', 'WPMailSMTP\\Core' => $baseDir . '/src/Core.php', 'WPMailSMTP\\DBRepair' => $baseDir . '/src/DBRepair.php', 'WPMailSMTP\\Debug' => $baseDir . '/src/Debug.php', 'WPMailSMTP\\Geo' => $baseDir . '/src/Geo.php', 'WPMailSMTP\\Helpers\\Crypto' => $baseDir . '/src/Helpers/Crypto.php', 'WPMailSMTP\\Helpers\\DB' => $baseDir . '/src/Helpers/DB.php', 'WPMailSMTP\\Helpers\\Helpers' => $baseDir . '/src/Helpers/Helpers.php', 'WPMailSMTP\\Helpers\\PluginImportDataRetriever' => $baseDir . '/src/Helpers/PluginImportDataRetriever.php', 'WPMailSMTP\\Helpers\\UI' => $baseDir . '/src/Helpers/UI.php', 'WPMailSMTP\\MailCatcher' => $baseDir . '/src/MailCatcher.php', 'WPMailSMTP\\MailCatcherInterface' => $baseDir . '/src/MailCatcherInterface.php', 'WPMailSMTP\\MailCatcherTrait' => $baseDir . '/src/MailCatcherTrait.php', 'WPMailSMTP\\MailCatcherV6' => $baseDir . '/src/MailCatcherV6.php', 'WPMailSMTP\\Migration' => $baseDir . '/src/Migration.php', 'WPMailSMTP\\MigrationAbstract' => $baseDir . '/src/MigrationAbstract.php', 'WPMailSMTP\\Migrations' => $baseDir . '/src/Migrations.php', 'WPMailSMTP\\OptimizedEmailSending' => $baseDir . '/src/OptimizedEmailSending.php', 'WPMailSMTP\\Options' => $baseDir . '/src/Options.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\AdditionalConnections' => $baseDir . '/src/Pro/AdditionalConnections/AdditionalConnections.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\Admin\\SettingsTab' => $baseDir . '/src/Pro/AdditionalConnections/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\Admin\\TestTab' => $baseDir . '/src/Pro/AdditionalConnections/Admin/TestTab.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\Connection' => $baseDir . '/src/Pro/AdditionalConnections/Connection.php', 'WPMailSMTP\\Pro\\AdditionalConnections\\ConnectionOptions' => $baseDir . '/src/Pro/AdditionalConnections/ConnectionOptions.php', 'WPMailSMTP\\Pro\\Admin\\Area' => $baseDir . '/src/Pro/Admin/Area.php', 'WPMailSMTP\\Pro\\Admin\\DashboardWidget' => $baseDir . '/src/Pro/Admin/DashboardWidget.php', 'WPMailSMTP\\Pro\\Admin\\Pages\\MiscTab' => $baseDir . '/src/Pro/Admin/Pages/MiscTab.php', 'WPMailSMTP\\Pro\\Admin\\PluginsList' => $baseDir . '/src/Pro/Admin/PluginsList.php', 'WPMailSMTP\\Pro\\Alerts\\AbstractOptions' => $baseDir . '/src/Pro/Alerts/AbstractOptions.php', 'WPMailSMTP\\Pro\\Alerts\\Admin\\SettingsTab' => $baseDir . '/src/Pro/Alerts/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\Alerts\\Alert' => $baseDir . '/src/Pro/Alerts/Alert.php', 'WPMailSMTP\\Pro\\Alerts\\Alerts' => $baseDir . '/src/Pro/Alerts/Alerts.php', 'WPMailSMTP\\Pro\\Alerts\\Handlers\\HandlerInterface' => $baseDir . '/src/Pro/Alerts/Handlers/HandlerInterface.php', 'WPMailSMTP\\Pro\\Alerts\\Loader' => $baseDir . '/src/Pro/Alerts/Loader.php', 'WPMailSMTP\\Pro\\Alerts\\Notifier' => $baseDir . '/src/Pro/Alerts/Notifier.php', 'WPMailSMTP\\Pro\\Alerts\\OptionsInterface' => $baseDir . '/src/Pro/Alerts/OptionsInterface.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/CustomWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\CustomWebhook\\Options' => $baseDir . '/src/Pro/Alerts/Providers/CustomWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/DiscordWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\DiscordWebhook\\Options' => $baseDir . '/src/Pro/Alerts/Providers/DiscordWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/Email/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Email\\Options' => $baseDir . '/src/Pro/Alerts/Providers/Email/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Push\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/Push/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Push\\Options' => $baseDir . '/src/Pro/Alerts/Providers/Push/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\Push\\Provider' => $baseDir . '/src/Pro/Alerts/Providers/Push/Provider.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\SlackWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/SlackWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\SlackWebhook\\Options' => $baseDir . '/src/Pro/Alerts/Providers/SlackWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TeamsWebhook\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/TeamsWebhook/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TeamsWebhook\\Options' => $baseDir . '/src/Pro/Alerts/Providers/TeamsWebhook/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TwilioSMS\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/TwilioSMS/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\TwilioSMS\\Options' => $baseDir . '/src/Pro/Alerts/Providers/TwilioSMS/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\WhatsApp\\Handler' => $baseDir . '/src/Pro/Alerts/Providers/WhatsApp/Handler.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\WhatsApp\\Options' => $baseDir . '/src/Pro/Alerts/Providers/WhatsApp/Options.php', 'WPMailSMTP\\Pro\\Alerts\\Providers\\WhatsApp\\Provider' => $baseDir . '/src/Pro/Alerts/Providers/WhatsApp/Provider.php', 'WPMailSMTP\\Pro\\BackupConnections\\Admin\\SettingsTab' => $baseDir . '/src/Pro/BackupConnections/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\BackupConnections\\BackupConnections' => $baseDir . '/src/Pro/BackupConnections/BackupConnections.php', 'WPMailSMTP\\Pro\\ConditionalLogic\\CanProcessConditionalLogicTrait' => $baseDir . '/src/Pro/ConditionalLogic/CanProcessConditionalLogicTrait.php', 'WPMailSMTP\\Pro\\ConditionalLogic\\ConditionalLogicSettings' => $baseDir . '/src/Pro/ConditionalLogic/ConditionalLogicSettings.php', 'WPMailSMTP\\Pro\\ConnectionsManager' => $baseDir . '/src/Pro/ConnectionsManager.php', 'WPMailSMTP\\Pro\\DBRepair' => $baseDir . '/src/Pro/DBRepair.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Admin\\SettingsTab' => $baseDir . '/src/Pro/Emails/Control/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Control' => $baseDir . '/src/Pro/Emails/Control/Control.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Reload' => $baseDir . '/src/Pro/Emails/Control/Reload.php', 'WPMailSMTP\\Pro\\Emails\\Control\\Switcher' => $baseDir . '/src/Pro/Emails/Control/Switcher.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\ArchivePage' => $baseDir . '/src/Pro/Emails/Logs/Admin/ArchivePage.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\PageAbstract' => $baseDir . '/src/Pro/Emails/Logs/Admin/PageAbstract.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\PrintPreview' => $baseDir . '/src/Pro/Emails/Logs/Admin/PrintPreview.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\SettingsTab' => $baseDir . '/src/Pro/Emails/Logs/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\SinglePage' => $baseDir . '/src/Pro/Emails/Logs/Admin/SinglePage.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Admin\\Table' => $baseDir . '/src/Pro/Emails/Logs/Admin/Table.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Attachment' => $baseDir . '/src/Pro/Emails/Logs/Attachments/Attachment.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Attachments' => $baseDir . '/src/Pro/Emails/Logs/Attachments/Attachments.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Cleanup' => $baseDir . '/src/Pro/Emails/Logs/Attachments/Cleanup.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Attachments\\Migration' => $baseDir . '/src/Pro/Emails/Logs/Attachments/Migration.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\CanResendEmailTrait' => $baseDir . '/src/Pro/Emails/Logs/CanResendEmailTrait.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\AbstractDeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/AbstractDeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryStatus' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryStatus.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\DeliveryVerification' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/DeliveryVerification.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\ElasticEmail\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/ElasticEmail/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\MailerSend\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/MailerSend/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailgun\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Mailgun/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mailjet\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Mailjet/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Mandrill\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Mandrill/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Postmark\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Postmark/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Resend\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Resend/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTP2GO\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/SMTP2GO/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SMTPcom\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/SMTPcom/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Sendinblue\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Sendinblue/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\Sendlayer\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/Sendlayer/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\DeliveryVerification\\SparkPost\\DeliveryVerifier' => $baseDir . '/src/Pro/Emails/Logs/DeliveryVerification/SparkPost/DeliveryVerifier.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Email' => $baseDir . '/src/Pro/Emails/Logs/Email.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\EmailsCollection' => $baseDir . '/src/Pro/Emails/Logs/EmailsCollection.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\AbstractData' => $baseDir . '/src/Pro/Emails/Logs/Export/AbstractData.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Admin' => $baseDir . '/src/Pro/Emails/Logs/Export/Admin.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\CanRemoveExportFileTrait' => $baseDir . '/src/Pro/Emails/Logs/Export/CanRemoveExportFileTrait.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\EMLData' => $baseDir . '/src/Pro/Emails/Logs/Export/EMLData.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Export' => $baseDir . '/src/Pro/Emails/Logs/Export/Export.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\File' => $baseDir . '/src/Pro/Emails/Logs/Export/File.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Handler' => $baseDir . '/src/Pro/Emails/Logs/Export/Handler.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\Request' => $baseDir . '/src/Pro/Emails/Logs/Export/Request.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Export\\TableData' => $baseDir . '/src/Pro/Emails/Logs/Export/TableData.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterAbstract' => $baseDir . '/src/Pro/Emails/Logs/Importers/ImporterAbstract.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterInterface' => $baseDir . '/src/Pro/Emails/Logs/Importers/ImporterInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterTabAbstract' => $baseDir . '/src/Pro/Emails/Logs/Importers/ImporterTabAbstract.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\ImporterTabAbstractInterface' => $baseDir . '/src/Pro/Emails/Logs/Importers/ImporterTabAbstractInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\Importers' => $baseDir . '/src/Pro/Emails/Logs/Importers/Importers.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\WPMailLogging\\Importer' => $baseDir . '/src/Pro/Emails/Logs/Importers/WPMailLogging/Importer.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Importers\\WPMailLogging\\Tab' => $baseDir . '/src/Pro/Emails/Logs/Importers/WPMailLogging/Tab.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Logs' => $baseDir . '/src/Pro/Emails/Logs/Logs.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Migration' => $baseDir . '/src/Pro/Emails/Logs/Migration.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Providers\\Common' => $baseDir . '/src/Pro/Emails/Logs/Providers/Common.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Providers\\SMTP' => $baseDir . '/src/Pro/Emails/Logs/Providers/SMTP.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\RecheckDeliveryStatus' => $baseDir . '/src/Pro/Emails/Logs/RecheckDeliveryStatus.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Admin' => $baseDir . '/src/Pro/Emails/Logs/Reports/Admin.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Emails\\Summary' => $baseDir . '/src/Pro/Emails/Logs/Reports/Emails/Summary.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Report' => $baseDir . '/src/Pro/Emails/Logs/Reports/Report.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Reports' => $baseDir . '/src/Pro/Emails/Logs/Reports/Reports.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Reports\\Table' => $baseDir . '/src/Pro/Emails/Logs/Reports/Table.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Resend' => $baseDir . '/src/Pro/Emails/Logs/Resend.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Cleanup' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Cleanup.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\AbstractEvent' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/AbstractEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\EventFactory' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/EventFactory.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\EventInterface' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/EventInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Events' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/Events.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Injectable\\AbstractInjectableEvent' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/Injectable/AbstractInjectableEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Injectable\\ClickLinkEvent' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/Injectable/ClickLinkEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Events\\Injectable\\OpenEmailEvent' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Events/Injectable/OpenEmailEvent.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Migration' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Migration.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Tracking\\Tracking' => $baseDir . '/src/Pro/Emails/Logs/Tracking/Tracking.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\AbstractProcessor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/AbstractProcessor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\AbstractProvider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/AbstractProvider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\AbstractSubscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/AbstractSubscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Events\\Delivered' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Events/Delivered.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Events\\EventInterface' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Events/EventInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\ProcessorInterface' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/ProcessorInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\ProviderInterface' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/ProviderInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\MailerSend\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/MailerSend/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailgun\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailgun/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mailjet\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mailjet/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Mandrill\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Mandrill/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Postmark\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Postmark/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Resend\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Resend/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTP2GO\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTP2GO/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SMTPcom\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SMTPcom/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendinblue\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendinblue/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\Sendlayer\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/Sendlayer/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Events\\Failed' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Events/Failed.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Processor' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Processor.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Provider' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Provider.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Providers\\SparkPost\\Subscriber' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Providers/SparkPost/Subscriber.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\SubscriberInterface' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/SubscriberInterface.php', 'WPMailSMTP\\Pro\\Emails\\Logs\\Webhooks\\Webhooks' => $baseDir . '/src/Pro/Emails/Logs/Webhooks/Webhooks.php', 'WPMailSMTP\\Pro\\Emails\\RateLimiting\\RateLimiting' => $baseDir . '/src/Pro/Emails/RateLimiting/RateLimiting.php', 'WPMailSMTP\\Pro\\Emails\\TestEmail' => $baseDir . '/src/Pro/Emails/TestEmail.php', 'WPMailSMTP\\Pro\\License\\License' => $baseDir . '/src/Pro/License/License.php', 'WPMailSMTP\\Pro\\License\\Updater' => $baseDir . '/src/Pro/License/Updater.php', 'WPMailSMTP\\Pro\\MailCatcher' => $baseDir . '/src/Pro/MailCatcher.php', 'WPMailSMTP\\Pro\\MailCatcherTrait' => $baseDir . '/src/Pro/MailCatcherTrait.php', 'WPMailSMTP\\Pro\\MailCatcherV6' => $baseDir . '/src/Pro/MailCatcherV6.php', 'WPMailSMTP\\Pro\\Migration' => $baseDir . '/src/Pro/Migration.php', 'WPMailSMTP\\Pro\\Multisite' => $baseDir . '/src/Pro/Multisite.php', 'WPMailSMTP\\Pro\\Pro' => $baseDir . '/src/Pro/Pro.php', 'WPMailSMTP\\Pro\\ProductApi\\Client' => $baseDir . '/src/Pro/ProductApi/Client.php', 'WPMailSMTP\\Pro\\ProductApi\\Credentials' => $baseDir . '/src/Pro/ProductApi/Credentials.php', 'WPMailSMTP\\Pro\\ProductApi\\CredentialsGenerationNonce' => $baseDir . '/src/Pro/ProductApi/CredentialsGenerationNonce.php', 'WPMailSMTP\\Pro\\ProductApi\\CredentialsGenerator' => $baseDir . '/src/Pro/ProductApi/CredentialsGenerator.php', 'WPMailSMTP\\Pro\\ProductApi\\CredentialsRepository' => $baseDir . '/src/Pro/ProductApi/CredentialsRepository.php', 'WPMailSMTP\\Pro\\ProductApi\\ProductApi' => $baseDir . '/src/Pro/ProductApi/ProductApi.php', 'WPMailSMTP\\Pro\\ProductApi\\Response' => $baseDir . '/src/Pro/ProductApi/Response.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Auth' => $baseDir . '/src/Pro/Providers/AmazonSES/Auth.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\IdentitiesTable' => $baseDir . '/src/Pro/Providers/AmazonSES/IdentitiesTable.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Identity' => $baseDir . '/src/Pro/Providers/AmazonSES/Identity.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Mailer' => $baseDir . '/src/Pro/Providers/AmazonSES/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\AmazonSES\\Options' => $baseDir . '/src/Pro/Providers/AmazonSES/Options.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\Client' => $baseDir . '/src/Pro/Providers/Gmail/Api/Client.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\OneTimeToken' => $baseDir . '/src/Pro/Providers/Gmail/Api/OneTimeToken.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\Response' => $baseDir . '/src/Pro/Providers/Gmail/Api/Response.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Api\\SiteId' => $baseDir . '/src/Pro/Providers/Gmail/Api/SiteId.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Auth' => $baseDir . '/src/Pro/Providers/Gmail/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Mailer' => $baseDir . '/src/Pro/Providers/Gmail/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Options' => $baseDir . '/src/Pro/Providers/Gmail/Options.php', 'WPMailSMTP\\Pro\\Providers\\Gmail\\Provider' => $baseDir . '/src/Pro/Providers/Gmail/Provider.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\AttachmentsUploader' => $baseDir . '/src/Pro/Providers/Outlook/AttachmentsUploader.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Auth' => $baseDir . '/src/Pro/Providers/Outlook/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Mailer' => $baseDir . '/src/Pro/Providers/Outlook/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Auth' => $baseDir . '/src/Pro/Providers/Outlook/OneClick/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Auth\\Client' => $baseDir . '/src/Pro/Providers/Outlook/OneClick/Auth/Client.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Auth\\Response' => $baseDir . '/src/Pro/Providers/Outlook/OneClick/Auth/Response.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\OneClick\\Options' => $baseDir . '/src/Pro/Providers/Outlook/OneClick/Options.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Options' => $baseDir . '/src/Pro/Providers/Outlook/Options.php', 'WPMailSMTP\\Pro\\Providers\\Outlook\\Provider' => $baseDir . '/src/Pro/Providers/Outlook/Provider.php', 'WPMailSMTP\\Pro\\Providers\\Providers' => $baseDir . '/src/Pro/Providers/Providers.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Auth' => $baseDir . '/src/Pro/Providers/Zoho/Auth.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Auth\\Zoho' => $baseDir . '/src/Pro/Providers/Zoho/Auth/Zoho.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Auth\\ZohoUser' => $baseDir . '/src/Pro/Providers/Zoho/Auth/ZohoUser.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Mailer' => $baseDir . '/src/Pro/Providers/Zoho/Mailer.php', 'WPMailSMTP\\Pro\\Providers\\Zoho\\Options' => $baseDir . '/src/Pro/Providers/Zoho/Options.php', 'WPMailSMTP\\Pro\\SiteHealth' => $baseDir . '/src/Pro/SiteHealth.php', 'WPMailSMTP\\Pro\\SmartRouting\\Admin\\SettingsTab' => $baseDir . '/src/Pro/SmartRouting/Admin/SettingsTab.php', 'WPMailSMTP\\Pro\\SmartRouting\\ConditionalLogic' => $baseDir . '/src/Pro/SmartRouting/ConditionalLogic.php', 'WPMailSMTP\\Pro\\SmartRouting\\SmartRouting' => $baseDir . '/src/Pro/SmartRouting/SmartRouting.php', 'WPMailSMTP\\Pro\\Tasks\\EmailLogCleanupTask' => $baseDir . '/src/Pro/Tasks/EmailLogCleanupTask.php', 'WPMailSMTP\\Pro\\Tasks\\LicenseCheckTask' => $baseDir . '/src/Pro/Tasks/LicenseCheckTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\BulkVerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/BulkVerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\ElasticEmail\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/ElasticEmail/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\ExportCleanupTask' => $baseDir . '/src/Pro/Tasks/Logs/ExportCleanupTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\MailerSend\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/MailerSend/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailgun\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Mailgun/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Mailjet\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Mailjet/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Mandrill\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Mandrill/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Postmark\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Postmark/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\ResendTask' => $baseDir . '/src/Pro/Tasks/Logs/ResendTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Resend\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Resend/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\SMTP2GO\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/SMTP2GO/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\SMTPcom\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/SMTPcom/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Sendinblue\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Sendinblue/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\Sendlayer\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/Sendlayer/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\SparkPost\\VerifySentStatusTask' => $baseDir . '/src/Pro/Tasks/Logs/SparkPost/VerifySentStatusTask.php', 'WPMailSMTP\\Pro\\Tasks\\Logs\\VerifySentStatusTaskAbstract' => $baseDir . '/src/Pro/Tasks/Logs/VerifySentStatusTaskAbstract.php', 'WPMailSMTP\\Pro\\Tasks\\Migrations\\EmailLogMigration11' => $baseDir . '/src/Pro/Tasks/Migrations/EmailLogMigration11.php', 'WPMailSMTP\\Pro\\Tasks\\Migrations\\EmailLogMigration4' => $baseDir . '/src/Pro/Tasks/Migrations/EmailLogMigration4.php', 'WPMailSMTP\\Pro\\Tasks\\Migrations\\EmailLogMigration5' => $baseDir . '/src/Pro/Tasks/Migrations/EmailLogMigration5.php', 'WPMailSMTP\\Pro\\Tasks\\NotifierTask' => $baseDir . '/src/Pro/Tasks/NotifierTask.php', 'WPMailSMTP\\Pro\\Translations' => $baseDir . '/src/Pro/Translations.php', 'WPMailSMTP\\Pro\\Upgrade' => $baseDir . '/src/Pro/Upgrade.php', 'WPMailSMTP\\Processor' => $baseDir . '/src/Processor.php', 'WPMailSMTP\\Providers\\AmazonSES\\Options' => $baseDir . '/src/Providers/AmazonSES/Options.php', 'WPMailSMTP\\Providers\\AuthAbstract' => $baseDir . '/src/Providers/AuthAbstract.php', 'WPMailSMTP\\Providers\\AuthInterface' => $baseDir . '/src/Providers/AuthInterface.php', 'WPMailSMTP\\Providers\\ElasticEmail\\Mailer' => $baseDir . '/src/Providers/ElasticEmail/Mailer.php', 'WPMailSMTP\\Providers\\ElasticEmail\\Options' => $baseDir . '/src/Providers/ElasticEmail/Options.php', 'WPMailSMTP\\Providers\\Gmail\\Auth' => $baseDir . '/src/Providers/Gmail/Auth.php', 'WPMailSMTP\\Providers\\Gmail\\Logger' => $baseDir . '/src/Providers/Gmail/Logger.php', 'WPMailSMTP\\Providers\\Gmail\\Mailer' => $baseDir . '/src/Providers/Gmail/Mailer.php', 'WPMailSMTP\\Providers\\Gmail\\Options' => $baseDir . '/src/Providers/Gmail/Options.php', 'WPMailSMTP\\Providers\\Loader' => $baseDir . '/src/Providers/Loader.php', 'WPMailSMTP\\Providers\\Mail\\Mailer' => $baseDir . '/src/Providers/Mail/Mailer.php', 'WPMailSMTP\\Providers\\Mail\\Options' => $baseDir . '/src/Providers/Mail/Options.php', 'WPMailSMTP\\Providers\\MailerAbstract' => $baseDir . '/src/Providers/MailerAbstract.php', 'WPMailSMTP\\Providers\\MailerInterface' => $baseDir . '/src/Providers/MailerInterface.php', 'WPMailSMTP\\Providers\\MailerSend\\Mailer' => $baseDir . '/src/Providers/MailerSend/Mailer.php', 'WPMailSMTP\\Providers\\MailerSend\\Options' => $baseDir . '/src/Providers/MailerSend/Options.php', 'WPMailSMTP\\Providers\\Mailgun\\Mailer' => $baseDir . '/src/Providers/Mailgun/Mailer.php', 'WPMailSMTP\\Providers\\Mailgun\\Options' => $baseDir . '/src/Providers/Mailgun/Options.php', 'WPMailSMTP\\Providers\\Mailjet\\Mailer' => $baseDir . '/src/Providers/Mailjet/Mailer.php', 'WPMailSMTP\\Providers\\Mailjet\\Options' => $baseDir . '/src/Providers/Mailjet/Options.php', 'WPMailSMTP\\Providers\\Mandrill\\Mailer' => $baseDir . '/src/Providers/Mandrill/Mailer.php', 'WPMailSMTP\\Providers\\Mandrill\\Options' => $baseDir . '/src/Providers/Mandrill/Options.php', 'WPMailSMTP\\Providers\\OptionsAbstract' => $baseDir . '/src/Providers/OptionsAbstract.php', 'WPMailSMTP\\Providers\\OptionsInterface' => $baseDir . '/src/Providers/OptionsInterface.php', 'WPMailSMTP\\Providers\\Outlook\\Options' => $baseDir . '/src/Providers/Outlook/Options.php', 'WPMailSMTP\\Providers\\Outlook\\Provider' => $baseDir . '/src/Providers/Outlook/Provider.php', 'WPMailSMTP\\Providers\\PepipostAPI\\Mailer' => $baseDir . '/src/Providers/PepipostAPI/Mailer.php', 'WPMailSMTP\\Providers\\PepipostAPI\\Options' => $baseDir . '/src/Providers/PepipostAPI/Options.php', 'WPMailSMTP\\Providers\\Pepipost\\Mailer' => $baseDir . '/src/Providers/Pepipost/Mailer.php', 'WPMailSMTP\\Providers\\Pepipost\\Options' => $baseDir . '/src/Providers/Pepipost/Options.php', 'WPMailSMTP\\Providers\\Postmark\\Mailer' => $baseDir . '/src/Providers/Postmark/Mailer.php', 'WPMailSMTP\\Providers\\Postmark\\Options' => $baseDir . '/src/Providers/Postmark/Options.php', 'WPMailSMTP\\Providers\\Resend\\Mailer' => $baseDir . '/src/Providers/Resend/Mailer.php', 'WPMailSMTP\\Providers\\Resend\\Options' => $baseDir . '/src/Providers/Resend/Options.php', 'WPMailSMTP\\Providers\\SMTP2GO\\Mailer' => $baseDir . '/src/Providers/SMTP2GO/Mailer.php', 'WPMailSMTP\\Providers\\SMTP2GO\\Options' => $baseDir . '/src/Providers/SMTP2GO/Options.php', 'WPMailSMTP\\Providers\\SMTP\\Mailer' => $baseDir . '/src/Providers/SMTP/Mailer.php', 'WPMailSMTP\\Providers\\SMTP\\Options' => $baseDir . '/src/Providers/SMTP/Options.php', 'WPMailSMTP\\Providers\\SMTPcom\\Mailer' => $baseDir . '/src/Providers/SMTPcom/Mailer.php', 'WPMailSMTP\\Providers\\SMTPcom\\Options' => $baseDir . '/src/Providers/SMTPcom/Options.php', 'WPMailSMTP\\Providers\\Sendgrid\\Mailer' => $baseDir . '/src/Providers/Sendgrid/Mailer.php', 'WPMailSMTP\\Providers\\Sendgrid\\Options' => $baseDir . '/src/Providers/Sendgrid/Options.php', 'WPMailSMTP\\Providers\\Sendinblue\\Api' => $baseDir . '/src/Providers/Sendinblue/Api.php', 'WPMailSMTP\\Providers\\Sendinblue\\Mailer' => $baseDir . '/src/Providers/Sendinblue/Mailer.php', 'WPMailSMTP\\Providers\\Sendinblue\\Options' => $baseDir . '/src/Providers/Sendinblue/Options.php', 'WPMailSMTP\\Providers\\Sendlayer\\Mailer' => $baseDir . '/src/Providers/Sendlayer/Mailer.php', 'WPMailSMTP\\Providers\\Sendlayer\\Options' => $baseDir . '/src/Providers/Sendlayer/Options.php', 'WPMailSMTP\\Providers\\SparkPost\\Mailer' => $baseDir . '/src/Providers/SparkPost/Mailer.php', 'WPMailSMTP\\Providers\\SparkPost\\Options' => $baseDir . '/src/Providers/SparkPost/Options.php', 'WPMailSMTP\\Providers\\Zoho\\Options' => $baseDir . '/src/Providers/Zoho/Options.php', 'WPMailSMTP\\Queue\\Attachments' => $baseDir . '/src/Queue/Attachments.php', 'WPMailSMTP\\Queue\\Email' => $baseDir . '/src/Queue/Email.php', 'WPMailSMTP\\Queue\\Migration' => $baseDir . '/src/Queue/Migration.php', 'WPMailSMTP\\Queue\\Queue' => $baseDir . '/src/Queue/Queue.php', 'WPMailSMTP\\Reports\\Emails\\Summary' => $baseDir . '/src/Reports/Emails/Summary.php', 'WPMailSMTP\\Reports\\Reports' => $baseDir . '/src/Reports/Reports.php', 'WPMailSMTP\\SiteHealth' => $baseDir . '/src/SiteHealth.php', 'WPMailSMTP\\Tasks\\DebugEventsCleanupTask' => $baseDir . '/src/Tasks/DebugEventsCleanupTask.php', 'WPMailSMTP\\Tasks\\Meta' => $baseDir . '/src/Tasks/Meta.php', 'WPMailSMTP\\Tasks\\NotificationsUpdateTask' => $baseDir . '/src/Tasks/NotificationsUpdateTask.php', 'WPMailSMTP\\Tasks\\Queue\\CleanupQueueTask' => $baseDir . '/src/Tasks/Queue/CleanupQueueTask.php', 'WPMailSMTP\\Tasks\\Queue\\ProcessQueueTask' => $baseDir . '/src/Tasks/Queue/ProcessQueueTask.php', 'WPMailSMTP\\Tasks\\Queue\\SendEnqueuedEmailTask' => $baseDir . '/src/Tasks/Queue/SendEnqueuedEmailTask.php', 'WPMailSMTP\\Tasks\\Reports\\SummaryEmailTask' => $baseDir . '/src/Tasks/Reports/SummaryEmailTask.php', 'WPMailSMTP\\Tasks\\Task' => $baseDir . '/src/Tasks/Task.php', 'WPMailSMTP\\Tasks\\Tasks' => $baseDir . '/src/Tasks/Tasks.php', 'WPMailSMTP\\Upgrade' => $baseDir . '/src/Upgrade.php', 'WPMailSMTP\\Uploads' => $baseDir . '/src/Uploads.php', 'WPMailSMTP\\UsageTracking\\SendUsageTask' => $baseDir . '/src/UsageTracking/SendUsageTask.php', 'WPMailSMTP\\UsageTracking\\UsageTracking' => $baseDir . '/src/UsageTracking/UsageTracking.php', 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Revoke' => $baseDir . '/vendor_prefixed/google/apiclient/src/AccessToken/Revoke.php', 'WPMailSMTP\\Vendor\\Google\\AccessToken\\Verify' => $baseDir . '/vendor_prefixed/google/apiclient/src/AccessToken/Verify.php', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\AuthHandlerFactory' => $baseDir . '/vendor_prefixed/google/apiclient/src/AuthHandler/AuthHandlerFactory.php', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\Guzzle6AuthHandler' => $baseDir . '/vendor_prefixed/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php', 'WPMailSMTP\\Vendor\\Google\\AuthHandler\\Guzzle7AuthHandler' => $baseDir . '/vendor_prefixed/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\AccessToken' => $baseDir . '/vendor_prefixed/google/auth/src/AccessToken.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ApplicationDefaultCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/ApplicationDefaultCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CacheTrait' => $baseDir . '/vendor_prefixed/google/auth/src/CacheTrait.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\InvalidArgumentException' => $baseDir . '/vendor_prefixed/google/auth/src/Cache/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\Item' => $baseDir . '/vendor_prefixed/google/auth/src/Cache/Item.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\MemoryCacheItemPool' => $baseDir . '/vendor_prefixed/google/auth/src/Cache/MemoryCacheItemPool.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\SysVCacheItemPool' => $baseDir . '/vendor_prefixed/google/auth/src/Cache/SysVCacheItemPool.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Cache\\TypedItem' => $baseDir . '/vendor_prefixed/google/auth/src/Cache/TypedItem.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialSource\\AwsNativeSource' => $baseDir . '/vendor_prefixed/google/auth/src/CredentialSource/AwsNativeSource.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialSource\\FileSource' => $baseDir . '/vendor_prefixed/google/auth/src/CredentialSource/FileSource.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialSource\\UrlSource' => $baseDir . '/vendor_prefixed/google/auth/src/CredentialSource/UrlSource.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\CredentialsLoader' => $baseDir . '/vendor_prefixed/google/auth/src/CredentialsLoader.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\AppIdentityCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/AppIdentityCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ExternalAccountCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/ExternalAccountCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\GCECredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/GCECredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\IAMCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/IAMCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ImpersonatedServiceAccountCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\InsecureCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/InsecureCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ServiceAccountCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/ServiceAccountCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\ServiceAccountJwtAccessCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Credentials\\UserRefreshCredentials' => $baseDir . '/vendor_prefixed/google/auth/src/Credentials/UserRefreshCredentials.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ExternalAccountCredentialSourceInterface' => $baseDir . '/vendor_prefixed/google/auth/src/ExternalAccountCredentialSourceInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\FetchAuthTokenCache' => $baseDir . '/vendor_prefixed/google/auth/src/FetchAuthTokenCache.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\FetchAuthTokenInterface' => $baseDir . '/vendor_prefixed/google/auth/src/FetchAuthTokenInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\GCECache' => $baseDir . '/vendor_prefixed/google/auth/src/GCECache.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\GetQuotaProjectInterface' => $baseDir . '/vendor_prefixed/google/auth/src/GetQuotaProjectInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\GetUniverseDomainInterface' => $baseDir . '/vendor_prefixed/google/auth/src/GetUniverseDomainInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\Guzzle6HttpHandler' => $baseDir . '/vendor_prefixed/google/auth/src/HttpHandler/Guzzle6HttpHandler.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\Guzzle7HttpHandler' => $baseDir . '/vendor_prefixed/google/auth/src/HttpHandler/Guzzle7HttpHandler.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\HttpClientCache' => $baseDir . '/vendor_prefixed/google/auth/src/HttpHandler/HttpClientCache.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\HttpHandler\\HttpHandlerFactory' => $baseDir . '/vendor_prefixed/google/auth/src/HttpHandler/HttpHandlerFactory.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Iam' => $baseDir . '/vendor_prefixed/google/auth/src/Iam.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\IamSignerTrait' => $baseDir . '/vendor_prefixed/google/auth/src/IamSignerTrait.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\AuthTokenMiddleware' => $baseDir . '/vendor_prefixed/google/auth/src/Middleware/AuthTokenMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\ProxyAuthTokenMiddleware' => $baseDir . '/vendor_prefixed/google/auth/src/Middleware/ProxyAuthTokenMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\ScopedAccessTokenMiddleware' => $baseDir . '/vendor_prefixed/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\Middleware\\SimpleMiddleware' => $baseDir . '/vendor_prefixed/google/auth/src/Middleware/SimpleMiddleware.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\OAuth2' => $baseDir . '/vendor_prefixed/google/auth/src/OAuth2.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ProjectIdProviderInterface' => $baseDir . '/vendor_prefixed/google/auth/src/ProjectIdProviderInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\ServiceAccountSignerTrait' => $baseDir . '/vendor_prefixed/google/auth/src/ServiceAccountSignerTrait.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\SignBlobInterface' => $baseDir . '/vendor_prefixed/google/auth/src/SignBlobInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\UpdateMetadataInterface' => $baseDir . '/vendor_prefixed/google/auth/src/UpdateMetadataInterface.php', 'WPMailSMTP\\Vendor\\Google\\Auth\\UpdateMetadataTrait' => $baseDir . '/vendor_prefixed/google/auth/src/UpdateMetadataTrait.php', 'WPMailSMTP\\Vendor\\Google\\Client' => $baseDir . '/vendor_prefixed/google/apiclient/src/Client.php', 'WPMailSMTP\\Vendor\\Google\\Collection' => $baseDir . '/vendor_prefixed/google/apiclient/src/Collection.php', 'WPMailSMTP\\Vendor\\Google\\Exception' => $baseDir . '/vendor_prefixed/google/apiclient/src/Exception.php', 'WPMailSMTP\\Vendor\\Google\\Http\\Batch' => $baseDir . '/vendor_prefixed/google/apiclient/src/Http/Batch.php', 'WPMailSMTP\\Vendor\\Google\\Http\\MediaFileUpload' => $baseDir . '/vendor_prefixed/google/apiclient/src/Http/MediaFileUpload.php', 'WPMailSMTP\\Vendor\\Google\\Http\\REST' => $baseDir . '/vendor_prefixed/google/apiclient/src/Http/REST.php', 'WPMailSMTP\\Vendor\\Google\\Model' => $baseDir . '/vendor_prefixed/google/apiclient/src/Model.php', 'WPMailSMTP\\Vendor\\Google\\Service' => $baseDir . '/vendor_prefixed/google/apiclient/src/Service.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Exception' => $baseDir . '/vendor_prefixed/google/apiclient/src/Service/Exception.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\AutoForwarding' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/AutoForwarding.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\BatchDeleteMessagesRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/BatchDeleteMessagesRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\BatchModifyMessagesRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/BatchModifyMessagesRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\CseIdentity' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/CseIdentity.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\CseKeyPair' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/CseKeyPair.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\CsePrivateKeyMetadata' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/CsePrivateKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Delegate' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Delegate.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\DisableCseKeyPairRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/DisableCseKeyPairRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Draft' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Draft.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\EnableCseKeyPairRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/EnableCseKeyPairRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Filter' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Filter.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\FilterAction' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/FilterAction.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\FilterCriteria' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/FilterCriteria.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ForwardingAddress' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ForwardingAddress.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HardwareKeyMetadata' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/HardwareKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\History' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/History.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryLabelAdded' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryLabelAdded.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryLabelRemoved' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryLabelRemoved.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryMessageAdded' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryMessageAdded.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\HistoryMessageDeleted' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/HistoryMessageDeleted.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ImapSettings' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ImapSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\KaclsKeyMetadata' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/KaclsKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Label' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Label.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\LabelColor' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/LabelColor.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\LanguageSettings' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/LanguageSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListCseIdentitiesResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListCseIdentitiesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListCseKeyPairsResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListCseKeyPairsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListDelegatesResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListDelegatesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListDraftsResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListDraftsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListFiltersResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListFiltersResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListForwardingAddressesResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListForwardingAddressesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListHistoryResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListHistoryResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListLabelsResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListLabelsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListMessagesResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListMessagesResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListSendAsResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListSendAsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListSmimeInfoResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListSmimeInfoResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ListThreadsResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ListThreadsResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Message' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Message.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\MessagePart' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePart.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\MessagePartBody' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartBody.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\MessagePartHeader' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/MessagePartHeader.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ModifyMessageRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ModifyMessageRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ModifyThreadRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ModifyThreadRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\ObliterateCseKeyPairRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/ObliterateCseKeyPairRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\PivKeyMetadata' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/PivKeyMetadata.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\PopSettings' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/PopSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Profile' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Profile.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\Users' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/Users.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersDrafts' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersDrafts.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersHistory' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersHistory.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersLabels' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersLabels.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersMessages' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersMessages.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersMessagesAttachments' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersMessagesAttachments.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettings' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsCse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsCseIdentities' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCseIdentities.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsCseKeypairs' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsCseKeypairs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsDelegates' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsDelegates.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsFilters' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsFilters.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsForwardingAddresses' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsForwardingAddresses.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsSendAs' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsSendAs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersSettingsSendAsSmimeInfo' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersSettingsSendAsSmimeInfo.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Resource\\UsersThreads' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Resource/UsersThreads.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SendAs' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/SendAs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SignAndEncryptKeyPairs' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/SignAndEncryptKeyPairs.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SmimeInfo' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/SmimeInfo.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\SmtpMsa' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/SmtpMsa.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\Thread' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/Thread.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\VacationSettings' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/VacationSettings.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\WatchRequest' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/WatchRequest.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Gmail\\WatchResponse' => $baseDir . '/vendor_prefixed/google/apiclient-services/src/Gmail/WatchResponse.php', 'WPMailSMTP\\Vendor\\Google\\Service\\Resource' => $baseDir . '/vendor_prefixed/google/apiclient/src/Service/Resource.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Composer' => $baseDir . '/vendor_prefixed/google/apiclient/src/Task/Composer.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Exception' => $baseDir . '/vendor_prefixed/google/apiclient/src/Task/Exception.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Retryable' => $baseDir . '/vendor_prefixed/google/apiclient/src/Task/Retryable.php', 'WPMailSMTP\\Vendor\\Google\\Task\\Runner' => $baseDir . '/vendor_prefixed/google/apiclient/src/Task/Runner.php', 'WPMailSMTP\\Vendor\\Google\\Utils\\UriTemplate' => $baseDir . '/vendor_prefixed/google/apiclient/src/Utils/UriTemplate.php', 'WPMailSMTP\\Vendor\\Google_AccessToken_Revoke' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AccessToken_Verify' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AuthHandler_AuthHandlerFactory' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AuthHandler_Guzzle6AuthHandler' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_AuthHandler_Guzzle7AuthHandler' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Client' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Collection' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Exception' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Http_Batch' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Http_MediaFileUpload' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Http_REST' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Model' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Service' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Service_Exception' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Service_Resource' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Composer' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Exception' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Retryable' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Task_Runner' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\Google_Utils_UriTemplate' => $baseDir . '/vendor_prefixed/google/apiclient/src/aliases.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\BodySummarizer' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\BodySummarizerInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizerInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Client' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Client.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\ClientInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\ClientTrait' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/ClientTrait.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\CookieJar' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJar.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\CookieJarInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\FileCookieJar' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\SessionCookieJar' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Cookie\\SetCookie' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Cookie/SetCookie.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\BadResponseException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/BadResponseException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\ClientException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ClientException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\ConnectException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ConnectException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\GuzzleException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/GuzzleException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\InvalidArgumentException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\RequestException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/RequestException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\ServerException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/ServerException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\TooManyRedirectsException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Exception\\TransferException' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Exception/TransferException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\HandlerStack' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/HandlerStack.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlFactory' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactory.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlFactoryInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlHandler' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\CurlMultiHandler' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\EasyHandle' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/EasyHandle.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\HeaderProcessor' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\MockHandler' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/MockHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\Proxy' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/Proxy.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Handler\\StreamHandler' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Handler/StreamHandler.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\MessageFormatter' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatter.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\MessageFormatterInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/MessageFormatterInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Middleware' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Middleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Pool' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Pool.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\PrepareBodyMiddleware' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\AggregateException' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/AggregateException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\CancellationException' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/CancellationException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Coroutine' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Coroutine.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Create' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Create.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Each' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Each.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\EachPromise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/EachPromise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\FulfilledPromise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/FulfilledPromise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Is' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Is.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Promise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Promise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/PromiseInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromisorInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/PromisorInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\RejectedPromise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/RejectedPromise.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\RejectionException' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/RejectionException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueue' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueue.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueueInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueueInterface.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Utils' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Utils.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\AppendStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/AppendStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\BufferStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/BufferStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\CachingStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/CachingStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\DroppingStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Exception\\MalformedUriException' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Exception/MalformedUriException.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\FnStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/FnStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Header' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Header.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\HttpFactory' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/HttpFactory.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\InflateStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/InflateStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LazyOpenStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/LazyOpenStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LimitStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/LimitStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Message' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Message.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MessageTrait' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/MessageTrait.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MimeType' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/MimeType.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MultipartStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/MultipartStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\NoSeekStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/NoSeekStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\PumpStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/PumpStream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Query' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Query.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Request' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Request.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Response' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Response.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Rfc7230' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Rfc7230.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\ServerRequest' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/ServerRequest.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Stream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Stream.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/StreamDecoratorTrait.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\StreamWrapper' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/StreamWrapper.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UploadedFile' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/UploadedFile.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Uri' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Uri.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriComparator' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/UriComparator.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriNormalizer' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/UriNormalizer.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriResolver' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/UriResolver.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Utils' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Utils.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\RedirectMiddleware' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/RedirectMiddleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\RequestOptions' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/RequestOptions.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\RetryMiddleware' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\TransferStats' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/TransferStats.php', 'WPMailSMTP\\Vendor\\GuzzleHttp\\Utils' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/Utils.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base32' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base32.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base32Hex' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base32Hex.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64DotSlash' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64DotSlash.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64DotSlashOrdered' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Base64UrlSafe' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Base64UrlSafe.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Binary' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Binary.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\EncoderInterface' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/EncoderInterface.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Encoding' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Encoding.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\Hex' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/Hex.php', 'WPMailSMTP\\Vendor\\ParagonIE\\ConstantTime\\RFC4648' => $baseDir . '/vendor_prefixed/paragonie/constant_time_encoding/src/RFC4648.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\CacheException' => $baseDir . '/vendor_prefixed/psr/cache/src/CacheException.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\CacheItemInterface' => $baseDir . '/vendor_prefixed/psr/cache/src/CacheItemInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\CacheItemPoolInterface' => $baseDir . '/vendor_prefixed/psr/cache/src/CacheItemPoolInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Cache\\InvalidArgumentException' => $baseDir . '/vendor_prefixed/psr/cache/src/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\ClientExceptionInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/ClientExceptionInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\ClientInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/ClientInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\NetworkExceptionInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/NetworkExceptionInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Client\\RequestExceptionInterface' => $baseDir . '/vendor_prefixed/psr/http-client/src/RequestExceptionInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\MessageInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/MessageInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\RequestFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/RequestFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\RequestInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/RequestInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ResponseFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/ResponseFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ResponseInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/ResponseInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ServerRequestFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/ServerRequestFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\ServerRequestInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/ServerRequestInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\StreamFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/StreamFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\StreamInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/StreamInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UploadedFileFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/UploadedFileFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UploadedFileInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/UploadedFileInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UriFactoryInterface' => $baseDir . '/vendor_prefixed/psr/http-factory/src/UriFactoryInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Http\\Message\\UriInterface' => $baseDir . '/vendor_prefixed/psr/http-message/src/UriInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\AbstractLogger' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/AbstractLogger.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\InvalidArgumentException' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/InvalidArgumentException.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LogLevel' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LogLevel.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerAwareInterface' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerAwareTrait' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerAwareTrait.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerInterface' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerInterface.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\LoggerTrait' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\NullLogger' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/NullLogger.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\Test\\DummyTest' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/Test/DummyTest.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\Test\\LoggerInterfaceTest' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', 'WPMailSMTP\\Vendor\\Psr\\Log\\Test\\TestLogger' => $baseDir . '/vendor_prefixed/psr/log/Psr/Log/Test/TestLogger.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Idn' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/Idn.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Info' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/Info.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => $baseDir . '/vendor_prefixed/symfony/polyfill-intl-idn/Resources/unidata/Regex.php', 'WPMailSMTP\\Vendor\\Symfony\\Polyfill\\Mbstring\\Mbstring' => $baseDir . '/vendor_prefixed/symfony/polyfill-mbstring/Mbstring.php', 'WPMailSMTP\\WP' => $baseDir . '/src/WP.php', 'WPMailSMTP\\WPMailArgs' => $baseDir . '/src/WPMailArgs.php', 'WPMailSMTP\\WPMailInitiator' => $baseDir . '/src/WPMailInitiator.php', ); vendor/composer/InstalledVersions.php 0000644 00000037417 15174671617 0014104 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 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|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(); } /** * @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(); if (self::$canGetVendors) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 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'; $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } } } } 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()) { $installed[] = self::$installed; } return $installed; } } vendor/composer/autoload_real.php 0000644 00000003207 15174671617 0013235 0 ustar 00 <?php // autoload_real.php @generated by Composer class ComposerAutoloaderInitcff0bec3e1c1cc5d8ab7965adacb1549 { 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; } spl_autoload_register(array('ComposerAutoloaderInitcff0bec3e1c1cc5d8ab7965adacb1549', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); spl_autoload_unregister(array('ComposerAutoloaderInitcff0bec3e1c1cc5d8ab7965adacb1549', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; call_user_func(\Composer\Autoload\ComposerStaticInitcff0bec3e1c1cc5d8ab7965adacb1549::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); $filesToLoad = \Composer\Autoload\ComposerStaticInitcff0bec3e1c1cc5d8ab7965adacb1549::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; require $file; } }, null, null); foreach ($filesToLoad as $fileIdentifier => $file) { $requireFile($fileIdentifier, $file); } return $loader; } } vendor/composer/ClassLoader.php 0000644 00000037772 15174671617 0012634 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 00000001403 15174671617 0010377 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; } } trigger_error( $err, E_USER_ERROR ); } require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInitcff0bec3e1c1cc5d8ab7965adacb1549::getLoader(); vendor/woocommerce/action-scheduler/action-scheduler.php 0000644 00000005717 15174671617 0017604 0 ustar 00 <?php /** * Plugin Name: Action Scheduler * Plugin URI: https://actionscheduler.org * Description: A robust scheduling library for use in WordPress plugins. * Author: Automattic * Author URI: https://automattic.com/ * Version: 3.9.3 * License: GPLv3 * Requires at least: 6.5 * Tested up to: 6.8 * Requires PHP: 7.2 * * Copyright 2019 Automattic, Inc. (https://automattic.com/contact/) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * * @package ActionScheduler */ if ( ! function_exists( 'action_scheduler_register_3_dot_9_dot_3' ) && function_exists( 'add_action' ) ) { // WRCS: DEFINED_VERSION. if ( ! class_exists( 'ActionScheduler_Versions', false ) ) { require_once __DIR__ . '/classes/ActionScheduler_Versions.php'; add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 ); } add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_9_dot_3', 0, 0 ); // WRCS: DEFINED_VERSION. // phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace /** * Registers this version of Action Scheduler. */ function action_scheduler_register_3_dot_9_dot_3() { // WRCS: DEFINED_VERSION. $versions = ActionScheduler_Versions::instance(); $versions->register( '3.9.3', 'action_scheduler_initialize_3_dot_9_dot_3' ); // WRCS: DEFINED_VERSION. } // phpcs:disable Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace /** * Initializes this version of Action Scheduler. */ function action_scheduler_initialize_3_dot_9_dot_3() { // WRCS: DEFINED_VERSION. // A final safety check is required even here, because historic versions of Action Scheduler // followed a different pattern (in some unusual cases, we could reach this point and the // ActionScheduler class is already defined—so we need to guard against that). if ( ! class_exists( 'ActionScheduler', false ) ) { require_once __DIR__ . '/classes/abstracts/ActionScheduler.php'; ActionScheduler::init( __FILE__ ); } } // Support usage in themes - load this version if no plugin has loaded a version yet. if ( did_action( 'plugins_loaded' ) && ! doing_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler', false ) ) { action_scheduler_initialize_3_dot_9_dot_3(); // WRCS: DEFINED_VERSION. do_action( 'action_scheduler_pre_theme_init' ); ActionScheduler_Versions::initialize_latest_version(); } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php 0000644 00000001651 15174671617 0025155 0 ustar 00 <?php /** * Year field. Allows: * , / - * * @author Michael Dowling <mtdowling@gmail.com> */ class CronExpression_YearField extends CronExpression_AbstractField { /** * {@inheritdoc} */ public function isSatisfiedBy(DateTime $date, $value) { return $this->isSatisfied($date->format('Y'), $value); } /** * {@inheritdoc} */ public function increment(DateTime $date, $invert = false) { if ($invert) { $date->modify('-1 year'); $date->setDate($date->format('Y'), 12, 31); $date->setTime(23, 59, 0); } else { $date->modify('+1 year'); $date->setDate($date->format('Y'), 1, 1); $date->setTime(0, 0, 0); } return $this; } /** * {@inheritdoc} */ public function validate($value) { return (bool) preg_match('/[\*,\/\-0-9]+/', $value); } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php 0000644 00000002567 15174671617 0025351 0 ustar 00 <?php /** * Month field. Allows: * , / - * * @author Michael Dowling <mtdowling@gmail.com> */ class CronExpression_MonthField extends CronExpression_AbstractField { /** * {@inheritdoc} */ public function isSatisfiedBy(DateTime $date, $value) { // Convert text month values to integers $value = str_ireplace( array( 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC' ), range(1, 12), $value ); return $this->isSatisfied($date->format('m'), $value); } /** * {@inheritdoc} */ public function increment(DateTime $date, $invert = false) { if ($invert) { // $date->modify('last day of previous month'); // remove for php 5.2 compat $date->modify('previous month'); $date->modify($date->format('Y-m-t')); $date->setTime(23, 59); } else { //$date->modify('first day of next month'); // remove for php 5.2 compat $date->modify('next month'); $date->modify($date->format('Y-m-01')); $date->setTime(0, 0); } return $this; } /** * {@inheritdoc} */ public function validate($value) { return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); } } vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE 0000644 00000002112 15174671617 0020535 0 ustar 00 Copyright (c) 2011 Michael Dowling <mtdowling@gmail.com> and contributors 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/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php 0000644 00000002162 15174671617 0026153 0 ustar 00 <?php /** * CRON field interface * * @author Michael Dowling <mtdowling@gmail.com> */ interface CronExpression_FieldInterface { /** * Check if the respective value of a DateTime field satisfies a CRON exp * * @param DateTime $date DateTime object to check * @param string $value CRON expression to test against * * @return bool Returns TRUE if satisfied, FALSE otherwise */ public function isSatisfiedBy(DateTime $date, $value); /** * When a CRON expression is not satisfied, this method is used to increment * or decrement a DateTime object by the unit of the cron field * * @param DateTime $date DateTime object to change * @param bool $invert (optional) Set to TRUE to decrement * * @return CronExpression_FieldInterface */ public function increment(DateTime $date, $invert = false); /** * Validates a CRON expression for a given field * * @param string $value CRON expression value to validate * * @return bool Returns TRUE if valid, FALSE otherwise */ public function validate($value); } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php 0000644 00000007521 15174671617 0026075 0 ustar 00 <?php /** * Day of week field. Allows: * / , - ? L # * * Days of the week can be represented as a number 0-7 (0|7 = Sunday) * or as a three letter string: SUN, MON, TUE, WED, THU, FRI, SAT. * * 'L' stands for "last". It allows you to specify constructs such as * "the last Friday" of a given month. * * '#' is allowed for the day-of-week field, and must be followed by a * number between one and five. It allows you to specify constructs such as * "the second Friday" of a given month. * * @author Michael Dowling <mtdowling@gmail.com> */ class CronExpression_DayOfWeekField extends CronExpression_AbstractField { /** * {@inheritdoc} */ public function isSatisfiedBy(DateTime $date, $value) { if ($value == '?') { return true; } // Convert text day of the week values to integers $value = str_ireplace( array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'), range(0, 6), $value ); $currentYear = $date->format('Y'); $currentMonth = $date->format('m'); $lastDayOfMonth = $date->format('t'); // Find out if this is the last specific weekday of the month if (strpos($value, 'L')) { $weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L'))); $tdate = clone $date; $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); while ($tdate->format('w') != $weekday) { $tdate->setDate($currentYear, $currentMonth, --$lastDayOfMonth); } return $date->format('j') == $lastDayOfMonth; } // Handle # hash tokens if (strpos($value, '#')) { list($weekday, $nth) = explode('#', $value); // Validate the hash fields if ($weekday < 1 || $weekday > 5) { throw new InvalidArgumentException("Weekday must be a value between 1 and 5. {$weekday} given"); } if ($nth > 5) { throw new InvalidArgumentException('There are never more than 5 of a given weekday in a month'); } // The current weekday must match the targeted weekday to proceed if ($date->format('N') != $weekday) { return false; } $tdate = clone $date; $tdate->setDate($currentYear, $currentMonth, 1); $dayCount = 0; $currentDay = 1; while ($currentDay < $lastDayOfMonth + 1) { if ($tdate->format('N') == $weekday) { if (++$dayCount >= $nth) { break; } } $tdate->setDate($currentYear, $currentMonth, ++$currentDay); } return $date->format('j') == $currentDay; } // Handle day of the week values if (strpos($value, '-')) { $parts = explode('-', $value); if ($parts[0] == '7') { $parts[0] = '0'; } elseif ($parts[1] == '0') { $parts[1] = '7'; } $value = implode('-', $parts); } // Test to see which Sunday to use -- 0 == 7 == Sunday $format = in_array(7, str_split($value)) ? 'N' : 'w'; $fieldValue = $date->format($format); return $this->isSatisfied($fieldValue, $value); } /** * {@inheritdoc} */ public function increment(DateTime $date, $invert = false) { if ($invert) { $date->modify('-1 day'); $date->setTime(23, 59, 0); } else { $date->modify('+1 day'); $date->setTime(0, 0, 0); } return $this; } /** * {@inheritdoc} */ public function validate($value) { return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value); } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php 0000644 00000007014 15174671617 0026264 0 ustar 00 <?php /** * Day of month field. Allows: * , / - ? L W * * 'L' stands for "last" and specifies the last day of the month. * * The 'W' character is used to specify the weekday (Monday-Friday) nearest the * given day. As an example, if you were to specify "15W" as the value for the * day-of-month field, the meaning is: "the nearest weekday to the 15th of the * month". So if the 15th is a Saturday, the trigger will fire on Friday the * 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If * the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you * specify "1W" as the value for day-of-month, and the 1st is a Saturday, the * trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary * of a month's days. The 'W' character can only be specified when the * day-of-month is a single day, not a range or list of days. * * @author Michael Dowling <mtdowling@gmail.com> */ class CronExpression_DayOfMonthField extends CronExpression_AbstractField { /** * Get the nearest day of the week for a given day in a month * * @param int $currentYear Current year * @param int $currentMonth Current month * @param int $targetDay Target day of the month * * @return DateTime Returns the nearest date */ private static function getNearestWeekday($currentYear, $currentMonth, $targetDay) { $tday = str_pad($targetDay, 2, '0', STR_PAD_LEFT); $target = new DateTime("$currentYear-$currentMonth-$tday"); $currentWeekday = (int) $target->format('N'); if ($currentWeekday < 6) { return $target; } $lastDayOfMonth = $target->format('t'); foreach (array(-1, 1, -2, 2) as $i) { $adjusted = $targetDay + $i; if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) { $target->setDate($currentYear, $currentMonth, $adjusted); if ($target->format('N') < 6 && $target->format('m') == $currentMonth) { return $target; } } } } /** * {@inheritdoc} */ public function isSatisfiedBy(DateTime $date, $value) { // ? states that the field value is to be skipped if ($value == '?') { return true; } $fieldValue = $date->format('d'); // Check to see if this is the last day of the month if ($value == 'L') { return $fieldValue == $date->format('t'); } // Check to see if this is the nearest weekday to a particular value if (strpos($value, 'W')) { // Parse the target day $targetDay = substr($value, 0, strpos($value, 'W')); // Find out if the current day is the nearest day of the week return $date->format('j') == self::getNearestWeekday( $date->format('Y'), $date->format('m'), $targetDay )->format('j'); } return $this->isSatisfied($date->format('d'), $value); } /** * {@inheritdoc} */ public function increment(DateTime $date, $invert = false) { if ($invert) { $date->modify('previous day'); $date->setTime(23, 59); } else { $date->modify('next day'); $date->setTime(0, 0); } return $this; } /** * {@inheritdoc} */ public function validate($value) { return (bool) preg_match('/[\*,\/\-\?LW0-9A-Za-z]+/', $value); } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php 0000644 00000003321 15174671617 0025660 0 ustar 00 <?php /** * CRON field factory implementing a flyweight factory * * @author Michael Dowling <mtdowling@gmail.com> * @link http://en.wikipedia.org/wiki/Cron */ class CronExpression_FieldFactory { /** * @var array Cache of instantiated fields */ private $fields = array(); /** * Get an instance of a field object for a cron expression position * * @param int $position CRON expression position value to retrieve * * @return CronExpression_FieldInterface * @throws InvalidArgumentException if a position is not valid */ public function getField($position) { if (!isset($this->fields[$position])) { switch ($position) { case 0: $this->fields[$position] = new CronExpression_MinutesField(); break; case 1: $this->fields[$position] = new CronExpression_HoursField(); break; case 2: $this->fields[$position] = new CronExpression_DayOfMonthField(); break; case 3: $this->fields[$position] = new CronExpression_MonthField(); break; case 4: $this->fields[$position] = new CronExpression_DayOfWeekField(); break; case 5: $this->fields[$position] = new CronExpression_YearField(); break; default: throw new InvalidArgumentException( $position . ' is not a valid position' ); } } return $this->fields[$position]; } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php 0000644 00000002205 15174671617 0025351 0 ustar 00 <?php /** * Hours field. Allows: * , / - * * @author Michael Dowling <mtdowling@gmail.com> */ class CronExpression_HoursField extends CronExpression_AbstractField { /** * {@inheritdoc} */ public function isSatisfiedBy(DateTime $date, $value) { return $this->isSatisfied($date->format('H'), $value); } /** * {@inheritdoc} */ public function increment(DateTime $date, $invert = false) { // Change timezone to UTC temporarily. This will // allow us to go back or forwards and hour even // if DST will be changed between the hours. $timezone = $date->getTimezone(); $date->setTimezone(new DateTimeZone('UTC')); if ($invert) { $date->modify('-1 hour'); $date->setTime($date->format('H'), 59); } else { $date->modify('+1 hour'); $date->setTime($date->format('H'), 0); } $date->setTimezone($timezone); return $this; } /** * {@inheritdoc} */ public function validate($value) { return (bool) preg_match('/[\*,\/\-0-9]+/', $value); } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php 0000644 00000001371 15174671617 0025700 0 ustar 00 <?php /** * Minutes field. Allows: * , / - * * @author Michael Dowling <mtdowling@gmail.com> */ class CronExpression_MinutesField extends CronExpression_AbstractField { /** * {@inheritdoc} */ public function isSatisfiedBy(DateTime $date, $value) { return $this->isSatisfied($date->format('i'), $value); } /** * {@inheritdoc} */ public function increment(DateTime $date, $invert = false) { if ($invert) { $date->modify('-1 minute'); } else { $date->modify('+1 minute'); } return $this; } /** * {@inheritdoc} */ public function validate($value) { return (bool) preg_match('/[\*,\/\-0-9]+/', $value); } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php 0000644 00000026537 15174671617 0023243 0 ustar 00 <?php /** * CRON expression parser that can determine whether or not a CRON expression is * due to run, the next run date and previous run date of a CRON expression. * The determinations made by this class are accurate if checked run once per * minute (seconds are dropped from date time comparisons). * * Schedule parts must map to: * minute [0-59], hour [0-23], day of month, month [1-12|JAN-DEC], day of week * [1-7|MON-SUN], and an optional year. * * @author Michael Dowling <mtdowling@gmail.com> * @link http://en.wikipedia.org/wiki/Cron */ class CronExpression { const MINUTE = 0; const HOUR = 1; const DAY = 2; const MONTH = 3; const WEEKDAY = 4; const YEAR = 5; /** * @var array CRON expression parts */ private $cronParts; /** * @var CronExpression_FieldFactory CRON field factory */ private $fieldFactory; /** * @var array Order in which to test of cron parts */ private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE); /** * Factory method to create a new CronExpression. * * @param string $expression The CRON expression to create. There are * several special predefined values which can be used to substitute the * CRON expression: * * @yearly, @annually) - Run once a year, midnight, Jan. 1 - 0 0 1 1 * * @monthly - Run once a month, midnight, first of month - 0 0 1 * * * @weekly - Run once a week, midnight on Sun - 0 0 * * 0 * @daily - Run once a day, midnight - 0 0 * * * * @hourly - Run once an hour, first minute - 0 * * * * * *@param CronExpression_FieldFactory $fieldFactory (optional) Field factory to use * * @return CronExpression */ public static function factory($expression, ?CronExpression_FieldFactory $fieldFactory = null) { $mappings = array( '@yearly' => '0 0 1 1 *', '@annually' => '0 0 1 1 *', '@monthly' => '0 0 1 * *', '@weekly' => '0 0 * * 0', '@daily' => '0 0 * * *', '@hourly' => '0 * * * *' ); if (isset($mappings[$expression])) { $expression = $mappings[$expression]; } return new self($expression, $fieldFactory ? $fieldFactory : new CronExpression_FieldFactory()); } /** * Parse a CRON expression * * @param string $expression CRON expression (e.g. '8 * * * *') * @param CronExpression_FieldFactory $fieldFactory Factory to create cron fields */ public function __construct($expression, CronExpression_FieldFactory $fieldFactory) { $this->fieldFactory = $fieldFactory; $this->setExpression($expression); } /** * Set or change the CRON expression * * @param string $value CRON expression (e.g. 8 * * * *) * * @return CronExpression * @throws InvalidArgumentException if not a valid CRON expression */ public function setExpression($value) { $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); if (count($this->cronParts) < 5) { throw new InvalidArgumentException( $value . ' is not a valid CRON expression' ); } foreach ($this->cronParts as $position => $part) { $this->setPart($position, $part); } return $this; } /** * Set part of the CRON expression * * @param int $position The position of the CRON expression to set * @param string $value The value to set * * @return CronExpression * @throws InvalidArgumentException if the value is not valid for the part */ public function setPart($position, $value) { if (!$this->fieldFactory->getField($position)->validate($value)) { throw new InvalidArgumentException( 'Invalid CRON field value ' . $value . ' as position ' . $position ); } $this->cronParts[$position] = $value; return $this; } /** * Get a next run date relative to the current date or a specific date * * @param string|DateTime $currentTime (optional) Relative calculation date * @param int $nth (optional) Number of matches to skip before returning a * matching next run date. 0, the default, will return the current * date and time if the next run date falls on the current date and * time. Setting this value to 1 will skip the first match and go to * the second match. Setting this value to 2 will skip the first 2 * matches and so on. * @param bool $allowCurrentDate (optional) Set to TRUE to return the * current date if it matches the cron expression * * @return DateTime * @throws RuntimeException on too many iterations */ public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) { return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate); } /** * Get a previous run date relative to the current date or a specific date * * @param string|DateTime $currentTime (optional) Relative calculation date * @param int $nth (optional) Number of matches to skip before returning * @param bool $allowCurrentDate (optional) Set to TRUE to return the * current date if it matches the cron expression * * @return DateTime * @throws RuntimeException on too many iterations * @see CronExpression::getNextRunDate */ public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) { return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate); } /** * Get multiple run dates starting at the current date or a specific date * * @param int $total Set the total number of dates to calculate * @param string|DateTime $currentTime (optional) Relative calculation date * @param bool $invert (optional) Set to TRUE to retrieve previous dates * @param bool $allowCurrentDate (optional) Set to TRUE to return the * current date if it matches the cron expression * * @return array Returns an array of run dates */ public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false) { $matches = array(); for ($i = 0; $i < max(0, $total); $i++) { $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); } return $matches; } /** * Get all or part of the CRON expression * * @param string $part (optional) Specify the part to retrieve or NULL to * get the full cron schedule string. * * @return string|null Returns the CRON expression, a part of the * CRON expression, or NULL if the part was specified but not found */ public function getExpression($part = null) { if (null === $part) { return implode(' ', $this->cronParts); } elseif (array_key_exists($part, $this->cronParts)) { return $this->cronParts[$part]; } return null; } /** * Helper method to output the full expression. * * @return string Full CRON expression */ public function __toString() { return $this->getExpression(); } /** * Determine if the cron is due to run based on the current date or a * specific date. This method assumes that the current number of * seconds are irrelevant, and should be called once per minute. * * @param string|DateTime $currentTime (optional) Relative calculation date * * @return bool Returns TRUE if the cron is due to run or FALSE if not */ public function isDue($currentTime = 'now') { if ('now' === $currentTime) { $currentDate = date('Y-m-d H:i'); $currentTime = strtotime($currentDate); } elseif ($currentTime instanceof DateTime) { $currentDate = $currentTime->format('Y-m-d H:i'); $currentTime = strtotime($currentDate); } else { $currentTime = new DateTime($currentTime); $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0); $currentDate = $currentTime->format('Y-m-d H:i'); $currentTime = (int)($currentTime->getTimestamp()); } return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime; } /** * Get the next or previous run date of the expression relative to a date * * @param string|DateTime $currentTime (optional) Relative calculation date * @param int $nth (optional) Number of matches to skip before returning * @param bool $invert (optional) Set to TRUE to go backwards in time * @param bool $allowCurrentDate (optional) Set to TRUE to return the * current date if it matches the cron expression * * @return DateTime * @throws RuntimeException on too many iterations */ protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false) { if ($currentTime instanceof DateTime) { $currentDate = $currentTime; } else { $currentDate = new DateTime($currentTime ? $currentTime : 'now'); $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); } $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0); $nextRun = clone $currentDate; $nth = (int) $nth; // Set a hard limit to bail on an impossible date for ($i = 0; $i < 1000; $i++) { foreach (self::$order as $position) { $part = $this->getExpression($position); if (null === $part) { continue; } $satisfied = false; // Get the field object used to validate this part $field = $this->fieldFactory->getField($position); // Check if this is singular or a list if (strpos($part, ',') === false) { $satisfied = $field->isSatisfiedBy($nextRun, $part); } else { foreach (array_map('trim', explode(',', $part)) as $listPart) { if ($field->isSatisfiedBy($nextRun, $listPart)) { $satisfied = true; break; } } } // If the field is not satisfied, then start over if (!$satisfied) { $field->increment($nextRun, $invert); continue 2; } } // Skip this match if needed if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { $this->fieldFactory->getField(0)->increment($nextRun, $invert); continue; } return $nextRun; } // @codeCoverageIgnoreStart throw new RuntimeException('Impossible CRON expression'); // @codeCoverageIgnoreEnd } } vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php 0000644 00000005020 15174671617 0026012 0 ustar 00 <?php /** * Abstract CRON expression field * * @author Michael Dowling <mtdowling@gmail.com> */ abstract class CronExpression_AbstractField implements CronExpression_FieldInterface { /** * Check to see if a field is satisfied by a value * * @param string $dateValue Date value to check * @param string $value Value to test * * @return bool */ public function isSatisfied($dateValue, $value) { if ($this->isIncrementsOfRanges($value)) { return $this->isInIncrementsOfRanges($dateValue, $value); } elseif ($this->isRange($value)) { return $this->isInRange($dateValue, $value); } return $value == '*' || $dateValue == $value; } /** * Check if a value is a range * * @param string $value Value to test * * @return bool */ public function isRange($value) { return strpos($value, '-') !== false; } /** * Check if a value is an increments of ranges * * @param string $value Value to test * * @return bool */ public function isIncrementsOfRanges($value) { return strpos($value, '/') !== false; } /** * Test if a value is within a range * * @param string $dateValue Set date value * @param string $value Value to test * * @return bool */ public function isInRange($dateValue, $value) { $parts = array_map('trim', explode('-', $value, 2)); return $dateValue >= $parts[0] && $dateValue <= $parts[1]; } /** * Test if a value is within an increments of ranges (offset[-to]/step size) * * @param string $dateValue Set date value * @param string $value Value to test * * @return bool */ public function isInIncrementsOfRanges($dateValue, $value) { $parts = array_map('trim', explode('/', $value, 2)); $stepSize = isset($parts[1]) ? $parts[1] : 0; if ($parts[0] == '*' || $parts[0] === '0') { return (int) $dateValue % $stepSize == 0; } $range = explode('-', $parts[0], 2); $offset = $range[0]; $to = isset($range[1]) ? $range[1] : $dateValue; // Ensure that the date value is within the range if ($dateValue < $offset || $dateValue > $to) { return false; } for ($i = $offset; $i <= $to; $i+= $stepSize) { if ($i == $dateValue) { return true; } } return false; } } vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php 0000644 00000007206 15174671617 0020307 0 ustar 00 <?php /** * WP Async Request * * @package WP-Background-Processing */ /* Library URI: https://github.com/deliciousbrains/wp-background-processing/blob/fbbc56f2480910d7959972ec9ec0819a13c6150a/classes/wp-async-request.php Author: Delicious Brains Inc. Author URI: https://deliciousbrains.com/ License: GNU General Public License v2.0 License URI: https://github.com/deliciousbrains/wp-background-processing/commit/126d7945dd3d39f39cb6488ca08fe1fb66cb351a */ if ( ! class_exists( 'WP_Async_Request' ) ) { /** * Abstract WP_Async_Request class. * * @abstract */ abstract class WP_Async_Request { /** * Prefix * * (default value: 'wp') * * @var string */ protected $prefix = 'wp'; /** * Action * * (default value: 'async_request') * * @var string */ protected $action = 'async_request'; /** * Identifier * * @var mixed */ protected $identifier; /** * Data * * (default value: array()) * * @var array */ protected $data = array(); /** * Initiate new async request */ public function __construct() { $this->identifier = $this->prefix . '_' . $this->action; add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) ); add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) ); } /** * Set data used during the request * * @param array $data Data. * * @return $this */ public function data( $data ) { $this->data = $data; return $this; } /** * Dispatch the async request * * @return array|WP_Error */ public function dispatch() { $url = add_query_arg( $this->get_query_args(), $this->get_query_url() ); $args = $this->get_post_args(); return wp_remote_post( esc_url_raw( $url ), $args ); } /** * Get query args * * @return array */ protected function get_query_args() { if ( property_exists( $this, 'query_args' ) ) { return $this->query_args; } $args = array( 'action' => $this->identifier, 'nonce' => wp_create_nonce( $this->identifier ), ); /** * Filters the post arguments used during an async request. * * @param array $url */ return apply_filters( $this->identifier . '_query_args', $args ); } /** * Get query URL * * @return string */ protected function get_query_url() { if ( property_exists( $this, 'query_url' ) ) { return $this->query_url; } $url = admin_url( 'admin-ajax.php' ); /** * Filters the post arguments used during an async request. * * @param string $url */ return apply_filters( $this->identifier . '_query_url', $url ); } /** * Get post args * * @return array */ protected function get_post_args() { if ( property_exists( $this, 'post_args' ) ) { return $this->post_args; } $args = array( 'timeout' => 0.01, 'blocking' => false, 'body' => $this->data, 'cookies' => $_COOKIE, 'sslverify' => apply_filters( 'https_local_ssl_verify', false ), ); /** * Filters the post arguments used during an async request. * * @param array $args */ return apply_filters( $this->identifier . '_post_args', $args ); } /** * Maybe handle * * Check for correct nonce and pass to handler. */ public function maybe_handle() { // Don't lock up other requests while processing. session_write_close(); check_ajax_referer( $this->identifier, 'nonce' ); $this->handle(); wp_die(); } /** * Handle * * Override this method to perform any actions required * during the async request. */ abstract protected function handle(); } } vendor/woocommerce/action-scheduler/license.txt 0000644 00000104515 15174671617 0016021 0 ustar 00 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>. vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php 0000644 00000005672 15174671617 0024744 0 ustar 00 <?php /** * Class ActionScheduler_LoggerSchema * * @codeCoverageIgnore * * Creates a custom table for storing action logs */ class ActionScheduler_LoggerSchema extends ActionScheduler_Abstract_Schema { const LOG_TABLE = 'actionscheduler_logs'; /** * Schema version. * * Increment this value to trigger a schema update. * * @var int */ protected $schema_version = 3; /** * Construct. */ public function __construct() { $this->tables = array( self::LOG_TABLE, ); } /** * Performs additional setup work required to support this schema. */ public function init() { add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_3_0' ), 10, 2 ); } /** * Get table definition. * * @param string $table Table name. */ protected function get_table_definition( $table ) { global $wpdb; $table_name = $wpdb->$table; $charset_collate = $wpdb->get_charset_collate(); switch ( $table ) { case self::LOG_TABLE: $default_date = ActionScheduler_StoreSchema::DEFAULT_DATE; return "CREATE TABLE $table_name ( log_id bigint(20) unsigned NOT NULL auto_increment, action_id bigint(20) unsigned NOT NULL, message text NOT NULL, log_date_gmt datetime NULL default '{$default_date}', log_date_local datetime NULL default '{$default_date}', PRIMARY KEY (log_id), KEY action_id (action_id), KEY log_date_gmt (log_date_gmt) ) $charset_collate"; default: return ''; } } /** * Update the logs table schema, allowing datetime fields to be NULL. * * This is needed because the NOT NULL constraint causes a conflict with some versions of MySQL * configured with sql_mode=NO_ZERO_DATE, which can for instance lead to tables not being created. * * Most other schema updates happen via ActionScheduler_Abstract_Schema::update_table(), however * that method relies on dbDelta() and this change is not possible when using that function. * * @param string $table Name of table being updated. * @param string $db_version The existing schema version of the table. */ public function update_schema_3_0( $table, $db_version ) { global $wpdb; if ( 'actionscheduler_logs' !== $table || version_compare( $db_version, '3', '>=' ) ) { return; } // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared $table_name = $wpdb->prefix . 'actionscheduler_logs'; $table_list = $wpdb->get_col( "SHOW TABLES LIKE '{$table_name}'" ); $default_date = ActionScheduler_StoreSchema::DEFAULT_DATE; if ( ! empty( $table_list ) ) { $query = " ALTER TABLE {$table_name} MODIFY COLUMN log_date_gmt datetime NULL default '{$default_date}', MODIFY COLUMN log_date_local datetime NULL default '{$default_date}' "; $wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared } } vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php 0000644 00000012217 15174671617 0024612 0 ustar 00 <?php /** * Class ActionScheduler_StoreSchema * * @codeCoverageIgnore * * Creates custom tables for storing scheduled actions */ class ActionScheduler_StoreSchema extends ActionScheduler_Abstract_Schema { const ACTIONS_TABLE = 'actionscheduler_actions'; const CLAIMS_TABLE = 'actionscheduler_claims'; const GROUPS_TABLE = 'actionscheduler_groups'; const DEFAULT_DATE = '0000-00-00 00:00:00'; /** * Schema version. * * Increment this value to trigger a schema update. * * @var int */ protected $schema_version = 8; /** * Construct. */ public function __construct() { $this->tables = array( self::ACTIONS_TABLE, self::CLAIMS_TABLE, self::GROUPS_TABLE, ); } /** * Performs additional setup work required to support this schema. */ public function init() { add_action( 'action_scheduler_before_schema_update', array( $this, 'update_schema_5_0' ), 10, 2 ); } /** * Get table definition. * * @param string $table Table name. */ protected function get_table_definition( $table ) { global $wpdb; $table_name = $wpdb->$table; $charset_collate = $wpdb->get_charset_collate(); $default_date = self::DEFAULT_DATE; // phpcs:ignore Squiz.PHP.CommentedOutCode $max_index_length = 191; // @see wp_get_db_schema() $hook_status_scheduled_date_gmt_max_index_length = $max_index_length - 20 - 8; // - status, - scheduled_date_gmt switch ( $table ) { case self::ACTIONS_TABLE: return "CREATE TABLE {$table_name} ( action_id bigint(20) unsigned NOT NULL auto_increment, hook varchar(191) NOT NULL, status varchar(20) NOT NULL, scheduled_date_gmt datetime NULL default '{$default_date}', scheduled_date_local datetime NULL default '{$default_date}', priority tinyint unsigned NOT NULL default '10', args varchar($max_index_length), schedule longtext, group_id bigint(20) unsigned NOT NULL default '0', attempts int(11) NOT NULL default '0', last_attempt_gmt datetime NULL default '{$default_date}', last_attempt_local datetime NULL default '{$default_date}', claim_id bigint(20) unsigned NOT NULL default '0', extended_args varchar(8000) DEFAULT NULL, PRIMARY KEY (action_id), KEY hook_status_scheduled_date_gmt (hook($hook_status_scheduled_date_gmt_max_index_length), status, scheduled_date_gmt), KEY status_scheduled_date_gmt (status, scheduled_date_gmt), KEY scheduled_date_gmt (scheduled_date_gmt), KEY args (args($max_index_length)), KEY group_id (group_id), KEY last_attempt_gmt (last_attempt_gmt), KEY `claim_id_status_priority_scheduled_date_gmt` (`claim_id`,`status`,`priority`,`scheduled_date_gmt`), KEY `status_last_attempt_gmt` (`status`,`last_attempt_gmt`), KEY `status_claim_id` (`status`,`claim_id`) ) $charset_collate"; case self::CLAIMS_TABLE: return "CREATE TABLE {$table_name} ( claim_id bigint(20) unsigned NOT NULL auto_increment, date_created_gmt datetime NULL default '{$default_date}', PRIMARY KEY (claim_id), KEY date_created_gmt (date_created_gmt) ) $charset_collate"; case self::GROUPS_TABLE: return "CREATE TABLE {$table_name} ( group_id bigint(20) unsigned NOT NULL auto_increment, slug varchar(255) NOT NULL, PRIMARY KEY (group_id), KEY slug (slug($max_index_length)) ) $charset_collate"; default: return ''; } } /** * Update the actions table schema, allowing datetime fields to be NULL. * * This is needed because the NOT NULL constraint causes a conflict with some versions of MySQL * configured with sql_mode=NO_ZERO_DATE, which can for instance lead to tables not being created. * * Most other schema updates happen via ActionScheduler_Abstract_Schema::update_table(), however * that method relies on dbDelta() and this change is not possible when using that function. * * @param string $table Name of table being updated. * @param string $db_version The existing schema version of the table. */ public function update_schema_5_0( $table, $db_version ) { global $wpdb; if ( 'actionscheduler_actions' !== $table || version_compare( $db_version, '5', '>=' ) ) { return; } // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared $table_name = $wpdb->prefix . 'actionscheduler_actions'; $table_list = $wpdb->get_col( "SHOW TABLES LIKE '{$table_name}'" ); $default_date = self::DEFAULT_DATE; if ( ! empty( $table_list ) ) { $query = " ALTER TABLE {$table_name} MODIFY COLUMN scheduled_date_gmt datetime NULL default '{$default_date}', MODIFY COLUMN scheduled_date_local datetime NULL default '{$default_date}', MODIFY COLUMN last_attempt_gmt datetime NULL default '{$default_date}', MODIFY COLUMN last_attempt_local datetime NULL default '{$default_date}' "; $wpdb->query( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } // phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php 0000644 00000004163 15174671617 0026122 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; /** * ActionScheduler_AsyncRequest_QueueRunner class. */ class ActionScheduler_AsyncRequest_QueueRunner extends WP_Async_Request { /** * Data store for querying actions * * @var ActionScheduler_Store */ protected $store; /** * Prefix for ajax hooks * * @var string */ protected $prefix = 'as'; /** * Action for ajax hooks * * @var string */ protected $action = 'async_request_queue_runner'; /** * Initiate new async request. * * @param ActionScheduler_Store $store Store object. */ public function __construct( ActionScheduler_Store $store ) { parent::__construct(); $this->store = $store; } /** * Handle async requests * * Run a queue, and maybe dispatch another async request to run another queue * if there are still pending actions after completing a queue in this request. */ protected function handle() { do_action( 'action_scheduler_run_queue', 'Async Request' ); // run a queue in the same way as WP Cron, but declare the Async Request context. $sleep_seconds = $this->get_sleep_seconds(); if ( $sleep_seconds ) { sleep( $sleep_seconds ); } $this->maybe_dispatch(); } /** * If the async request runner is needed and allowed to run, dispatch a request. */ public function maybe_dispatch() { if ( ! $this->allow() ) { return; } $this->dispatch(); ActionScheduler_QueueRunner::instance()->unhook_dispatch_async_request(); } /** * Only allow async requests when needed. * * Also allow 3rd party code to disable running actions via async requests. */ protected function allow() { if ( ! has_action( 'action_scheduler_run_queue' ) || ActionScheduler::runner()->has_maximum_concurrent_batches() || ! $this->store->has_pending_actions_due() ) { $allow = false; } else { $allow = true; } return apply_filters( 'action_scheduler_allow_async_request_runner', $allow ); } /** * Chaining async requests can crash MySQL. A brief sleep call in PHP prevents that. */ protected function get_sleep_seconds() { return apply_filters( 'action_scheduler_async_request_sleep_seconds', 5, $this ); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php 0000644 00000022770 15174671617 0023420 0 ustar 00 <?php /** * Class ActionScheduler_QueueRunner */ class ActionScheduler_QueueRunner extends ActionScheduler_Abstract_QueueRunner { const WP_CRON_HOOK = 'action_scheduler_run_queue'; const WP_CRON_SCHEDULE = 'every_minute'; /** * ActionScheduler_AsyncRequest_QueueRunner instance. * * @var ActionScheduler_AsyncRequest_QueueRunner */ protected $async_request; /** * ActionScheduler_QueueRunner instance. * * @var ActionScheduler_QueueRunner */ private static $runner = null; /** * Number of processed actions. * * @var int */ private $processed_actions_count = 0; /** * Get instance. * * @return ActionScheduler_QueueRunner * @codeCoverageIgnore */ public static function instance() { if ( empty( self::$runner ) ) { $class = apply_filters( 'action_scheduler_queue_runner_class', 'ActionScheduler_QueueRunner' ); self::$runner = new $class(); } return self::$runner; } /** * ActionScheduler_QueueRunner constructor. * * @param ActionScheduler_Store|null $store Store object. * @param ActionScheduler_FatalErrorMonitor|null $monitor Monitor object. * @param ActionScheduler_QueueCleaner|null $cleaner Cleaner object. * @param ActionScheduler_AsyncRequest_QueueRunner|null $async_request Async request runner object. */ public function __construct( ?ActionScheduler_Store $store = null, ?ActionScheduler_FatalErrorMonitor $monitor = null, ?ActionScheduler_QueueCleaner $cleaner = null, ?ActionScheduler_AsyncRequest_QueueRunner $async_request = null ) { parent::__construct( $store, $monitor, $cleaner ); if ( is_null( $async_request ) ) { $async_request = new ActionScheduler_AsyncRequest_QueueRunner( $this->store ); } $this->async_request = $async_request; } /** * Initialize. * * @codeCoverageIgnore */ public function init() { add_filter( 'cron_schedules', array( self::instance(), 'add_wp_cron_schedule' ) ); // phpcs:ignore WordPress.WP.CronInterval.CronSchedulesInterval // Check for and remove any WP Cron hook scheduled by Action Scheduler < 3.0.0, which didn't include the $context param. $next_timestamp = wp_next_scheduled( self::WP_CRON_HOOK ); if ( $next_timestamp ) { wp_unschedule_event( $next_timestamp, self::WP_CRON_HOOK ); } $cron_context = array( 'WP Cron' ); if ( ! wp_next_scheduled( self::WP_CRON_HOOK, $cron_context ) ) { $schedule = apply_filters( 'action_scheduler_run_schedule', self::WP_CRON_SCHEDULE ); wp_schedule_event( time(), $schedule, self::WP_CRON_HOOK, $cron_context ); } add_action( self::WP_CRON_HOOK, array( self::instance(), 'run' ) ); $this->hook_dispatch_async_request(); } /** * Hook check for dispatching an async request. */ public function hook_dispatch_async_request() { add_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) ); } /** * Unhook check for dispatching an async request. */ public function unhook_dispatch_async_request() { remove_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) ); } /** * Check if we should dispatch an async request to process actions. * * This method is attached to 'shutdown', so is called frequently. To avoid slowing down * the site, it mitigates the work performed in each request by: * 1. checking if it's in the admin context and then * 2. haven't run on the 'shutdown' hook within the lock time (60 seconds by default) * 3. haven't exceeded the number of allowed batches. * * The order of these checks is important, because they run from a check on a value: * 1. in memory - is_admin() maps to $GLOBALS or the WP_ADMIN constant * 2. in memory - transients use autoloaded options by default * 3. from a database query - has_maximum_concurrent_batches() run the query * $this->store->get_claim_count() to find the current number of claims in the DB. * * If all of these conditions are met, then we request an async runner check whether it * should dispatch a request to process pending actions. */ public function maybe_dispatch_async_request() { // Only start an async queue at most once every 60 seconds. if ( is_admin() && ! ActionScheduler::lock()->is_locked( 'async-request-runner' ) && ActionScheduler::lock()->set( 'async-request-runner' ) ) { $this->async_request->maybe_dispatch(); } } /** * Process actions in the queue. Attached to self::WP_CRON_HOOK i.e. 'action_scheduler_run_queue' * * The $context param of this method defaults to 'WP Cron', because prior to Action Scheduler 3.0.0 * that was the only context in which this method was run, and the self::WP_CRON_HOOK hook had no context * passed along with it. New code calling this method directly, or by triggering the self::WP_CRON_HOOK, * should set a context as the first parameter. For an example of this, refer to the code seen in * * @see ActionScheduler_AsyncRequest_QueueRunner::handle() * * @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' * Generally, this should be capitalised and not localised as it's a proper noun. * @return int The number of actions processed. */ public function run( $context = 'WP Cron' ) { ActionScheduler_Compatibility::raise_memory_limit(); ActionScheduler_Compatibility::raise_time_limit( $this->get_time_limit() ); do_action( 'action_scheduler_before_process_queue' ); $this->run_cleanup(); $this->processed_actions_count = 0; if ( false === $this->has_maximum_concurrent_batches() ) { do { $batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 ); $processed_actions_in_batch = $this->do_batch( $batch_size, $context ); $this->processed_actions_count += $processed_actions_in_batch; } while ( $processed_actions_in_batch > 0 && ! $this->batch_limits_exceeded( $this->processed_actions_count ) ); // keep going until we run out of actions, time, or memory. } do_action( 'action_scheduler_after_process_queue' ); return $this->processed_actions_count; } /** * Process a batch of actions pending in the queue. * * Actions are processed by claiming a set of pending actions then processing each one until either the batch * size is completed, or memory or time limits are reached, defined by @see $this->batch_limits_exceeded(). * * @param int $size The maximum number of actions to process in the batch. * @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' * Generally, this should be capitalised and not localised as it's a proper noun. * @return int The number of actions processed. */ protected function do_batch( $size = 100, $context = '' ) { $claim = $this->store->stake_claim( $size ); $this->monitor->attach( $claim ); $processed_actions = 0; foreach ( $claim->get_actions() as $action_id ) { // bail if we lost the claim. if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $claim->get_id() ), true ) ) { break; } $this->process_action( $action_id, $context ); $processed_actions++; if ( $this->batch_limits_exceeded( $processed_actions + $this->processed_actions_count ) ) { break; } } $this->store->release_claim( $claim ); $this->monitor->detach(); $this->clear_caches(); return $processed_actions; } /** * Flush the cache if possible (intended for use after a batch of actions has been processed). * * This is useful because running large batches can eat up memory and because invalid data can accrue in the * runtime cache, which may lead to unexpected results. */ protected function clear_caches() { /* * Calling wp_cache_flush_runtime() lets us clear the runtime cache without invalidating the external object * cache, so we will always prefer this method (as compared to calling wp_cache_flush()) when it is available. * * However, this function was only introduced in WordPress 6.0. Additionally, the preferred way of detecting if * it is supported changed in WordPress 6.1 so we use two different methods to decide if we should utilize it. */ $flushing_runtime_cache_explicitly_supported = function_exists( 'wp_cache_supports' ) && wp_cache_supports( 'flush_runtime' ); $flushing_runtime_cache_implicitly_supported = ! function_exists( 'wp_cache_supports' ) && function_exists( 'wp_cache_flush_runtime' ); if ( $flushing_runtime_cache_explicitly_supported || $flushing_runtime_cache_implicitly_supported ) { wp_cache_flush_runtime(); } elseif ( ! wp_using_ext_object_cache() /** * When an external object cache is in use, and when wp_cache_flush_runtime() is not available, then * normally the cache will not be flushed after processing a batch of actions (to avoid a performance * penalty for other processes). * * This filter makes it possible to override this behavior and always flush the cache, even if an external * object cache is in use. * * @since 1.0 * * @param bool $flush_cache If the cache should be flushed. */ || apply_filters( 'action_scheduler_queue_runner_flush_cache', false ) ) { wp_cache_flush(); } } /** * Add schedule to WP cron. * * @param array<string, array<string, int|string>> $schedules Schedules. * @return array<string, array<string, int|string>> */ public function add_wp_cron_schedule( $schedules ) { $schedules['every_minute'] = array( 'interval' => 60, // in seconds. 'display' => __( 'Every minute', 'action-scheduler' ), ); return $schedules; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_AdminView.php 0000644 00000024603 15174671617 0023022 0 ustar 00 <?php /** * Class ActionScheduler_AdminView * * @codeCoverageIgnore */ class ActionScheduler_AdminView extends ActionScheduler_AdminView_Deprecated { /** * Instance. * * @var null|self */ private static $admin_view = null; /** * Screen ID. * * @var string */ private static $screen_id = 'tools_page_action-scheduler'; /** * ActionScheduler_ListTable instance. * * @var ActionScheduler_ListTable */ protected $list_table; /** * Get instance. * * @return ActionScheduler_AdminView * @codeCoverageIgnore */ public static function instance() { if ( empty( self::$admin_view ) ) { $class = apply_filters( 'action_scheduler_admin_view_class', 'ActionScheduler_AdminView' ); self::$admin_view = new $class(); } return self::$admin_view; } /** * Initialize. * * @codeCoverageIgnore */ public function init() { if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { if ( class_exists( 'WooCommerce' ) ) { add_action( 'woocommerce_admin_status_content_action-scheduler', array( $this, 'render_admin_ui' ) ); add_action( 'woocommerce_system_status_report', array( $this, 'system_status_report' ) ); add_filter( 'woocommerce_admin_status_tabs', array( $this, 'register_system_status_tab' ) ); } add_action( 'admin_menu', array( $this, 'register_menu' ) ); add_action( 'admin_notices', array( $this, 'maybe_check_pastdue_actions' ) ); add_action( 'current_screen', array( $this, 'add_help_tabs' ) ); } } /** * Print system status report. */ public function system_status_report() { $table = new ActionScheduler_wcSystemStatus( ActionScheduler::store() ); $table->render(); } /** * Registers action-scheduler into WooCommerce > System status. * * @param array $tabs An associative array of tab key => label. * @return array $tabs An associative array of tab key => label, including Action Scheduler's tabs */ public function register_system_status_tab( array $tabs ) { $tabs['action-scheduler'] = __( 'Scheduled Actions', 'action-scheduler' ); return $tabs; } /** * Include Action Scheduler's administration under the Tools menu. * * A menu under the Tools menu is important for backward compatibility (as that's * where it started), and also provides more convenient access than the WooCommerce * System Status page, and for sites where WooCommerce isn't active. */ public function register_menu() { $hook_suffix = add_submenu_page( 'tools.php', __( 'Scheduled Actions', 'action-scheduler' ), __( 'Scheduled Actions', 'action-scheduler' ), 'manage_options', 'action-scheduler', array( $this, 'render_admin_ui' ) ); add_action( 'load-' . $hook_suffix, array( $this, 'process_admin_ui' ) ); } /** * Triggers processing of any pending actions. */ public function process_admin_ui() { $this->get_list_table(); } /** * Renders the Admin UI */ public function render_admin_ui() { $table = $this->get_list_table(); $table->display_page(); } /** * Get the admin UI object and process any requested actions. * * @return ActionScheduler_ListTable */ protected function get_list_table() { if ( null === $this->list_table ) { $this->list_table = new ActionScheduler_ListTable( ActionScheduler::store(), ActionScheduler::logger(), ActionScheduler::runner() ); $this->list_table->process_actions(); } return $this->list_table; } /** * Action: admin_notices * * Maybe check past-due actions, and print notice. * * @uses $this->check_pastdue_actions() */ public function maybe_check_pastdue_actions() { // Filter to prevent checking actions (ex: inappropriate user). if ( ! apply_filters( 'action_scheduler_check_pastdue_actions', current_user_can( 'manage_options' ) ) ) { return; } // Get last check transient. $last_check = get_transient( 'action_scheduler_last_pastdue_actions_check' ); // If transient exists, we're within interval, so bail. if ( ! empty( $last_check ) ) { return; } // Perform the check. $this->check_pastdue_actions(); } /** * Check past-due actions, and print notice. */ protected function check_pastdue_actions() { // Set thresholds. $threshold_seconds = (int) apply_filters( 'action_scheduler_pastdue_actions_seconds', DAY_IN_SECONDS ); $threshold_min = (int) apply_filters( 'action_scheduler_pastdue_actions_min', 1 ); // Set fallback value for past-due actions count. $num_pastdue_actions = 0; // Allow third-parties to preempt the default check logic. $check = apply_filters( 'action_scheduler_pastdue_actions_check_pre', null ); // If no third-party preempted and there are no past-due actions, return early. if ( ! is_null( $check ) ) { return; } // Scheduled actions query arguments. $query_args = array( 'date' => as_get_datetime_object( time() - $threshold_seconds ), 'status' => ActionScheduler_Store::STATUS_PENDING, 'per_page' => $threshold_min, ); // If no third-party preempted, run default check. if ( is_null( $check ) ) { $store = ActionScheduler_Store::instance(); $num_pastdue_actions = (int) $store->query_actions( $query_args, 'count' ); // Check if past-due actions count is greater than or equal to threshold. $check = ( $num_pastdue_actions >= $threshold_min ); $check = (bool) apply_filters( 'action_scheduler_pastdue_actions_check', $check, $num_pastdue_actions, $threshold_seconds, $threshold_min ); } // If check failed, set transient and abort. if ( ! boolval( $check ) ) { $interval = apply_filters( 'action_scheduler_pastdue_actions_check_interval', round( $threshold_seconds / 4 ), $threshold_seconds ); set_transient( 'action_scheduler_last_pastdue_actions_check', time(), $interval ); return; } $actions_url = add_query_arg( array( 'page' => 'action-scheduler', 'status' => 'past-due', 'order' => 'asc', ), admin_url( 'tools.php' ) ); // Print notice. echo '<div class="notice notice-warning"><p>'; printf( wp_kses( // translators: 1) is the number of affected actions, 2) is a link to an admin screen. _n( '<strong>Action Scheduler:</strong> %1$d <a href="%2$s">past-due action</a> found; something may be wrong. <a href="https://actionscheduler.org/faq/#my-site-has-past-due-actions-what-can-i-do" target="_blank">Read documentation »</a>', '<strong>Action Scheduler:</strong> %1$d <a href="%2$s">past-due actions</a> found; something may be wrong. <a href="https://actionscheduler.org/faq/#my-site-has-past-due-actions-what-can-i-do" target="_blank">Read documentation »</a>', $num_pastdue_actions, 'action-scheduler' ), array( 'strong' => array(), 'a' => array( 'href' => true, 'target' => true, ), ) ), absint( $num_pastdue_actions ), esc_attr( esc_url( $actions_url ) ) ); echo '</p></div>'; // Facilitate third-parties to evaluate and print notices. do_action( 'action_scheduler_pastdue_actions_extra_notices', $query_args ); } /** * Provide more information about the screen and its data in the help tab. */ public function add_help_tabs() { $screen = get_current_screen(); if ( ! $screen || self::$screen_id !== $screen->id ) { return; } $as_version = ActionScheduler_Versions::instance()->latest_version(); $as_source = ActionScheduler_SystemInformation::active_source(); $as_source_path = ActionScheduler_SystemInformation::active_source_path(); $as_source_markup = sprintf( '<code>%s</code>', esc_html( $as_source_path ) ); if ( ! empty( $as_source ) ) { $as_source_markup = sprintf( '%s: <abbr title="%s">%s</abbr>', ucfirst( $as_source['type'] ), esc_attr( $as_source_path ), esc_html( $as_source['name'] ) ); } $screen->add_help_tab( array( 'id' => 'action_scheduler_about', 'title' => __( 'About', 'action-scheduler' ), 'content' => // translators: %s is the Action Scheduler version. '<h2>' . sprintf( __( 'About Action Scheduler %s', 'action-scheduler' ), $as_version ) . '</h2>' . '<p>' . __( 'Action Scheduler is a scalable, traceable job queue for background processing large sets of actions. Action Scheduler works by triggering an action hook to run at some time in the future. Scheduled actions can also be scheduled to run on a recurring schedule.', 'action-scheduler' ) . '</p>' . '<h3>' . esc_html__( 'Source', 'action-scheduler' ) . '</h3>' . '<p>' . esc_html__( 'Action Scheduler is currently being loaded from the following location. This can be useful when debugging, or if requested by the support team.', 'action-scheduler' ) . '</p>' . '<p>' . $as_source_markup . '</p>' . '<h3>' . esc_html__( 'WP CLI', 'action-scheduler' ) . '</h3>' . '<p>' . sprintf( /* translators: %1$s is WP CLI command (not translatable) */ esc_html__( 'WP CLI commands are available: execute %1$s for a list of available commands.', 'action-scheduler' ), '<code>wp help action-scheduler</code>' ) . '</p>', ) ); $screen->add_help_tab( array( 'id' => 'action_scheduler_columns', 'title' => __( 'Columns', 'action-scheduler' ), 'content' => '<h2>' . __( 'Scheduled Action Columns', 'action-scheduler' ) . '</h2>' . '<ul>' . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Hook', 'action-scheduler' ), __( 'Name of the action hook that will be triggered.', 'action-scheduler' ) ) . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Status', 'action-scheduler' ), __( 'Action statuses are Pending, Complete, Canceled, Failed', 'action-scheduler' ) ) . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Arguments', 'action-scheduler' ), __( 'Optional data array passed to the action hook.', 'action-scheduler' ) ) . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Group', 'action-scheduler' ), __( 'Optional action group.', 'action-scheduler' ) ) . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Recurrence', 'action-scheduler' ), __( 'The action\'s schedule frequency.', 'action-scheduler' ) ) . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Scheduled', 'action-scheduler' ), __( 'The date/time the action is/was scheduled to run.', 'action-scheduler' ) ) . sprintf( '<li><strong>%1$s</strong>: %2$s</li>', __( 'Log', 'action-scheduler' ), __( 'Activity log for the action.', 'action-scheduler' ) ) . '</ul>', ) ); } } woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php0000644 00000003502 15174671617 0031706 0 ustar 00 vendor <?php /** * Class ActionScheduler_wpPostStore_PostStatusRegistrar * * @codeCoverageIgnore */ class ActionScheduler_wpPostStore_PostStatusRegistrar { /** * Registrar. */ public function register() { register_post_status( ActionScheduler_Store::STATUS_RUNNING, array_merge( $this->post_status_args(), $this->post_status_running_labels() ) ); register_post_status( ActionScheduler_Store::STATUS_FAILED, array_merge( $this->post_status_args(), $this->post_status_failed_labels() ) ); } /** * Build the args array for the post type definition * * @return array */ protected function post_status_args() { $args = array( 'public' => false, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, ); return apply_filters( 'action_scheduler_post_status_args', $args ); } /** * Build the args array for the post type definition * * @return array */ protected function post_status_failed_labels() { $labels = array( 'label' => _x( 'Failed', 'post', 'action-scheduler' ), /* translators: %s: count */ 'label_count' => _n_noop( 'Failed <span class="count">(%s)</span>', 'Failed <span class="count">(%s)</span>', 'action-scheduler' ), ); return apply_filters( 'action_scheduler_post_status_failed_labels', $labels ); } /** * Build the args array for the post type definition * * @return array */ protected function post_status_running_labels() { $labels = array( 'label' => _x( 'In-Progress', 'post', 'action-scheduler' ), /* translators: %s: count */ 'label_count' => _n_noop( 'In-Progress <span class="count">(%s)</span>', 'In-Progress <span class="count">(%s)</span>', 'action-scheduler' ), ); return apply_filters( 'action_scheduler_post_status_running_labels', $labels ); } } vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php 0000644 00000030606 15174671617 0025623 0 ustar 00 <?php use ActionScheduler_Store as Store; use Action_Scheduler\Migration\Runner; use Action_Scheduler\Migration\Config; use Action_Scheduler\Migration\Controller; /** * Class ActionScheduler_HybridStore * * A wrapper around multiple stores that fetches data from both. * * @since 3.0.0 */ class ActionScheduler_HybridStore extends Store { const DEMARKATION_OPTION = 'action_scheduler_hybrid_store_demarkation'; /** * Primary store instance. * * @var ActionScheduler_Store */ private $primary_store; /** * Secondary store instance. * * @var ActionScheduler_Store */ private $secondary_store; /** * Runner instance. * * @var Action_Scheduler\Migration\Runner */ private $migration_runner; /** * The dividing line between IDs of actions created * by the primary and secondary stores. * * @var int * * Methods that accept an action ID will compare the ID against * this to determine which store will contain that ID. In almost * all cases, the ID should come from the primary store, but if * client code is bypassing the API functions and fetching IDs * from elsewhere, then there is a chance that an unmigrated ID * might be requested. */ private $demarkation_id = 0; /** * ActionScheduler_HybridStore constructor. * * @param Config|null $config Migration config object. */ public function __construct( ?Config $config = null ) { $this->demarkation_id = (int) get_option( self::DEMARKATION_OPTION, 0 ); if ( empty( $config ) ) { $config = Controller::instance()->get_migration_config_object(); } $this->primary_store = $config->get_destination_store(); $this->secondary_store = $config->get_source_store(); $this->migration_runner = new Runner( $config ); } /** * Initialize the table data store tables. * * @codeCoverageIgnore */ public function init() { add_action( 'action_scheduler/created_table', array( $this, 'set_autoincrement' ), 10, 2 ); $this->primary_store->init(); $this->secondary_store->init(); remove_action( 'action_scheduler/created_table', array( $this, 'set_autoincrement' ), 10 ); } /** * When the actions table is created, set its autoincrement * value to be one higher than the posts table to ensure that * there are no ID collisions. * * @param string $table_name Table name. * @param string $table_suffix Suffix of table name. * * @return void * @codeCoverageIgnore */ public function set_autoincrement( $table_name, $table_suffix ) { if ( ActionScheduler_StoreSchema::ACTIONS_TABLE === $table_suffix ) { if ( empty( $this->demarkation_id ) ) { $this->demarkation_id = $this->set_demarkation_id(); } /** * Global. * * @var \wpdb $wpdb */ global $wpdb; /** * A default date of '0000-00-00 00:00:00' is invalid in MySQL 5.7 when configured with * sql_mode including both STRICT_TRANS_TABLES and NO_ZERO_DATE. */ $default_date = new DateTime( 'tomorrow' ); $null_action = new ActionScheduler_NullAction(); $date_gmt = $this->get_scheduled_date_string( $null_action, $default_date ); $date_local = $this->get_scheduled_date_string_local( $null_action, $default_date ); $row_count = $wpdb->insert( $wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE}, array( 'action_id' => $this->demarkation_id, 'hook' => '', 'status' => '', 'scheduled_date_gmt' => $date_gmt, 'scheduled_date_local' => $date_local, 'last_attempt_gmt' => $date_gmt, 'last_attempt_local' => $date_local, ) ); if ( $row_count > 0 ) { $wpdb->delete( $wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE}, array( 'action_id' => $this->demarkation_id ) ); } } } /** * Store the demarkation id in WP options. * * @param int $id The ID to set as the demarkation point between the two stores * Leave null to use the next ID from the WP posts table. * * @return int The new ID. * * @codeCoverageIgnore */ private function set_demarkation_id( $id = null ) { if ( empty( $id ) ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $id = (int) $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" ); $id++; } update_option( self::DEMARKATION_OPTION, $id ); return $id; } /** * Find the first matching action from the secondary store. * If it exists, migrate it to the primary store immediately. * After it migrates, the secondary store will logically contain * the next matching action, so return the result thence. * * @param string $hook Action's hook. * @param array $params Action's arguments. * * @return string */ public function find_action( $hook, $params = array() ) { $found_unmigrated_action = $this->secondary_store->find_action( $hook, $params ); if ( ! empty( $found_unmigrated_action ) ) { $this->migrate( array( $found_unmigrated_action ) ); } return $this->primary_store->find_action( $hook, $params ); } /** * Find actions matching the query in the secondary source first. * If any are found, migrate them immediately. Then the secondary * store will contain the canonical results. * * @param array $query Query arguments. * @param string $query_type Whether to select or count the results. Default, select. * * @return int[] */ public function query_actions( $query = array(), $query_type = 'select' ) { $found_unmigrated_actions = $this->secondary_store->query_actions( $query, 'select' ); if ( ! empty( $found_unmigrated_actions ) ) { $this->migrate( $found_unmigrated_actions ); } return $this->primary_store->query_actions( $query, $query_type ); } /** * Get a count of all actions in the store, grouped by status * * @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status. */ public function action_counts() { $unmigrated_actions_count = $this->secondary_store->action_counts(); $migrated_actions_count = $this->primary_store->action_counts(); $actions_count_by_status = array(); foreach ( $this->get_status_labels() as $status_key => $status_label ) { $count = 0; if ( isset( $unmigrated_actions_count[ $status_key ] ) ) { $count += $unmigrated_actions_count[ $status_key ]; } if ( isset( $migrated_actions_count[ $status_key ] ) ) { $count += $migrated_actions_count[ $status_key ]; } $actions_count_by_status[ $status_key ] = $count; } $actions_count_by_status = array_filter( $actions_count_by_status ); return $actions_count_by_status; } /** * If any actions would have been claimed by the secondary store, * migrate them immediately, then ask the primary store for the * canonical claim. * * @param int $max_actions Maximum number of actions to claim. * @param null|DateTime $before_date Latest timestamp of actions to claim. * @param string[] $hooks Hook of actions to claim. * @param string $group Group of actions to claim. * * @return ActionScheduler_ActionClaim */ public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) { $claim = $this->secondary_store->stake_claim( $max_actions, $before_date, $hooks, $group ); $claimed_actions = $claim->get_actions(); if ( ! empty( $claimed_actions ) ) { $this->migrate( $claimed_actions ); } $this->secondary_store->release_claim( $claim ); return $this->primary_store->stake_claim( $max_actions, $before_date, $hooks, $group ); } /** * Migrate a list of actions to the table data store. * * @param array $action_ids List of action IDs. */ private function migrate( $action_ids ) { $this->migration_runner->migrate_actions( $action_ids ); } /** * Save an action to the primary store. * * @param ActionScheduler_Action $action Action object to be saved. * @param DateTime|null $date Optional. Schedule date. Default null. * * @return int The action ID */ public function save_action( ActionScheduler_Action $action, ?DateTime $date = null ) { return $this->primary_store->save_action( $action, $date ); } /** * Retrieve an existing action whether migrated or not. * * @param int $action_id Action ID. */ public function fetch_action( $action_id ) { $store = $this->get_store_from_action_id( $action_id, true ); if ( $store ) { return $store->fetch_action( $action_id ); } else { return new ActionScheduler_NullAction(); } } /** * Cancel an existing action whether migrated or not. * * @param int $action_id Action ID. */ public function cancel_action( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { $store->cancel_action( $action_id ); } } /** * Delete an existing action whether migrated or not. * * @param int $action_id Action ID. */ public function delete_action( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { $store->delete_action( $action_id ); } } /** * Get the schedule date an existing action whether migrated or not. * * @param int $action_id Action ID. */ public function get_date( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { return $store->get_date( $action_id ); } else { return null; } } /** * Mark an existing action as failed whether migrated or not. * * @param int $action_id Action ID. */ public function mark_failure( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { $store->mark_failure( $action_id ); } } /** * Log the execution of an existing action whether migrated or not. * * @param int $action_id Action ID. */ public function log_execution( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { $store->log_execution( $action_id ); } } /** * Mark an existing action complete whether migrated or not. * * @param int $action_id Action ID. */ public function mark_complete( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { $store->mark_complete( $action_id ); } } /** * Get an existing action status whether migrated or not. * * @param int $action_id Action ID. */ public function get_status( $action_id ) { $store = $this->get_store_from_action_id( $action_id ); if ( $store ) { return $store->get_status( $action_id ); } return null; } /** * Return which store an action is stored in. * * @param int $action_id ID of the action. * @param bool $primary_first Optional flag indicating search the primary store first. * @return ActionScheduler_Store */ protected function get_store_from_action_id( $action_id, $primary_first = false ) { if ( $primary_first ) { $stores = array( $this->primary_store, $this->secondary_store, ); } elseif ( $action_id < $this->demarkation_id ) { $stores = array( $this->secondary_store, $this->primary_store, ); } else { $stores = array( $this->primary_store, ); } foreach ( $stores as $store ) { $action = $store->fetch_action( $action_id ); if ( ! is_a( $action, 'ActionScheduler_NullAction' ) ) { return $store; } } return null; } /** * * * * * * * * * * * * * * * * * * * * * * * * * * * * All claim-related functions should operate solely * on the primary store. * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Get the claim count from the table data store. */ public function get_claim_count() { return $this->primary_store->get_claim_count(); } /** * Retrieve the claim ID for an action from the table data store. * * @param int $action_id Action ID. */ public function get_claim_id( $action_id ) { return $this->primary_store->get_claim_id( $action_id ); } /** * Release a claim in the table data store on any pending actions. * * @param ActionScheduler_ActionClaim $claim Claim object. */ public function release_claim( ActionScheduler_ActionClaim $claim ) { $this->primary_store->release_claim( $claim ); } /** * Release claims on an action in the table data store. * * @param int $action_id Action ID. */ public function unclaim_action( $action_id ) { $this->primary_store->unclaim_action( $action_id ); } /** * Retrieve a list of action IDs by claim. * * @param int $claim_id Claim ID. */ public function find_actions_by_claim_id( $claim_id ) { return $this->primary_store->find_actions_by_claim_id( $claim_id ); } } woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php 0000644 00000001372 15174671617 0031376 0 ustar 00 vendor <?php /** * Class ActionScheduler_wpPostStore_TaxonomyRegistrar * * @codeCoverageIgnore */ class ActionScheduler_wpPostStore_TaxonomyRegistrar { /** * Registrar. */ public function register() { register_taxonomy( ActionScheduler_wpPostStore::GROUP_TAXONOMY, ActionScheduler_wpPostStore::POST_TYPE, $this->taxonomy_args() ); } /** * Get taxonomy arguments. */ protected function taxonomy_args() { $args = array( 'label' => __( 'Action Group', 'action-scheduler' ), 'public' => false, 'hierarchical' => false, 'show_admin_column' => true, 'query_var' => false, 'rewrite' => false, ); $args = apply_filters( 'action_scheduler_taxonomy_args', $args ); return $args; } } vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php 0000644 00000010620 15174671617 0025004 0 ustar 00 <?php /** * Class ActionScheduler_DBLogger * * Action logs data table data store. * * @since 3.0.0 */ class ActionScheduler_DBLogger extends ActionScheduler_Logger { /** * Add a record to an action log. * * @param int $action_id Action ID. * @param string $message Message to be saved in the log entry. * @param DateTime|null $date Timestamp of the log entry. * * @return int The log entry ID. */ public function log( $action_id, $message, ?DateTime $date = null ) { if ( empty( $date ) ) { $date = as_get_datetime_object(); } else { $date = clone $date; } $date_gmt = $date->format( 'Y-m-d H:i:s' ); ActionScheduler_TimezoneHelper::set_local_timezone( $date ); $date_local = $date->format( 'Y-m-d H:i:s' ); /** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort global $wpdb; $wpdb->insert( $wpdb->actionscheduler_logs, array( 'action_id' => $action_id, 'message' => $message, 'log_date_gmt' => $date_gmt, 'log_date_local' => $date_local, ), array( '%d', '%s', '%s', '%s' ) ); return $wpdb->insert_id; } /** * Retrieve an action log entry. * * @param int $entry_id Log entry ID. * * @return ActionScheduler_LogEntry */ public function get_entry( $entry_id ) { /** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort global $wpdb; $entry = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE log_id=%d", $entry_id ) ); return $this->create_entry_from_db_record( $entry ); } /** * Create an action log entry from a database record. * * @param object $record Log entry database record object. * * @return ActionScheduler_LogEntry */ private function create_entry_from_db_record( $record ) { if ( empty( $record ) ) { return new ActionScheduler_NullLogEntry(); } if ( is_null( $record->log_date_gmt ) ) { $date = as_get_datetime_object( ActionScheduler_StoreSchema::DEFAULT_DATE ); } else { $date = as_get_datetime_object( $record->log_date_gmt ); } return new ActionScheduler_LogEntry( $record->action_id, $record->message, $date ); } /** * Retrieve an action's log entries from the database. * * @param int $action_id Action ID. * * @return ActionScheduler_LogEntry[] */ public function get_logs( $action_id ) { /** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort global $wpdb; $records = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE action_id=%d", $action_id ) ); return array_map( array( $this, 'create_entry_from_db_record' ), $records ); } /** * Initialize the data store. * * @codeCoverageIgnore */ public function init() { $table_maker = new ActionScheduler_LoggerSchema(); $table_maker->init(); $table_maker->register_tables(); parent::init(); add_action( 'action_scheduler_deleted_action', array( $this, 'clear_deleted_action_logs' ), 10, 1 ); } /** * Delete the action logs for an action. * * @param int $action_id Action ID. */ public function clear_deleted_action_logs( $action_id ) { /** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort global $wpdb; $wpdb->delete( $wpdb->actionscheduler_logs, array( 'action_id' => $action_id ), array( '%d' ) ); } /** * Bulk add cancel action log entries. * * @param array $action_ids List of action ID. */ public function bulk_log_cancel_actions( $action_ids ) { if ( empty( $action_ids ) ) { return; } /** @var \wpdb $wpdb */ //phpcs:ignore Generic.Commenting.DocComment.MissingShort global $wpdb; $date = as_get_datetime_object(); $date_gmt = $date->format( 'Y-m-d H:i:s' ); ActionScheduler_TimezoneHelper::set_local_timezone( $date ); $date_local = $date->format( 'Y-m-d H:i:s' ); $message = __( 'action canceled', 'action-scheduler' ); $format = '(%d, ' . $wpdb->prepare( '%s, %s, %s', $message, $date_gmt, $date_local ) . ')'; $sql_query = "INSERT {$wpdb->actionscheduler_logs} (action_id, message, log_date_gmt, log_date_local) VALUES "; $value_rows = array(); foreach ( $action_ids as $action_id ) { $value_rows[] = $wpdb->prepare( $format, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } $sql_query .= implode( ',', $value_rows ); $wpdb->query( $sql_query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } } woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php 0000644 00000003711 15174671617 0031346 0 ustar 00 vendor <?php /** * Class ActionScheduler_wpPostStore_PostTypeRegistrar * * @codeCoverageIgnore */ class ActionScheduler_wpPostStore_PostTypeRegistrar { /** * Registrar. */ public function register() { register_post_type( ActionScheduler_wpPostStore::POST_TYPE, $this->post_type_args() ); } /** * Build the args array for the post type definition * * @return array */ protected function post_type_args() { $args = array( 'label' => __( 'Scheduled Actions', 'action-scheduler' ), 'description' => __( 'Scheduled actions are hooks triggered on a certain date and time.', 'action-scheduler' ), 'public' => false, 'map_meta_cap' => true, 'hierarchical' => false, 'supports' => array( 'title', 'editor', 'comments' ), 'rewrite' => false, 'query_var' => false, 'can_export' => true, 'ep_mask' => EP_NONE, 'labels' => array( 'name' => __( 'Scheduled Actions', 'action-scheduler' ), 'singular_name' => __( 'Scheduled Action', 'action-scheduler' ), 'menu_name' => _x( 'Scheduled Actions', 'Admin menu name', 'action-scheduler' ), 'add_new' => __( 'Add', 'action-scheduler' ), 'add_new_item' => __( 'Add New Scheduled Action', 'action-scheduler' ), 'edit' => __( 'Edit', 'action-scheduler' ), 'edit_item' => __( 'Edit Scheduled Action', 'action-scheduler' ), 'new_item' => __( 'New Scheduled Action', 'action-scheduler' ), 'view' => __( 'View Action', 'action-scheduler' ), 'view_item' => __( 'View Action', 'action-scheduler' ), 'search_items' => __( 'Search Scheduled Actions', 'action-scheduler' ), 'not_found' => __( 'No actions found', 'action-scheduler' ), 'not_found_in_trash' => __( 'No actions found in trash', 'action-scheduler' ), ), ); $args = apply_filters( 'action_scheduler_post_type_args', $args ); return $args; } } vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php 0000644 00000120321 15174671617 0024661 0 ustar 00 <?php /** * Class ActionScheduler_DBStore * * Action data table data store. * * @since 3.0.0 */ class ActionScheduler_DBStore extends ActionScheduler_Store { /** * Used to share information about the before_date property of claims internally. * * This is used in preference to passing the same information as a method param * for backwards-compatibility reasons. * * @var DateTime|null */ private $claim_before_date = null; /** * Maximum length of args. * * @var int */ protected static $max_args_length = 8000; /** * Maximum length of index. * * @var int */ protected static $max_index_length = 191; /** * List of claim filters. * * @var array */ protected $claim_filters = array( 'group' => '', 'hooks' => '', 'exclude-groups' => '', ); /** * Initialize the data store * * @codeCoverageIgnore */ public function init() { $table_maker = new ActionScheduler_StoreSchema(); $table_maker->init(); $table_maker->register_tables(); } /** * Save an action, checks if this is a unique action before actually saving. * * @param ActionScheduler_Action $action Action object. * @param DateTime|null $scheduled_date Optional schedule date. Default null. * * @return int Action ID. * @throws RuntimeException Throws exception when saving the action fails. */ public function save_unique_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { return $this->save_action_to_db( $action, $scheduled_date, true ); } /** * Save an action. Can save duplicate action as well, prefer using `save_unique_action` instead. * * @param ActionScheduler_Action $action Action object. * @param DateTime|null $scheduled_date Optional schedule date. Default null. * * @return int Action ID. * @throws RuntimeException Throws exception when saving the action fails. */ public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { return $this->save_action_to_db( $action, $scheduled_date, false ); } /** * Save an action. * * @param ActionScheduler_Action $action Action object. * @param ?DateTime $date Optional schedule date. Default null. * @param bool $unique Whether the action should be unique. * * @return int Action ID. * @throws \RuntimeException Throws exception when saving the action fails. */ private function save_action_to_db( ActionScheduler_Action $action, ?DateTime $date = null, $unique = false ) { global $wpdb; try { $this->validate_action( $action ); $data = array( 'hook' => $action->get_hook(), 'status' => ( $action->is_finished() ? self::STATUS_COMPLETE : self::STATUS_PENDING ), 'scheduled_date_gmt' => $this->get_scheduled_date_string( $action, $date ), 'scheduled_date_local' => $this->get_scheduled_date_string_local( $action, $date ), 'schedule' => serialize( $action->get_schedule() ), // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize 'group_id' => current( $this->get_group_ids( $action->get_group() ) ), 'priority' => $action->get_priority(), ); $args = wp_json_encode( $action->get_args() ); if ( strlen( $args ) <= static::$max_index_length ) { $data['args'] = $args; } else { $data['args'] = $this->hash_args( $args ); $data['extended_args'] = $args; } $insert_sql = $this->build_insert_sql( $data, $unique ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $insert_sql should be already prepared. $wpdb->query( $insert_sql ); $action_id = $wpdb->insert_id; if ( is_wp_error( $action_id ) ) { throw new \RuntimeException( $action_id->get_error_message() ); } elseif ( empty( $action_id ) ) { if ( $unique ) { return 0; } throw new \RuntimeException( $wpdb->last_error ? $wpdb->last_error : __( 'Database error.', 'action-scheduler' ) ); } do_action( 'action_scheduler_stored_action', $action_id ); return $action_id; } catch ( \Exception $e ) { /* translators: %s: error message */ throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); } } /** * Helper function to build insert query. * * @param array $data Row data for action. * @param bool $unique Whether the action should be unique. * * @return string Insert query. */ private function build_insert_sql( array $data, $unique ) { global $wpdb; $columns = array_keys( $data ); $values = array_values( $data ); $placeholders = array_map( array( $this, 'get_placeholder_for_column' ), $columns ); $table_name = ! empty( $wpdb->actionscheduler_actions ) ? $wpdb->actionscheduler_actions : $wpdb->prefix . 'actionscheduler_actions'; $column_sql = '`' . implode( '`, `', $columns ) . '`'; $placeholder_sql = implode( ', ', $placeholders ); $where_clause = $this->build_where_clause_for_insert( $data, $table_name, $unique ); // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- $column_sql and $where_clause are already prepared. $placeholder_sql is hardcoded. $insert_query = $wpdb->prepare( " INSERT INTO $table_name ( $column_sql ) SELECT $placeholder_sql FROM DUAL WHERE ( $where_clause ) IS NULL", $values ); // phpcs:enable return $insert_query; } /** * Helper method to build where clause for action insert statement. * * @param array $data Row data for action. * @param string $table_name Action table name. * @param bool $unique Where action should be unique. * * @return string Where clause to be used with insert. */ private function build_where_clause_for_insert( $data, $table_name, $unique ) { global $wpdb; if ( ! $unique ) { return 'SELECT NULL FROM DUAL'; } $pending_statuses = array( ActionScheduler_Store::STATUS_PENDING, ActionScheduler_Store::STATUS_RUNNING, ); $pending_status_placeholders = implode( ', ', array_fill( 0, count( $pending_statuses ), '%s' ) ); // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber -- $pending_status_placeholders is hardcoded. $where_clause = $wpdb->prepare( " SELECT action_id FROM $table_name WHERE status IN ( $pending_status_placeholders ) AND hook = %s AND `group_id` = %d ", array_merge( $pending_statuses, array( $data['hook'], $data['group_id'], ) ) ); // phpcs:enable return "$where_clause" . ' LIMIT 1'; } /** * Helper method to get $wpdb->prepare placeholder for a given column name. * * @param string $column_name Name of column in actions table. * * @return string Placeholder to use for given column. */ private function get_placeholder_for_column( $column_name ) { $string_columns = array( 'hook', 'status', 'scheduled_date_gmt', 'scheduled_date_local', 'args', 'schedule', 'last_attempt_gmt', 'last_attempt_local', 'extended_args', ); return in_array( $column_name, $string_columns, true ) ? '%s' : '%d'; } /** * Generate a hash from json_encoded $args using MD5 as this isn't for security. * * @param string $args JSON encoded action args. * @return string */ protected function hash_args( $args ) { return md5( $args ); } /** * Get action args query param value from action args. * * @param array $args Action args. * @return string */ protected function get_args_for_query( $args ) { $encoded = wp_json_encode( $args ); if ( strlen( $encoded ) <= static::$max_index_length ) { return $encoded; } return $this->hash_args( $encoded ); } /** * Get a group's ID based on its name/slug. * * @param string|array $slugs The string name of a group, or names for several groups. * @param bool $create_if_not_exists Whether to create the group if it does not already exist. Default, true - create the group. * * @return array The group IDs, if they exist or were successfully created. May be empty. */ protected function get_group_ids( $slugs, $create_if_not_exists = true ) { $slugs = (array) $slugs; $group_ids = array(); if ( empty( $slugs ) ) { return array(); } /** * Global. * * @var \wpdb $wpdb */ global $wpdb; foreach ( $slugs as $slug ) { $group_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT group_id FROM {$wpdb->actionscheduler_groups} WHERE slug=%s", $slug ) ); if ( empty( $group_id ) && $create_if_not_exists ) { $group_id = $this->create_group( $slug ); } if ( $group_id ) { $group_ids[] = $group_id; } } return $group_ids; } /** * Create an action group. * * @param string $slug Group slug. * * @return int Group ID. */ protected function create_group( $slug ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $wpdb->insert( $wpdb->actionscheduler_groups, array( 'slug' => $slug ) ); return (int) $wpdb->insert_id; } /** * Retrieve an action. * * @param int $action_id Action ID. * * @return ActionScheduler_Action */ public function fetch_action( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $data = $wpdb->get_row( $wpdb->prepare( "SELECT a.*, g.slug AS `group` FROM {$wpdb->actionscheduler_actions} a LEFT JOIN {$wpdb->actionscheduler_groups} g ON a.group_id=g.group_id WHERE a.action_id=%d", $action_id ) ); if ( empty( $data ) ) { return $this->get_null_action(); } if ( ! empty( $data->extended_args ) ) { $data->args = $data->extended_args; unset( $data->extended_args ); } // Convert NULL dates to zero dates. $date_fields = array( 'scheduled_date_gmt', 'scheduled_date_local', 'last_attempt_gmt', 'last_attempt_gmt', ); foreach ( $date_fields as $date_field ) { if ( is_null( $data->$date_field ) ) { $data->$date_field = ActionScheduler_StoreSchema::DEFAULT_DATE; } } try { $action = $this->make_action_from_db_record( $data ); } catch ( ActionScheduler_InvalidActionException $exception ) { do_action( 'action_scheduler_failed_fetch_action', $action_id, $exception ); return $this->get_null_action(); } return $action; } /** * Create a null action. * * @return ActionScheduler_NullAction */ protected function get_null_action() { return new ActionScheduler_NullAction(); } /** * Create an action from a database record. * * @param object $data Action database record. * * @return ActionScheduler_Action|ActionScheduler_CanceledAction|ActionScheduler_FinishedAction */ protected function make_action_from_db_record( $data ) { $hook = $data->hook; $args = json_decode( $data->args, true ); $schedule = unserialize( $data->schedule ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize $this->validate_args( $args, $data->action_id ); $this->validate_schedule( $schedule, $data->action_id ); if ( empty( $schedule ) ) { $schedule = new ActionScheduler_NullSchedule(); } $group = $data->group ? $data->group : ''; return ActionScheduler::factory()->get_stored_action( $data->status, $data->hook, $args, $schedule, $group, $data->priority ); } /** * Returns the SQL statement to query (or count) actions. * * @since 3.3.0 $query['status'] accepts array of statuses instead of a single status. * * @param array $query Filtering options. * @param string $select_or_count Whether the SQL should select and return the IDs or just the row count. * * @return string SQL statement already properly escaped. * @throws \InvalidArgumentException If the query is invalid. * @throws \RuntimeException When "unknown partial args matching value". */ protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) { if ( ! in_array( $select_or_count, array( 'select', 'count' ), true ) ) { throw new InvalidArgumentException( __( 'Invalid value for select or count parameter. Cannot query actions.', 'action-scheduler' ) ); } $query = wp_parse_args( $query, array( 'hook' => '', 'args' => null, 'partial_args_matching' => 'off', // can be 'like' or 'json'. 'date' => null, 'date_compare' => '<=', 'modified' => null, 'modified_compare' => '<=', 'group' => '', 'status' => '', 'claimed' => null, 'per_page' => 5, 'offset' => 0, 'orderby' => 'date', 'order' => 'ASC', ) ); /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $db_server_info = is_callable( array( $wpdb, 'db_server_info' ) ) ? $wpdb->db_server_info() : $wpdb->db_version(); if ( false !== strpos( $db_server_info, 'MariaDB' ) ) { $supports_json = version_compare( PHP_VERSION_ID >= 80016 ? $wpdb->db_version() : preg_replace( '/[^0-9.].*/', '', str_replace( '5.5.5-', '', $db_server_info ) ), '10.2', '>=' ); } else { $supports_json = version_compare( $wpdb->db_version(), '5.7', '>=' ); } $sql = ( 'count' === $select_or_count ) ? 'SELECT count(a.action_id)' : 'SELECT a.action_id'; $sql .= " FROM {$wpdb->actionscheduler_actions} a"; $sql_params = array(); if ( ! empty( $query['group'] ) || 'group' === $query['orderby'] ) { $sql .= " LEFT JOIN {$wpdb->actionscheduler_groups} g ON g.group_id=a.group_id"; } $sql .= ' WHERE 1=1'; if ( ! empty( $query['group'] ) ) { $sql .= ' AND g.slug=%s'; $sql_params[] = $query['group']; } if ( ! empty( $query['hook'] ) ) { $sql .= ' AND a.hook=%s'; $sql_params[] = $query['hook']; } if ( ! is_null( $query['args'] ) ) { switch ( $query['partial_args_matching'] ) { case 'json': if ( ! $supports_json ) { throw new \RuntimeException( __( 'JSON partial matching not supported in your environment. Please check your MySQL/MariaDB version.', 'action-scheduler' ) ); } $supported_types = array( 'integer' => '%d', 'boolean' => '%s', 'double' => '%f', 'string' => '%s', ); foreach ( $query['args'] as $key => $value ) { $value_type = gettype( $value ); if ( 'boolean' === $value_type ) { $value = $value ? 'true' : 'false'; } $placeholder = isset( $supported_types[ $value_type ] ) ? $supported_types[ $value_type ] : false; if ( ! $placeholder ) { throw new \RuntimeException( sprintf( /* translators: %s: provided value type */ __( 'The value type for the JSON partial matching is not supported. Must be either integer, boolean, double or string. %s type provided.', 'action-scheduler' ), $value_type ) ); } $sql .= ' AND JSON_EXTRACT(a.args, %s)=' . $placeholder; $sql_params[] = '$.' . $key; $sql_params[] = $value; } break; case 'like': foreach ( $query['args'] as $key => $value ) { $sql .= ' AND a.args LIKE %s'; $json_partial = $wpdb->esc_like( trim( wp_json_encode( array( $key => $value ) ), '{}' ) ); $sql_params[] = "%{$json_partial}%"; } break; case 'off': $sql .= ' AND a.args=%s'; $sql_params[] = $this->get_args_for_query( $query['args'] ); break; default: throw new \RuntimeException( __( 'Unknown partial args matching value.', 'action-scheduler' ) ); } } if ( $query['status'] ) { $statuses = (array) $query['status']; $placeholders = array_fill( 0, count( $statuses ), '%s' ); $sql .= ' AND a.status IN (' . join( ', ', $placeholders ) . ')'; $sql_params = array_merge( $sql_params, array_values( $statuses ) ); } if ( $query['date'] instanceof \DateTime ) { $date = clone $query['date']; $date->setTimezone( new \DateTimeZone( 'UTC' ) ); $date_string = $date->format( 'Y-m-d H:i:s' ); $comparator = $this->validate_sql_comparator( $query['date_compare'] ); $sql .= " AND a.scheduled_date_gmt $comparator %s"; $sql_params[] = $date_string; } if ( $query['modified'] instanceof \DateTime ) { $modified = clone $query['modified']; $modified->setTimezone( new \DateTimeZone( 'UTC' ) ); $date_string = $modified->format( 'Y-m-d H:i:s' ); $comparator = $this->validate_sql_comparator( $query['modified_compare'] ); $sql .= " AND a.last_attempt_gmt $comparator %s"; $sql_params[] = $date_string; } if ( true === $query['claimed'] ) { $sql .= ' AND a.claim_id != 0'; } elseif ( false === $query['claimed'] ) { $sql .= ' AND a.claim_id = 0'; } elseif ( ! is_null( $query['claimed'] ) ) { $sql .= ' AND a.claim_id = %d'; $sql_params[] = $query['claimed']; } if ( ! empty( $query['search'] ) ) { $sql .= ' AND (a.hook LIKE %s OR (a.extended_args IS NULL AND a.args LIKE %s) OR a.extended_args LIKE %s'; for ( $i = 0; $i < 3; $i++ ) { $sql_params[] = sprintf( '%%%s%%', $query['search'] ); } $search_claim_id = (int) $query['search']; if ( $search_claim_id ) { $sql .= ' OR a.claim_id = %d'; $sql_params[] = $search_claim_id; } $sql .= ')'; } if ( 'select' === $select_or_count ) { if ( 'ASC' === strtoupper( $query['order'] ) ) { $order = 'ASC'; } else { $order = 'DESC'; } switch ( $query['orderby'] ) { case 'hook': $sql .= " ORDER BY a.hook $order"; break; case 'group': $sql .= " ORDER BY g.slug $order"; break; case 'modified': $sql .= " ORDER BY a.last_attempt_gmt $order"; break; case 'none': break; case 'action_id': $sql .= " ORDER BY a.action_id $order"; break; case 'date': default: $sql .= " ORDER BY a.scheduled_date_gmt $order"; break; } if ( $query['per_page'] > 0 ) { $sql .= ' LIMIT %d, %d'; $sql_params[] = $query['offset']; $sql_params[] = $query['per_page']; } } if ( ! empty( $sql_params ) ) { $sql = $wpdb->prepare( $sql, $sql_params ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } return $sql; } /** * Query for action count or list of action IDs. * * @since 3.3.0 $query['status'] accepts array of statuses instead of a single status. * * @see ActionScheduler_Store::query_actions for $query arg usage. * * @param array $query Query filtering options. * @param string $query_type Whether to select or count the results. Defaults to select. * * @return string|array|null The IDs of actions matching the query. Null on failure. */ public function query_actions( $query = array(), $query_type = 'select' ) { /** * Global. * * @var wpdb $wpdb */ global $wpdb; $sql = $this->get_query_actions_sql( $query, $query_type ); return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoSql, WordPress.DB.DirectDatabaseQuery.NoCaching } /** * Get a count of all actions in the store, grouped by status. * * @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status. */ public function action_counts() { global $wpdb; $sql = "SELECT a.status, count(a.status) as 'count'"; $sql .= " FROM {$wpdb->actionscheduler_actions} a"; $sql .= ' GROUP BY a.status'; $actions_count_by_status = array(); $action_stati_and_labels = $this->get_status_labels(); foreach ( $wpdb->get_results( $sql ) as $action_data ) { // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared // Ignore any actions with invalid status. if ( array_key_exists( $action_data->status, $action_stati_and_labels ) ) { $actions_count_by_status[ $action_data->status ] = $action_data->count; } } return $actions_count_by_status; } /** * Cancel an action. * * @param int $action_id Action ID. * * @return void * @throws \InvalidArgumentException If the action update failed. */ public function cancel_action( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $updated = $wpdb->update( $wpdb->actionscheduler_actions, array( 'status' => self::STATUS_CANCELED ), array( 'action_id' => $action_id ), array( '%s' ), array( '%d' ) ); if ( false === $updated ) { /* translators: %s: action ID */ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to cancel this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } do_action( 'action_scheduler_canceled_action', $action_id ); } /** * Cancel pending actions by hook. * * @since 3.0.0 * * @param string $hook Hook name. * * @return void */ public function cancel_actions_by_hook( $hook ) { $this->bulk_cancel_actions( array( 'hook' => $hook ) ); } /** * Cancel pending actions by group. * * @param string $group Group slug. * * @return void */ public function cancel_actions_by_group( $group ) { $this->bulk_cancel_actions( array( 'group' => $group ) ); } /** * Bulk cancel actions. * * @since 3.0.0 * * @param array $query_args Query parameters. */ protected function bulk_cancel_actions( $query_args ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; if ( ! is_array( $query_args ) ) { return; } // Don't cancel actions that are already canceled. if ( isset( $query_args['status'] ) && self::STATUS_CANCELED === $query_args['status'] ) { return; } $action_ids = true; $query_args = wp_parse_args( $query_args, array( 'per_page' => 1000, 'status' => self::STATUS_PENDING, 'orderby' => 'none', ) ); while ( $action_ids ) { $action_ids = $this->query_actions( $query_args ); if ( empty( $action_ids ) ) { break; } $format = array_fill( 0, count( $action_ids ), '%d' ); $query_in = '(' . implode( ',', $format ) . ')'; $parameters = $action_ids; array_unshift( $parameters, self::STATUS_CANCELED ); $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->actionscheduler_actions} SET status = %s WHERE action_id IN {$query_in}", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared $parameters ) ); do_action( 'action_scheduler_bulk_cancel_actions', $action_ids ); } } /** * Delete an action. * * @param int $action_id Action ID. * @throws \InvalidArgumentException If the action deletion failed. */ public function delete_action( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $deleted = $wpdb->delete( $wpdb->actionscheduler_actions, array( 'action_id' => $action_id ), array( '%d' ) ); if ( empty( $deleted ) ) { /* translators: %s is the action ID */ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to delete this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } do_action( 'action_scheduler_deleted_action', $action_id ); } /** * Get the schedule date for an action. * * @param string $action_id Action ID. * * @return \DateTime The local date the action is scheduled to run, or the date that it ran. */ public function get_date( $action_id ) { $date = $this->get_date_gmt( $action_id ); ActionScheduler_TimezoneHelper::set_local_timezone( $date ); return $date; } /** * Get the GMT schedule date for an action. * * @param int $action_id Action ID. * * @throws \InvalidArgumentException If action cannot be identified. * @return \DateTime The GMT date the action is scheduled to run, or the date that it ran. */ protected function get_date_gmt( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $record = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d", $action_id ) ); if ( empty( $record ) ) { /* translators: %s is the action ID */ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to determine the date of this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } if ( self::STATUS_PENDING === $record->status ) { return as_get_datetime_object( $record->scheduled_date_gmt ); } else { return as_get_datetime_object( $record->last_attempt_gmt ); } } /** * Stake a claim on actions. * * @param int $max_actions Maximum number of action to include in claim. * @param DateTime|null $before_date Jobs must be schedule before this date. Defaults to now. * @param array $hooks Hooks to filter for. * @param string $group Group to filter for. * * @return ActionScheduler_ActionClaim */ public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) { $claim_id = $this->generate_claim_id(); $this->claim_before_date = $before_date; $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group ); $action_ids = $this->find_actions_by_claim_id( $claim_id ); $this->claim_before_date = null; return new ActionScheduler_ActionClaim( $claim_id, $action_ids ); } /** * Generate a new action claim. * * @return int Claim ID. */ protected function generate_claim_id() { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $now = as_get_datetime_object(); $wpdb->insert( $wpdb->actionscheduler_claims, array( 'date_created_gmt' => $now->format( 'Y-m-d H:i:s' ) ) ); return $wpdb->insert_id; } /** * Set a claim filter. * * @param string $filter_name Claim filter name. * @param mixed $filter_values Values to filter. * @return void */ public function set_claim_filter( $filter_name, $filter_values ) { if ( isset( $this->claim_filters[ $filter_name ] ) ) { $this->claim_filters[ $filter_name ] = $filter_values; } } /** * Get the claim filter value. * * @param string $filter_name Claim filter name. * @return mixed */ public function get_claim_filter( $filter_name ) { if ( isset( $this->claim_filters[ $filter_name ] ) ) { return $this->claim_filters[ $filter_name ]; } return ''; } /** * Mark actions claimed. * * @param string $claim_id Claim Id. * @param int $limit Number of action to include in claim. * @param DateTime|null $before_date Should use UTC timezone. * @param array $hooks Hooks to filter for. * @param string $group Group to filter for. * * @return int The number of actions that were claimed. * @throws \InvalidArgumentException Throws InvalidArgumentException if group doesn't exist. * @throws \RuntimeException Throws RuntimeException if unable to claim action. */ protected function claim_actions( $claim_id, $limit, ?DateTime $before_date = null, $hooks = array(), $group = '' ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $now = as_get_datetime_object(); $date = is_null( $before_date ) ? $now : clone $before_date; // Set claim filters. if ( ! empty( $hooks ) ) { $this->set_claim_filter( 'hooks', $hooks ); } else { $hooks = $this->get_claim_filter( 'hooks' ); } if ( ! empty( $group ) ) { $this->set_claim_filter( 'group', $group ); } else { $group = $this->get_claim_filter( 'group' ); } $where = 'WHERE claim_id = 0 AND scheduled_date_gmt <= %s AND status=%s'; $where_params = array( $date->format( 'Y-m-d H:i:s' ), self::STATUS_PENDING, ); if ( ! empty( $hooks ) ) { $placeholders = array_fill( 0, count( $hooks ), '%s' ); $where .= ' AND hook IN (' . join( ', ', $placeholders ) . ')'; $where_params = array_merge( $where_params, array_values( $hooks ) ); } $group_operator = 'IN'; if ( empty( $group ) ) { $group = $this->get_claim_filter( 'exclude-groups' ); $group_operator = 'NOT IN'; } if ( ! empty( $group ) ) { $group_ids = $this->get_group_ids( $group, false ); // throw exception if no matching group(s) found, this matches ActionScheduler_wpPostStore's behaviour. if ( empty( $group_ids ) ) { throw new InvalidArgumentException( sprintf( /* translators: %s: group name(s) */ _n( 'The group "%s" does not exist.', 'The groups "%s" do not exist.', is_array( $group ) ? count( $group ) : 1, 'action-scheduler' ), $group ) ); } $id_list = implode( ',', array_map( 'intval', $group_ids ) ); $where .= " AND group_id {$group_operator} ( $id_list )"; } /** * Sets the order-by clause used in the action claim query. * * @param string $order_by_sql * @param string $claim_id Claim Id. * @param array $hooks Hooks to filter for. * * @since 3.8.3 Made $claim_id and $hooks available. * @since 3.4.0 */ $order = apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC', $claim_id, $hooks ); $skip_locked = $this->db_supports_skip_locked() ? ' SKIP LOCKED' : ''; // Selecting the action_ids that we plan to claim, while skipping any locked rows to avoid deadlocking. $select_sql = $wpdb->prepare( "SELECT action_id from {$wpdb->actionscheduler_actions} {$where} {$order} LIMIT %d FOR UPDATE{$skip_locked}", array_merge( $where_params, array( $limit ) ) ); // Now place it into an UPDATE statement by joining the result sets, allowing for the SKIP LOCKED behavior to take effect. $update_sql = "UPDATE {$wpdb->actionscheduler_actions} t1 JOIN ( $select_sql ) t2 ON t1.action_id = t2.action_id SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s"; $update_params = array( $claim_id, $now->format( 'Y-m-d H:i:s' ), current_time( 'mysql' ), ); $rows_affected = $wpdb->query( $wpdb->prepare( $update_sql, $update_params ) ); if ( false === $rows_affected ) { $error = empty( $wpdb->last_error ) ? _x( 'unknown', 'database error', 'action-scheduler' ) : $wpdb->last_error; throw new \RuntimeException( sprintf( /* translators: %s database error. */ __( 'Unable to claim actions. Database error: %s.', 'action-scheduler' ), $error ) ); } return (int) $rows_affected; } /** * Determines whether the database supports using SKIP LOCKED. This logic mimicks the $wpdb::has_cap() logic. * * SKIP_LOCKED support was added to MariaDB in 10.6.0 and to MySQL in 8.0.1 * * @return bool */ private function db_supports_skip_locked() { global $wpdb; $db_version = $wpdb->db_version(); $db_server_info = $wpdb->db_server_info(); $is_mariadb = ( false !== strpos( $db_server_info, 'MariaDB' ) ); if ( $is_mariadb && '5.5.5' === $db_version && PHP_VERSION_ID < 80016 // PHP 8.0.15 or older. ) { /* * Account for MariaDB version being prefixed with '5.5.5-' on older PHP versions. */ $db_server_info = preg_replace( '/^5\.5\.5-(.*)/', '$1', $db_server_info ); $db_version = preg_replace( '/[^0-9.].*/', '', $db_server_info ); } $is_supported = ( $is_mariadb && version_compare( $db_version, '10.6.0', '>=' ) ) || ( ! $is_mariadb && version_compare( $db_version, '8.0.1', '>=' ) ); /** * Filter whether the database supports the SKIP LOCKED modifier for queries. * * @param bool $is_supported Whether SKIP LOCKED is supported. * * @since 3.9.3 */ return apply_filters( 'action_scheduler_db_supports_skip_locked', $is_supported ); } /** * Get the number of active claims. * * @return int */ public function get_claim_count() { global $wpdb; $sql = "SELECT COUNT(DISTINCT claim_id) FROM {$wpdb->actionscheduler_actions} WHERE claim_id != 0 AND status IN ( %s, %s)"; $sql = $wpdb->prepare( $sql, array( self::STATUS_PENDING, self::STATUS_RUNNING ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared return (int) $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } /** * Return an action's claim ID, as stored in the claim_id column. * * @param string $action_id Action ID. * @return mixed */ public function get_claim_id( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $sql = "SELECT claim_id FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"; $sql = $wpdb->prepare( $sql, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared return (int) $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } /** * Retrieve the action IDs of action in a claim. * * @param int $claim_id Claim ID. * @return int[] */ public function find_actions_by_claim_id( $claim_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $action_ids = array(); $before_date = isset( $this->claim_before_date ) ? $this->claim_before_date : as_get_datetime_object(); $cut_off = $before_date->format( 'Y-m-d H:i:s' ); $sql = $wpdb->prepare( "SELECT action_id, scheduled_date_gmt FROM {$wpdb->actionscheduler_actions} WHERE claim_id = %d ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC", $claim_id ); // Verify that the scheduled date for each action is within the expected bounds (in some unusual // cases, we cannot depend on MySQL to honor all of the WHERE conditions we specify). foreach ( $wpdb->get_results( $sql ) as $claimed_action ) { // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared if ( $claimed_action->scheduled_date_gmt <= $cut_off ) { $action_ids[] = absint( $claimed_action->action_id ); } } return $action_ids; } /** * Release pending actions from a claim and delete the claim. * * @param ActionScheduler_ActionClaim $claim Claim object. * @throws \RuntimeException When unable to release actions from claim. */ public function release_claim( ActionScheduler_ActionClaim $claim ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; if ( 0 === intval( $claim->get_id() ) ) { // Verify that the claim_id is valid before attempting to release it. return; } /** * Deadlock warning: This function modifies actions to release them from claims that have been processed. Earlier, we used to it in a atomic query, i.e. we would update all actions belonging to a particular claim_id with claim_id = 0. * While this was functionally correct, it would cause deadlock, since this update query will hold a lock on the claim_id_.. index on the action table. * This allowed the possibility of a race condition, where the claimer query is also running at the same time, then the claimer query will also try to acquire a lock on the claim_id_.. index, and in this case if claim release query has already progressed to the point of acquiring the lock, but have not updated yet, it would cause a deadlock. * * We resolve this by getting all the actions_id that we want to release claim from in a separate query, and then releasing the claim on each of them. This way, our lock is acquired on the action_id index instead of the claim_id index. Note that the lock on claim_id will still be acquired, but it will only when we actually make the update, rather than when we select the actions. * * We only release pending actions in order for them to be claimed by another process. */ $action_ids = $wpdb->get_col( $wpdb->prepare( "SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id = %d AND status = %s", $claim->get_id(), self::STATUS_PENDING ) ); $row_updates = 0; if ( count( $action_ids ) > 0 ) { $action_id_string = implode( ',', array_map( 'absint', $action_ids ) ); $row_updates = $wpdb->query( "UPDATE {$wpdb->actionscheduler_actions} SET claim_id = 0 WHERE action_id IN ({$action_id_string})" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared } $wpdb->delete( $wpdb->actionscheduler_claims, array( 'claim_id' => $claim->get_id() ), array( '%d' ) ); if ( $row_updates < count( $action_ids ) ) { throw new RuntimeException( sprintf( // translators: %d is an id. __( 'Unable to release actions from claim id %d.', 'action-scheduler' ), $claim->get_id() ) ); } } /** * Remove the claim from an action. * * @param int $action_id Action ID. * * @return void */ public function unclaim_action( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $wpdb->update( $wpdb->actionscheduler_actions, array( 'claim_id' => 0 ), array( 'action_id' => $action_id ), array( '%s' ), array( '%d' ) ); } /** * Mark an action as failed. * * @param int $action_id Action ID. * @throws \InvalidArgumentException Throw an exception if action was not updated. */ public function mark_failure( $action_id ) { /** * Global. * @var \wpdb $wpdb */ global $wpdb; $updated = $wpdb->update( $wpdb->actionscheduler_actions, array( 'status' => self::STATUS_FAILED ), array( 'action_id' => $action_id ), array( '%s' ), array( '%d' ) ); if ( empty( $updated ) ) { /* translators: %s is the action ID */ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to mark this action as having failed. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } } /** * Add execution message to action log. * * @throws Exception If the action status cannot be updated to self::STATUS_RUNNING ('in-progress'). * * @param int $action_id Action ID. * * @return void */ public function log_execution( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $sql = "UPDATE {$wpdb->actionscheduler_actions} SET attempts = attempts+1, status=%s, last_attempt_gmt = %s, last_attempt_local = %s WHERE action_id = %d"; $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time( 'mysql', true ), current_time( 'mysql' ), $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $status_updated = $wpdb->query( $sql ); if ( ! $status_updated ) { throw new Exception( sprintf( /* translators: 1: action ID. 2: status slug. */ __( 'Unable to update the status of action %1$d to %2$s.', 'action-scheduler' ), $action_id, self::STATUS_RUNNING ) ); } } /** * Mark an action as complete. * * @param int $action_id Action ID. * * @return void * @throws \InvalidArgumentException Throw an exception if action was not updated. */ public function mark_complete( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $updated = $wpdb->update( $wpdb->actionscheduler_actions, array( 'status' => self::STATUS_COMPLETE, 'last_attempt_gmt' => current_time( 'mysql', true ), 'last_attempt_local' => current_time( 'mysql' ), ), array( 'action_id' => $action_id ), array( '%s' ), array( '%d' ) ); if ( empty( $updated ) ) { /* translators: %s is the action ID */ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to mark this action as having completed. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } /** * Fires after a scheduled action has been completed. * * @since 3.4.2 * * @param int $action_id Action ID. */ do_action( 'action_scheduler_completed_action', $action_id ); } /** * Get an action's status. * * @param int $action_id Action ID. * * @return string * @throws \InvalidArgumentException Throw an exception if not status was found for action_id. * @throws \RuntimeException Throw an exception if action status could not be retrieved. */ public function get_status( $action_id ) { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $sql = "SELECT status FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d"; $sql = $wpdb->prepare( $sql, $action_id ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $status = $wpdb->get_var( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared if ( is_null( $status ) ) { throw new \InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) ); } elseif ( empty( $status ) ) { throw new \RuntimeException( __( 'Unknown status found for action.', 'action-scheduler' ) ); } else { return $status; } } } vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php 0000644 00000017033 15174671617 0026475 0 ustar 00 <?php /** * Class ActionScheduler_wpCommentLogger */ class ActionScheduler_wpCommentLogger extends ActionScheduler_Logger { const AGENT = 'ActionScheduler'; const TYPE = 'action_log'; /** * Create log entry. * * @param string $action_id Action ID. * @param string $message Action log's message. * @param DateTime|null $date Action log's timestamp. * * @return string The log entry ID */ public function log( $action_id, $message, ?DateTime $date = null ) { if ( empty( $date ) ) { $date = as_get_datetime_object(); } else { $date = as_get_datetime_object( clone $date ); } $comment_id = $this->create_wp_comment( $action_id, $message, $date ); return $comment_id; } /** * Create comment. * * @param int $action_id Action ID. * @param string $message Action log's message. * @param DateTime $date Action log entry's timestamp. */ protected function create_wp_comment( $action_id, $message, DateTime $date ) { $comment_date_gmt = $date->format( 'Y-m-d H:i:s' ); ActionScheduler_TimezoneHelper::set_local_timezone( $date ); $comment_data = array( 'comment_post_ID' => $action_id, 'comment_date' => $date->format( 'Y-m-d H:i:s' ), 'comment_date_gmt' => $comment_date_gmt, 'comment_author' => self::AGENT, 'comment_content' => $message, 'comment_agent' => self::AGENT, 'comment_type' => self::TYPE, ); return wp_insert_comment( $comment_data ); } /** * Get single log entry for action. * * @param string $entry_id Entry ID. * * @return ActionScheduler_LogEntry */ public function get_entry( $entry_id ) { $comment = $this->get_comment( $entry_id ); if ( empty( $comment ) || self::TYPE !== $comment->comment_type ) { return new ActionScheduler_NullLogEntry(); } $date = as_get_datetime_object( $comment->comment_date_gmt ); ActionScheduler_TimezoneHelper::set_local_timezone( $date ); return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $date ); } /** * Get action's logs. * * @param string $action_id Action ID. * * @return ActionScheduler_LogEntry[] */ public function get_logs( $action_id ) { $status = 'all'; $logs = array(); if ( get_post_status( $action_id ) === 'trash' ) { $status = 'post-trashed'; } $comments = get_comments( array( 'post_id' => $action_id, 'orderby' => 'comment_date_gmt', 'order' => 'ASC', 'type' => self::TYPE, 'status' => $status, ) ); foreach ( $comments as $c ) { $entry = $this->get_entry( $c ); if ( ! empty( $entry ) ) { $logs[] = $entry; } } return $logs; } /** * Get comment. * * @param int $comment_id Comment ID. */ protected function get_comment( $comment_id ) { return get_comment( $comment_id ); } /** * Filter comment queries. * * @param WP_Comment_Query $query Comment query object. */ public function filter_comment_queries( $query ) { foreach ( array( 'ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID' ) as $key ) { if ( ! empty( $query->query_vars[ $key ] ) ) { return; // don't slow down queries that wouldn't include action_log comments anyway. } } $query->query_vars['action_log_filter'] = true; add_filter( 'comments_clauses', array( $this, 'filter_comment_query_clauses' ), 10, 2 ); } /** * Filter comment queries. * * @param array $clauses Query's clauses. * @param WP_Comment_Query $query Query object. * * @return array */ public function filter_comment_query_clauses( $clauses, $query ) { if ( ! empty( $query->query_vars['action_log_filter'] ) ) { $clauses['where'] .= $this->get_where_clause(); } return $clauses; } /** * Make sure Action Scheduler logs are excluded from comment feeds, which use WP_Query, not * the WP_Comment_Query class handled by @see self::filter_comment_queries(). * * @param string $where Query's `where` clause. * @param WP_Query $query Query object. * * @return string */ public function filter_comment_feed( $where, $query ) { if ( is_comment_feed() ) { $where .= $this->get_where_clause(); } return $where; } /** * Return a SQL clause to exclude Action Scheduler comments. * * @return string */ protected function get_where_clause() { global $wpdb; return sprintf( " AND {$wpdb->comments}.comment_type != '%s'", self::TYPE ); } /** * Remove action log entries from wp_count_comments() * * @param array $stats Comment count. * @param int $post_id Post ID. * * @return object */ public function filter_comment_count( $stats, $post_id ) { global $wpdb; if ( 0 === $post_id ) { $stats = $this->get_comment_count(); } return $stats; } /** * Retrieve the comment counts from our cache, or the database if the cached version isn't set. * * @return object */ protected function get_comment_count() { global $wpdb; $stats = get_transient( 'as_comment_count' ); if ( ! $stats ) { $stats = array(); $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} WHERE comment_type NOT IN('order_note','action_log') GROUP BY comment_approved", ARRAY_A ); $total = 0; $stats = array(); $approved = array( '0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed', ); foreach ( (array) $count as $row ) { // Don't count post-trashed toward totals. if ( 'post-trashed' !== $row['comment_approved'] && 'trash' !== $row['comment_approved'] ) { $total += $row['num_comments']; } if ( isset( $approved[ $row['comment_approved'] ] ) ) { $stats[ $approved[ $row['comment_approved'] ] ] = $row['num_comments']; } } $stats['total_comments'] = $total; $stats['all'] = $total; foreach ( $approved as $key ) { if ( empty( $stats[ $key ] ) ) { $stats[ $key ] = 0; } } $stats = (object) $stats; set_transient( 'as_comment_count', $stats ); } return $stats; } /** * Delete comment count cache whenever there is new comment or the status of a comment changes. Cache * will be regenerated next time ActionScheduler_wpCommentLogger::filter_comment_count() is called. */ public function delete_comment_count_cache() { delete_transient( 'as_comment_count' ); } /** * Initialize. * * @codeCoverageIgnore */ public function init() { add_action( 'action_scheduler_before_process_queue', array( $this, 'disable_comment_counting' ), 10, 0 ); add_action( 'action_scheduler_after_process_queue', array( $this, 'enable_comment_counting' ), 10, 0 ); parent::init(); add_action( 'pre_get_comments', array( $this, 'filter_comment_queries' ), 10, 1 ); add_action( 'wp_count_comments', array( $this, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs. add_action( 'comment_feed_where', array( $this, 'filter_comment_feed' ), 10, 2 ); // Delete comments count cache whenever there is a new comment or a comment status changes. add_action( 'wp_insert_comment', array( $this, 'delete_comment_count_cache' ) ); add_action( 'wp_set_comment_status', array( $this, 'delete_comment_count_cache' ) ); } /** * Defer comment counting. */ public function disable_comment_counting() { wp_defer_comment_counting( true ); } /** * Enable comment counting. */ public function enable_comment_counting() { wp_defer_comment_counting( false ); } } vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php 0000644 00000107413 15174671617 0025677 0 ustar 00 <?php /** * Class ActionScheduler_wpPostStore */ class ActionScheduler_wpPostStore extends ActionScheduler_Store { const POST_TYPE = 'scheduled-action'; const GROUP_TAXONOMY = 'action-group'; const SCHEDULE_META_KEY = '_action_manager_schedule'; const DEPENDENCIES_MET = 'as-post-store-dependencies-met'; /** * Used to share information about the before_date property of claims internally. * * This is used in preference to passing the same information as a method param * for backwards-compatibility reasons. * * @var DateTime|null */ private $claim_before_date = null; /** * Local Timezone. * * @var DateTimeZone */ protected $local_timezone = null; /** * Save action. * * @param ActionScheduler_Action $action Scheduled Action. * @param DateTime|null $scheduled_date Scheduled Date. * * @throws RuntimeException Throws an exception if the action could not be saved. * @return int */ public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { try { $this->validate_action( $action ); $post_array = $this->create_post_array( $action, $scheduled_date ); $post_id = $this->save_post_array( $post_array ); $this->save_post_schedule( $post_id, $action->get_schedule() ); $this->save_action_group( $post_id, $action->get_group() ); do_action( 'action_scheduler_stored_action', $post_id ); return $post_id; } catch ( Exception $e ) { /* translators: %s: action error message */ throw new RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); } } /** * Create post array. * * @param ActionScheduler_Action $action Scheduled Action. * @param DateTime|null $scheduled_date Scheduled Date. * * @return array Returns an array of post data. */ protected function create_post_array( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { $post = array( 'post_type' => self::POST_TYPE, 'post_title' => $action->get_hook(), 'post_content' => wp_json_encode( $action->get_args() ), 'post_status' => ( $action->is_finished() ? 'publish' : 'pending' ), 'post_date_gmt' => $this->get_scheduled_date_string( $action, $scheduled_date ), 'post_date' => $this->get_scheduled_date_string_local( $action, $scheduled_date ), ); return $post; } /** * Save post array. * * @param array $post_array Post array. * @return int Returns the post ID. * @throws RuntimeException Throws an exception if the action could not be saved. */ protected function save_post_array( $post_array ) { add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 ); add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); $has_kses = false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ); if ( $has_kses ) { // Prevent KSES from corrupting JSON in post_content. kses_remove_filters(); } $post_id = wp_insert_post( $post_array ); if ( $has_kses ) { kses_init_filters(); } remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 ); remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); if ( is_wp_error( $post_id ) || empty( $post_id ) ) { throw new RuntimeException( __( 'Unable to save action.', 'action-scheduler' ) ); } return $post_id; } /** * Filter insert post data. * * @param array $postdata Post data to filter. * * @return array */ public function filter_insert_post_data( $postdata ) { if ( self::POST_TYPE === $postdata['post_type'] ) { $postdata['post_author'] = 0; if ( 'future' === $postdata['post_status'] ) { $postdata['post_status'] = 'publish'; } } return $postdata; } /** * Create a (probably unique) post name for scheduled actions in a more performant manner than wp_unique_post_slug(). * * When an action's post status is transitioned to something other than 'draft', 'pending' or 'auto-draft, like 'publish' * or 'failed' or 'trash', WordPress will find a unique slug (stored in post_name column) using the wp_unique_post_slug() * function. This is done to ensure URL uniqueness. The approach taken by wp_unique_post_slug() is to iterate over existing * post_name values that match, and append a number 1 greater than the largest. This makes sense when manually creating a * post from the Edit Post screen. It becomes a bottleneck when automatically processing thousands of actions, with a * database containing thousands of related post_name values. * * WordPress 5.1 introduces the 'pre_wp_unique_post_slug' filter for plugins to address this issue. * * We can short-circuit WordPress's wp_unique_post_slug() approach using the 'pre_wp_unique_post_slug' filter. This * method is available to be used as a callback on that filter. It provides a more scalable approach to generating a * post_name/slug that is probably unique. Because Action Scheduler never actually uses the post_name field, or an * action's slug, being probably unique is good enough. * * For more backstory on this issue, see: * - https://github.com/woocommerce/action-scheduler/issues/44 and * - https://core.trac.wordpress.org/ticket/21112 * * @param string $override_slug Short-circuit return value. * @param string $slug The desired slug (post_name). * @param int $post_ID Post ID. * @param string $post_status The post status. * @param string $post_type Post type. * @return string */ public function set_unique_post_slug( $override_slug, $slug, $post_ID, $post_status, $post_type ) { if ( self::POST_TYPE === $post_type ) { $override_slug = uniqid( self::POST_TYPE . '-', true ) . '-' . wp_generate_password( 32, false ); } return $override_slug; } /** * Save post schedule. * * @param int $post_id Post ID of the scheduled action. * @param string $schedule Schedule to save. * * @return void */ protected function save_post_schedule( $post_id, $schedule ) { update_post_meta( $post_id, self::SCHEDULE_META_KEY, $schedule ); } /** * Save action group. * * @param int $post_id Post ID. * @param string $group Group to save. * @return void */ protected function save_action_group( $post_id, $group ) { if ( empty( $group ) ) { wp_set_object_terms( $post_id, array(), self::GROUP_TAXONOMY, false ); } else { wp_set_object_terms( $post_id, array( $group ), self::GROUP_TAXONOMY, false ); } } /** * Fetch actions. * * @param int $action_id Action ID. * @return object */ public function fetch_action( $action_id ) { $post = $this->get_post( $action_id ); if ( empty( $post ) || self::POST_TYPE !== $post->post_type ) { return $this->get_null_action(); } try { $action = $this->make_action_from_post( $post ); } catch ( ActionScheduler_InvalidActionException $exception ) { do_action( 'action_scheduler_failed_fetch_action', $post->ID, $exception ); return $this->get_null_action(); } return $action; } /** * Get post. * * @param string $action_id - Action ID. * @return WP_Post|null */ protected function get_post( $action_id ) { if ( empty( $action_id ) ) { return null; } return get_post( $action_id ); } /** * Get NULL action. * * @return ActionScheduler_NullAction */ protected function get_null_action() { return new ActionScheduler_NullAction(); } /** * Make action from post. * * @param WP_Post $post Post object. * @return WP_Post */ protected function make_action_from_post( $post ) { $hook = $post->post_title; $args = json_decode( $post->post_content, true ); $this->validate_args( $args, $post->ID ); $schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true ); $this->validate_schedule( $schedule, $post->ID ); $group = wp_get_object_terms( $post->ID, self::GROUP_TAXONOMY, array( 'fields' => 'names' ) ); $group = empty( $group ) ? '' : reset( $group ); return ActionScheduler::factory()->get_stored_action( $this->get_action_status_by_post_status( $post->post_status ), $hook, $args, $schedule, $group ); } /** * Get action status by post status. * * @param string $post_status Post status. * * @throws InvalidArgumentException Throw InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels(). * @return string */ protected function get_action_status_by_post_status( $post_status ) { switch ( $post_status ) { case 'publish': $action_status = self::STATUS_COMPLETE; break; case 'trash': $action_status = self::STATUS_CANCELED; break; default: if ( ! array_key_exists( $post_status, $this->get_status_labels() ) ) { throw new InvalidArgumentException( sprintf( 'Invalid post status: "%s". No matching action status available.', $post_status ) ); } $action_status = $post_status; break; } return $action_status; } /** * Get post status by action status. * * @param string $action_status Action status. * * @throws InvalidArgumentException Throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels(). * @return string */ protected function get_post_status_by_action_status( $action_status ) { switch ( $action_status ) { case self::STATUS_COMPLETE: $post_status = 'publish'; break; case self::STATUS_CANCELED: $post_status = 'trash'; break; default: if ( ! array_key_exists( $action_status, $this->get_status_labels() ) ) { throw new InvalidArgumentException( sprintf( 'Invalid action status: "%s".', $action_status ) ); } $post_status = $action_status; break; } return $post_status; } /** * Returns the SQL statement to query (or count) actions. * * @param array $query - Filtering options. * @param string $select_or_count - Whether the SQL should select and return the IDs or just the row count. * * @throws InvalidArgumentException - Throw InvalidArgumentException if $select_or_count not count or select. * @return string SQL statement. The returned SQL is already properly escaped. */ protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) { if ( ! in_array( $select_or_count, array( 'select', 'count' ), true ) ) { throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'action-scheduler' ) ); } $query = wp_parse_args( $query, array( 'hook' => '', 'args' => null, 'date' => null, 'date_compare' => '<=', 'modified' => null, 'modified_compare' => '<=', 'group' => '', 'status' => '', 'claimed' => null, 'per_page' => 5, 'offset' => 0, 'orderby' => 'date', 'order' => 'ASC', 'search' => '', ) ); /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; $sql = ( 'count' === $select_or_count ) ? 'SELECT count(p.ID)' : 'SELECT p.ID '; $sql .= "FROM {$wpdb->posts} p"; $sql_params = array(); if ( empty( $query['group'] ) && 'group' === $query['orderby'] ) { $sql .= " LEFT JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; $sql .= " LEFT JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; $sql .= " LEFT JOIN {$wpdb->terms} t ON tt.term_id=t.term_id"; } elseif ( ! empty( $query['group'] ) ) { $sql .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID"; $sql .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id"; $sql .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id"; $sql .= ' AND t.slug=%s'; $sql_params[] = $query['group']; } $sql .= ' WHERE post_type=%s'; $sql_params[] = self::POST_TYPE; if ( $query['hook'] ) { $sql .= ' AND p.post_title=%s'; $sql_params[] = $query['hook']; } if ( ! is_null( $query['args'] ) ) { $sql .= ' AND p.post_content=%s'; $sql_params[] = wp_json_encode( $query['args'] ); } if ( $query['status'] ) { $post_statuses = array_map( array( $this, 'get_post_status_by_action_status' ), (array) $query['status'] ); $placeholders = array_fill( 0, count( $post_statuses ), '%s' ); $sql .= ' AND p.post_status IN (' . join( ', ', $placeholders ) . ')'; $sql_params = array_merge( $sql_params, array_values( $post_statuses ) ); } if ( $query['date'] instanceof DateTime ) { $date = clone $query['date']; $date->setTimezone( new DateTimeZone( 'UTC' ) ); $date_string = $date->format( 'Y-m-d H:i:s' ); $comparator = $this->validate_sql_comparator( $query['date_compare'] ); $sql .= " AND p.post_date_gmt $comparator %s"; $sql_params[] = $date_string; } if ( $query['modified'] instanceof DateTime ) { $modified = clone $query['modified']; $modified->setTimezone( new DateTimeZone( 'UTC' ) ); $date_string = $modified->format( 'Y-m-d H:i:s' ); $comparator = $this->validate_sql_comparator( $query['modified_compare'] ); $sql .= " AND p.post_modified_gmt $comparator %s"; $sql_params[] = $date_string; } if ( true === $query['claimed'] ) { $sql .= " AND p.post_password != ''"; } elseif ( false === $query['claimed'] ) { $sql .= " AND p.post_password = ''"; } elseif ( ! is_null( $query['claimed'] ) ) { $sql .= ' AND p.post_password = %s'; $sql_params[] = $query['claimed']; } if ( ! empty( $query['search'] ) ) { $sql .= ' AND (p.post_title LIKE %s OR p.post_content LIKE %s OR p.post_password LIKE %s)'; for ( $i = 0; $i < 3; $i++ ) { $sql_params[] = sprintf( '%%%s%%', $query['search'] ); } } if ( 'select' === $select_or_count ) { switch ( $query['orderby'] ) { case 'hook': $orderby = 'p.post_title'; break; case 'group': $orderby = 't.name'; break; case 'status': $orderby = 'p.post_status'; break; case 'modified': $orderby = 'p.post_modified'; break; case 'claim_id': $orderby = 'p.post_password'; break; case 'schedule': case 'date': default: $orderby = 'p.post_date_gmt'; break; } if ( 'ASC' === strtoupper( $query['order'] ) ) { $order = 'ASC'; } else { $order = 'DESC'; } $sql .= " ORDER BY $orderby $order"; if ( $query['per_page'] > 0 ) { $sql .= ' LIMIT %d, %d'; $sql_params[] = $query['offset']; $sql_params[] = $query['per_page']; } } return $wpdb->prepare( $sql, $sql_params ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared } /** * Query for action count or list of action IDs. * * @since 3.3.0 $query['status'] accepts array of statuses instead of a single status. * * @see ActionScheduler_Store::query_actions for $query arg usage. * * @param array $query Query filtering options. * @param string $query_type Whether to select or count the results. Defaults to select. * * @return string|array|null The IDs of actions matching the query. Null on failure. */ public function query_actions( $query = array(), $query_type = 'select' ) { /** * Global $wpdb object. * * @var wpdb $wpdb */ global $wpdb; $sql = $this->get_query_actions_sql( $query, $query_type ); return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.NotPrepared } /** * Get a count of all actions in the store, grouped by status * * @return array */ public function action_counts() { $action_counts_by_status = array(); $action_stati_and_labels = $this->get_status_labels(); $posts_count_by_status = (array) wp_count_posts( self::POST_TYPE, 'readable' ); foreach ( $posts_count_by_status as $post_status_name => $count ) { try { $action_status_name = $this->get_action_status_by_post_status( $post_status_name ); } catch ( Exception $e ) { // Ignore any post statuses that aren't for actions. continue; } if ( array_key_exists( $action_status_name, $action_stati_and_labels ) ) { $action_counts_by_status[ $action_status_name ] = $count; } } return $action_counts_by_status; } /** * Cancel action. * * @param int $action_id Action ID. * * @throws InvalidArgumentException If $action_id is not identified. */ public function cancel_action( $action_id ) { $post = get_post( $action_id ); if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) { /* translators: %s is the action ID */ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to cancel this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } do_action( 'action_scheduler_canceled_action', $action_id ); add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); wp_trash_post( $action_id ); remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); } /** * Delete action. * * @param int $action_id Action ID. * @return void * @throws InvalidArgumentException If action is not identified. */ public function delete_action( $action_id ) { $post = get_post( $action_id ); if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) { /* translators: %s is the action ID */ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to delete this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } do_action( 'action_scheduler_deleted_action', $action_id ); wp_delete_post( $action_id, true ); } /** * Get date for claim id. * * @param int $action_id Action ID. * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran. */ public function get_date( $action_id ) { $next = $this->get_date_gmt( $action_id ); return ActionScheduler_TimezoneHelper::set_local_timezone( $next ); } /** * Get Date GMT. * * @param int $action_id Action ID. * * @throws InvalidArgumentException If $action_id is not identified. * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran. */ public function get_date_gmt( $action_id ) { $post = get_post( $action_id ); if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) { /* translators: %s is the action ID */ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to determine the date of this action. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } if ( 'publish' === $post->post_status ) { return as_get_datetime_object( $post->post_modified_gmt ); } else { return as_get_datetime_object( $post->post_date_gmt ); } } /** * Stake claim. * * @param int $max_actions Maximum number of actions. * @param DateTime|null $before_date Jobs must be schedule before this date. Defaults to now. * @param array $hooks Claim only actions with a hook or hooks. * @param string $group Claim only actions in the given group. * * @return ActionScheduler_ActionClaim * @throws RuntimeException When there is an error staking a claim. * @throws InvalidArgumentException When the given group is not valid. */ public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ) { $this->claim_before_date = $before_date; $claim_id = $this->generate_claim_id(); $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group ); $action_ids = $this->find_actions_by_claim_id( $claim_id ); $this->claim_before_date = null; return new ActionScheduler_ActionClaim( $claim_id, $action_ids ); } /** * Get claim count. * * @return int */ public function get_claim_count() { global $wpdb; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')", array( self::POST_TYPE ) ) ); } /** * Generate claim id. * * @return string */ protected function generate_claim_id() { $claim_id = md5( microtime( true ) . wp_rand( 0, 1000 ) ); return substr( $claim_id, 0, 20 ); // to fit in db field with 20 char limit. } /** * Claim actions. * * @param string $claim_id Claim ID. * @param int $limit Limit. * @param DateTime|null $before_date Should use UTC timezone. * @param array $hooks Claim only actions with a hook or hooks. * @param string $group Claim only actions in the given group. * * @return int The number of actions that were claimed. * @throws RuntimeException When there is a database error. */ protected function claim_actions( $claim_id, $limit, ?DateTime $before_date = null, $hooks = array(), $group = '' ) { // Set up initial variables. $date = null === $before_date ? as_get_datetime_object() : clone $before_date; $limit_ids = ! empty( $group ); $ids = $limit_ids ? $this->get_actions_by_group( $group, $limit, $date ) : array(); // If limiting by IDs and no posts found, then return early since we have nothing to update. if ( $limit_ids && 0 === count( $ids ) ) { return 0; } /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; /* * Build up custom query to update the affected posts. Parameters are built as a separate array * to make it easier to identify where they are in the query. * * We can't use $wpdb->update() here because of the "ID IN ..." clause. */ $update = "UPDATE {$wpdb->posts} SET post_password = %s, post_modified_gmt = %s, post_modified = %s"; $params = array( $claim_id, current_time( 'mysql', true ), current_time( 'mysql' ), ); // Build initial WHERE clause. $where = "WHERE post_type = %s AND post_status = %s AND post_password = ''"; $params[] = self::POST_TYPE; $params[] = ActionScheduler_Store::STATUS_PENDING; if ( ! empty( $hooks ) ) { $placeholders = array_fill( 0, count( $hooks ), '%s' ); $where .= ' AND post_title IN (' . join( ', ', $placeholders ) . ')'; $params = array_merge( $params, array_values( $hooks ) ); } /* * Add the IDs to the WHERE clause. IDs not escaped because they came directly from a prior DB query. * * If we're not limiting by IDs, then include the post_date_gmt clause. */ if ( $limit_ids ) { $where .= ' AND ID IN (' . join( ',', $ids ) . ')'; } else { $where .= ' AND post_date_gmt <= %s'; $params[] = $date->format( 'Y-m-d H:i:s' ); } // Add the ORDER BY clause and,ms limit. $order = 'ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT %d'; $params[] = $limit; // Run the query and gather results. $rows_affected = $wpdb->query( $wpdb->prepare( "{$update} {$where} {$order}", $params ) ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare if ( false === $rows_affected ) { throw new RuntimeException( __( 'Unable to claim actions. Database error.', 'action-scheduler' ) ); } return (int) $rows_affected; } /** * Get IDs of actions within a certain group and up to a certain date/time. * * @param string $group The group to use in finding actions. * @param int $limit The number of actions to retrieve. * @param DateTime $date DateTime object representing cutoff time for actions. Actions retrieved will be * up to and including this DateTime. * * @return array IDs of actions in the appropriate group and before the appropriate time. * @throws InvalidArgumentException When the group does not exist. */ protected function get_actions_by_group( $group, $limit, DateTime $date ) { // Ensure the group exists before continuing. if ( ! term_exists( $group, self::GROUP_TAXONOMY ) ) { /* translators: %s is the group name */ throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'action-scheduler' ), $group ) ); } // Set up a query for post IDs to use later. $query = new WP_Query(); $query_args = array( 'fields' => 'ids', 'post_type' => self::POST_TYPE, 'post_status' => ActionScheduler_Store::STATUS_PENDING, 'has_password' => false, 'posts_per_page' => $limit * 3, 'suppress_filters' => true, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFilters_suppress_filters 'no_found_rows' => true, 'orderby' => array( 'menu_order' => 'ASC', 'date' => 'ASC', 'ID' => 'ASC', ), 'date_query' => array( 'column' => 'post_date_gmt', 'before' => $date->format( 'Y-m-d H:i' ), 'inclusive' => true, ), 'tax_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery array( 'taxonomy' => self::GROUP_TAXONOMY, 'field' => 'slug', 'terms' => $group, 'include_children' => false, ), ), ); return $query->query( $query_args ); } /** * Find actions by claim ID. * * @param string $claim_id Claim ID. * @return array */ public function find_actions_by_claim_id( $claim_id ) { /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; $action_ids = array(); $before_date = isset( $this->claim_before_date ) ? $this->claim_before_date : as_get_datetime_object(); $cut_off = $before_date->format( 'Y-m-d H:i:s' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $results = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_date_gmt FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s", array( self::POST_TYPE, $claim_id, ) ) ); // Verify that the scheduled date for each action is within the expected bounds (in some unusual // cases, we cannot depend on MySQL to honor all of the WHERE conditions we specify). foreach ( $results as $claimed_action ) { if ( $claimed_action->post_date_gmt <= $cut_off ) { $action_ids[] = absint( $claimed_action->ID ); } } return $action_ids; } /** * Release pending actions from a claim. * * @param ActionScheduler_ActionClaim $claim Claim object to release. * @return void * @throws RuntimeException When the claim is not unlocked. */ public function release_claim( ActionScheduler_ActionClaim $claim ) { /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; $claim_id = $claim->get_id(); if ( trim( $claim_id ) === '' ) { // Verify that the claim_id is valid before attempting to release it. return; } // Only attempt to release pending actions to be claimed again. Running and complete actions are no longer relevant outside of admin/analytics. // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $action_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID, post_date_gmt FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s AND post_status = %s", self::POST_TYPE, $claim_id, self::STATUS_PENDING ) ); if ( empty( $action_ids ) ) { return; // nothing to do. } $action_id_string = implode( ',', array_map( 'intval', $action_ids ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $result = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID IN ($action_id_string) AND post_password = %s", //phpcs:ignore array( $claim->get_id(), ) ) ); if ( false === $result ) { /* translators: %s: claim ID */ throw new RuntimeException( sprintf( __( 'Unable to unlock claim %s. Database error.', 'action-scheduler' ), $claim->get_id() ) ); } } /** * Unclaim action. * * @param string $action_id Action ID. * @throws RuntimeException When unable to unlock claim on action ID. */ public function unclaim_action( $action_id ) { /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $result = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s", $action_id, self::POST_TYPE ) ); if ( false === $result ) { /* translators: %s: action ID */ throw new RuntimeException( sprintf( __( 'Unable to unlock claim on action %s. Database error.', 'action-scheduler' ), $action_id ) ); } } /** * Mark failure on action. * * @param int $action_id Action ID. * * @return void * @throws RuntimeException When unable to mark failure on action ID. */ public function mark_failure( $action_id ) { /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $result = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_status = %s WHERE ID = %d AND post_type = %s", self::STATUS_FAILED, $action_id, self::POST_TYPE ) ); if ( false === $result ) { /* translators: %s: action ID */ throw new RuntimeException( sprintf( __( 'Unable to mark failure on action %s. Database error.', 'action-scheduler' ), $action_id ) ); } } /** * Return an action's claim ID, as stored in the post password column * * @param int $action_id Action ID. * @return mixed */ public function get_claim_id( $action_id ) { return $this->get_post_column( $action_id, 'post_password' ); } /** * Return an action's status, as stored in the post status column * * @param int $action_id Action ID. * * @return mixed * @throws InvalidArgumentException When the action ID is invalid. */ public function get_status( $action_id ) { $status = $this->get_post_column( $action_id, 'post_status' ); if ( null === $status ) { throw new InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) ); } return $this->get_action_status_by_post_status( $status ); } /** * Get post column * * @param string $action_id Action ID. * @param string $column_name Column Name. * * @return string|null */ private function get_post_column( $action_id, $column_name ) { /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_var( $wpdb->prepare( "SELECT {$column_name} FROM {$wpdb->posts} WHERE ID=%d AND post_type=%s", // phpcs:ignore $action_id, self::POST_TYPE ) ); } /** * Log Execution. * * @throws Exception If the action status cannot be updated to self::STATUS_RUNNING ('in-progress'). * * @param string $action_id Action ID. */ public function log_execution( $action_id ) { /** * Global wpdb object. * * @var wpdb $wpdb */ global $wpdb; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $status_updated = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s", self::STATUS_RUNNING, current_time( 'mysql', true ), current_time( 'mysql' ), $action_id, self::POST_TYPE ) ); if ( ! $status_updated ) { throw new Exception( sprintf( /* translators: 1: action ID. 2: status slug. */ __( 'Unable to update the status of action %1$d to %2$s.', 'action-scheduler' ), $action_id, self::STATUS_RUNNING ) ); } } /** * Record that an action was completed. * * @param string $action_id ID of the completed action. * * @throws InvalidArgumentException When the action ID is invalid. * @throws RuntimeException When there was an error executing the action. */ public function mark_complete( $action_id ) { $post = get_post( $action_id ); if ( empty( $post ) || ( self::POST_TYPE !== $post->post_type ) ) { /* translators: %s is the action ID */ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s: we were unable to mark this action as having completed. It may may have been deleted by another process.', 'action-scheduler' ), $action_id ) ); } add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 ); add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 ); $result = wp_update_post( array( 'ID' => $action_id, 'post_status' => 'publish', ), true ); remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 ); remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 ); if ( is_wp_error( $result ) ) { throw new RuntimeException( $result->get_error_message() ); } /** * Fires after a scheduled action has been completed. * * @since 3.4.2 * * @param int $action_id Action ID. */ do_action( 'action_scheduler_completed_action', $action_id ); } /** * Mark action as migrated when there is an error deleting the action. * * @param int $action_id Action ID. */ public function mark_migrated( $action_id ) { wp_update_post( array( 'ID' => $action_id, 'post_status' => 'migrated', ) ); } /** * Determine whether the post store can be migrated. * * @param [type] $setting - Setting value. * @return bool */ public function migration_dependencies_met( $setting ) { global $wpdb; $dependencies_met = get_transient( self::DEPENDENCIES_MET ); if ( empty( $dependencies_met ) ) { $maximum_args_length = apply_filters( 'action_scheduler_maximum_args_length', 191 ); $found_action = $wpdb->get_var( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND CHAR_LENGTH(post_content) > %d LIMIT 1", $maximum_args_length, self::POST_TYPE ) ); $dependencies_met = $found_action ? 'no' : 'yes'; set_transient( self::DEPENDENCIES_MET, $dependencies_met, DAY_IN_SECONDS ); } return 'yes' === $dependencies_met ? $setting : false; } /** * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4. * * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However, * as we prepare to move to custom tables, and can use an indexed VARCHAR column instead, we want to warn * developers of this impending requirement. * * @param ActionScheduler_Action $action Action object. */ protected function validate_action( ActionScheduler_Action $action ) { try { parent::validate_action( $action ); } catch ( Exception $e ) { /* translators: %s is the error message */ $message = sprintf( __( '%s Support for strings longer than this will be removed in a future version.', 'action-scheduler' ), $e->getMessage() ); _doing_it_wrong( 'ActionScheduler_Action::$args', esc_html( $message ), '2.1.0' ); } } /** * (@codeCoverageIgnore) */ public function init() { add_filter( 'action_scheduler_migration_dependencies_met', array( $this, 'migration_dependencies_met' ) ); $post_type_registrar = new ActionScheduler_wpPostStore_PostTypeRegistrar(); $post_type_registrar->register(); $post_status_registrar = new ActionScheduler_wpPostStore_PostStatusRegistrar(); $post_status_registrar->register(); $taxonomy_registrar = new ActionScheduler_wpPostStore_TaxonomyRegistrar(); $taxonomy_registrar->register(); } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php 0000644 00000026215 15174671617 0023046 0 ustar 00 <?php use Action_Scheduler\WP_CLI\Migration_Command; use Action_Scheduler\Migration\Controller; /** * Class ActionScheduler * * @codeCoverageIgnore */ abstract class ActionScheduler { /** * Plugin file path. * * @var string */ private static $plugin_file = ''; /** * ActionScheduler_ActionFactory instance. * * @var ActionScheduler_ActionFactory */ private static $factory = null; /** * Data store is initialized. * * @var bool */ private static $data_store_initialized = false; /** * Factory. */ public static function factory() { if ( ! isset( self::$factory ) ) { self::$factory = new ActionScheduler_ActionFactory(); } return self::$factory; } /** * Get Store instance. */ public static function store() { return ActionScheduler_Store::instance(); } /** * Get Lock instance. */ public static function lock() { return ActionScheduler_Lock::instance(); } /** * Get Logger instance. */ public static function logger() { return ActionScheduler_Logger::instance(); } /** * Get QueueRunner instance. */ public static function runner() { return ActionScheduler_QueueRunner::instance(); } /** * Get AdminView instance. */ public static function admin_view() { return ActionScheduler_AdminView::instance(); } /** * Get the absolute system path to the plugin directory, or a file therein * * @static * @param string $path Path relative to plugin directory. * @return string */ public static function plugin_path( $path ) { $base = dirname( self::$plugin_file ); if ( $path ) { return trailingslashit( $base ) . $path; } else { return untrailingslashit( $base ); } } /** * Get the absolute URL to the plugin directory, or a file therein * * @static * @param string $path Path relative to plugin directory. * @return string */ public static function plugin_url( $path ) { return plugins_url( $path, self::$plugin_file ); } /** * Autoload. * * @param string $class Class name. */ public static function autoload( $class ) { $d = DIRECTORY_SEPARATOR; $classes_dir = self::plugin_path( 'classes' . $d ); $separator = strrpos( $class, '\\' ); if ( false !== $separator ) { if ( 0 !== strpos( $class, 'Action_Scheduler' ) ) { return; } $class = substr( $class, $separator + 1 ); } if ( 'Deprecated' === substr( $class, -10 ) ) { $dir = self::plugin_path( 'deprecated' . $d ); } elseif ( self::is_class_abstract( $class ) ) { $dir = $classes_dir . 'abstracts' . $d; } elseif ( self::is_class_migration( $class ) ) { $dir = $classes_dir . 'migration' . $d; } elseif ( 'Schedule' === substr( $class, -8 ) ) { $dir = $classes_dir . 'schedules' . $d; } elseif ( 'Action' === substr( $class, -6 ) ) { $dir = $classes_dir . 'actions' . $d; } elseif ( 'Schema' === substr( $class, -6 ) ) { $dir = $classes_dir . 'schema' . $d; } elseif ( strpos( $class, 'ActionScheduler' ) === 0 ) { $segments = explode( '_', $class ); $type = isset( $segments[1] ) ? $segments[1] : ''; switch ( $type ) { case 'WPCLI': $dir = $classes_dir . 'WP_CLI' . $d; break; case 'DBLogger': case 'DBStore': case 'HybridStore': case 'wpPostStore': case 'wpCommentLogger': $dir = $classes_dir . 'data-stores' . $d; break; default: $dir = $classes_dir; break; } } elseif ( self::is_class_cli( $class ) ) { $dir = $classes_dir . 'WP_CLI' . $d; } elseif ( strpos( $class, 'CronExpression' ) === 0 ) { $dir = self::plugin_path( 'lib' . $d . 'cron-expression' . $d ); } elseif ( strpos( $class, 'WP_Async_Request' ) === 0 ) { $dir = self::plugin_path( 'lib' . $d ); } else { return; } if ( file_exists( $dir . "{$class}.php" ) ) { include $dir . "{$class}.php"; return; } } /** * Initialize the plugin * * @static * @param string $plugin_file Plugin file path. */ public static function init( $plugin_file ) { self::$plugin_file = $plugin_file; spl_autoload_register( array( __CLASS__, 'autoload' ) ); /** * Fires in the early stages of Action Scheduler init hook. */ do_action( 'action_scheduler_pre_init' ); require_once self::plugin_path( 'functions.php' ); ActionScheduler_DataController::init(); $store = self::store(); $logger = self::logger(); $runner = self::runner(); $admin_view = self::admin_view(); $recurring_action_scheduler = new ActionScheduler_RecurringActionScheduler(); // Ensure initialization on plugin activation. if ( ! did_action( 'init' ) ) { // phpcs:ignore Squiz.PHP.CommentedOutCode add_action( 'init', array( $admin_view, 'init' ), 0, 0 ); // run before $store::init(). add_action( 'init', array( $store, 'init' ), 1, 0 ); add_action( 'init', array( $logger, 'init' ), 1, 0 ); add_action( 'init', array( $runner, 'init' ), 1, 0 ); add_action( 'init', array( $recurring_action_scheduler, 'init' ), 1, 0 ); add_action( 'init', /** * Runs after the active store's init() method has been called. * * It would probably be preferable to have $store->init() (or it's parent method) set this itself, * once it has initialized, however that would cause problems in cases where a custom data store is in * use and it has not yet been updated to follow that same logic. */ function () { self::$data_store_initialized = true; /** * Fires when Action Scheduler is ready: it is safe to use the procedural API after this point. * * @since 3.5.5 */ do_action( 'action_scheduler_init' ); }, 1 ); } else { $admin_view->init(); $store->init(); $logger->init(); $runner->init(); $recurring_action_scheduler->init(); self::$data_store_initialized = true; /** * Fires when Action Scheduler is ready: it is safe to use the procedural API after this point. * * @since 3.5.5 */ do_action( 'action_scheduler_init' ); } if ( apply_filters( 'action_scheduler_load_deprecated_functions', true ) ) { require_once self::plugin_path( 'deprecated/functions.php' ); } if ( defined( 'WP_CLI' ) && WP_CLI ) { WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Scheduler_command' ); WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Clean_Command' ); WP_CLI::add_command( 'action-scheduler action', '\Action_Scheduler\WP_CLI\Action_Command' ); WP_CLI::add_command( 'action-scheduler', '\Action_Scheduler\WP_CLI\System_Command' ); if ( ! ActionScheduler_DataController::is_migration_complete() && Controller::instance()->allow_migration() ) { $command = new Migration_Command(); $command->register(); } } /** * Handle WP comment cleanup after migration. */ if ( is_a( $logger, 'ActionScheduler_DBLogger' ) && ActionScheduler_DataController::is_migration_complete() && ActionScheduler_WPCommentCleaner::has_logs() ) { ActionScheduler_WPCommentCleaner::init(); } add_action( 'action_scheduler/migration_complete', 'ActionScheduler_WPCommentCleaner::maybe_schedule_cleanup' ); } /** * Check whether the AS data store has been initialized. * * @param string $function_name The name of the function being called. Optional. Default `null`. * @return bool */ public static function is_initialized( $function_name = null ) { if ( ! self::$data_store_initialized && ! empty( $function_name ) ) { $message = sprintf( /* translators: %s function name. */ __( '%s() was called before the Action Scheduler data store was initialized', 'action-scheduler' ), esc_attr( $function_name ) ); _doing_it_wrong( esc_html( $function_name ), esc_html( $message ), '3.1.6' ); } return self::$data_store_initialized; } /** * Determine if the class is one of our abstract classes. * * @since 3.0.0 * * @param string $class The class name. * * @return bool */ protected static function is_class_abstract( $class ) { static $abstracts = array( 'ActionScheduler' => true, 'ActionScheduler_Abstract_ListTable' => true, 'ActionScheduler_Abstract_QueueRunner' => true, 'ActionScheduler_Abstract_Schedule' => true, 'ActionScheduler_Abstract_RecurringSchedule' => true, 'ActionScheduler_Lock' => true, 'ActionScheduler_Logger' => true, 'ActionScheduler_Abstract_Schema' => true, 'ActionScheduler_Store' => true, 'ActionScheduler_TimezoneHelper' => true, 'ActionScheduler_WPCLI_Command' => true, ); return isset( $abstracts[ $class ] ) && $abstracts[ $class ]; } /** * Determine if the class is one of our migration classes. * * @since 3.0.0 * * @param string $class The class name. * * @return bool */ protected static function is_class_migration( $class ) { static $migration_segments = array( 'ActionMigrator' => true, 'BatchFetcher' => true, 'DBStoreMigrator' => true, 'DryRun' => true, 'LogMigrator' => true, 'Config' => true, 'Controller' => true, 'Runner' => true, 'Scheduler' => true, ); $segments = explode( '_', $class ); $segment = isset( $segments[1] ) ? $segments[1] : $class; return isset( $migration_segments[ $segment ] ) && $migration_segments[ $segment ]; } /** * Determine if the class is one of our WP CLI classes. * * @since 3.0.0 * * @param string $class The class name. * * @return bool */ protected static function is_class_cli( $class ) { static $cli_segments = array( 'QueueRunner' => true, 'Command' => true, 'ProgressBar' => true, '\Action_Scheduler\WP_CLI\Action_Command' => true, '\Action_Scheduler\WP_CLI\System_Command' => true, ); $segments = explode( '_', $class ); $segment = isset( $segments[1] ) ? $segments[1] : $class; return isset( $cli_segments[ $segment ] ) && $cli_segments[ $segment ]; } /** * Clone. */ final public function __clone() { trigger_error( 'Singleton. No cloning allowed!', E_USER_ERROR ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error } /** * Wakeup. */ final public function __wakeup() { trigger_error( 'Singleton. No serialization allowed!', E_USER_ERROR ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error } /** * Construct. */ final private function __construct() {} /** Deprecated **/ /** * Get DateTime object. * * @param null|string $when Date/time string. * @param string $timezone Timezone string. */ public static function get_datetime_object( $when = null, $timezone = 'UTC' ) { _deprecated_function( __METHOD__, '2.0', 'wcs_add_months()' ); return as_get_datetime_object( $when, $timezone ); } /** * Issue deprecated warning if an Action Scheduler function is called in the shutdown hook. * * @param string $function_name The name of the function being called. * @deprecated 3.1.6. */ public static function check_shutdown_hook( $function_name ) { _deprecated_function( __FUNCTION__, '3.1.6' ); } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php 0000644 00000011415 15174671617 0026054 0 ustar 00 <?php /** * Class ActionScheduler_TimezoneHelper */ abstract class ActionScheduler_TimezoneHelper { /** * DateTimeZone object. * * @var null|DateTimeZone */ private static $local_timezone = null; /** * Set a DateTime's timezone to the WordPress site's timezone, or a UTC offset * if no timezone string is available. * * @since 2.1.0 * * @param DateTime $date Timestamp. * @return ActionScheduler_DateTime */ public static function set_local_timezone( DateTime $date ) { // Accept a DateTime for easier backward compatibility, even though we require methods on ActionScheduler_DateTime. if ( ! is_a( $date, 'ActionScheduler_DateTime' ) ) { $date = as_get_datetime_object( $date->format( 'U' ) ); } if ( get_option( 'timezone_string' ) ) { $date->setTimezone( new DateTimeZone( self::get_local_timezone_string() ) ); } else { $date->setUtcOffset( self::get_local_timezone_offset() ); } return $date; } /** * Helper to retrieve the timezone string for a site until a WP core method exists * (see https://core.trac.wordpress.org/ticket/24730). * * Adapted from wc_timezone_string() and https://secure.php.net/manual/en/function.timezone-name-from-abbr.php#89155. * * If no timezone string is set, and its not possible to match the UTC offset set for the site to a timezone * string, then an empty string will be returned, and the UTC offset should be used to set a DateTime's * timezone. * * @since 2.1.0 * @param bool $reset Unused. * @return string PHP timezone string for the site or empty if no timezone string is available. */ protected static function get_local_timezone_string( $reset = false ) { // If site timezone string exists, return it. $timezone = get_option( 'timezone_string' ); if ( $timezone ) { return $timezone; } // Get UTC offset, if it isn't set then return UTC. $utc_offset = intval( get_option( 'gmt_offset', 0 ) ); if ( 0 === $utc_offset ) { return 'UTC'; } // Adjust UTC offset from hours to seconds. $utc_offset *= 3600; // Attempt to guess the timezone string from the UTC offset. $timezone = timezone_name_from_abbr( '', $utc_offset ); if ( $timezone ) { return $timezone; } // Last try, guess timezone string manually. foreach ( timezone_abbreviations_list() as $abbr ) { foreach ( $abbr as $city ) { if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) { // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- we are actually interested in the runtime timezone. return $city['timezone_id']; } } } // No timezone string. return ''; } /** * Get timezone offset in seconds. * * @since 2.1.0 * @return float */ protected static function get_local_timezone_offset() { $timezone = get_option( 'timezone_string' ); if ( $timezone ) { $timezone_object = new DateTimeZone( $timezone ); return $timezone_object->getOffset( new DateTime( 'now' ) ); } else { return floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS; } } /** * Get local timezone. * * @param bool $reset Toggle to discard stored value. * @deprecated 2.1.0 */ public static function get_local_timezone( $reset = false ) { _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); if ( $reset ) { self::$local_timezone = null; } if ( ! isset( self::$local_timezone ) ) { $tzstring = get_option( 'timezone_string' ); if ( empty( $tzstring ) ) { $gmt_offset = absint( get_option( 'gmt_offset' ) ); if ( 0 === $gmt_offset ) { $tzstring = 'UTC'; } else { $gmt_offset *= HOUR_IN_SECONDS; $tzstring = timezone_name_from_abbr( '', $gmt_offset, 1 ); // If there's no timezone string, try again with no DST. if ( false === $tzstring ) { $tzstring = timezone_name_from_abbr( '', $gmt_offset, 0 ); } // Try mapping to the first abbreviation we can find. if ( false === $tzstring ) { $is_dst = date( 'I' ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date -- we are actually interested in the runtime timezone. foreach ( timezone_abbreviations_list() as $abbr ) { foreach ( $abbr as $city ) { if ( $city['dst'] === $is_dst && $city['offset'] === $gmt_offset ) { // If there's no valid timezone ID, keep looking. if ( is_null( $city['timezone_id'] ) ) { continue; } $tzstring = $city['timezone_id']; break 2; } } } } // If we still have no valid string, then fall back to UTC. if ( false === $tzstring ) { $tzstring = 'UTC'; } } } self::$local_timezone = new DateTimeZone( $tzstring ); } return self::$local_timezone; } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php 0000644 00000034071 15174671617 0024221 0 ustar 00 <?php /** * Class ActionScheduler_Store * * @codeCoverageIgnore */ abstract class ActionScheduler_Store extends ActionScheduler_Store_Deprecated { const STATUS_COMPLETE = 'complete'; const STATUS_PENDING = 'pending'; const STATUS_RUNNING = 'in-progress'; const STATUS_FAILED = 'failed'; const STATUS_CANCELED = 'canceled'; const DEFAULT_CLASS = 'ActionScheduler_wpPostStore'; /** * ActionScheduler_Store instance. * * @var ActionScheduler_Store */ private static $store = null; /** * Maximum length of args. * * @var int */ protected static $max_args_length = 191; /** * Save action. * * @param ActionScheduler_Action $action Action to save. * @param null|DateTime $scheduled_date Optional Date of the first instance * to store. Otherwise uses the first date of the action's * schedule. * * @return int The action ID */ abstract public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ); /** * Get action. * * @param string $action_id Action ID. * * @return ActionScheduler_Action */ abstract public function fetch_action( $action_id ); /** * Find an action. * * Note: the query ordering changes based on the passed 'status' value. * * @param string $hook Action hook. * @param array $params Parameters of the action to find. * * @return string|null ID of the next action matching the criteria or NULL if not found. */ public function find_action( $hook, $params = array() ) { $params = wp_parse_args( $params, array( 'args' => null, 'status' => self::STATUS_PENDING, 'group' => '', ) ); // These params are fixed for this method. $params['hook'] = $hook; $params['orderby'] = 'date'; $params['per_page'] = 1; if ( ! empty( $params['status'] ) ) { if ( self::STATUS_PENDING === $params['status'] ) { $params['order'] = 'ASC'; // Find the next action that matches. } else { $params['order'] = 'DESC'; // Find the most recent action that matches. } } $results = $this->query_actions( $params ); return empty( $results ) ? null : $results[0]; } /** * Query for action count or list of action IDs. * * @since 3.3.0 $query['status'] accepts array of statuses instead of a single status. * * @param array $query { * Query filtering options. * * @type string $hook The name of the actions. Optional. * @type string|array $status The status or statuses of the actions. Optional. * @type array $args The args array of the actions. Optional. * @type DateTime $date The scheduled date of the action. Used in UTC timezone. Optional. * @type string $date_compare Operator for selecting by $date param. Accepted values are '!=', '>', '>=', '<', '<=', '='. Defaults to '<='. * @type DateTime $modified The last modified date of the action. Used in UTC timezone. Optional. * @type string $modified_compare Operator for comparing $modified param. Accepted values are '!=', '>', '>=', '<', '<=', '='. Defaults to '<='. * @type string $group The group the action belongs to. Optional. * @type bool|int $claimed TRUE to find claimed actions, FALSE to find unclaimed actions, an int to find a specific claim ID. Optional. * @type int $per_page Number of results to return. Defaults to 5. * @type int $offset The query pagination offset. Defaults to 0. * @type int $orderby Accepted values are 'hook', 'group', 'modified', 'date' or 'none'. Defaults to 'date'. * @type string $order Accepted values are 'ASC' or 'DESC'. Defaults to 'ASC'. * } * @param string $query_type Whether to select or count the results. Default, select. * * @return string|array|null The IDs of actions matching the query. Null on failure. */ abstract public function query_actions( $query = array(), $query_type = 'select' ); /** * Run query to get a single action ID. * * @since 3.3.0 * * @see ActionScheduler_Store::query_actions for $query arg usage but 'per_page' and 'offset' can't be used. * * @param array $query Query parameters. * * @return int|null */ public function query_action( $query ) { $query['per_page'] = 1; $query['offset'] = 0; $results = $this->query_actions( $query ); if ( empty( $results ) ) { return null; } else { return (int) $results[0]; } } /** * Get a count of all actions in the store, grouped by status * * @return array */ abstract public function action_counts(); /** * Get additional action counts. * * - add past-due actions * * @return array */ public function extra_action_counts() { $extra_actions = array(); $pastdue_action_counts = (int) $this->query_actions( array( 'status' => self::STATUS_PENDING, 'date' => as_get_datetime_object(), ), 'count' ); if ( $pastdue_action_counts ) { $extra_actions['past-due'] = $pastdue_action_counts; } /** * Allows 3rd party code to add extra action counts (used in filters in the list table). * * @since 3.5.0 * @param $extra_actions array Array with format action_count_identifier => action count. */ return apply_filters( 'action_scheduler_extra_action_counts', $extra_actions ); } /** * Cancel action. * * @param string $action_id Action ID. */ abstract public function cancel_action( $action_id ); /** * Delete action. * * @param string $action_id Action ID. */ abstract public function delete_action( $action_id ); /** * Get action's schedule or run timestamp. * * @param string $action_id Action ID. * * @return DateTime The date the action is schedule to run, or the date that it ran. */ abstract public function get_date( $action_id ); /** * Make a claim. * * @param int $max_actions Maximum number of actions to claim. * @param DateTime|null $before_date Claim only actions schedule before the given date. Defaults to now. * @param array $hooks Claim only actions with a hook or hooks. * @param string $group Claim only actions in the given group. * * @return ActionScheduler_ActionClaim */ abstract public function stake_claim( $max_actions = 10, ?DateTime $before_date = null, $hooks = array(), $group = '' ); /** * Get claim count. * * @return int */ abstract public function get_claim_count(); /** * Release the claim. * * @param ActionScheduler_ActionClaim $claim Claim object. */ abstract public function release_claim( ActionScheduler_ActionClaim $claim ); /** * Un-claim the action. * * @param string $action_id Action ID. */ abstract public function unclaim_action( $action_id ); /** * Mark action as failed. * * @param string $action_id Action ID. */ abstract public function mark_failure( $action_id ); /** * Log action's execution. * * @param string $action_id Actoin ID. */ abstract public function log_execution( $action_id ); /** * Mark action as complete. * * @param string $action_id Action ID. */ abstract public function mark_complete( $action_id ); /** * Get action's status. * * @param string $action_id Action ID. * @return string */ abstract public function get_status( $action_id ); /** * Get action's claim ID. * * @param string $action_id Action ID. * @return mixed */ abstract public function get_claim_id( $action_id ); /** * Find actions by claim ID. * * @param string $claim_id Claim ID. * @return array */ abstract public function find_actions_by_claim_id( $claim_id ); /** * Validate SQL operator. * * @param string $comparison_operator Operator. * @return string */ protected function validate_sql_comparator( $comparison_operator ) { if ( in_array( $comparison_operator, array( '!=', '>', '>=', '<', '<=', '=' ), true ) ) { return $comparison_operator; } return '='; } /** * Get the time MySQL formatted date/time string for an action's (next) scheduled date. * * @param ActionScheduler_Action $action Action. * @param null|DateTime $scheduled_date Action's schedule date (optional). * @return string */ protected function get_scheduled_date_string( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { $next = is_null( $scheduled_date ) ? $action->get_schedule()->get_date() : $scheduled_date; if ( ! $next ) { $next = date_create(); } $next->setTimezone( new DateTimeZone( 'UTC' ) ); return $next->format( 'Y-m-d H:i:s' ); } /** * Get the time MySQL formatted date/time string for an action's (next) scheduled date. * * @param ActionScheduler_Action|null $action Action. * @param null|DateTime $scheduled_date Action's scheduled date (optional). * @return string */ protected function get_scheduled_date_string_local( ActionScheduler_Action $action, ?DateTime $scheduled_date = null ) { $next = is_null( $scheduled_date ) ? $action->get_schedule()->get_date() : $scheduled_date; if ( ! $next ) { $next = date_create(); } ActionScheduler_TimezoneHelper::set_local_timezone( $next ); return $next->format( 'Y-m-d H:i:s' ); } /** * Validate that we could decode action arguments. * * @param mixed $args The decoded arguments. * @param int $action_id The action ID. * * @throws ActionScheduler_InvalidActionException When the decoded arguments are invalid. */ protected function validate_args( $args, $action_id ) { // Ensure we have an array of args. if ( ! is_array( $args ) ) { throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id ); } // Validate JSON decoding if possible. if ( function_exists( 'json_last_error' ) && JSON_ERROR_NONE !== json_last_error() ) { throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id, $args ); } } /** * Validate a ActionScheduler_Schedule object. * * @param mixed $schedule The unserialized ActionScheduler_Schedule object. * @param int $action_id The action ID. * * @throws ActionScheduler_InvalidActionException When the schedule is invalid. */ protected function validate_schedule( $schedule, $action_id ) { if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) { throw ActionScheduler_InvalidActionException::from_schedule( $action_id, $schedule ); } } /** * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4. * * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However, * with custom tables, we use an indexed VARCHAR column instead. * * @param ActionScheduler_Action $action Action to be validated. * @throws InvalidArgumentException When json encoded args is too long. */ protected function validate_action( ActionScheduler_Action $action ) { if ( strlen( wp_json_encode( $action->get_args() ) ) > static::$max_args_length ) { // translators: %d is a number (maximum length of action arguments). throw new InvalidArgumentException( sprintf( __( 'ActionScheduler_Action::$args too long. To ensure the args column can be indexed, action args should not be more than %d characters when encoded as JSON.', 'action-scheduler' ), static::$max_args_length ) ); } } /** * Cancel pending actions by hook. * * @since 3.0.0 * * @param string $hook Hook name. * * @return void */ public function cancel_actions_by_hook( $hook ) { $action_ids = true; while ( ! empty( $action_ids ) ) { $action_ids = $this->query_actions( array( 'hook' => $hook, 'status' => self::STATUS_PENDING, 'per_page' => 1000, 'orderby' => 'none', ) ); $this->bulk_cancel_actions( $action_ids ); } } /** * Cancel pending actions by group. * * @since 3.0.0 * * @param string $group Group slug. * * @return void */ public function cancel_actions_by_group( $group ) { $action_ids = true; while ( ! empty( $action_ids ) ) { $action_ids = $this->query_actions( array( 'group' => $group, 'status' => self::STATUS_PENDING, 'per_page' => 1000, 'orderby' => 'none', ) ); $this->bulk_cancel_actions( $action_ids ); } } /** * Cancel a set of action IDs. * * @since 3.0.0 * * @param int[] $action_ids List of action IDs. * * @return void */ private function bulk_cancel_actions( $action_ids ) { foreach ( $action_ids as $action_id ) { $this->cancel_action( $action_id ); } do_action( 'action_scheduler_bulk_cancel_actions', $action_ids ); } /** * Get status labels. * * @return array<string, string> */ public function get_status_labels() { return array( self::STATUS_COMPLETE => __( 'Complete', 'action-scheduler' ), self::STATUS_PENDING => __( 'Pending', 'action-scheduler' ), self::STATUS_RUNNING => __( 'In-progress', 'action-scheduler' ), self::STATUS_FAILED => __( 'Failed', 'action-scheduler' ), self::STATUS_CANCELED => __( 'Canceled', 'action-scheduler' ), ); } /** * Check if there are any pending scheduled actions due to run. * * @return string */ public function has_pending_actions_due() { $pending_actions = $this->query_actions( array( 'per_page' => 1, 'date' => as_get_datetime_object(), 'status' => self::STATUS_PENDING, 'orderby' => 'none', ), 'count' ); return ! empty( $pending_actions ); } /** * Callable initialization function optionally overridden in derived classes. */ public function init() {} /** * Callable function to mark an action as migrated optionally overridden in derived classes. * * @param int $action_id Action ID. */ public function mark_migrated( $action_id ) {} /** * Get instance. * * @return ActionScheduler_Store */ public static function instance() { if ( empty( self::$store ) ) { $class = apply_filters( 'action_scheduler_store_class', self::DEFAULT_CLASS ); self::$store = new $class(); } return self::$store; } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php 0000644 00000032712 15174671617 0027226 0 ustar 00 <?php /** * Abstract class with common Queue Cleaner functionality. */ abstract class ActionScheduler_Abstract_QueueRunner extends ActionScheduler_Abstract_QueueRunner_Deprecated { /** * ActionScheduler_QueueCleaner instance. * * @var ActionScheduler_QueueCleaner */ protected $cleaner; /** * ActionScheduler_FatalErrorMonitor instance. * * @var ActionScheduler_FatalErrorMonitor */ protected $monitor; /** * ActionScheduler_Store instance. * * @var ActionScheduler_Store */ protected $store; /** * The created time. * * Represents when the queue runner was constructed and used when calculating how long a PHP request has been running. * For this reason it should be as close as possible to the PHP request start time. * * @var int */ private $created_time; /** * ActionScheduler_Abstract_QueueRunner constructor. * * @param ActionScheduler_Store|null $store Store object. * @param ActionScheduler_FatalErrorMonitor|null $monitor Monitor object. * @param ActionScheduler_QueueCleaner|null $cleaner Cleaner object. */ public function __construct( ?ActionScheduler_Store $store = null, ?ActionScheduler_FatalErrorMonitor $monitor = null, ?ActionScheduler_QueueCleaner $cleaner = null ) { $this->created_time = microtime( true ); $this->store = $store ? $store : ActionScheduler_Store::instance(); $this->monitor = $monitor ? $monitor : new ActionScheduler_FatalErrorMonitor( $this->store ); $this->cleaner = $cleaner ? $cleaner : new ActionScheduler_QueueCleaner( $this->store ); } /** * Process an individual action. * * @param int $action_id The action ID to process. * @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' * Generally, this should be capitalised and not localised as it's a proper noun. * @throws \Exception When error running action. */ public function process_action( $action_id, $context = '' ) { // Temporarily override the error handler while we process the current action. // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler( /** * Temporary error handler which can catch errors and convert them into exceptions. This facilitates more * robust error handling across all supported PHP versions. * * @throws Exception * * @param int $type Error level expressed as an integer. * @param string $message Error message. */ function ( $type, $message ) { throw new Exception( $message ); }, E_USER_ERROR | E_RECOVERABLE_ERROR ); /* * The nested try/catch structure is required because we potentially need to convert thrown errors into * exceptions (and an exception thrown from a catch block cannot be caught by a later catch block in the *same* * structure). */ try { try { $valid_action = true; do_action( 'action_scheduler_before_execute', $action_id, $context ); if ( ActionScheduler_Store::STATUS_PENDING !== $this->store->get_status( $action_id ) ) { $valid_action = false; do_action( 'action_scheduler_execution_ignored', $action_id, $context ); return; } do_action( 'action_scheduler_begin_execute', $action_id, $context ); $action = $this->store->fetch_action( $action_id ); $this->store->log_execution( $action_id ); $action->execute(); do_action( 'action_scheduler_after_execute', $action_id, $action, $context ); $this->store->mark_complete( $action_id ); } catch ( Throwable $e ) { // Throwable is defined when executing under PHP 7.0 and up. We convert it to an exception, for // compatibility with ActionScheduler_Logger. throw new Exception( $e->getMessage(), $e->getCode(), $e ); } } catch ( Exception $e ) { // This catch block exists for compatibility with PHP 5.6. $this->handle_action_error( $action_id, $e, $context, $valid_action ); } finally { restore_error_handler(); } if ( isset( $action ) && is_a( $action, 'ActionScheduler_Action' ) && $action->get_schedule()->is_recurring() ) { $this->schedule_next_instance( $action, $action_id ); } } /** * Marks actions as either having failed execution or failed validation, as appropriate. * * @param int $action_id Action ID. * @param Exception $e Exception instance. * @param string $context Execution context. * @param bool $valid_action If the action is valid. * * @return void */ private function handle_action_error( $action_id, $e, $context, $valid_action ) { if ( $valid_action ) { $this->store->mark_failure( $action_id ); /** * Runs when action execution fails. * * @param int $action_id Action ID. * @param Exception $e Exception instance. * @param string $context Execution context. */ do_action( 'action_scheduler_failed_execution', $action_id, $e, $context ); } else { /** * Runs when action validation fails. * * @param int $action_id Action ID. * @param Exception $e Exception instance. * @param string $context Execution context. */ do_action( 'action_scheduler_failed_validation', $action_id, $e, $context ); } } /** * Schedule the next instance of the action if necessary. * * @param ActionScheduler_Action $action Action. * @param int $action_id Action ID. */ protected function schedule_next_instance( ActionScheduler_Action $action, $action_id ) { // If a recurring action has been consistently failing, we may wish to stop rescheduling it. if ( ActionScheduler_Store::STATUS_FAILED === $this->store->get_status( $action_id ) && $this->recurring_action_is_consistently_failing( $action, $action_id ) ) { ActionScheduler_Logger::instance()->log( $action_id, __( 'This action appears to be consistently failing. A new instance will not be scheduled.', 'action-scheduler' ) ); return; } try { ActionScheduler::factory()->repeat( $action ); } catch ( Exception $e ) { do_action( 'action_scheduler_failed_to_schedule_next_instance', $action_id, $e, $action ); } } /** * Determine if the specified recurring action has been consistently failing. * * @param ActionScheduler_Action $action The recurring action to be rescheduled. * @param int $action_id The ID of the recurring action. * * @return bool */ private function recurring_action_is_consistently_failing( ActionScheduler_Action $action, $action_id ) { /** * Controls the failure threshold for recurring actions. * * Before rescheduling a recurring action, we look at its status. If it failed, we then check if all of the most * recent actions (upto the threshold set by this filter) sharing the same hook have also failed: if they have, * that is considered consistent failure and a new instance of the action will not be scheduled. * * @param int $failure_threshold Number of actions of the same hook to examine for failure. Defaults to 5. */ $consistent_failure_threshold = (int) apply_filters( 'action_scheduler_recurring_action_failure_threshold', 5 ); // This query should find the earliest *failing* action (for the hook we are interested in) within our threshold. $query_args = array( 'hook' => $action->get_hook(), 'status' => ActionScheduler_Store::STATUS_FAILED, 'date' => date_create( 'now', timezone_open( 'UTC' ) )->format( 'Y-m-d H:i:s' ), 'date_compare' => '<', 'per_page' => 1, 'offset' => $consistent_failure_threshold - 1, ); $first_failing_action_id = $this->store->query_actions( $query_args ); // If we didn't retrieve an action ID, then there haven't been enough failures for us to worry about. if ( empty( $first_failing_action_id ) ) { return false; } // Now let's fetch the first action (having the same hook) of *any status* within the same window. unset( $query_args['status'] ); $first_action_id_with_the_same_hook = $this->store->query_actions( $query_args ); /** * If a recurring action is assessed as consistently failing, it will not be rescheduled. This hook provides a * way to observe and optionally override that assessment. * * @param bool $is_consistently_failing If the action is considered to be consistently failing. * @param ActionScheduler_Action $action The action being assessed. */ return (bool) apply_filters( 'action_scheduler_recurring_action_is_consistently_failing', $first_action_id_with_the_same_hook === $first_failing_action_id, $action ); } /** * Run the queue cleaner. */ protected function run_cleanup() { $this->cleaner->clean( 10 * $this->get_time_limit() ); } /** * Get the number of concurrent batches a runner allows. * * @return int */ public function get_allowed_concurrent_batches() { return apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 1 ); } /** * Check if the number of allowed concurrent batches is met or exceeded. * * @return bool */ public function has_maximum_concurrent_batches() { return $this->store->get_claim_count() >= $this->get_allowed_concurrent_batches(); } /** * Get the maximum number of seconds a batch can run for. * * @return int The number of seconds. */ protected function get_time_limit() { $time_limit = 30; // Apply deprecated filter from deprecated get_maximum_execution_time() method. if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) { _deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' ); $time_limit = apply_filters( 'action_scheduler_maximum_execution_time', $time_limit ); } return absint( apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ) ); } /** * Get the number of seconds the process has been running. * * @return int The number of seconds. */ protected function get_execution_time() { $execution_time = microtime( true ) - $this->created_time; // Get the CPU time if the hosting environment uses it rather than wall-clock time to calculate a process's execution time. if ( function_exists( 'getrusage' ) && apply_filters( 'action_scheduler_use_cpu_execution_time', defined( 'PANTHEON_ENVIRONMENT' ) ) ) { $resource_usages = getrusage(); if ( isset( $resource_usages['ru_stime.tv_usec'], $resource_usages['ru_stime.tv_usec'] ) ) { $execution_time = $resource_usages['ru_stime.tv_sec'] + ( $resource_usages['ru_stime.tv_usec'] / 1000000 ); } } return $execution_time; } /** * Check if the host's max execution time is (likely) to be exceeded if processing more actions. * * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action. * @return bool */ protected function time_likely_to_be_exceeded( $processed_actions ) { $execution_time = $this->get_execution_time(); $max_execution_time = $this->get_time_limit(); // Safety against division by zero errors. if ( 0 === $processed_actions ) { return $execution_time >= $max_execution_time; } $time_per_action = $execution_time / $processed_actions; $estimated_time = $execution_time + ( $time_per_action * 3 ); $likely_to_be_exceeded = $estimated_time > $max_execution_time; return apply_filters( 'action_scheduler_maximum_execution_time_likely_to_be_exceeded', $likely_to_be_exceeded, $this, $processed_actions, $execution_time, $max_execution_time ); } /** * Get memory limit * * Based on WP_Background_Process::get_memory_limit() * * @return int */ protected function get_memory_limit() { if ( function_exists( 'ini_get' ) ) { $memory_limit = ini_get( 'memory_limit' ); } else { $memory_limit = '128M'; // Sensible default, and minimum required by WooCommerce. } if ( ! $memory_limit || -1 === $memory_limit || '-1' === $memory_limit ) { // Unlimited, set to 32GB. $memory_limit = '32G'; } return ActionScheduler_Compatibility::convert_hr_to_bytes( $memory_limit ); } /** * Memory exceeded * * Ensures the batch process never exceeds 90% of the maximum WordPress memory. * * Based on WP_Background_Process::memory_exceeded() * * @return bool */ protected function memory_exceeded() { $memory_limit = $this->get_memory_limit() * 0.90; $current_memory = memory_get_usage( true ); $memory_exceeded = $current_memory >= $memory_limit; return apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this ); } /** * See if the batch limits have been exceeded, which is when memory usage is almost at * the maximum limit, or the time to process more actions will exceed the max time limit. * * Based on WC_Background_Process::batch_limits_exceeded() * * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action. * @return bool */ protected function batch_limits_exceeded( $processed_actions ) { return $this->memory_exceeded() || $this->time_likely_to_be_exceeded( $processed_actions ); } /** * Process actions in the queue. * * @param string $context Optional identifier for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron' * Generally, this should be capitalised and not localised as it's a proper noun. * @return int The number of actions processed. */ abstract public function run( $context = '' ); } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php 0000644 00000003547 15174671617 0026510 0 ustar 00 <?php /** * Class ActionScheduler_Abstract_Schedule */ abstract class ActionScheduler_Abstract_Schedule extends ActionScheduler_Schedule_Deprecated { /** * The date & time the schedule is set to run. * * @var DateTime */ private $scheduled_date = null; /** * Timestamp equivalent of @see $this->scheduled_date * * @var int */ protected $scheduled_timestamp = null; /** * Construct. * * @param DateTime $date The date & time to run the action. */ public function __construct( DateTime $date ) { $this->scheduled_date = $date; } /** * Check if a schedule should recur. * * @return bool */ abstract public function is_recurring(); /** * Calculate when the next instance of this schedule would run based on a given date & time. * * @param DateTime $after Start timestamp. * @return DateTime */ abstract protected function calculate_next( DateTime $after ); /** * Get the next date & time when this schedule should run after a given date & time. * * @param DateTime $after Start timestamp. * @return DateTime|null */ public function get_next( DateTime $after ) { $after = clone $after; if ( $after > $this->scheduled_date ) { $after = $this->calculate_next( $after ); return $after; } return clone $this->scheduled_date; } /** * Get the date & time the schedule is set to run. * * @return DateTime|null */ public function get_date() { return $this->scheduled_date; } /** * For PHP 5.2 compat, because DateTime objects can't be serialized * * @return array */ public function __sleep() { $this->scheduled_timestamp = $this->scheduled_date->getTimestamp(); return array( 'scheduled_timestamp', ); } /** * Wakeup. */ public function __wakeup() { $this->scheduled_date = as_get_datetime_object( $this->scheduled_timestamp ); unset( $this->scheduled_timestamp ); } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php0000644 00000006346 15174671617 0030371 0 ustar 00 <?php /** * Class ActionScheduler_Abstract_RecurringSchedule */ abstract class ActionScheduler_Abstract_RecurringSchedule extends ActionScheduler_Abstract_Schedule { /** * The date & time the first instance of this schedule was setup to run (which may not be this instance). * * Schedule objects are attached to an action object. Each schedule stores the run date for that * object as the start date - @see $this->start - and logic to calculate the next run date after * that - @see $this->calculate_next(). The $first_date property also keeps a record of when the very * first instance of this chain of schedules ran. * * @var DateTime */ private $first_date = null; /** * Timestamp equivalent of @see $this->first_date * * @var int */ protected $first_timestamp = null; /** * The recurrence between each time an action is run using this schedule. * Used to calculate the start date & time. Can be a number of seconds, in the * case of ActionScheduler_IntervalSchedule, or a cron expression, as in the * case of ActionScheduler_CronSchedule. Or something else. * * @var mixed */ protected $recurrence; /** * Construct. * * @param DateTime $date The date & time to run the action. * @param mixed $recurrence The data used to determine the schedule's recurrence. * @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance. */ public function __construct( DateTime $date, $recurrence, ?DateTime $first = null ) { parent::__construct( $date ); $this->first_date = empty( $first ) ? $date : $first; $this->recurrence = $recurrence; } /** * Schedule is recurring. * * @return bool */ public function is_recurring() { return true; } /** * Get the date & time of the first schedule in this recurring series. * * @return DateTime|null */ public function get_first_date() { return clone $this->first_date; } /** * Get the schedule's recurrence. * * @return string */ public function get_recurrence() { return $this->recurrence; } /** * For PHP 5.2 compat, since DateTime objects can't be serialized * * @return array */ public function __sleep() { $sleep_params = parent::__sleep(); $this->first_timestamp = $this->first_date->getTimestamp(); return array_merge( $sleep_params, array( 'first_timestamp', 'recurrence', ) ); } /** * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 * * Prior to Action Scheduler 3.0.0, schedules used different property names to refer * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp * was the same as ActionScheduler_SimpleSchedule::timestamp. This was addressed in * Action Scheduler 3.0.0, where properties and property names were aligned for better * inheritance. To maintain backward compatibility with scheduled serialized and stored * prior to 3.0, we need to correctly map the old property names. */ public function __wakeup() { parent::__wakeup(); if ( $this->first_timestamp > 0 ) { $this->first_date = as_get_datetime_object( $this->first_timestamp ); } else { $this->first_date = $this->get_date(); } } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php 0000644 00000017525 15174671617 0024351 0 ustar 00 <?php /** * Class ActionScheduler_Logger * * @codeCoverageIgnore */ abstract class ActionScheduler_Logger { /** * Instance. * * @var null|self */ private static $logger = null; /** * Get instance. * * @return ActionScheduler_Logger */ public static function instance() { if ( empty( self::$logger ) ) { $class = apply_filters( 'action_scheduler_logger_class', 'ActionScheduler_wpCommentLogger' ); self::$logger = new $class(); } return self::$logger; } /** * Create log entry. * * @param string $action_id Action ID. * @param string $message Log message. * @param DateTime|null $date Log date. * * @return string The log entry ID */ abstract public function log( $action_id, $message, ?DateTime $date = null ); /** * Get action's log entry. * * @param string $entry_id Entry ID. * * @return ActionScheduler_LogEntry */ abstract public function get_entry( $entry_id ); /** * Get action's logs. * * @param string $action_id Action ID. * * @return ActionScheduler_LogEntry[] */ abstract public function get_logs( $action_id ); /** * Initialize. * * @codeCoverageIgnore */ public function init() { $this->hook_stored_action(); add_action( 'action_scheduler_canceled_action', array( $this, 'log_canceled_action' ), 10, 1 ); add_action( 'action_scheduler_begin_execute', array( $this, 'log_started_action' ), 10, 2 ); add_action( 'action_scheduler_after_execute', array( $this, 'log_completed_action' ), 10, 3 ); add_action( 'action_scheduler_failed_execution', array( $this, 'log_failed_action' ), 10, 3 ); add_action( 'action_scheduler_failed_action', array( $this, 'log_timed_out_action' ), 10, 2 ); add_action( 'action_scheduler_unexpected_shutdown', array( $this, 'log_unexpected_shutdown' ), 10, 2 ); add_action( 'action_scheduler_reset_action', array( $this, 'log_reset_action' ), 10, 1 ); add_action( 'action_scheduler_execution_ignored', array( $this, 'log_ignored_action' ), 10, 2 ); add_action( 'action_scheduler_failed_fetch_action', array( $this, 'log_failed_fetch_action' ), 10, 2 ); add_action( 'action_scheduler_failed_to_schedule_next_instance', array( $this, 'log_failed_schedule_next_instance' ), 10, 2 ); add_action( 'action_scheduler_bulk_cancel_actions', array( $this, 'bulk_log_cancel_actions' ), 10, 1 ); } /** * Register callback for storing action. */ public function hook_stored_action() { add_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) ); } /** * Unhook callback for storing action. */ public function unhook_stored_action() { remove_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) ); } /** * Log action stored. * * @param int $action_id Action ID. */ public function log_stored_action( $action_id ) { $this->log( $action_id, __( 'action created', 'action-scheduler' ) ); } /** * Log action cancellation. * * @param int $action_id Action ID. */ public function log_canceled_action( $action_id ) { $this->log( $action_id, __( 'action canceled', 'action-scheduler' ) ); } /** * Log action start. * * @param int $action_id Action ID. * @param string $context Action execution context. */ public function log_started_action( $action_id, $context = '' ) { if ( ! empty( $context ) ) { /* translators: %s: context */ $message = sprintf( __( 'action started via %s', 'action-scheduler' ), $context ); } else { $message = __( 'action started', 'action-scheduler' ); } $this->log( $action_id, $message ); } /** * Log action completion. * * @param int $action_id Action ID. * @param null|ActionScheduler_Action $action Action. * @param string $context Action execution context. */ public function log_completed_action( $action_id, $action = null, $context = '' ) { if ( ! empty( $context ) ) { /* translators: %s: context */ $message = sprintf( __( 'action complete via %s', 'action-scheduler' ), $context ); } else { $message = __( 'action complete', 'action-scheduler' ); } $this->log( $action_id, $message ); } /** * Log action failure. * * @param int $action_id Action ID. * @param Exception $exception Exception. * @param string $context Action execution context. */ public function log_failed_action( $action_id, Exception $exception, $context = '' ) { if ( ! empty( $context ) ) { /* translators: 1: context 2: exception message */ $message = sprintf( __( 'action failed via %1$s: %2$s', 'action-scheduler' ), $context, $exception->getMessage() ); } else { /* translators: %s: exception message */ $message = sprintf( __( 'action failed: %s', 'action-scheduler' ), $exception->getMessage() ); } $this->log( $action_id, $message ); } /** * Log action timeout. * * @param int $action_id Action ID. * @param string $timeout Timeout. */ public function log_timed_out_action( $action_id, $timeout ) { /* translators: %s: amount of time */ $this->log( $action_id, sprintf( __( 'action marked as failed after %s seconds. Unknown error occurred. Check server, PHP and database error logs to diagnose cause.', 'action-scheduler' ), $timeout ) ); } /** * Log unexpected shutdown. * * @param int $action_id Action ID. * @param mixed[] $error Error. */ public function log_unexpected_shutdown( $action_id, $error ) { if ( ! empty( $error ) ) { /* translators: 1: error message 2: filename 3: line */ $this->log( $action_id, sprintf( __( 'unexpected shutdown: PHP Fatal error %1$s in %2$s on line %3$s', 'action-scheduler' ), $error['message'], $error['file'], $error['line'] ) ); } } /** * Log action reset. * * @param int $action_id Action ID. */ public function log_reset_action( $action_id ) { $this->log( $action_id, __( 'action reset', 'action-scheduler' ) ); } /** * Log ignored action. * * @param int $action_id Action ID. * @param string $context Action execution context. */ public function log_ignored_action( $action_id, $context = '' ) { if ( ! empty( $context ) ) { /* translators: %s: context */ $message = sprintf( __( 'action ignored via %s', 'action-scheduler' ), $context ); } else { $message = __( 'action ignored', 'action-scheduler' ); } $this->log( $action_id, $message ); } /** * Log the failure of fetching the action. * * @param string $action_id Action ID. * @param null|Exception $exception The exception which occurred when fetching the action. NULL by default for backward compatibility. */ public function log_failed_fetch_action( $action_id, ?Exception $exception = null ) { if ( ! is_null( $exception ) ) { /* translators: %s: exception message */ $log_message = sprintf( __( 'There was a failure fetching this action: %s', 'action-scheduler' ), $exception->getMessage() ); } else { $log_message = __( 'There was a failure fetching this action', 'action-scheduler' ); } $this->log( $action_id, $log_message ); } /** * Log the failure of scheduling the action's next instance. * * @param int $action_id Action ID. * @param Exception $exception Exception object. */ public function log_failed_schedule_next_instance( $action_id, Exception $exception ) { /* translators: %s: exception message */ $this->log( $action_id, sprintf( __( 'There was a failure scheduling the next instance of this action: %s', 'action-scheduler' ), $exception->getMessage() ) ); } /** * Bulk add cancel action log entries. * * Implemented here for backward compatibility. Should be implemented in parent loggers * for more performant bulk logging. * * @param array $action_ids List of action ID. */ public function bulk_log_cancel_actions( $action_ids ) { if ( empty( $action_ids ) ) { return; } foreach ( $action_ids as $action_id ) { $this->log_canceled_action( $action_id ); } } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php 0000644 00000061057 15174671617 0026637 0 ustar 00 <?php if ( ! class_exists( 'WP_List_Table' ) ) { require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; } /** * Action Scheduler Abstract List Table class * * This abstract class enhances WP_List_Table making it ready to use. * * By extending this class we can focus on describing how our table looks like, * which columns needs to be shown, filter, ordered by and more and forget about the details. * * This class supports: * - Bulk actions * - Search * - Sortable columns * - Automatic translations of the columns * * @codeCoverageIgnore * @since 2.0.0 */ abstract class ActionScheduler_Abstract_ListTable extends WP_List_Table { /** * The table name * * @var string */ protected $table_name; /** * Package name, used to get options from WP_List_Table::get_items_per_page. * * @var string */ protected $package; /** * How many items do we render per page? * * @var int */ protected $items_per_page = 10; /** * Enables search in this table listing. If this array * is empty it means the listing is not searchable. * * @var array */ protected $search_by = array(); /** * Columns to show in the table listing. It is a key => value pair. The * key must much the table column name and the value is the label, which is * automatically translated. * * @var array */ protected $columns = array(); /** * Defines the row-actions. It expects an array where the key * is the column name and the value is an array of actions. * * The array of actions are key => value, where key is the method name * (with the prefix row_action_<key>) and the value is the label * and title. * * @var array */ protected $row_actions = array(); /** * The Primary key of our table * * @var string */ protected $ID = 'ID'; /** * Enables sorting, it expects an array * of columns (the column names are the values) * * @var array */ protected $sort_by = array(); /** * The default sort order * * @var string */ protected $filter_by = array(); /** * The status name => count combinations for this table's items. Used to display status filters. * * @var array */ protected $status_counts = array(); /** * Notices to display when loading the table. Array of arrays of form array( 'class' => {updated|error}, 'message' => 'This is the notice text display.' ). * * @var array */ protected $admin_notices = array(); /** * Localised string displayed in the <h1> element above the able. * * @var string */ protected $table_header; /** * Enables bulk actions. It must be an array where the key is the action name * and the value is the label (which is translated automatically). It is important * to notice that it will check that the method exists (`bulk_$name`) and will throw * an exception if it does not exists. * * This class will automatically check if the current request has a bulk action, will do the * validations and afterwards will execute the bulk method, with two arguments. The first argument * is the array with primary keys, the second argument is a string with a list of the primary keys, * escaped and ready to use (with `IN`). * * @var array */ protected $bulk_actions = array(); /** * Makes translation easier, it basically just wraps * `_x` with some default (the package name). * * @param string $text The new text to translate. * @param string $context The context of the text. * @return string|void The translated text. * * @deprecated 3.0.0 Use `_x()` instead. */ protected function translate( $text, $context = '' ) { return $text; } /** * Reads `$this->bulk_actions` and returns an array that WP_List_Table understands. It * also validates that the bulk method handler exists. It throws an exception because * this is a library meant for developers and missing a bulk method is a development-time error. * * @return array * * @throws RuntimeException Throws RuntimeException when the bulk action does not have a callback method. */ protected function get_bulk_actions() { $actions = array(); foreach ( $this->bulk_actions as $action => $label ) { if ( ! is_callable( array( $this, 'bulk_' . $action ) ) ) { throw new RuntimeException( "The bulk action $action does not have a callback method" ); } $actions[ $action ] = $label; } return $actions; } /** * Checks if the current request has a bulk action. If that is the case it will validate and will * execute the bulk method handler. Regardless if the action is valid or not it will redirect to * the previous page removing the current arguments that makes this request a bulk action. */ protected function process_bulk_action() { global $wpdb; // Detect when a bulk action is being triggered. $action = $this->current_action(); if ( ! $action ) { return; } check_admin_referer( 'bulk-' . $this->_args['plural'] ); $method = 'bulk_' . $action; if ( array_key_exists( $action, $this->bulk_actions ) && is_callable( array( $this, $method ) ) && ! empty( $_GET['ID'] ) && is_array( $_GET['ID'] ) ) { $ids_sql = '(' . implode( ',', array_fill( 0, count( $_GET['ID'] ), '%s' ) ) . ')'; $id = array_map( 'absint', $_GET['ID'] ); $this->$method( $id, $wpdb->prepare( $ids_sql, $id ) ); //phpcs:ignore WordPress.DB.PreparedSQL } if ( isset( $_SERVER['REQUEST_URI'] ) ) { wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'ID', 'action', 'action2' ), esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); exit; } } /** * Default code for deleting entries. * validated already by process_bulk_action() * * @param array $ids ids of the items to delete. * @param string $ids_sql the sql for the ids. * @return void */ protected function bulk_delete( array $ids, $ids_sql ) { $store = ActionScheduler::store(); foreach ( $ids as $action_id ) { $store->delete( $action_id ); } } /** * Prepares the _column_headers property which is used by WP_Table_List at rendering. * It merges the columns and the sortable columns. */ protected function prepare_column_headers() { $this->_column_headers = array( $this->get_columns(), get_hidden_columns( $this->screen ), $this->get_sortable_columns(), ); } /** * Reads $this->sort_by and returns the columns name in a format that WP_Table_List * expects */ public function get_sortable_columns() { $sort_by = array(); foreach ( $this->sort_by as $column ) { $sort_by[ $column ] = array( $column, true ); } return $sort_by; } /** * Returns the columns names for rendering. It adds a checkbox for selecting everything * as the first column */ public function get_columns() { $columns = array_merge( array( 'cb' => '<input type="checkbox" />' ), $this->columns ); return $columns; } /** * Get prepared LIMIT clause for items query * * @global wpdb $wpdb * * @return string Prepared LIMIT clause for items query. */ protected function get_items_query_limit() { global $wpdb; $per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page ); return $wpdb->prepare( 'LIMIT %d', $per_page ); } /** * Returns the number of items to offset/skip for this current view. * * @return int */ protected function get_items_offset() { $per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page ); $current_page = $this->get_pagenum(); if ( 1 < $current_page ) { $offset = $per_page * ( $current_page - 1 ); } else { $offset = 0; } return $offset; } /** * Get prepared OFFSET clause for items query * * @global wpdb $wpdb * * @return string Prepared OFFSET clause for items query. */ protected function get_items_query_offset() { global $wpdb; return $wpdb->prepare( 'OFFSET %d', $this->get_items_offset() ); } /** * Prepares the ORDER BY sql statement. It uses `$this->sort_by` to know which * columns are sortable. This requests validates the orderby $_GET parameter is a valid * column and sortable. It will also use order (ASC|DESC) using DESC by default. */ protected function get_items_query_order() { if ( empty( $this->sort_by ) ) { return ''; } $orderby = esc_sql( $this->get_request_orderby() ); $order = esc_sql( $this->get_request_order() ); return "ORDER BY {$orderby} {$order}"; } /** * Querystring arguments to persist between form submissions. * * @since 3.7.3 * * @return string[] */ protected function get_request_query_args_to_persist() { return array_merge( $this->sort_by, array( 'page', 'status', 'tab', ) ); } /** * Return the sortable column specified for this request to order the results by, if any. * * @return string */ protected function get_request_orderby() { $valid_sortable_columns = array_values( $this->sort_by ); if ( ! empty( $_GET['orderby'] ) && in_array( $_GET['orderby'], $valid_sortable_columns, true ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $orderby = sanitize_text_field( wp_unslash( $_GET['orderby'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended } else { $orderby = $valid_sortable_columns[0]; } return $orderby; } /** * Return the sortable column order specified for this request. * * @return string */ protected function get_request_order() { if ( ! empty( $_GET['order'] ) && 'desc' === strtolower( sanitize_text_field( wp_unslash( $_GET['order'] ) ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended $order = 'DESC'; } else { $order = 'ASC'; } return $order; } /** * Return the status filter for this request, if any. * * @return string */ protected function get_request_status() { $status = ( ! empty( $_GET['status'] ) ) ? sanitize_text_field( wp_unslash( $_GET['status'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended return $status; } /** * Return the search filter for this request, if any. * * @return string */ protected function get_request_search_query() { $search_query = ( ! empty( $_GET['s'] ) ) ? sanitize_text_field( wp_unslash( $_GET['s'] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended return $search_query; } /** * Process and return the columns name. This is meant for using with SQL, this means it * always includes the primary key. * * @return array */ protected function get_table_columns() { $columns = array_keys( $this->columns ); if ( ! in_array( $this->ID, $columns, true ) ) { $columns[] = $this->ID; } return $columns; } /** * Check if the current request is doing a "full text" search. If that is the case * prepares the SQL to search texts using LIKE. * * If the current request does not have any search or if this list table does not support * that feature it will return an empty string. * * @return string */ protected function get_items_query_search() { global $wpdb; if ( empty( $_GET['s'] ) || empty( $this->search_by ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended return ''; } $search_string = sanitize_text_field( wp_unslash( $_GET['s'] ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended $filter = array(); foreach ( $this->search_by as $column ) { $wild = '%'; $sql_like = $wild . $wpdb->esc_like( $search_string ) . $wild; $filter[] = $wpdb->prepare( '`' . $column . '` LIKE %s', $sql_like ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.DB.PreparedSQL.NotPrepared } return implode( ' OR ', $filter ); } /** * Prepares the SQL to filter rows by the options defined at `$this->filter_by`. Before trusting * any data sent by the user it validates that it is a valid option. */ protected function get_items_query_filters() { global $wpdb; if ( ! $this->filter_by || empty( $_GET['filter_by'] ) || ! is_array( $_GET['filter_by'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended return ''; } $filter = array(); foreach ( $this->filter_by as $column => $options ) { if ( empty( $_GET['filter_by'][ $column ] ) || empty( $options[ $_GET['filter_by'][ $column ] ] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended continue; } $filter[] = $wpdb->prepare( "`$column` = %s", sanitize_text_field( wp_unslash( $_GET['filter_by'][ $column ] ) ) ); //phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.DB.PreparedSQL.InterpolatedNotPrepared } return implode( ' AND ', $filter ); } /** * Prepares the data to feed WP_Table_List. * * This has the core for selecting, sorting and filtering data. To keep the code simple * its logic is split among many methods (get_items_query_*). * * Beside populating the items this function will also count all the records that matches * the filtering criteria and will do fill the pagination variables. */ public function prepare_items() { global $wpdb; $this->process_bulk_action(); $this->process_row_actions(); if ( ! empty( $_REQUEST['_wp_http_referer'] && ! empty( $_SERVER['REQUEST_URI'] ) ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); exit; } $this->prepare_column_headers(); $limit = $this->get_items_query_limit(); $offset = $this->get_items_query_offset(); $order = $this->get_items_query_order(); $where = array_filter( array( $this->get_items_query_search(), $this->get_items_query_filters(), ) ); $columns = '`' . implode( '`, `', $this->get_table_columns() ) . '`'; if ( ! empty( $where ) ) { $where = 'WHERE (' . implode( ') AND (', $where ) . ')'; } else { $where = ''; } $sql = "SELECT $columns FROM {$this->table_name} {$where} {$order} {$limit} {$offset}"; $this->set_items( $wpdb->get_results( $sql, ARRAY_A ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $query_count = "SELECT COUNT({$this->ID}) FROM {$this->table_name} {$where}"; $total_items = $wpdb->get_var( $query_count ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared $per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page ); $this->set_pagination_args( array( 'total_items' => $total_items, 'per_page' => $per_page, 'total_pages' => ceil( $total_items / $per_page ), ) ); } /** * Display the table. * * @param string $which The name of the table. */ public function extra_tablenav( $which ) { if ( ! $this->filter_by || 'top' !== $which ) { return; } echo '<div class="alignleft actions">'; foreach ( $this->filter_by as $id => $options ) { $default = ! empty( $_GET['filter_by'][ $id ] ) ? sanitize_text_field( wp_unslash( $_GET['filter_by'][ $id ] ) ) : ''; //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( empty( $options[ $default ] ) ) { $default = ''; } echo '<select name="filter_by[' . esc_attr( $id ) . ']" class="first" id="filter-by-' . esc_attr( $id ) . '">'; foreach ( $options as $value => $label ) { echo '<option value="' . esc_attr( $value ) . '" ' . esc_html( $value === $default ? 'selected' : '' ) . '>' . esc_html( $label ) . '</option>'; } echo '</select>'; } submit_button( esc_html__( 'Filter', 'action-scheduler' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); echo '</div>'; } /** * Set the data for displaying. It will attempt to unserialize (There is a chance that some columns * are serialized). This can be override in child classes for further data transformation. * * @param array $items Items array. */ protected function set_items( array $items ) { $this->items = array(); foreach ( $items as $item ) { $this->items[ $item[ $this->ID ] ] = array_map( 'maybe_unserialize', $item ); } } /** * Renders the checkbox for each row, this is the first column and it is named ID regardless * of how the primary key is named (to keep the code simpler). The bulk actions will do the proper * name transformation though using `$this->ID`. * * @param array $row The row to render. */ public function column_cb( $row ) { return '<input name="ID[]" type="checkbox" value="' . esc_attr( $row[ $this->ID ] ) . '" />'; } /** * Renders the row-actions. * * This method renders the action menu, it reads the definition from the $row_actions property, * and it checks that the row action method exists before rendering it. * * @param array $row Row to be rendered. * @param string $column_name Column name. * @return string */ protected function maybe_render_actions( $row, $column_name ) { if ( empty( $this->row_actions[ $column_name ] ) ) { return; } $row_id = $row[ $this->ID ]; $actions = '<div class="row-actions">'; $action_count = 0; foreach ( $this->row_actions[ $column_name ] as $action_key => $action ) { $action_count++; if ( ! method_exists( $this, 'row_action_' . $action_key ) ) { continue; } $action_link = ! empty( $action['link'] ) ? $action['link'] : add_query_arg( array( 'row_action' => $action_key, 'row_id' => $row_id, 'nonce' => wp_create_nonce( $action_key . '::' . $row_id ), ) ); $span_class = ! empty( $action['class'] ) ? $action['class'] : $action_key; $separator = ( $action_count < count( $this->row_actions[ $column_name ] ) ) ? ' | ' : ''; $actions .= sprintf( '<span class="%s">', esc_attr( $span_class ) ); $actions .= sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', esc_url( $action_link ), esc_attr( $action['desc'] ), esc_html( $action['name'] ) ); $actions .= sprintf( '%s</span>', $separator ); } $actions .= '</div>'; return $actions; } /** * Process the bulk actions. * * @return void */ protected function process_row_actions() { $parameters = array( 'row_action', 'row_id', 'nonce' ); foreach ( $parameters as $parameter ) { if ( empty( $_REQUEST[ $parameter ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended return; } } $action = sanitize_text_field( wp_unslash( $_REQUEST['row_action'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated $row_id = sanitize_text_field( wp_unslash( $_REQUEST['row_id'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated $nonce = sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated $method = 'row_action_' . $action; // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( wp_verify_nonce( $nonce, $action . '::' . $row_id ) && method_exists( $this, $method ) ) { $this->$method( sanitize_text_field( wp_unslash( $row_id ) ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended } if ( isset( $_SERVER['REQUEST_URI'] ) ) { wp_safe_redirect( remove_query_arg( array( 'row_id', 'row_action', 'nonce' ), esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); exit; } } /** * Default column formatting, it will escape everything for security. * * @param array $item The item array. * @param string $column_name Column name to display. * * @return string */ public function column_default( $item, $column_name ) { $column_html = esc_html( $item[ $column_name ] ); $column_html .= $this->maybe_render_actions( $item, $column_name ); return $column_html; } /** * Display the table heading and search query, if any */ protected function display_header() { echo '<h1 class="wp-heading-inline">' . esc_attr( $this->table_header ) . '</h1>'; if ( $this->get_request_search_query() ) { /* translators: %s: search query */ echo '<span class="subtitle">' . esc_attr( sprintf( __( 'Search results for "%s"', 'action-scheduler' ), $this->get_request_search_query() ) ) . '</span>'; } echo '<hr class="wp-header-end">'; } /** * Display the table heading and search query, if any */ protected function display_admin_notices() { foreach ( $this->admin_notices as $notice ) { echo '<div id="message" class="' . esc_attr( $notice['class'] ) . '">'; echo ' <p>' . wp_kses_post( $notice['message'] ) . '</p>'; echo '</div>'; } } /** * Prints the available statuses so the user can click to filter. */ protected function display_filter_by_status() { $status_list_items = array(); $request_status = $this->get_request_status(); // Helper to set 'all' filter when not set on status counts passed in. if ( ! isset( $this->status_counts['all'] ) ) { $all_count = array_sum( $this->status_counts ); if ( isset( $this->status_counts['past-due'] ) ) { $all_count -= $this->status_counts['past-due']; } $this->status_counts = array( 'all' => $all_count ) + $this->status_counts; } // Translated status labels. $status_labels = ActionScheduler_Store::instance()->get_status_labels(); $status_labels['all'] = esc_html_x( 'All', 'status labels', 'action-scheduler' ); $status_labels['past-due'] = esc_html_x( 'Past-due', 'status labels', 'action-scheduler' ); foreach ( $this->status_counts as $status_slug => $count ) { if ( 0 === $count ) { continue; } if ( $status_slug === $request_status || ( empty( $request_status ) && 'all' === $status_slug ) ) { $status_list_item = '<li class="%1$s"><a href="%2$s" class="current">%3$s</a> (%4$d)</li>'; } else { $status_list_item = '<li class="%1$s"><a href="%2$s">%3$s</a> (%4$d)</li>'; } $status_name = isset( $status_labels[ $status_slug ] ) ? $status_labels[ $status_slug ] : ucfirst( $status_slug ); $status_filter_url = ( 'all' === $status_slug ) ? remove_query_arg( 'status' ) : add_query_arg( 'status', $status_slug ); $status_filter_url = remove_query_arg( array( 'paged', 's' ), $status_filter_url ); $status_list_items[] = sprintf( $status_list_item, esc_attr( $status_slug ), esc_url( $status_filter_url ), esc_html( $status_name ), absint( $count ) ); } if ( $status_list_items ) { echo '<ul class="subsubsub">'; echo implode( " | \n", $status_list_items ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '</ul>'; } } /** * Renders the table list, we override the original class to render the table inside a form * and to render any needed HTML (like the search box). By doing so the callee of a function can simple * forget about any extra HTML. */ protected function display_table() { echo '<form id="' . esc_attr( $this->_args['plural'] ) . '-filter" method="get">'; foreach ( $this->get_request_query_args_to_persist() as $arg ) { $arg_value = isset( $_GET[ $arg ] ) ? sanitize_text_field( wp_unslash( $_GET[ $arg ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( ! $arg_value ) { continue; } echo '<input type="hidden" name="' . esc_attr( $arg ) . '" value="' . esc_attr( $arg_value ) . '" />'; } if ( ! empty( $this->search_by ) ) { echo $this->search_box( $this->get_search_box_button_text(), 'plugin' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } parent::display(); echo '</form>'; } /** * Process any pending actions. */ public function process_actions() { $this->process_bulk_action(); $this->process_row_actions(); if ( ! empty( $_REQUEST['_wp_http_referer'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter wp_safe_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ); exit; } } /** * Render the list table page, including header, notices, status filters and table. */ public function display_page() { $this->prepare_items(); echo '<div class="wrap">'; $this->display_header(); $this->display_admin_notices(); $this->display_filter_by_status(); $this->display_table(); echo '</div>'; } /** * Get the text to display in the search box on the list table. */ protected function get_search_box_placeholder() { return esc_html__( 'Search', 'action-scheduler' ); } /** * Gets the screen per_page option name. * * @return string */ protected function get_per_page_option_name() { return $this->package . '_items_per_page'; } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php 0000644 00000011443 15174671617 0026146 0 ustar 00 <?php /** * Class ActionScheduler_Abstract_Schema * * @package Action_Scheduler * * @codeCoverageIgnore * * Utility class for creating/updating custom tables */ abstract class ActionScheduler_Abstract_Schema { /** * Increment this value in derived class to trigger a schema update. * * @var int */ protected $schema_version = 1; /** * Schema version stored in database. * * @var string */ protected $db_version; /** * Names of tables that will be registered by this class. * * @var array */ protected $tables = array(); /** * Can optionally be used by concrete classes to carry out additional initialization work * as needed. */ public function init() {} /** * Register tables with WordPress, and create them if needed. * * @param bool $force_update Optional. Default false. Use true to always run the schema update. * * @return void */ public function register_tables( $force_update = false ) { global $wpdb; // make WP aware of our tables. foreach ( $this->tables as $table ) { $wpdb->tables[] = $table; $name = $this->get_full_table_name( $table ); $wpdb->$table = $name; } // create the tables. if ( $this->schema_update_required() || $force_update ) { foreach ( $this->tables as $table ) { /** * Allow custom processing before updating a table schema. * * @param string $table Name of table being updated. * @param string $db_version Existing version of the table being updated. */ do_action( 'action_scheduler_before_schema_update', $table, $this->db_version ); $this->update_table( $table ); } $this->mark_schema_update_complete(); } } /** * Get table definition. * * @param string $table The name of the table. * * @return string The CREATE TABLE statement, suitable for passing to dbDelta */ abstract protected function get_table_definition( $table ); /** * Determine if the database schema is out of date * by comparing the integer found in $this->schema_version * with the option set in the WordPress options table * * @return bool */ private function schema_update_required() { $option_name = 'schema-' . static::class; $this->db_version = get_option( $option_name, 0 ); // Check for schema option stored by the Action Scheduler Custom Tables plugin in case site has migrated from that plugin with an older schema. if ( 0 === $this->db_version ) { $plugin_option_name = 'schema-'; switch ( static::class ) { case 'ActionScheduler_StoreSchema': $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Store_Table_Maker'; break; case 'ActionScheduler_LoggerSchema': $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Logger_Table_Maker'; break; } $this->db_version = get_option( $plugin_option_name, 0 ); delete_option( $plugin_option_name ); } return version_compare( $this->db_version, $this->schema_version, '<' ); } /** * Update the option in WordPress to indicate that * our schema is now up to date * * @return void */ private function mark_schema_update_complete() { $option_name = 'schema-' . static::class; // work around race conditions and ensure that our option updates. $value_to_save = (string) $this->schema_version . '.0.' . time(); update_option( $option_name, $value_to_save ); } /** * Update the schema for the given table * * @param string $table The name of the table to update. * * @return void */ private function update_table( $table ) { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; $definition = $this->get_table_definition( $table ); if ( $definition ) { $updated = dbDelta( $definition ); foreach ( $updated as $updated_table => $update_description ) { if ( strpos( $update_description, 'Created table' ) === 0 ) { do_action( 'action_scheduler/created_table', $updated_table, $table ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } } } } /** * Get full table name. * * @param string $table Table name. * * @return string The full name of the table, including the * table prefix for the current blog */ protected function get_full_table_name( $table ) { return $GLOBALS['wpdb']->prefix . $table; } /** * Confirms that all of the tables registered by this schema class have been created. * * @return bool */ public function tables_exist() { global $wpdb; $tables_exist = true; foreach ( $this->tables as $table_name ) { $table_name = $wpdb->prefix . $table_name; $pattern = str_replace( '_', '\\_', $table_name ); $existing_table = $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $pattern ) ); if ( $existing_table !== $table_name ) { $tables_exist = false; break; } } return $tables_exist; } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_WPCLI_Command.php 0000644 00000004073 15174671617 0025440 0 ustar 00 <?php /** * Abstract for WP-CLI commands. */ abstract class ActionScheduler_WPCLI_Command extends \WP_CLI_Command { const DATE_FORMAT = 'Y-m-d H:i:s O'; /** * Keyed arguments. * * @var string[] */ protected $args; /** * Positional arguments. * * @var array<string, string> */ protected $assoc_args; /** * Construct. * * @param string[] $args Positional arguments. * @param array<string, string> $assoc_args Keyed arguments. * @throws \Exception When loading a CLI command file outside of WP CLI context. */ public function __construct( array $args, array $assoc_args ) { if ( ! defined( 'WP_CLI' ) || ! constant( 'WP_CLI' ) ) { /* translators: %s php class name */ throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'action-scheduler' ), get_class( $this ) ) ); } $this->args = $args; $this->assoc_args = $assoc_args; } /** * Execute command. */ abstract public function execute(); /** * Get the scheduled date in a human friendly format. * * @see ActionScheduler_ListTable::get_schedule_display_string() * @param ActionScheduler_Schedule $schedule Schedule. * @return string */ protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) { $schedule_display_string = ''; if ( ! $schedule->get_date() ) { return '0000-00-00 00:00:00'; } $next_timestamp = $schedule->get_date()->getTimestamp(); $schedule_display_string .= $schedule->get_date()->format( static::DATE_FORMAT ); return $schedule_display_string; } /** * Transforms arguments with '__' from CSV into expected arrays. * * @see \WP_CLI\CommandWithDBObject::process_csv_arguments_to_arrays() * @link https://github.com/wp-cli/entity-command/blob/c270cc9a2367cb8f5845f26a6b5e203397c91392/src/WP_CLI/CommandWithDBObject.php#L99 * @return void */ protected function process_csv_arguments_to_arrays() { foreach ( $this->assoc_args as $k => $v ) { if ( false !== strpos( $k, '__' ) ) { $this->assoc_args[ $k ] = explode( ',', $v ); } } } } vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php 0000644 00000003437 15174671617 0024017 0 ustar 00 <?php /** * Abstract class for setting a basic lock to throttle some action. * * Class ActionScheduler_Lock */ abstract class ActionScheduler_Lock { /** * Instance. * * @var ActionScheduler_Lock */ private static $locker = null; /** * Duration of lock. * * @var int */ protected static $lock_duration = MINUTE_IN_SECONDS; /** * Check if a lock is set for a given lock type. * * @param string $lock_type A string to identify different lock types. * @return bool */ public function is_locked( $lock_type ) { return ( $this->get_expiration( $lock_type ) >= time() ); } /** * Set a lock. * * To prevent race conditions, implementations should avoid setting the lock if the lock is already held. * * @param string $lock_type A string to identify different lock types. * @return bool */ abstract public function set( $lock_type ); /** * If a lock is set, return the timestamp it was set to expiry. * * @param string $lock_type A string to identify different lock types. * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire. */ abstract public function get_expiration( $lock_type ); /** * Get the amount of time to set for a given lock. 60 seconds by default. * * @param string $lock_type A string to identify different lock types. * @return int */ protected function get_duration( $lock_type ) { return apply_filters( 'action_scheduler_lock_duration', self::$lock_duration, $lock_type ); } /** * Get instance. * * @return ActionScheduler_Lock */ public static function instance() { if ( empty( self::$locker ) ) { $class = apply_filters( 'action_scheduler_lock_class', 'ActionScheduler_OptionLock' ); self::$locker = new $class(); } return self::$locker; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_DateTime.php 0000644 00000004014 15174671617 0022625 0 ustar 00 <?php /** * ActionScheduler DateTime class. * * This is a custom extension to DateTime that */ class ActionScheduler_DateTime extends DateTime { /** * UTC offset. * * Only used when a timezone is not set. When a timezone string is * used, this will be set to 0. * * @var int */ protected $utcOffset = 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase /** * Get the unix timestamp of the current object. * * Missing in PHP 5.2 so just here so it can be supported consistently. * * @return int */ #[\ReturnTypeWillChange] public function getTimestamp() { return method_exists( 'DateTime', 'getTimestamp' ) ? parent::getTimestamp() : $this->format( 'U' ); } /** * Set the UTC offset. * * This represents a fixed offset instead of a timezone setting. * * @param string|int $offset UTC offset value. */ public function setUtcOffset( $offset ) { $this->utcOffset = intval( $offset ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } /** * Returns the timezone offset. * * @return int * @link http://php.net/manual/en/datetime.getoffset.php */ #[\ReturnTypeWillChange] public function getOffset() { return $this->utcOffset ? $this->utcOffset : parent::getOffset(); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase } /** * Set the TimeZone associated with the DateTime * * @param DateTimeZone $timezone Timezone object. * * @return static * @link http://php.net/manual/en/datetime.settimezone.php */ #[\ReturnTypeWillChange] public function setTimezone( $timezone ) { $this->utcOffset = 0; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase parent::setTimezone( $timezone ); return $this; } /** * Get the timestamp with the WordPress timezone offset added or subtracted. * * @since 3.0.0 * @return int */ public function getOffsetTimestamp() { return $this->getTimestamp() + $this->getOffset(); } } vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php 0000644 00000001305 15174671617 0025477 0 ustar 00 <?php /** * Class ActionScheduler_NullSchedule */ class ActionScheduler_NullSchedule extends ActionScheduler_SimpleSchedule { /** * DateTime instance. * * @var DateTime|null */ protected $scheduled_date; /** * Make the $date param optional and default to null. * * @param null|DateTime $date The date & time to run the action. */ public function __construct( ?DateTime $date = null ) { $this->scheduled_date = null; } /** * This schedule has no scheduled DateTime, so we need to override the parent __sleep(). * * @return array */ public function __sleep() { return array(); } /** * Wakeup. */ public function __wakeup() { $this->scheduled_date = null; } } vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php 0000644 00000005111 15174671617 0026350 0 ustar 00 <?php /** * Class ActionScheduler_IntervalSchedule */ class ActionScheduler_IntervalSchedule extends ActionScheduler_Abstract_RecurringSchedule implements ActionScheduler_Schedule { /** * Deprecated property @see $this->__wakeup() for details. * * @var null */ private $start_timestamp = null; /** * Deprecated property @see $this->__wakeup() for details. * * @var null */ private $interval_in_seconds = null; /** * Calculate when this schedule should start after a given date & time using * the number of seconds between recurrences. * * @param DateTime $after Timestamp. * @return DateTime */ protected function calculate_next( DateTime $after ) { $after->modify( '+' . (int) $this->get_recurrence() . ' seconds' ); return $after; } /** * Schedule interval in seconds. * * @return int */ public function interval_in_seconds() { _deprecated_function( __METHOD__, '3.0.0', '(int)ActionScheduler_Abstract_RecurringSchedule::get_recurrence()' ); return (int) $this->get_recurrence(); } /** * Serialize interval schedules with data required prior to AS 3.0.0 * * Prior to Action Scheduler 3.0.0, recurring schedules used different property names to * refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 * aligned properties and property names for better inheritance. To guard against the * possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to * also store the data with the old property names so if it's unserialized in AS < 3.0, * the schedule doesn't end up with a null/false/0 recurrence. * * @return array */ public function __sleep() { $sleep_params = parent::__sleep(); $this->start_timestamp = $this->scheduled_timestamp; $this->interval_in_seconds = $this->recurrence; return array_merge( $sleep_params, array( 'start_timestamp', 'interval_in_seconds', ) ); } /** * Unserialize interval schedules serialized/stored prior to AS 3.0.0 * * For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup(). */ public function __wakeup() { if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) { $this->scheduled_timestamp = $this->start_timestamp; unset( $this->start_timestamp ); } if ( is_null( $this->recurrence ) && ! is_null( $this->interval_in_seconds ) ) { $this->recurrence = $this->interval_in_seconds; unset( $this->interval_in_seconds ); } parent::__wakeup(); } } vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php 0000644 00000000710 15174671617 0024643 0 ustar 00 <?php /** * Class ActionScheduler_Schedule */ interface ActionScheduler_Schedule { /** * Get the date & time this schedule was created to run, or calculate when it should be run * after a given date & time. * * @param null|DateTime $after Timestamp. * @return DateTime|null */ public function next( ?DateTime $after = null ); /** * Identify the schedule as (not) recurring. * * @return bool */ public function is_recurring(); } vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php 0000644 00000003157 15174671617 0026272 0 ustar 00 <?php /** * Class ActionScheduler_SimpleSchedule */ class ActionScheduler_CanceledSchedule extends ActionScheduler_SimpleSchedule { /** * Deprecated property @see $this->__wakeup() for details. * * @var null */ private $timestamp = null; /** * Calculate when the next instance of this schedule would run based on a given date & time. * * @param DateTime $after Timestamp. * * @return DateTime|null */ public function calculate_next( DateTime $after ) { return null; } /** * Cancelled actions should never have a next schedule, even if get_next() * is called with $after < $this->scheduled_date. * * @param DateTime $after Timestamp. * @return DateTime|null */ public function get_next( DateTime $after ) { return null; } /** * Action is not recurring. * * @return bool */ public function is_recurring() { return false; } /** * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 * * Prior to Action Scheduler 3.0.0, schedules used different property names to refer * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 * aligned properties and property names for better inheritance. To maintain backward * compatibility with schedules serialized and stored prior to 3.0, we need to correctly * map the old property names with matching visibility. */ public function __wakeup() { if ( ! is_null( $this->timestamp ) ) { $this->scheduled_timestamp = $this->timestamp; unset( $this->timestamp ); } parent::__wakeup(); } } vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_SimpleSchedule.php 0000644 00000004477 15174671617 0026033 0 ustar 00 <?php /** * Class ActionScheduler_SimpleSchedule */ class ActionScheduler_SimpleSchedule extends ActionScheduler_Abstract_Schedule { /** * Deprecated property @see $this->__wakeup() for details. * * @var null|DateTime */ private $timestamp = null; /** * Calculate when this schedule should start after a given date & time using * the number of seconds between recurrences. * * @param DateTime $after Timestamp. * * @return DateTime|null */ public function calculate_next( DateTime $after ) { return null; } /** * Schedule is not recurring. * * @return bool */ public function is_recurring() { return false; } /** * Serialize schedule with data required prior to AS 3.0.0 * * Prior to Action Scheduler 3.0.0, schedules used different property names to refer * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 * aligned properties and property names for better inheritance. To guard against the * scheduled date for single actions always being seen as "now" if downgrading to * Action Scheduler < 3.0.0, we need to also store the data with the old property names * so if it's unserialized in AS < 3.0, the schedule doesn't end up with a null recurrence. * * @return array */ public function __sleep() { $sleep_params = parent::__sleep(); $this->timestamp = $this->scheduled_timestamp; return array_merge( $sleep_params, array( 'timestamp', ) ); } /** * Unserialize recurring schedules serialized/stored prior to AS 3.0.0 * * Prior to Action Scheduler 3.0.0, schedules used different property names to refer * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 * aligned properties and property names for better inheritance. To maintain backward * compatibility with schedules serialized and stored prior to 3.0, we need to correctly * map the old property names with matching visibility. */ public function __wakeup() { if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->timestamp ) ) { $this->scheduled_timestamp = $this->timestamp; unset( $this->timestamp ); } parent::__wakeup(); } } vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php 0000644 00000007367 15174671617 0025504 0 ustar 00 <?php /** * Class ActionScheduler_CronSchedule */ class ActionScheduler_CronSchedule extends ActionScheduler_Abstract_RecurringSchedule implements ActionScheduler_Schedule { /** * Deprecated property @see $this->__wakeup() for details. * * @var null */ private $start_timestamp = null; /** * Deprecated property @see $this->__wakeup() for details. * * @var null */ private $cron = null; /** * Wrapper for parent constructor to accept a cron expression string and map it to a CronExpression for this * objects $recurrence property. * * @param DateTime $start The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used. * @param CronExpression|string $recurrence The CronExpression used to calculate the schedule's next instance. * @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance. */ public function __construct( DateTime $start, $recurrence, ?DateTime $first = null ) { if ( ! is_a( $recurrence, 'CronExpression' ) ) { $recurrence = CronExpression::factory( $recurrence ); } // For backward compatibility, we need to make sure the date is set to the first matching cron date, not whatever date is passed in. Importantly, by passing true as the 3rd param, if $start matches the cron expression, then it will be used. This was previously handled in the now deprecated next() method. $date = $recurrence->getNextRunDate( $start, 0, true ); // parent::__construct() will set this to $date by default, but that may be different to $start now. $first = empty( $first ) ? $start : $first; parent::__construct( $date, $recurrence, $first ); } /** * Calculate when an instance of this schedule would start based on a given * date & time using its the CronExpression. * * @param DateTime $after Timestamp. * @return DateTime */ protected function calculate_next( DateTime $after ) { return $this->recurrence->getNextRunDate( $after, 0, false ); } /** * Get the schedule's recurrence. * * @return string */ public function get_recurrence() { return strval( $this->recurrence ); } /** * Serialize cron schedules with data required prior to AS 3.0.0 * * Prior to Action Scheduler 3.0.0, recurring schedules used different property names to * refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 * aligned properties and property names for better inheritance. To guard against the * possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to * also store the data with the old property names so if it's unserialized in AS < 3.0, * the schedule doesn't end up with a null recurrence. * * @return array */ public function __sleep() { $sleep_params = parent::__sleep(); $this->start_timestamp = $this->scheduled_timestamp; $this->cron = $this->recurrence; return array_merge( $sleep_params, array( 'start_timestamp', 'cron', ) ); } /** * Unserialize cron schedules serialized/stored prior to AS 3.0.0 * * For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup(). */ public function __wakeup() { if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) { $this->scheduled_timestamp = $this->start_timestamp; unset( $this->start_timestamp ); } if ( is_null( $this->recurrence ) && ! is_null( $this->cron ) ) { $this->recurrence = $this->cron; unset( $this->cron ); } parent::__wakeup(); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionFactory.php 0000644 00000037657 15174671617 0023721 0 ustar 00 <?php /** * Class ActionScheduler_ActionFactory */ class ActionScheduler_ActionFactory { /** * Return stored actions for given params. * * @param string $status The action's status in the data store. * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass to callbacks when the hook is triggered. * @param ActionScheduler_Schedule|null $schedule The action's schedule. * @param string $group A group to put the action in. * phpcs:ignore Squiz.Commenting.FunctionComment.ExtraParamComment * @param int $priority The action priority. * * @return ActionScheduler_Action An instance of the stored action. */ public function get_stored_action( $status, $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) { // The 6th parameter ($priority) is not formally declared in the method signature to maintain compatibility with // third-party subclasses created before this param was added. $priority = func_num_args() >= 6 ? (int) func_get_arg( 5 ) : 10; switch ( $status ) { case ActionScheduler_Store::STATUS_PENDING: $action_class = 'ActionScheduler_Action'; break; case ActionScheduler_Store::STATUS_CANCELED: $action_class = 'ActionScheduler_CanceledAction'; if ( ! is_null( $schedule ) && ! is_a( $schedule, 'ActionScheduler_CanceledSchedule' ) && ! is_a( $schedule, 'ActionScheduler_NullSchedule' ) ) { $schedule = new ActionScheduler_CanceledSchedule( $schedule->get_date() ); } break; default: $action_class = 'ActionScheduler_FinishedAction'; break; } $action_class = apply_filters( 'action_scheduler_stored_action_class', $action_class, $status, $hook, $args, $schedule, $group ); $action = new $action_class( $hook, $args, $schedule, $group ); $action->set_priority( $priority ); /** * Allow 3rd party code to change the instantiated action for a given hook, args, schedule and group. * * @param ActionScheduler_Action $action The instantiated action. * @param string $hook The instantiated action's hook. * @param array $args The instantiated action's args. * @param ActionScheduler_Schedule $schedule The instantiated action's schedule. * @param string $group The instantiated action's group. * @param int $priority The action priority. */ return apply_filters( 'action_scheduler_stored_action_instance', $action, $hook, $args, $schedule, $group, $priority ); } /** * Enqueue an action to run one time, as soon as possible (rather a specific scheduled time). * * This method creates a new action using the NullSchedule. In practice, this results in an action scheduled to * execute "now". Therefore, it will generally run as soon as possible but is not prioritized ahead of other actions * that are already past-due. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param string $group A group to put the action in. * * @return int The ID of the stored action. */ public function async( $hook, $args = array(), $group = '' ) { return $this->async_unique( $hook, $args, $group, false ); } /** * Same as async, but also supports $unique param. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param string $group A group to put the action in. * @param bool $unique Whether to ensure the action is unique. * * @return int The ID of the stored action. */ public function async_unique( $hook, $args = array(), $group = '', $unique = true ) { $schedule = new ActionScheduler_NullSchedule(); $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); return $unique ? $this->store_unique_action( $action, $unique ) : $this->store( $action ); } /** * Create single action. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param int $when Unix timestamp when the action will run. * @param string $group A group to put the action in. * * @return int The ID of the stored action. */ public function single( $hook, $args = array(), $when = null, $group = '' ) { return $this->single_unique( $hook, $args, $when, $group, false ); } /** * Create single action only if there is no pending or running action with same name and params. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param int $when Unix timestamp when the action will run. * @param string $group A group to put the action in. * @param bool $unique Whether action scheduled should be unique. * * @return int The ID of the stored action. */ public function single_unique( $hook, $args = array(), $when = null, $group = '', $unique = true ) { $date = as_get_datetime_object( $when ); $schedule = new ActionScheduler_SimpleSchedule( $date ); $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); return $unique ? $this->store_unique_action( $action ) : $this->store( $action ); } /** * Create the first instance of an action recurring on a given interval. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param int $first Unix timestamp for the first run. * @param int $interval Seconds between runs. * @param string $group A group to put the action in. * * @return int The ID of the stored action. */ public function recurring( $hook, $args = array(), $first = null, $interval = null, $group = '' ) { return $this->recurring_unique( $hook, $args, $first, $interval, $group, false ); } /** * Create the first instance of an action recurring on a given interval only if there is no pending or running action with same name and params. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param int $first Unix timestamp for the first run. * @param int $interval Seconds between runs. * @param string $group A group to put the action in. * @param bool $unique Whether action scheduled should be unique. * * @return int The ID of the stored action. */ public function recurring_unique( $hook, $args = array(), $first = null, $interval = null, $group = '', $unique = true ) { if ( empty( $interval ) ) { return $this->single_unique( $hook, $args, $first, $group, $unique ); } $date = as_get_datetime_object( $first ); $schedule = new ActionScheduler_IntervalSchedule( $date, $interval ); $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); return $unique ? $this->store_unique_action( $action ) : $this->store( $action ); } /** * Create the first instance of an action recurring on a Cron schedule. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param int $base_timestamp The first instance of the action will be scheduled * to run at a time calculated after this timestamp matching the cron * expression. This can be used to delay the first instance of the action. * @param int $schedule A cron definition string. * @param string $group A group to put the action in. * * @return int The ID of the stored action. */ public function cron( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '' ) { return $this->cron_unique( $hook, $args, $base_timestamp, $schedule, $group, false ); } /** * Create the first instance of an action recurring on a Cron schedule only if there is no pending or running action with same name and params. * * @param string $hook The hook to trigger when this action runs. * @param array $args Args to pass when the hook is triggered. * @param int $base_timestamp The first instance of the action will be scheduled * to run at a time calculated after this timestamp matching the cron * expression. This can be used to delay the first instance of the action. * @param int $schedule A cron definition string. * @param string $group A group to put the action in. * @param bool $unique Whether action scheduled should be unique. * * @return int The ID of the stored action. **/ public function cron_unique( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '', $unique = true ) { if ( empty( $schedule ) ) { return $this->single_unique( $hook, $args, $base_timestamp, $group, $unique ); } $date = as_get_datetime_object( $base_timestamp ); $cron = CronExpression::factory( $schedule ); $schedule = new ActionScheduler_CronSchedule( $date, $cron ); $action = new ActionScheduler_Action( $hook, $args, $schedule, $group ); return $unique ? $this->store_unique_action( $action ) : $this->store( $action ); } /** * Create a successive instance of a recurring or cron action. * * Importantly, the action will be rescheduled to run based on the current date/time. * That means when the action is scheduled to run in the past, the next scheduled date * will be pushed forward. For example, if a recurring action set to run every hour * was scheduled to run 5 seconds ago, it will be next scheduled for 1 hour in the * future, which is 1 hour and 5 seconds from when it was last scheduled to run. * * Alternatively, if the action is scheduled to run in the future, and is run early, * likely via manual intervention, then its schedule will change based on the time now. * For example, if a recurring action set to run every day, and is run 12 hours early, * it will run again in 24 hours, not 36 hours. * * This slippage is less of an issue with Cron actions, as the specific run time can * be set for them to run, e.g. 1am each day. In those cases, and entire period would * need to be missed before there was any change is scheduled, e.g. in the case of an * action scheduled for 1am each day, the action would need to run an entire day late. * * @param ActionScheduler_Action $action The existing action. * * @return string The ID of the stored action * @throws InvalidArgumentException If $action is not a recurring action. */ public function repeat( $action ) { $schedule = $action->get_schedule(); $next = $schedule->get_next( as_get_datetime_object() ); if ( is_null( $next ) || ! $schedule->is_recurring() ) { throw new InvalidArgumentException( __( 'Invalid action - must be a recurring action.', 'action-scheduler' ) ); } $schedule_class = get_class( $schedule ); $new_schedule = new $schedule( $next, $schedule->get_recurrence(), $schedule->get_first_date() ); $new_action = new ActionScheduler_Action( $action->get_hook(), $action->get_args(), $new_schedule, $action->get_group() ); $new_action->set_priority( $action->get_priority() ); return $this->store( $new_action ); } /** * Creates a scheduled action. * * This general purpose method can be used in place of specific methods such as async(), * async_unique(), single() or single_unique(), etc. * * @internal Not intended for public use, should not be overridden by subclasses. * * @param array $options { * Describes the action we wish to schedule. * * @type string $type Must be one of 'async', 'cron', 'recurring', or 'single'. * @type string $hook The hook to be executed. * @type array $arguments Arguments to be passed to the callback. * @type string $group The action group. * @type bool $unique If the action should be unique. * @type int $when Timestamp. Indicates when the action, or first instance of the action in the case * of recurring or cron actions, becomes due. * @type int|string $pattern Recurrence pattern. This is either an interval in seconds for recurring actions * or a cron expression for cron actions. * @type int $priority Lower values means higher priority. Should be in the range 0-255. * } * * @return int The action ID. Zero if there was an error scheduling the action. */ public function create( array $options = array() ) { $defaults = array( 'type' => 'single', 'hook' => '', 'arguments' => array(), 'group' => '', 'unique' => false, 'when' => time(), 'pattern' => null, 'priority' => 10, ); $options = array_merge( $defaults, $options ); // Cron/recurring actions without a pattern are treated as single actions (this gives calling code the ability // to use functions like as_schedule_recurring_action() to schedule recurring as well as single actions). if ( ( 'cron' === $options['type'] || 'recurring' === $options['type'] ) && empty( $options['pattern'] ) ) { $options['type'] = 'single'; } switch ( $options['type'] ) { case 'async': $schedule = new ActionScheduler_NullSchedule(); break; case 'cron': $date = as_get_datetime_object( $options['when'] ); $cron = CronExpression::factory( $options['pattern'] ); $schedule = new ActionScheduler_CronSchedule( $date, $cron ); break; case 'recurring': $date = as_get_datetime_object( $options['when'] ); $schedule = new ActionScheduler_IntervalSchedule( $date, $options['pattern'] ); break; case 'single': $date = as_get_datetime_object( $options['when'] ); $schedule = new ActionScheduler_SimpleSchedule( $date ); break; default: // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log error_log( "Unknown action type '{$options['type']}' specified when trying to create an action for '{$options['hook']}'." ); return 0; } $action = new ActionScheduler_Action( $options['hook'], $options['arguments'], $schedule, $options['group'] ); $action->set_priority( $options['priority'] ); $action_id = 0; try { $action_id = $options['unique'] ? $this->store_unique_action( $action ) : $this->store( $action ); } catch ( Exception $e ) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log error_log( sprintf( /* translators: %1$s is the name of the hook to be enqueued, %2$s is the exception message. */ __( 'Caught exception while enqueuing action "%1$s": %2$s', 'action-scheduler' ), $options['hook'], $e->getMessage() ) ); } return $action_id; } /** * Save action to database. * * @param ActionScheduler_Action $action Action object to save. * * @return int The ID of the stored action */ protected function store( ActionScheduler_Action $action ) { $store = ActionScheduler_Store::instance(); return $store->save_action( $action ); } /** * Store action if it's unique. * * @param ActionScheduler_Action $action Action object to store. * * @return int ID of the created action. Will be 0 if action was not created. */ protected function store_unique_action( ActionScheduler_Action $action ) { $store = ActionScheduler_Store::instance(); if ( method_exists( $store, 'save_unique_action' ) ) { return $store->save_unique_action( $action ); } else { /** * Fallback to non-unique action if the store doesn't support unique actions. * We try to save the action as unique, accepting that there might be a race condition. * This is likely still better than giving up on unique actions entirely. */ $existing_action_id = (int) $store->find_action( $action->get_hook(), array( 'args' => $action->get_args(), 'status' => ActionScheduler_Store::STATUS_PENDING, 'group' => $action->get_group(), ) ); if ( $existing_action_id > 0 ) { return 0; } return $store->save_action( $action ); } } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_Exception.php 0000644 00000000317 15174671617 0023071 0 ustar 00 <?php /** * ActionScheduler Exception Interface. * * Facilitates catching Exceptions unique to Action Scheduler. * * @package ActionScheduler * @since 2.1.0 */ interface ActionScheduler_Exception {} vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php 0000644 00000010661 15174671617 0024301 0 ustar 00 <?php /** * Class ActionScheduler_WPCommentCleaner * * @since 3.0.0 */ class ActionScheduler_WPCommentCleaner { /** * Post migration hook used to cleanup the WP comment table. * * @var string */ protected static $cleanup_hook = 'action_scheduler/cleanup_wp_comment_logs'; /** * An instance of the ActionScheduler_wpCommentLogger class to interact with the comments table. * * This instance should only be used as an interface. It should not be initialized. * * @var ActionScheduler_wpCommentLogger */ protected static $wp_comment_logger = null; /** * The key used to store the cached value of whether there are logs in the WP comment table. * * @var string */ protected static $has_logs_option_key = 'as_has_wp_comment_logs'; /** * Initialize the class and attach callbacks. */ public static function init() { if ( empty( self::$wp_comment_logger ) ) { self::$wp_comment_logger = new ActionScheduler_wpCommentLogger(); } add_action( self::$cleanup_hook, array( __CLASS__, 'delete_all_action_comments' ) ); // While there are orphaned logs left in the comments table, we need to attach the callbacks which filter comment counts. add_action( 'pre_get_comments', array( self::$wp_comment_logger, 'filter_comment_queries' ), 10, 1 ); add_action( 'wp_count_comments', array( self::$wp_comment_logger, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs. add_action( 'comment_feed_where', array( self::$wp_comment_logger, 'filter_comment_feed' ), 10, 2 ); // Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen. add_action( 'load-tools_page_action-scheduler', array( __CLASS__, 'register_admin_notice' ) ); add_action( 'load-woocommerce_page_wc-status', array( __CLASS__, 'register_admin_notice' ) ); } /** * Determines if there are log entries in the wp comments table. * * Uses the flag set on migration completion set by @see self::maybe_schedule_cleanup(). * * @return boolean Whether there are scheduled action comments in the comments table. */ public static function has_logs() { return 'yes' === get_option( self::$has_logs_option_key ); } /** * Schedules the WP Post comment table cleanup to run in 6 months if it's not already scheduled. * Attached to the migration complete hook 'action_scheduler/migration_complete'. */ public static function maybe_schedule_cleanup() { $has_logs = 'no'; $args = array( 'type' => ActionScheduler_wpCommentLogger::TYPE, 'number' => 1, 'fields' => 'ids', ); if ( (bool) get_comments( $args ) ) { $has_logs = 'yes'; if ( ! as_next_scheduled_action( self::$cleanup_hook ) ) { as_schedule_single_action( gmdate( 'U' ) + ( 6 * MONTH_IN_SECONDS ), self::$cleanup_hook ); } } update_option( self::$has_logs_option_key, $has_logs, true ); } /** * Delete all action comments from the WP Comments table. */ public static function delete_all_action_comments() { global $wpdb; $wpdb->delete( $wpdb->comments, array( 'comment_type' => ActionScheduler_wpCommentLogger::TYPE, 'comment_agent' => ActionScheduler_wpCommentLogger::AGENT, ) ); update_option( self::$has_logs_option_key, 'no', true ); } /** * Registers admin notices about the orphaned action logs. */ public static function register_admin_notice() { add_action( 'admin_notices', array( __CLASS__, 'print_admin_notice' ) ); } /** * Prints details about the orphaned action logs and includes information on where to learn more. */ public static function print_admin_notice() { $next_cleanup_message = ''; $next_scheduled_cleanup_hook = as_next_scheduled_action( self::$cleanup_hook ); if ( $next_scheduled_cleanup_hook ) { /* translators: %s: date interval */ $next_cleanup_message = sprintf( __( 'This data will be deleted in %s.', 'action-scheduler' ), human_time_diff( gmdate( 'U' ), $next_scheduled_cleanup_hook ) ); } $notice = sprintf( /* translators: 1: next cleanup message 2: github issue URL */ __( 'Action Scheduler has migrated data to custom tables; however, orphaned log entries exist in the WordPress Comments table. %1$s <a href="%2$s">Learn more »</a>', 'action-scheduler' ), $next_cleanup_message, 'https://github.com/woocommerce/action-scheduler/issues/368' ); echo '<div class="notice notice-warning"><p>' . wp_kses_post( $notice ) . '</p></div>'; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php 0000644 00000000512 15174671617 0023526 0 ustar 00 <?php /** * Class ActionScheduler_NullLogEntry */ class ActionScheduler_NullLogEntry extends ActionScheduler_LogEntry { /** * Construct. * * @param string $action_id Action ID. * @param string $message Log entry. */ public function __construct( $action_id = '', $message = '' ) { // nothing to see here. } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_DataController.php 0000644 00000013211 15174671617 0024045 0 ustar 00 <?php use Action_Scheduler\Migration\Controller; /** * Class ActionScheduler_DataController * * The main plugin/initialization class for the data stores. * * Responsible for hooking everything up with WordPress. * * @package Action_Scheduler * * @since 3.0.0 */ class ActionScheduler_DataController { /** Action data store class name. */ const DATASTORE_CLASS = 'ActionScheduler_DBStore'; /** Logger data store class name. */ const LOGGER_CLASS = 'ActionScheduler_DBLogger'; /** Migration status option name. */ const STATUS_FLAG = 'action_scheduler_migration_status'; /** Migration status option value. */ const STATUS_COMPLETE = 'complete'; /** Migration minimum required PHP version. */ const MIN_PHP_VERSION = '5.5'; /** * Instance. * * @var ActionScheduler_DataController */ private static $instance; /** * Sleep time in seconds. * * @var int */ private static $sleep_time = 0; /** * Tick count required for freeing memory. * * @var int */ private static $free_ticks = 50; /** * Get a flag indicating whether the migration environment dependencies are met. * * @return bool */ public static function dependencies_met() { $php_support = version_compare( PHP_VERSION, self::MIN_PHP_VERSION, '>=' ); return $php_support && apply_filters( 'action_scheduler_migration_dependencies_met', true ); } /** * Get a flag indicating whether the migration is complete. * * @return bool Whether the flag has been set marking the migration as complete */ public static function is_migration_complete() { return get_option( self::STATUS_FLAG ) === self::STATUS_COMPLETE; } /** * Mark the migration as complete. */ public static function mark_migration_complete() { update_option( self::STATUS_FLAG, self::STATUS_COMPLETE ); } /** * Unmark migration when a plugin is de-activated. Will not work in case of silent activation, for example in an update. * We do this to mitigate the bug of lost actions which happens if there was an AS 2.x to AS 3.x migration in the past, but that plugin is now * deactivated and the site was running on AS 2.x again. */ public static function mark_migration_incomplete() { delete_option( self::STATUS_FLAG ); } /** * Set the action store class name. * * @param string $class Classname of the store class. * * @return string */ public static function set_store_class( $class ) { return self::DATASTORE_CLASS; } /** * Set the action logger class name. * * @param string $class Classname of the logger class. * * @return string */ public static function set_logger_class( $class ) { return self::LOGGER_CLASS; } /** * Set the sleep time in seconds. * * @param integer $sleep_time The number of seconds to pause before resuming operation. */ public static function set_sleep_time( $sleep_time ) { self::$sleep_time = (int) $sleep_time; } /** * Set the tick count required for freeing memory. * * @param integer $free_ticks The number of ticks to free memory on. */ public static function set_free_ticks( $free_ticks ) { self::$free_ticks = (int) $free_ticks; } /** * Free memory if conditions are met. * * @param int $ticks Current tick count. */ public static function maybe_free_memory( $ticks ) { if ( self::$free_ticks && 0 === $ticks % self::$free_ticks ) { self::free_memory(); } } /** * Reduce memory footprint by clearing the database query and object caches. */ public static function free_memory() { if ( 0 < self::$sleep_time ) { /* translators: %d: amount of time */ \WP_CLI::warning( sprintf( _n( 'Stopped the insanity for %d second', 'Stopped the insanity for %d seconds', self::$sleep_time, 'action-scheduler' ), self::$sleep_time ) ); sleep( self::$sleep_time ); } \WP_CLI::warning( __( 'Attempting to reduce used memory...', 'action-scheduler' ) ); /** * Globals. * * @var $wpdb \wpdb * @var $wp_object_cache \WP_Object_Cache */ global $wpdb, $wp_object_cache; $wpdb->queries = array(); if ( ! is_a( $wp_object_cache, 'WP_Object_Cache' ) ) { return; } // Not all drop-ins support these props, however, there may be existing installations that rely on these being cleared. if ( property_exists( $wp_object_cache, 'group_ops' ) ) { $wp_object_cache->group_ops = array(); } if ( property_exists( $wp_object_cache, 'stats' ) ) { $wp_object_cache->stats = array(); } if ( property_exists( $wp_object_cache, 'memcache_debug' ) ) { $wp_object_cache->memcache_debug = array(); } if ( property_exists( $wp_object_cache, 'cache' ) ) { $wp_object_cache->cache = array(); } if ( is_callable( array( $wp_object_cache, '__remoteset' ) ) ) { call_user_func( array( $wp_object_cache, '__remoteset' ) ); // important! } } /** * Connect to table datastores if migration is complete. * Otherwise, proceed with the migration if the dependencies have been met. */ public static function init() { if ( self::is_migration_complete() ) { add_filter( 'action_scheduler_store_class', array( 'ActionScheduler_DataController', 'set_store_class' ), 100 ); add_filter( 'action_scheduler_logger_class', array( 'ActionScheduler_DataController', 'set_logger_class' ), 100 ); add_action( 'deactivate_plugin', array( 'ActionScheduler_DataController', 'mark_migration_incomplete' ) ); } elseif ( self::dependencies_met() ) { Controller::init(); } add_action( 'action_scheduler/progress_tick', array( 'ActionScheduler_DataController', 'maybe_free_memory' ) ); } /** * Singleton factory. */ public static function instance() { if ( ! isset( self::$instance ) ) { self::$instance = new static(); } return self::$instance; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_ActionClaim.php 0000644 00000001214 15174671617 0023313 0 ustar 00 <?php /** * Class ActionScheduler_ActionClaim */ class ActionScheduler_ActionClaim { /** * Claim ID. * * @var string */ private $id = ''; /** * Claimed action IDs. * * @var int[] */ private $action_ids = array(); /** * Construct. * * @param string $id Claim ID. * @param int[] $action_ids Action IDs. */ public function __construct( $id, array $action_ids ) { $this->id = $id; $this->action_ids = $action_ids; } /** * Get claim ID. */ public function get_id() { return $this->id; } /** * Get IDs of claimed actions. */ public function get_actions() { return $this->action_ids; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php 0000644 00000007152 15174671617 0022747 0 ustar 00 <?php /** * Class ActionScheduler_Versions */ class ActionScheduler_Versions { /** * ActionScheduler_Versions instance. * * @var ActionScheduler_Versions */ private static $instance = null; /** * Versions. * * @var array<string, callable> */ private $versions = array(); /** * Registered sources. * * @var array<string, string> */ private $sources = array(); /** * Register version's callback. * * @param string $version_string Action Scheduler version. * @param callable $initialization_callback Callback to initialize the version. */ public function register( $version_string, $initialization_callback ) { if ( isset( $this->versions[ $version_string ] ) ) { return false; } // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ); $source = $backtrace[0]['file']; $this->versions[ $version_string ] = $initialization_callback; $this->sources[ $source ] = $version_string; return true; } /** * Get all versions. */ public function get_versions() { return $this->versions; } /** * Get registered sources. * * Use with caution: this method is only available as of Action Scheduler's 3.9.1 * release and, owing to the way Action Scheduler is loaded, it's possible that the * class definition used at runtime will belong to an earlier version. * * @since 3.9.1 * * @return array<string, string> */ public function get_sources() { return $this->sources; } /** * Get latest version registered. */ public function latest_version() { $keys = array_keys( $this->versions ); if ( empty( $keys ) ) { return false; } uasort( $keys, 'version_compare' ); return end( $keys ); } /** * Get callback for latest registered version. */ public function latest_version_callback() { $latest = $this->latest_version(); if ( empty( $latest ) || ! isset( $this->versions[ $latest ] ) ) { return '__return_null'; } return $this->versions[ $latest ]; } /** * Get instance. * * @return ActionScheduler_Versions * @codeCoverageIgnore */ public static function instance() { if ( empty( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } /** * Initialize. * * @codeCoverageIgnore */ public static function initialize_latest_version() { $self = self::instance(); call_user_func( $self->latest_version_callback() ); } /** * Returns information about the plugin or theme which contains the current active version * of Action Scheduler. * * If this cannot be determined, or if Action Scheduler is being loaded via some other * method, then it will return an empty array. Otherwise, if populated, the array will * look like the following: * * [ * 'type' => 'plugin', # or 'theme' * 'name' => 'Name', * ] * * @deprecated 3.9.2 Use ActionScheduler_SystemInformation::active_source(). * * @return array */ public function active_source(): array { _deprecated_function( __METHOD__, '3.9.2', 'ActionScheduler_SystemInformation::active_source()' ); return ActionScheduler_SystemInformation::active_source(); } /** * Returns the directory path for the currently active installation of Action Scheduler. * * @deprecated 3.9.2 Use ActionScheduler_SystemInformation::active_source_path(). * * @return string */ public function active_source_path(): string { _deprecated_function( __METHOD__, '3.9.2', 'ActionScheduler_SystemInformation::active_source_path()' ); return ActionScheduler_SystemInformation::active_source_path(); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_ListTable.php 0000644 00000052166 15174671617 0023027 0 ustar 00 <?php /** * Implements the admin view of the actions. * * @codeCoverageIgnore */ class ActionScheduler_ListTable extends ActionScheduler_Abstract_ListTable { /** * The package name. * * @var string */ protected $package = 'action-scheduler'; /** * Columns to show (name => label). * * @var array */ protected $columns = array(); /** * Actions (name => label). * * @var array */ protected $row_actions = array(); /** * The active data stores * * @var ActionScheduler_Store */ protected $store; /** * A logger to use for getting action logs to display * * @var ActionScheduler_Logger */ protected $logger; /** * A ActionScheduler_QueueRunner runner instance (or child class) * * @var ActionScheduler_QueueRunner */ protected $runner; /** * Bulk actions. The key of the array is the method name of the implementation. * Example: bulk_<key>(array $ids, string $sql_in). * * See the comments in the parent class for further details * * @var array */ protected $bulk_actions = array(); /** * Flag variable to render our notifications, if any, once. * * @var bool */ protected static $did_notification = false; /** * Array of seconds for common time periods, like week or month, alongside an internationalised string representation, i.e. "Day" or "Days" * * @var array */ private static $time_periods; /** * Sets the current data store object into `store->action` and initialises the object. * * @param ActionScheduler_Store $store Store object. * @param ActionScheduler_Logger $logger Logger object. * @param ActionScheduler_QueueRunner $runner Runner object. */ public function __construct( ActionScheduler_Store $store, ActionScheduler_Logger $logger, ActionScheduler_QueueRunner $runner ) { $this->store = $store; $this->logger = $logger; $this->runner = $runner; $this->table_header = __( 'Scheduled Actions', 'action-scheduler' ); $this->bulk_actions = array( 'delete' => __( 'Delete', 'action-scheduler' ), ); $this->columns = array( 'hook' => __( 'Hook', 'action-scheduler' ), 'status' => __( 'Status', 'action-scheduler' ), 'args' => __( 'Arguments', 'action-scheduler' ), 'group' => __( 'Group', 'action-scheduler' ), 'recurrence' => __( 'Recurrence', 'action-scheduler' ), 'schedule' => __( 'Scheduled Date', 'action-scheduler' ), 'log_entries' => __( 'Log', 'action-scheduler' ), ); $this->sort_by = array( 'schedule', 'hook', 'group', ); $this->search_by = array( 'hook', 'args', 'claim_id', ); $request_status = $this->get_request_status(); if ( empty( $request_status ) ) { $this->sort_by[] = 'status'; } elseif ( in_array( $request_status, array( 'in-progress', 'failed' ), true ) ) { $this->columns += array( 'claim_id' => __( 'Claim ID', 'action-scheduler' ) ); $this->sort_by[] = 'claim_id'; } $this->row_actions = array( 'hook' => array( 'run' => array( 'name' => __( 'Run', 'action-scheduler' ), 'desc' => __( 'Process the action now as if it were run as part of a queue', 'action-scheduler' ), ), 'cancel' => array( 'name' => __( 'Cancel', 'action-scheduler' ), 'desc' => __( 'Cancel the action now to avoid it being run in future', 'action-scheduler' ), 'class' => 'cancel trash', ), ), ); self::$time_periods = array( array( 'seconds' => YEAR_IN_SECONDS, /* translators: %s: amount of time */ 'names' => _n_noop( '%s year', '%s years', 'action-scheduler' ), ), array( 'seconds' => MONTH_IN_SECONDS, /* translators: %s: amount of time */ 'names' => _n_noop( '%s month', '%s months', 'action-scheduler' ), ), array( 'seconds' => WEEK_IN_SECONDS, /* translators: %s: amount of time */ 'names' => _n_noop( '%s week', '%s weeks', 'action-scheduler' ), ), array( 'seconds' => DAY_IN_SECONDS, /* translators: %s: amount of time */ 'names' => _n_noop( '%s day', '%s days', 'action-scheduler' ), ), array( 'seconds' => HOUR_IN_SECONDS, /* translators: %s: amount of time */ 'names' => _n_noop( '%s hour', '%s hours', 'action-scheduler' ), ), array( 'seconds' => MINUTE_IN_SECONDS, /* translators: %s: amount of time */ 'names' => _n_noop( '%s minute', '%s minutes', 'action-scheduler' ), ), array( 'seconds' => 1, /* translators: %s: amount of time */ 'names' => _n_noop( '%s second', '%s seconds', 'action-scheduler' ), ), ); parent::__construct( array( 'singular' => 'action-scheduler', 'plural' => 'action-scheduler', 'ajax' => false, ) ); add_screen_option( 'per_page', array( 'default' => $this->items_per_page, ) ); add_filter( 'set_screen_option_' . $this->get_per_page_option_name(), array( $this, 'set_items_per_page_option' ), 10, 3 ); set_screen_options(); } /** * Handles setting the items_per_page option for this screen. * * @param mixed $status Default false (to skip saving the current option). * @param string $option Screen option name. * @param int $value Screen option value. * @return int */ public function set_items_per_page_option( $status, $option, $value ) { return $value; } /** * Convert an interval of seconds into a two part human friendly string. * * The WordPress human_time_diff() function only calculates the time difference to one degree, meaning * even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step * further to display two degrees of accuracy. * * Inspired by the Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/ * * @param int $interval A interval in seconds. * @param int $periods_to_include Depth of time periods to include, e.g. for an interval of 70, and $periods_to_include of 2, both minutes and seconds would be included. With a value of 1, only minutes would be included. * @return string A human friendly string representation of the interval. */ private static function human_interval( $interval, $periods_to_include = 2 ) { if ( $interval <= 0 ) { return __( 'Now!', 'action-scheduler' ); } $output = ''; $num_time_periods = count( self::$time_periods ); for ( $time_period_index = 0, $periods_included = 0, $seconds_remaining = $interval; $time_period_index < $num_time_periods && $seconds_remaining > 0 && $periods_included < $periods_to_include; $time_period_index++ ) { $periods_in_interval = floor( $seconds_remaining / self::$time_periods[ $time_period_index ]['seconds'] ); if ( $periods_in_interval > 0 ) { if ( ! empty( $output ) ) { $output .= ' '; } $output .= sprintf( translate_nooped_plural( self::$time_periods[ $time_period_index ]['names'], $periods_in_interval, 'action-scheduler' ), $periods_in_interval ); $seconds_remaining -= $periods_in_interval * self::$time_periods[ $time_period_index ]['seconds']; $periods_included++; } } return $output; } /** * Returns the recurrence of an action or 'Non-repeating'. The output is human readable. * * @param ActionScheduler_Action $action Action object. * * @return string */ protected function get_recurrence( $action ) { $schedule = $action->get_schedule(); if ( $schedule->is_recurring() && method_exists( $schedule, 'get_recurrence' ) ) { $recurrence = $schedule->get_recurrence(); if ( is_numeric( $recurrence ) ) { /* translators: %s: time interval */ return sprintf( __( 'Every %s', 'action-scheduler' ), self::human_interval( $recurrence ) ); } else { return $recurrence; } } return __( 'Non-repeating', 'action-scheduler' ); } /** * Serializes the argument of an action to render it in a human friendly format. * * @param array $row The array representation of the current row of the table. * * @return string */ public function column_args( array $row ) { if ( empty( $row['args'] ) ) { return apply_filters( 'action_scheduler_list_table_column_args', '', $row ); } $row_html = '<ul>'; foreach ( $row['args'] as $key => $value ) { $row_html .= sprintf( '<li><code>%s => %s</code></li>', esc_html( var_export( $key, true ) ), esc_html( var_export( $value, true ) ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export } $row_html .= '</ul>'; return apply_filters( 'action_scheduler_list_table_column_args', $row_html, $row ); } /** * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal. * * @param array $row Action array. * @return string */ public function column_log_entries( array $row ) { $log_entries_html = '<ol>'; $timezone = new DateTimezone( 'UTC' ); foreach ( $row['log_entries'] as $log_entry ) { $log_entries_html .= $this->get_log_entry_html( $log_entry, $timezone ); } $log_entries_html .= '</ol>'; return $log_entries_html; } /** * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal. * * @param ActionScheduler_LogEntry $log_entry Log entry object. * @param DateTimezone $timezone Timestamp. * @return string */ protected function get_log_entry_html( ActionScheduler_LogEntry $log_entry, DateTimezone $timezone ) { $date = $log_entry->get_date(); $date->setTimezone( $timezone ); return sprintf( '<li><strong>%s</strong><br/>%s</li>', esc_html( $date->format( 'Y-m-d H:i:s O' ) ), esc_html( $log_entry->get_message() ) ); } /** * Only display row actions for pending actions. * * @param array $row Row to render. * @param string $column_name Current row. * * @return string */ protected function maybe_render_actions( $row, $column_name ) { if ( 'pending' === strtolower( $row['status_name'] ) ) { return parent::maybe_render_actions( $row, $column_name ); } return ''; } /** * Renders admin notifications * * Notifications: * 1. When the maximum number of tasks are being executed simultaneously. * 2. Notifications when a task is manually executed. * 3. Tables are missing. */ public function display_admin_notices() { global $wpdb; if ( ( is_a( $this->store, 'ActionScheduler_HybridStore' ) || is_a( $this->store, 'ActionScheduler_DBStore' ) ) && apply_filters( 'action_scheduler_enable_recreate_data_store', true ) ) { $table_list = array( 'actionscheduler_actions', 'actionscheduler_logs', 'actionscheduler_groups', 'actionscheduler_claims', ); $found_tables = $wpdb->get_col( "SHOW TABLES LIKE '{$wpdb->prefix}actionscheduler%'" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared foreach ( $table_list as $table_name ) { if ( ! in_array( $wpdb->prefix . $table_name, $found_tables, true ) ) { $this->admin_notices[] = array( 'class' => 'error', 'message' => __( 'It appears one or more database tables were missing. Attempting to re-create the missing table(s).', 'action-scheduler' ), ); $this->recreate_tables(); parent::display_admin_notices(); return; } } } if ( $this->runner->has_maximum_concurrent_batches() ) { $claim_count = $this->store->get_claim_count(); $this->admin_notices[] = array( 'class' => 'updated', 'message' => sprintf( /* translators: %s: amount of claims */ _n( 'Maximum simultaneous queues already in progress (%s queue). No additional queues will begin processing until the current queues are complete.', 'Maximum simultaneous queues already in progress (%s queues). No additional queues will begin processing until the current queues are complete.', $claim_count, 'action-scheduler' ), $claim_count ), ); } elseif ( $this->store->has_pending_actions_due() ) { $async_request_lock_expiration = ActionScheduler::lock()->get_expiration( 'async-request-runner' ); // No lock set or lock expired. if ( false === $async_request_lock_expiration || $async_request_lock_expiration < time() ) { $in_progress_url = add_query_arg( 'status', 'in-progress', remove_query_arg( 'status' ) ); /* translators: %s: process URL */ $async_request_message = sprintf( __( 'A new queue has begun processing. <a href="%s">View actions in-progress »</a>', 'action-scheduler' ), esc_url( $in_progress_url ) ); } else { /* translators: %d: seconds */ $async_request_message = sprintf( __( 'The next queue will begin processing in approximately %d seconds.', 'action-scheduler' ), $async_request_lock_expiration - time() ); } $this->admin_notices[] = array( 'class' => 'notice notice-info', 'message' => $async_request_message, ); } $notification = get_transient( 'action_scheduler_admin_notice' ); if ( is_array( $notification ) ) { delete_transient( 'action_scheduler_admin_notice' ); $action = $this->store->fetch_action( $notification['action_id'] ); $action_hook_html = '<strong><code>' . $action->get_hook() . '</code></strong>'; if ( 1 === absint( $notification['success'] ) ) { $class = 'updated'; switch ( $notification['row_action_type'] ) { case 'run': /* translators: %s: action HTML */ $action_message_html = sprintf( __( 'Successfully executed action: %s', 'action-scheduler' ), $action_hook_html ); break; case 'cancel': /* translators: %s: action HTML */ $action_message_html = sprintf( __( 'Successfully canceled action: %s', 'action-scheduler' ), $action_hook_html ); break; default: /* translators: %s: action HTML */ $action_message_html = sprintf( __( 'Successfully processed change for action: %s', 'action-scheduler' ), $action_hook_html ); break; } } else { $class = 'error'; /* translators: 1: action HTML 2: action ID 3: error message */ $action_message_html = sprintf( __( 'Could not process change for action: "%1$s" (ID: %2$d). Error: %3$s', 'action-scheduler' ), $action_hook_html, esc_html( $notification['action_id'] ), esc_html( $notification['error_message'] ) ); } $action_message_html = apply_filters( 'action_scheduler_admin_notice_html', $action_message_html, $action, $notification ); $this->admin_notices[] = array( 'class' => $class, 'message' => $action_message_html, ); } parent::display_admin_notices(); } /** * Prints the scheduled date in a human friendly format. * * @param array $row The array representation of the current row of the table. * * @return string */ public function column_schedule( $row ) { return $this->get_schedule_display_string( $row['schedule'] ); } /** * Get the scheduled date in a human friendly format. * * @param ActionScheduler_Schedule $schedule Action's schedule. * @return string */ protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) { $schedule_display_string = ''; if ( is_a( $schedule, 'ActionScheduler_NullSchedule' ) ) { return __( 'async', 'action-scheduler' ); } if ( ! method_exists( $schedule, 'get_date' ) || ! $schedule->get_date() ) { return '0000-00-00 00:00:00'; } $next_timestamp = $schedule->get_date()->getTimestamp(); $schedule_display_string .= $schedule->get_date()->format( 'Y-m-d H:i:s O' ); $schedule_display_string .= '<br/>'; if ( gmdate( 'U' ) > $next_timestamp ) { /* translators: %s: date interval */ $schedule_display_string .= sprintf( __( ' (%s ago)', 'action-scheduler' ), self::human_interval( gmdate( 'U' ) - $next_timestamp ) ); } else { /* translators: %s: date interval */ $schedule_display_string .= sprintf( __( ' (%s)', 'action-scheduler' ), self::human_interval( $next_timestamp - gmdate( 'U' ) ) ); } return $schedule_display_string; } /** * Bulk delete. * * Deletes actions based on their ID. This is the handler for the bulk delete. It assumes the data * properly validated by the callee and it will delete the actions without any extra validation. * * @param int[] $ids Action IDs. * @param string $ids_sql Inherited and unused. */ protected function bulk_delete( array $ids, $ids_sql ) { foreach ( $ids as $id ) { try { $this->store->delete_action( $id ); } catch ( Exception $e ) { // A possible reason for an exception would include a scenario where the same action is deleted by a // concurrent request. // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log error_log( sprintf( /* translators: 1: action ID 2: exception message. */ __( 'Action Scheduler was unable to delete action %1$d. Reason: %2$s', 'action-scheduler' ), $id, $e->getMessage() ) ); } } } /** * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their * parameters are valid. * * @param int $action_id Action ID. */ protected function row_action_cancel( $action_id ) { $this->process_row_action( $action_id, 'cancel' ); } /** * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their * parameters are valid. * * @param int $action_id Action ID. */ protected function row_action_run( $action_id ) { $this->process_row_action( $action_id, 'run' ); } /** * Force the data store schema updates. */ protected function recreate_tables() { if ( is_a( $this->store, 'ActionScheduler_HybridStore' ) ) { $store = $this->store; } else { $store = new ActionScheduler_HybridStore(); } add_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10, 2 ); $store_schema = new ActionScheduler_StoreSchema(); $logger_schema = new ActionScheduler_LoggerSchema(); $store_schema->register_tables( true ); $logger_schema->register_tables( true ); remove_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10 ); } /** * Implements the logic behind processing an action once an action link is clicked on the list table. * * @param int $action_id Action ID. * @param string $row_action_type The type of action to perform on the action. */ protected function process_row_action( $action_id, $row_action_type ) { try { switch ( $row_action_type ) { case 'run': $this->runner->process_action( $action_id, 'Admin List Table' ); break; case 'cancel': $this->store->cancel_action( $action_id ); break; } $success = 1; $error_message = ''; } catch ( Exception $e ) { $success = 0; $error_message = $e->getMessage(); } set_transient( 'action_scheduler_admin_notice', compact( 'action_id', 'success', 'error_message', 'row_action_type' ), 30 ); } /** * {@inheritDoc} */ public function prepare_items() { $this->prepare_column_headers(); $per_page = $this->get_items_per_page( $this->get_per_page_option_name(), $this->items_per_page ); $query = array( 'per_page' => $per_page, 'offset' => $this->get_items_offset(), 'status' => $this->get_request_status(), 'orderby' => $this->get_request_orderby(), 'order' => $this->get_request_order(), 'search' => $this->get_request_search_query(), ); /** * Change query arguments to query for past-due actions. * Past-due actions have the 'pending' status and are in the past. * This is needed because registering 'past-due' as a status is overkill. */ if ( 'past-due' === $this->get_request_status() ) { $query['status'] = ActionScheduler_Store::STATUS_PENDING; $query['date'] = as_get_datetime_object(); } $this->items = array(); $total_items = $this->store->query_actions( $query, 'count' ); $status_labels = $this->store->get_status_labels(); foreach ( $this->store->query_actions( $query ) as $action_id ) { try { $action = $this->store->fetch_action( $action_id ); } catch ( Exception $e ) { continue; } if ( is_a( $action, 'ActionScheduler_NullAction' ) ) { continue; } $this->items[ $action_id ] = array( 'ID' => $action_id, 'hook' => $action->get_hook(), 'status_name' => $this->store->get_status( $action_id ), 'status' => $status_labels[ $this->store->get_status( $action_id ) ], 'args' => $action->get_args(), 'group' => $action->get_group(), 'log_entries' => $this->logger->get_logs( $action_id ), 'claim_id' => $this->store->get_claim_id( $action_id ), 'recurrence' => $this->get_recurrence( $action ), 'schedule' => $action->get_schedule(), ); } $this->set_pagination_args( array( 'total_items' => $total_items, 'per_page' => $per_page, 'total_pages' => ceil( $total_items / $per_page ), ) ); } /** * Prints the available statuses so the user can click to filter. */ protected function display_filter_by_status() { $this->status_counts = $this->store->action_counts() + $this->store->extra_action_counts(); parent::display_filter_by_status(); } /** * Get the text to display in the search box on the list table. */ protected function get_search_box_button_text() { return __( 'Search hook, args and claim ID', 'action-scheduler' ); } /** * {@inheritDoc} */ protected function get_per_page_option_name() { return str_replace( '-', '_', $this->screen->id ) . '_per_page'; } } vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Clean_Command.php 0000644 00000007363 15174671617 0025576 0 ustar 00 <?php /** * Commands for Action Scheduler. */ class ActionScheduler_WPCLI_Clean_Command extends WP_CLI_Command { /** * Run the Action Scheduler Queue Cleaner * * ## OPTIONS * * [--batch-size=<size>] * : The maximum number of actions to delete per batch. Defaults to 20. * * [--batches=<size>] * : Limit execution to a number of batches. Defaults to 0, meaning batches will continue all eligible actions are deleted. * * [--status=<status>] * : Only clean actions with the specified status. Defaults to Canceled, Completed. Define multiple statuses as a comma separated string (without spaces), e.g. `--status=complete,failed,canceled` * * [--before=<datestring>] * : Only delete actions with scheduled date older than this. Defaults to 31 days. e.g `--before='7 days ago'`, `--before='02-Feb-2020 20:20:20'` * * [--pause=<seconds>] * : The number of seconds to pause between batches. Default no pause. * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @throws \WP_CLI\ExitException When an error occurs. * * @subcommand clean */ public function clean( $args, $assoc_args ) { // Handle passed arguments. $batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 20 ) ); $batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) ); $status = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'status', '' ) ); $status = array_filter( array_map( 'trim', $status ) ); $before = \WP_CLI\Utils\get_flag_value( $assoc_args, 'before', '' ); $sleep = \WP_CLI\Utils\get_flag_value( $assoc_args, 'pause', 0 ); $batches_completed = 0; $actions_deleted = 0; $unlimited = 0 === $batches; try { $lifespan = as_get_datetime_object( $before ); } catch ( Exception $e ) { $lifespan = null; } try { // Custom queue cleaner instance. $cleaner = new ActionScheduler_QueueCleaner( null, $batch ); // Clean actions for as long as possible. while ( $unlimited || $batches_completed < $batches ) { if ( $sleep && $batches_completed > 0 ) { sleep( $sleep ); } $deleted = count( $cleaner->clean_actions( $status, $lifespan, null, 'CLI' ) ); if ( $deleted <= 0 ) { break; } $actions_deleted += $deleted; $batches_completed++; $this->print_success( $deleted ); } } catch ( Exception $e ) { $this->print_error( $e ); } $this->print_total_batches( $batches_completed ); if ( $batches_completed > 1 ) { $this->print_success( $actions_deleted ); } } /** * Print WP CLI message about how many batches of actions were processed. * * @param int $batches_processed Number of batches processed. */ protected function print_total_batches( int $batches_processed ) { WP_CLI::log( sprintf( /* translators: %d refers to the total number of batches processed */ _n( '%d batch processed.', '%d batches processed.', $batches_processed, 'action-scheduler' ), $batches_processed ) ); } /** * Convert an exception into a WP CLI error. * * @param Exception $e The error object. */ protected function print_error( Exception $e ) { WP_CLI::error( sprintf( /* translators: %s refers to the exception error message */ __( 'There was an error deleting an action: %s', 'action-scheduler' ), $e->getMessage() ) ); } /** * Print a success message with the number of completed actions. * * @param int $actions_deleted Number of deleted actions. */ protected function print_success( int $actions_deleted ) { WP_CLI::success( sprintf( /* translators: %d refers to the total number of actions deleted */ _n( '%d action deleted.', '%d actions deleted.', $actions_deleted, 'action-scheduler' ), $actions_deleted ) ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php 0000644 00000005316 15174671617 0021251 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI; /** * WP_CLI progress bar for Action Scheduler. */ /** * Class ProgressBar * * @package Action_Scheduler\WP_CLI * * @since 3.0.0 * * @codeCoverageIgnore */ class ProgressBar { /** * Current number of ticks. * * @var integer */ protected $total_ticks; /** * Total number of ticks. * * @var integer */ protected $count; /** * Progress bar update interval. * * @var integer */ protected $interval; /** * Progress bar message. * * @var string */ protected $message; /** * Instance. * * @var \cli\progress\Bar */ protected $progress_bar; /** * ProgressBar constructor. * * @param string $message Text to display before the progress bar. * @param integer $count Total number of ticks to be performed. * @param integer $interval Optional. The interval in milliseconds between updates. Default 100. * * @throws \Exception When this is not run within WP CLI. */ public function __construct( $message, $count, $interval = 100 ) { if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { /* translators: %s php class name */ throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'action-scheduler' ), __CLASS__ ) ); } $this->total_ticks = 0; $this->message = $message; $this->count = $count; $this->interval = $interval; } /** * Increment the progress bar ticks. */ public function tick() { if ( null === $this->progress_bar ) { $this->setup_progress_bar(); } $this->progress_bar->tick(); $this->total_ticks++; do_action( 'action_scheduler/progress_tick', $this->total_ticks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } /** * Get the progress bar tick count. * * @return int */ public function current() { return $this->progress_bar ? $this->progress_bar->current() : 0; } /** * Finish the current progress bar. */ public function finish() { if ( null !== $this->progress_bar ) { $this->progress_bar->finish(); } $this->progress_bar = null; } /** * Set the message used when creating the progress bar. * * @param string $message The message to be used when the next progress bar is created. */ public function set_message( $message ) { $this->message = $message; } /** * Set the count for a new progress bar. * * @param integer $count The total number of ticks expected to complete. */ public function set_count( $count ) { $this->count = $count; $this->finish(); } /** * Set up the progress bar. */ protected function setup_progress_bar() { $this->progress_bar = \WP_CLI\Utils\make_progress_bar( $this->message, $this->count, $this->interval ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/System_Command.php 0000644 00000016105 15174671617 0021740 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI; // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping output is not necessary in WP CLI. use ActionScheduler_SystemInformation; use WP_CLI; use function \WP_CLI\Utils\get_flag_value; /** * System info WP-CLI commands for Action Scheduler. */ class System_Command { /** * Data store for querying actions * * @var ActionScheduler_Store */ protected $store; /** * Construct. */ public function __construct() { $this->store = \ActionScheduler::store(); } /** * Print in-use data store class. * * @param array $args Positional args. * @param array $assoc_args Keyed args. * @return void * * @subcommand data-store */ public function datastore( array $args, array $assoc_args ) { echo $this->get_current_datastore(); } /** * Print in-use runner class. * * @param array $args Positional args. * @param array $assoc_args Keyed args. * @return void */ public function runner( array $args, array $assoc_args ) { echo $this->get_current_runner(); } /** * Get system status. * * @param array $args Positional args. * @param array $assoc_args Keyed args. * @return void */ public function status( array $args, array $assoc_args ) { /** * Get runner status. * * @link https://github.com/woocommerce/action-scheduler-disable-default-runner */ $runner_enabled = has_action( 'action_scheduler_run_queue', array( \ActionScheduler::runner(), 'run' ) ); \WP_CLI::line( sprintf( 'Data store: %s', $this->get_current_datastore() ) ); \WP_CLI::line( sprintf( 'Runner: %s%s', $this->get_current_runner(), ( $runner_enabled ? '' : ' (disabled)' ) ) ); \WP_CLI::line( sprintf( 'Version: %s', $this->get_latest_version() ) ); $rows = array(); $action_counts = $this->store->action_counts(); $oldest_and_newest = $this->get_oldest_and_newest( array_keys( $action_counts ) ); foreach ( $action_counts as $status => $count ) { $rows[] = array( 'status' => $status, 'count' => $count, 'oldest' => $oldest_and_newest[ $status ]['oldest'], 'newest' => $oldest_and_newest[ $status ]['newest'], ); } $formatter = new \WP_CLI\Formatter( $assoc_args, array( 'status', 'count', 'oldest', 'newest' ) ); $formatter->display_items( $rows ); } /** * Display the active version, or all registered versions. * * ## OPTIONS * * [--all] * : List all registered versions. * * @param array $args Positional args. * @param array $assoc_args Keyed args. * @return void */ public function version( array $args, array $assoc_args ) { $all = (bool) get_flag_value( $assoc_args, 'all' ); $latest = $this->get_latest_version(); if ( ! $all ) { echo $latest; \WP_CLI::halt( 0 ); } $instance = \ActionScheduler_Versions::instance(); $versions = $instance->get_versions(); $rows = array(); foreach ( $versions as $version => $callback ) { $active = $version === $latest; $rows[ $version ] = array( 'version' => $version, 'callback' => $callback, 'active' => $active ? 'yes' : 'no', ); } uksort( $rows, 'version_compare' ); $formatter = new \WP_CLI\Formatter( $assoc_args, array( 'version', 'callback', 'active' ) ); $formatter->display_items( $rows ); } /** * Display the current source, or all registered sources. * * ## OPTIONS * * [--all] * : List all registered sources. * * [--fullpath] * : List full path of source(s). * * @param array $args Positional args. * @param array $assoc_args Keyed args. * @uses ActionScheduler_SystemInformation::active_source_path() * @uses \WP_CLI\Formatter::display_items() * @uses $this->get_latest_version() * @return void */ public function source( array $args, array $assoc_args ) { $all = (bool) get_flag_value( $assoc_args, 'all' ); $fullpath = (bool) get_flag_value( $assoc_args, 'fullpath' ); $source = ActionScheduler_SystemInformation::active_source_path(); $path = $source; if ( ! $fullpath ) { $path = str_replace( ABSPATH, '', $path ); } if ( ! $all ) { echo $path; \WP_CLI::halt( 0 ); } $sources = ActionScheduler_SystemInformation::get_sources(); if ( empty( $sources ) ) { WP_CLI::log( __( 'Detailed information about registered sources is not currently available.', 'action-scheduler' ) ); return; } $rows = array(); foreach ( $sources as $check_source => $version ) { $active = dirname( $check_source ) === $source; $path = $check_source; if ( ! $fullpath ) { $path = str_replace( ABSPATH, '', $path ); } $rows[ $check_source ] = array( 'source' => $path, 'version' => $version, 'active' => $active ? 'yes' : 'no', ); } ksort( $rows ); \WP_CLI::log( PHP_EOL . 'Please note there can only be one unique registered instance of Action Scheduler per ' . PHP_EOL . 'version number, so this list may not include all the currently present copies of ' . PHP_EOL . 'Action Scheduler.' . PHP_EOL ); $formatter = new \WP_CLI\Formatter( $assoc_args, array( 'source', 'version', 'active' ) ); $formatter->display_items( $rows ); } /** * Get current data store. * * @return string */ protected function get_current_datastore() { return get_class( $this->store ); } /** * Get latest version. * * @param null|\ActionScheduler_Versions $instance Versions. * @return string */ protected function get_latest_version( $instance = null ) { if ( is_null( $instance ) ) { $instance = \ActionScheduler_Versions::instance(); } return $instance->latest_version(); } /** * Get current runner. * * @return string */ protected function get_current_runner() { return get_class( \ActionScheduler::runner() ); } /** * Get oldest and newest scheduled dates for a given set of statuses. * * @param array $status_keys Set of statuses to find oldest & newest action for. * @return array */ protected function get_oldest_and_newest( $status_keys ) { $oldest_and_newest = array(); foreach ( $status_keys as $status ) { $oldest_and_newest[ $status ] = array( 'oldest' => '–', 'newest' => '–', ); if ( 'in-progress' === $status ) { continue; } $oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' ); $oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' ); } return $oldest_and_newest; } /** * Get oldest or newest scheduled date for a given status. * * @param string $status Action status label/name string. * @param string $date_type Oldest or Newest. * @return string */ protected function get_action_status_date( $status, $date_type = 'oldest' ) { $order = 'oldest' === $date_type ? 'ASC' : 'DESC'; $args = array( 'status' => $status, 'per_page' => 1, 'order' => $order, ); $action = $this->store->query_actions( $args ); if ( ! empty( $action ) ) { $date_object = $this->store->get_date( $action[0] ); $action_date = $date_object->format( 'Y-m-d H:i:s O' ); } else { $action_date = '–'; } return $action_date; } } vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_QueueRunner.php 0000644 00000014331 15174671617 0025365 0 ustar 00 <?php use Action_Scheduler\WP_CLI\ProgressBar; /** * WP CLI Queue runner. * * This class can only be called from within a WP CLI instance. */ class ActionScheduler_WPCLI_QueueRunner extends ActionScheduler_Abstract_QueueRunner { /** * Claimed actions. * * @var array */ protected $actions; /** * ActionScheduler_ActionClaim instance. * * @var ActionScheduler_ActionClaim */ protected $claim; /** * Progress bar instance. * * @var \cli\progress\Bar */ protected $progress_bar; /** * ActionScheduler_WPCLI_QueueRunner constructor. * * @param ActionScheduler_Store|null $store Store object. * @param ActionScheduler_FatalErrorMonitor|null $monitor Monitor object. * @param ActionScheduler_QueueCleaner|null $cleaner Cleaner object. * * @throws Exception When this is not run within WP CLI. */ public function __construct( ?ActionScheduler_Store $store = null, ?ActionScheduler_FatalErrorMonitor $monitor = null, ?ActionScheduler_QueueCleaner $cleaner = null ) { if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { /* translators: %s php class name */ throw new Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'action-scheduler' ), __CLASS__ ) ); } parent::__construct( $store, $monitor, $cleaner ); } /** * Set up the Queue before processing. * * @param int $batch_size The batch size to process. * @param array $hooks The hooks being used to filter the actions claimed in this batch. * @param string $group The group of actions to claim with this batch. * @param bool $force Whether to force running even with too many concurrent processes. * * @return int The number of actions that will be run. * @throws \WP_CLI\ExitException When there are too many concurrent batches. */ public function setup( $batch_size, $hooks = array(), $group = '', $force = false ) { $this->run_cleanup(); $this->add_hooks(); // Check to make sure there aren't too many concurrent processes running. if ( $this->has_maximum_concurrent_batches() ) { if ( $force ) { WP_CLI::warning( __( 'There are too many concurrent batches, but the run is forced to continue.', 'action-scheduler' ) ); } else { WP_CLI::error( __( 'There are too many concurrent batches.', 'action-scheduler' ) ); } } // Stake a claim and store it. $this->claim = $this->store->stake_claim( $batch_size, null, $hooks, $group ); $this->monitor->attach( $this->claim ); $this->actions = $this->claim->get_actions(); return count( $this->actions ); } /** * Add our hooks to the appropriate actions. */ protected function add_hooks() { add_action( 'action_scheduler_before_execute', array( $this, 'before_execute' ) ); add_action( 'action_scheduler_after_execute', array( $this, 'after_execute' ), 10, 2 ); add_action( 'action_scheduler_failed_execution', array( $this, 'action_failed' ), 10, 2 ); } /** * Set up the WP CLI progress bar. */ protected function setup_progress_bar() { $count = count( $this->actions ); $this->progress_bar = new ProgressBar( /* translators: %d: amount of actions */ sprintf( _n( 'Running %d action', 'Running %d actions', $count, 'action-scheduler' ), $count ), $count ); } /** * Process actions in the queue. * * @param string $context Optional runner context. Default 'WP CLI'. * * @return int The number of actions processed. */ public function run( $context = 'WP CLI' ) { do_action( 'action_scheduler_before_process_queue' ); $this->setup_progress_bar(); foreach ( $this->actions as $action_id ) { // Error if we lost the claim. if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $this->claim->get_id() ), true ) ) { WP_CLI::warning( __( 'The claim has been lost. Aborting current batch.', 'action-scheduler' ) ); break; } $this->process_action( $action_id, $context ); $this->progress_bar->tick(); } $completed = $this->progress_bar->current(); $this->progress_bar->finish(); $this->store->release_claim( $this->claim ); do_action( 'action_scheduler_after_process_queue' ); return $completed; } /** * Handle WP CLI message when the action is starting. * * @param int $action_id Action ID. */ public function before_execute( $action_id ) { /* translators: %s refers to the action ID */ WP_CLI::log( sprintf( __( 'Started processing action %s', 'action-scheduler' ), $action_id ) ); } /** * Handle WP CLI message when the action has completed. * * @param int $action_id ActionID. * @param null|ActionScheduler_Action $action The instance of the action. Default to null for backward compatibility. */ public function after_execute( $action_id, $action = null ) { // backward compatibility. if ( null === $action ) { $action = $this->store->fetch_action( $action_id ); } /* translators: 1: action ID 2: hook name */ WP_CLI::log( sprintf( __( 'Completed processing action %1$s with hook: %2$s', 'action-scheduler' ), $action_id, $action->get_hook() ) ); } /** * Handle WP CLI message when the action has failed. * * @param int $action_id Action ID. * @param Exception $exception Exception. * @throws \WP_CLI\ExitException With failure message. */ public function action_failed( $action_id, $exception ) { WP_CLI::error( /* translators: 1: action ID 2: exception message */ sprintf( __( 'Error processing action %1$s: %2$s', 'action-scheduler' ), $action_id, $exception->getMessage() ), false ); } /** * Sleep and help avoid hitting memory limit * * @param int $sleep_time Amount of seconds to sleep. * @deprecated 3.0.0 */ protected function stop_the_insanity( $sleep_time = 0 ) { _deprecated_function( 'ActionScheduler_WPCLI_QueueRunner::stop_the_insanity', '3.0.0', 'ActionScheduler_DataController::free_memory' ); ActionScheduler_DataController::free_memory(); } /** * Maybe trigger the stop_the_insanity() method to free up memory. */ protected function maybe_stop_the_insanity() { // The value returned by progress_bar->current() might be padded. Remove padding, and convert to int. $current_iteration = intval( trim( $this->progress_bar->current() ) ); if ( 0 === $current_iteration % 50 ) { $this->stop_the_insanity(); } } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action_Command.php 0000644 00000020224 15174671617 0021666 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI; /** * Action command for Action Scheduler. */ class Action_Command extends \WP_CLI_Command { /** * Cancel the next occurrence or all occurrences of a scheduled action. * * ## OPTIONS * * [<hook>] * : Name of the action hook. * * [--group=<group>] * : The group the job is assigned to. * * [--args=<args>] * : JSON object of arguments assigned to the job. * --- * default: [] * --- * * [--all] * : Cancel all occurrences of a scheduled action. * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function cancel( array $args, array $assoc_args ) { require_once 'Action/Cancel_Command.php'; $command = new Action\Cancel_Command( $args, $assoc_args ); $command->execute(); } /** * Creates a new scheduled action. * * ## OPTIONS * * <hook> * : Name of the action hook. * * <start> * : A unix timestamp representing the date you want the action to start. Also 'async' or 'now' to enqueue an async action. * * [--args=<args>] * : JSON object of arguments to pass to callbacks when the hook triggers. * --- * default: [] * --- * * [--cron=<cron>] * : A cron-like schedule string (https://crontab.guru/). * --- * default: '' * --- * * [--group=<group>] * : The group to assign this job to. * --- * default: '' * --- * * [--interval=<interval>] * : Number of seconds to wait between runs. * --- * default: 0 * --- * * ## EXAMPLES * * wp action-scheduler action create hook_async async * wp action-scheduler action create hook_single 1627147598 * wp action-scheduler action create hook_recurring 1627148188 --interval=5 * wp action-scheduler action create hook_cron 1627147655 --cron='5 4 * * *' * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function create( array $args, array $assoc_args ) { require_once 'Action/Create_Command.php'; $command = new Action\Create_Command( $args, $assoc_args ); $command->execute(); } /** * Delete existing scheduled action(s). * * ## OPTIONS * * <id>... * : One or more IDs of actions to delete. * --- * default: 0 * --- * * ## EXAMPLES * * # Delete the action with id 100 * $ wp action-scheduler action delete 100 * * # Delete the actions with ids 100 and 200 * $ wp action-scheduler action delete 100 200 * * # Delete the first five pending actions in 'action-scheduler' group * $ wp action-scheduler action delete $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids ) * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function delete( array $args, array $assoc_args ) { require_once 'Action/Delete_Command.php'; $command = new Action\Delete_Command( $args, $assoc_args ); $command->execute(); } /** * Generates some scheduled actions. * * ## OPTIONS * * <hook> * : Name of the action hook. * * <start> * : The Unix timestamp representing the date you want the action to start. * * [--count=<count>] * : Number of actions to create. * --- * default: 1 * --- * * [--interval=<interval>] * : Number of seconds to wait between runs. * --- * default: 0 * --- * * [--args=<args>] * : JSON object of arguments to pass to callbacks when the hook triggers. * --- * default: [] * --- * * [--group=<group>] * : The group to assign this job to. * --- * default: '' * --- * * ## EXAMPLES * * wp action-scheduler action generate test_multiple 1627147598 --count=5 --interval=5 * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function generate( array $args, array $assoc_args ) { require_once 'Action/Generate_Command.php'; $command = new Action\Generate_Command( $args, $assoc_args ); $command->execute(); } /** * Get details about a scheduled action. * * ## OPTIONS * * <id> * : The ID of the action to get. * --- * default: 0 * --- * * [--field=<field>] * : Instead of returning the whole action, returns the value of a single field. * * [--fields=<fields>] * : Limit the output to specific fields (comma-separated). Defaults to all fields. * * [--format=<format>] * : Render output in a particular format. * --- * default: table * options: * - table * - csv * - json * - yaml * --- * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function get( array $args, array $assoc_args ) { require_once 'Action/Get_Command.php'; $command = new Action\Get_Command( $args, $assoc_args ); $command->execute(); } /** * Get a list of scheduled actions. * * Display actions based on all arguments supported by * [as_get_scheduled_actions()](https://actionscheduler.org/api/#function-reference--as_get_scheduled_actions). * * ## OPTIONS * * [--<field>=<value>] * : One or more arguments to pass to as_get_scheduled_actions(). * * [--field=<field>] * : Prints the value of a single property for each action. * * [--fields=<fields>] * : Limit the output to specific object properties. * * [--format=<format>] * : Render output in a particular format. * --- * default: table * options: * - table * - csv * - ids * - json * - count * - yaml * --- * * ## AVAILABLE FIELDS * * These fields will be displayed by default for each action: * * * id * * hook * * status * * group * * recurring * * scheduled_date * * These fields are optionally available: * * * args * * log_entries * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void * * @subcommand list */ public function subcommand_list( array $args, array $assoc_args ) { require_once 'Action/List_Command.php'; $command = new Action\List_Command( $args, $assoc_args ); $command->execute(); } /** * Get logs for a scheduled action. * * ## OPTIONS * * <id> * : The ID of the action to get. * --- * default: 0 * --- * * @param array $args Positional arguments. * @return void */ public function logs( array $args ) { $command = sprintf( 'action-scheduler action get %d --field=log_entries', $args[0] ); WP_CLI::runcommand( $command ); } /** * Get the ID or timestamp of the next scheduled action. * * ## OPTIONS * * <hook> * : The hook of the next scheduled action. * * [--args=<args>] * : JSON object of arguments to search for next scheduled action. * --- * default: [] * --- * * [--group=<group>] * : The group to which the next scheduled action is assigned. * --- * default: '' * --- * * [--raw] * : Display the raw output of as_next_scheduled_action() (timestamp or boolean). * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function next( array $args, array $assoc_args ) { require_once 'Action/Next_Command.php'; $command = new Action\Next_Command( $args, $assoc_args ); $command->execute(); } /** * Run existing scheduled action(s). * * ## OPTIONS * * <id>... * : One or more IDs of actions to run. * --- * default: 0 * --- * * ## EXAMPLES * * # Run the action with id 100 * $ wp action-scheduler action run 100 * * # Run the actions with ids 100 and 200 * $ wp action-scheduler action run 100 200 * * # Run the first five pending actions in 'action-scheduler' group * $ wp action-scheduler action run $( wp action-scheduler action list --status=pending --group=action-scheduler --format=ids ) * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @return void */ public function run( array $args, array $assoc_args ) { require_once 'Action/Run_Command.php'; $command = new Action\Run_Command( $args, $assoc_args ); $command->execute(); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php 0000644 00000011670 15174671617 0022407 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI; use Action_Scheduler\Migration\Config; use Action_Scheduler\Migration\Runner; use Action_Scheduler\Migration\Scheduler; use Action_Scheduler\Migration\Controller; use WP_CLI; use WP_CLI_Command; /** * Class Migration_Command * * @package Action_Scheduler\WP_CLI * * @since 3.0.0 * * @codeCoverageIgnore */ class Migration_Command extends WP_CLI_Command { /** * Number of actions migrated. * * @var int */ private $total_processed = 0; /** * Register the command with WP-CLI */ public function register() { if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) { return; } WP_CLI::add_command( 'action-scheduler migrate', array( $this, 'migrate' ), array( 'shortdesc' => 'Migrates actions to the DB tables store', 'synopsis' => array( array( 'type' => 'assoc', 'name' => 'batch-size', 'optional' => true, 'default' => 100, 'description' => 'The number of actions to process in each batch', ), array( 'type' => 'assoc', 'name' => 'free-memory-on', 'optional' => true, 'default' => 50, 'description' => 'The number of actions to process between freeing memory. 0 disables freeing memory', ), array( 'type' => 'assoc', 'name' => 'pause', 'optional' => true, 'default' => 0, 'description' => 'The number of seconds to pause when freeing memory', ), array( 'type' => 'flag', 'name' => 'dry-run', 'optional' => true, 'description' => 'Reports on the actions that would have been migrated, but does not change any data', ), ), ) ); } /** * Process the data migration. * * @param array $positional_args Required for WP CLI. Not used in migration. * @param array $assoc_args Optional arguments. * * @return void */ public function migrate( $positional_args, $assoc_args ) { $this->init_logging(); $config = $this->get_migration_config( $assoc_args ); $runner = new Runner( $config ); $runner->init_destination(); $batch_size = isset( $assoc_args['batch-size'] ) ? (int) $assoc_args['batch-size'] : 100; $free_on = isset( $assoc_args['free-memory-on'] ) ? (int) $assoc_args['free-memory-on'] : 50; $sleep = isset( $assoc_args['pause'] ) ? (int) $assoc_args['pause'] : 0; \ActionScheduler_DataController::set_free_ticks( $free_on ); \ActionScheduler_DataController::set_sleep_time( $sleep ); do { $actions_processed = $runner->run( $batch_size ); $this->total_processed += $actions_processed; } while ( $actions_processed > 0 ); if ( ! $config->get_dry_run() ) { // let the scheduler know that there's nothing left to do. $scheduler = new Scheduler(); $scheduler->mark_complete(); } WP_CLI::success( sprintf( '%s complete. %d actions processed.', $config->get_dry_run() ? 'Dry run' : 'Migration', $this->total_processed ) ); } /** * Build the config object used to create the Runner * * @param array $args Optional arguments. * * @return ActionScheduler\Migration\Config */ private function get_migration_config( $args ) { $args = wp_parse_args( $args, array( 'dry-run' => false, ) ); $config = Controller::instance()->get_migration_config_object(); $config->set_dry_run( ! empty( $args['dry-run'] ) ); return $config; } /** * Hook command line logging into migration actions. */ private function init_logging() { add_action( 'action_scheduler/migrate_action_dry_run', function ( $action_id ) { WP_CLI::debug( sprintf( 'Dry-run: migrated action %d', $action_id ) ); } ); add_action( 'action_scheduler/no_action_to_migrate', function ( $action_id ) { WP_CLI::debug( sprintf( 'No action found to migrate for ID %d', $action_id ) ); } ); add_action( 'action_scheduler/migrate_action_failed', function ( $action_id ) { WP_CLI::warning( sprintf( 'Failed migrating action with ID %d', $action_id ) ); } ); add_action( 'action_scheduler/migrate_action_incomplete', function ( $source_id, $destination_id ) { WP_CLI::warning( sprintf( 'Unable to remove source action with ID %d after migrating to new ID %d', $source_id, $destination_id ) ); }, 10, 2 ); add_action( 'action_scheduler/migrated_action', function ( $source_id, $destination_id ) { WP_CLI::debug( sprintf( 'Migrated source action with ID %d to new store with ID %d', $source_id, $destination_id ) ); }, 10, 2 ); add_action( 'action_scheduler/migration_batch_starting', function ( $batch ) { WP_CLI::debug( 'Beginning migration of batch: ' . print_r( $batch, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r } ); add_action( 'action_scheduler/migration_batch_complete', function ( $batch ) { WP_CLI::log( sprintf( 'Completed migration of %d actions', count( $batch ) ) ); } ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php 0000644 00000015307 15174671617 0026527 0 ustar 00 <?php /** * Commands for Action Scheduler. */ class ActionScheduler_WPCLI_Scheduler_command extends WP_CLI_Command { /** * Force tables schema creation for Action Scheduler * * ## OPTIONS * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * * @subcommand fix-schema */ public function fix_schema( $args, $assoc_args ) { $schema_classes = array( ActionScheduler_LoggerSchema::class, ActionScheduler_StoreSchema::class ); foreach ( $schema_classes as $classname ) { if ( is_subclass_of( $classname, ActionScheduler_Abstract_Schema::class ) ) { $obj = new $classname(); $obj->init(); $obj->register_tables( true ); WP_CLI::success( sprintf( /* translators: %s refers to the schema name*/ __( 'Registered schema for %s', 'action-scheduler' ), $classname ) ); } } } /** * Run the Action Scheduler * * ## OPTIONS * * [--batch-size=<size>] * : The maximum number of actions to run. Defaults to 100. * * [--batches=<size>] * : Limit execution to a number of batches. Defaults to 0, meaning batches will continue being executed until all actions are complete. * * [--cleanup-batch-size=<size>] * : The maximum number of actions to clean up. Defaults to the value of --batch-size. * * [--hooks=<hooks>] * : Only run actions with the specified hook. Omitting this option runs actions with any hook. Define multiple hooks as a comma separated string (without spaces), e.g. `--hooks=hook_one,hook_two,hook_three` * * [--group=<group>] * : Only run actions from the specified group. Omitting this option runs actions from all groups. * * [--exclude-groups=<groups>] * : Run actions from all groups except the specified group(s). Define multiple groups as a comma separated string (without spaces), e.g. '--group_a,group_b'. This option is ignored when `--group` is used. * * [--free-memory-on=<count>] * : The number of actions to process between freeing memory. 0 disables freeing memory. Default 50. * * [--pause=<seconds>] * : The number of seconds to pause when freeing memory. Default no pause. * * [--force] * : Whether to force execution despite the maximum number of concurrent processes being exceeded. * * @param array $args Positional arguments. * @param array $assoc_args Keyed arguments. * @throws \WP_CLI\ExitException When an error occurs. * * @subcommand run */ public function run( $args, $assoc_args ) { // Handle passed arguments. $batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 100 ) ); $batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) ); $clean = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'cleanup-batch-size', $batch ) ); $hooks = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'hooks', '' ) ); $hooks = array_filter( array_map( 'trim', $hooks ) ); $group = \WP_CLI\Utils\get_flag_value( $assoc_args, 'group', '' ); $exclude_groups = \WP_CLI\Utils\get_flag_value( $assoc_args, 'exclude-groups', '' ); $free_on = \WP_CLI\Utils\get_flag_value( $assoc_args, 'free-memory-on', 50 ); $sleep = \WP_CLI\Utils\get_flag_value( $assoc_args, 'pause', 0 ); $force = \WP_CLI\Utils\get_flag_value( $assoc_args, 'force', false ); ActionScheduler_DataController::set_free_ticks( $free_on ); ActionScheduler_DataController::set_sleep_time( $sleep ); $batches_completed = 0; $actions_completed = 0; $unlimited = 0 === $batches; if ( is_callable( array( ActionScheduler::store(), 'set_claim_filter' ) ) ) { $exclude_groups = $this->parse_comma_separated_string( $exclude_groups ); if ( ! empty( $exclude_groups ) ) { ActionScheduler::store()->set_claim_filter( 'exclude-groups', $exclude_groups ); } } try { // Custom queue cleaner instance. $cleaner = new ActionScheduler_QueueCleaner( null, $clean ); // Get the queue runner instance. $runner = new ActionScheduler_WPCLI_QueueRunner( null, null, $cleaner ); // Determine how many tasks will be run in the first batch. $total = $runner->setup( $batch, $hooks, $group, $force ); // Run actions for as long as possible. while ( $total > 0 ) { $this->print_total_actions( $total ); $actions_completed += $runner->run(); $batches_completed++; // Maybe set up tasks for the next batch. $total = ( $unlimited || $batches_completed < $batches ) ? $runner->setup( $batch, $hooks, $group, $force ) : 0; } } catch ( Exception $e ) { $this->print_error( $e ); } $this->print_total_batches( $batches_completed ); $this->print_success( $actions_completed ); } /** * Converts a string of comma-separated values into an array of those same values. * * @param string $string The string of one or more comma separated values. * * @return array */ private function parse_comma_separated_string( $string ): array { return array_filter( str_getcsv( $string ) ); } /** * Print WP CLI message about how many actions are about to be processed. * * @param int $total Number of actions found. */ protected function print_total_actions( $total ) { WP_CLI::log( sprintf( /* translators: %d refers to how many scheduled tasks were found to run */ _n( 'Found %d scheduled task', 'Found %d scheduled tasks', $total, 'action-scheduler' ), $total ) ); } /** * Print WP CLI message about how many batches of actions were processed. * * @param int $batches_completed Number of completed batches. */ protected function print_total_batches( $batches_completed ) { WP_CLI::log( sprintf( /* translators: %d refers to the total number of batches executed */ _n( '%d batch executed.', '%d batches executed.', $batches_completed, 'action-scheduler' ), $batches_completed ) ); } /** * Convert an exception into a WP CLI error. * * @param Exception $e The error object. * * @throws \WP_CLI\ExitException Under some conditions WP CLI may throw an exception. */ protected function print_error( Exception $e ) { WP_CLI::error( sprintf( /* translators: %s refers to the exception error message */ __( 'There was an error running the action scheduler: %s', 'action-scheduler' ), $e->getMessage() ) ); } /** * Print a success message with the number of completed actions. * * @param int $actions_completed Number of completed actions. */ protected function print_success( $actions_completed ) { WP_CLI::success( sprintf( /* translators: %d refers to the total number of tasks completed */ _n( '%d scheduled task completed.', '%d scheduled tasks completed.', $actions_completed, 'action-scheduler' ), $actions_completed ) ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Delete_Command.php 0000644 00000005145 15174671617 0023075 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; /** * WP-CLI command: action-scheduler action delete */ class Delete_Command extends \ActionScheduler_WPCLI_Command { /** * Array of action IDs to delete. * * @var int[] */ protected $action_ids = array(); /** * Number of deleted, failed, and total actions deleted. * * @var array<string, int> */ protected $action_counts = array( 'deleted' => 0, 'failed' => 0, 'total' => 0, ); /** * Construct. * * @param string[] $args Positional arguments. * @param array<string, string> $assoc_args Keyed arguments. */ public function __construct( array $args, array $assoc_args ) { parent::__construct( $args, $assoc_args ); $this->action_ids = array_map( 'absint', $args ); $this->action_counts['total'] = count( $this->action_ids ); add_action( 'action_scheduler_deleted_action', array( $this, 'on_action_deleted' ) ); } /** * Execute. * * @return void */ public function execute() { $store = \ActionScheduler::store(); $progress_bar = \WP_CLI\Utils\make_progress_bar( sprintf( /* translators: %d: number of actions to be deleted */ _n( 'Deleting %d action', 'Deleting %d actions', $this->action_counts['total'], 'action-scheduler' ), number_format_i18n( $this->action_counts['total'] ) ), $this->action_counts['total'] ); foreach ( $this->action_ids as $action_id ) { try { $store->delete_action( $action_id ); } catch ( \Exception $e ) { $this->action_counts['failed']++; \WP_CLI::warning( $e->getMessage() ); } $progress_bar->tick(); } $progress_bar->finish(); /* translators: %1$d: number of actions deleted */ $format = _n( 'Deleted %1$d action', 'Deleted %1$d actions', $this->action_counts['deleted'], 'action-scheduler' ) . ', '; /* translators: %2$d: number of actions deletions failed */ $format .= _n( '%2$d failure.', '%2$d failures.', $this->action_counts['failed'], 'action-scheduler' ); \WP_CLI::success( sprintf( $format, number_format_i18n( $this->action_counts['deleted'] ), number_format_i18n( $this->action_counts['failed'] ) ) ); } /** * Action: action_scheduler_deleted_action * * @param int $action_id Action ID. * @return void */ public function on_action_deleted( $action_id ) { if ( 'action_scheduler_deleted_action' !== current_action() ) { return; } $action_id = absint( $action_id ); if ( ! in_array( $action_id, $this->action_ids, true ) ) { return; } $this->action_counts['deleted']++; \WP_CLI::debug( sprintf( 'Action %d was deleted.', $action_id ) ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Create_Command.php 0000644 00000010552 15174671617 0023074 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; use function \WP_CLI\Utils\get_flag_value; /** * WP-CLI command: action-scheduler action create */ class Create_Command extends \ActionScheduler_WPCLI_Command { const ASYNC_OPTS = array( 'async', 0 ); /** * Execute command. * * @return void */ public function execute() { $hook = $this->args[0]; $schedule_start = $this->args[1]; $callback_args = get_flag_value( $this->assoc_args, 'args', array() ); $group = get_flag_value( $this->assoc_args, 'group', '' ); $interval = absint( get_flag_value( $this->assoc_args, 'interval', 0 ) ); $cron = get_flag_value( $this->assoc_args, 'cron', '' ); $unique = get_flag_value( $this->assoc_args, 'unique', false ); $priority = absint( get_flag_value( $this->assoc_args, 'priority', 10 ) ); if ( ! empty( $callback_args ) ) { $callback_args = json_decode( $callback_args, true ); } $function_args = array( 'start' => $schedule_start, 'cron' => $cron, 'interval' => $interval, 'hook' => $hook, 'callback_args' => $callback_args, 'group' => $group, 'unique' => $unique, 'priority' => $priority, ); try { // Generate schedule start if appropriate. if ( ! in_array( $schedule_start, static::ASYNC_OPTS, true ) ) { $schedule_start = as_get_datetime_object( $schedule_start ); $function_args['start'] = $schedule_start->format( 'U' ); } } catch ( \Exception $e ) { \WP_CLI::error( $e->getMessage() ); } // Default to creating single action. $action_type = 'single'; $function = 'as_schedule_single_action'; if ( ! empty( $interval ) ) { // Creating recurring action. $action_type = 'recurring'; $function = 'as_schedule_recurring_action'; $function_args = array_filter( $function_args, static function( $key ) { return in_array( $key, array( 'start', 'interval', 'hook', 'callback_args', 'group', 'unique', 'priority' ), true ); }, ARRAY_FILTER_USE_KEY ); } elseif ( ! empty( $cron ) ) { // Creating cron action. $action_type = 'cron'; $function = 'as_schedule_cron_action'; $function_args = array_filter( $function_args, static function( $key ) { return in_array( $key, array( 'start', 'cron', 'hook', 'callback_args', 'group', 'unique', 'priority' ), true ); }, ARRAY_FILTER_USE_KEY ); } elseif ( in_array( $function_args['start'], static::ASYNC_OPTS, true ) ) { // Enqueue async action. $action_type = 'async'; $function = 'as_enqueue_async_action'; $function_args = array_filter( $function_args, static function( $key ) { return in_array( $key, array( 'hook', 'callback_args', 'group', 'unique', 'priority' ), true ); }, ARRAY_FILTER_USE_KEY ); } else { // Enqueue single action. $function_args = array_filter( $function_args, static function( $key ) { return in_array( $key, array( 'start', 'hook', 'callback_args', 'group', 'unique', 'priority' ), true ); }, ARRAY_FILTER_USE_KEY ); } $function_args = array_values( $function_args ); try { $action_id = call_user_func_array( $function, $function_args ); } catch ( \Exception $e ) { $this->print_error( $e ); } if ( 0 === $action_id ) { $e = new \Exception( __( 'Unable to create a scheduled action.', 'action-scheduler' ) ); $this->print_error( $e ); } $this->print_success( $action_id, $action_type ); } /** * Print a success message with the action ID. * * @param int $action_id Created action ID. * @param string $action_type Type of action. * * @return void */ protected function print_success( $action_id, $action_type ) { \WP_CLI::success( sprintf( /* translators: %1$s: type of action, %2$d: ID of the created action */ __( '%1$s action (%2$d) scheduled.', 'action-scheduler' ), ucfirst( $action_type ), $action_id ) ); } /** * Convert an exception into a WP CLI error. * * @param \Exception $e The error object. * @throws \WP_CLI\ExitException When an error occurs. * @return void */ protected function print_error( \Exception $e ) { \WP_CLI::error( sprintf( /* translators: %s refers to the exception error message. */ __( 'There was an error creating the scheduled action: %s', 'action-scheduler' ), $e->getMessage() ) ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Next_Command.php 0000644 00000003503 15174671617 0022605 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping output is not necessary in WP CLI. use function \WP_CLI\Utils\get_flag_value; /** * WP-CLI command: action-scheduler action next */ class Next_Command extends \ActionScheduler_WPCLI_Command { /** * Execute command. * * @return void */ public function execute() { $hook = $this->args[0]; $group = get_flag_value( $this->assoc_args, 'group', '' ); $callback_args = get_flag_value( $this->assoc_args, 'args', null ); $raw = (bool) get_flag_value( $this->assoc_args, 'raw', false ); if ( ! empty( $callback_args ) ) { $callback_args = json_decode( $callback_args, true ); } if ( $raw ) { \WP_CLI::line( as_next_scheduled_action( $hook, $callback_args, $group ) ); return; } $params = array( 'hook' => $hook, 'orderby' => 'date', 'order' => 'ASC', 'group' => $group, ); if ( is_array( $callback_args ) ) { $params['args'] = $callback_args; } $params['status'] = \ActionScheduler_Store::STATUS_RUNNING; // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export \WP_CLI::debug( 'ActionScheduler()::store()->query_action( ' . var_export( $params, true ) . ' )' ); $store = \ActionScheduler::store(); $action_id = $store->query_action( $params ); if ( $action_id ) { echo $action_id; return; } $params['status'] = \ActionScheduler_Store::STATUS_PENDING; // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export \WP_CLI::debug( 'ActionScheduler()::store()->query_action( ' . var_export( $params, true ) . ' )' ); $action_id = $store->query_action( $params ); if ( $action_id ) { echo $action_id; return; } \WP_CLI::warning( 'No matching next action.' ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Cancel_Command.php 0000644 00000006410 15174671617 0023054 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; use function \WP_CLI\Utils\get_flag_value; /** * WP-CLI command: action-scheduler action cancel */ class Cancel_Command extends \ActionScheduler_WPCLI_Command { /** * Execute command. * * @return void */ public function execute() { $hook = ''; $group = get_flag_value( $this->assoc_args, 'group', '' ); $callback_args = get_flag_value( $this->assoc_args, 'args', null ); $all = get_flag_value( $this->assoc_args, 'all', false ); if ( ! empty( $this->args[0] ) ) { $hook = $this->args[0]; } if ( ! empty( $callback_args ) ) { $callback_args = json_decode( $callback_args, true ); } if ( $all ) { $this->cancel_all( $hook, $callback_args, $group ); return; } $this->cancel_single( $hook, $callback_args, $group ); } /** * Cancel single action. * * @param string $hook The hook that the job will trigger. * @param array $callback_args Args that would have been passed to the job. * @param string $group The group the job is assigned to. * @return void */ protected function cancel_single( $hook, $callback_args, $group ) { if ( empty( $hook ) ) { \WP_CLI::error( __( 'Please specify hook of action to cancel.', 'action-scheduler' ) ); } try { $result = as_unschedule_action( $hook, $callback_args, $group ); } catch ( \Exception $e ) { $this->print_error( $e, false ); } if ( null === $result ) { $e = new \Exception( __( 'Unable to cancel scheduled action: check the logs.', 'action-scheduler' ) ); $this->print_error( $e, false ); } $this->print_success( false ); } /** * Cancel all actions. * * @param string $hook The hook that the job will trigger. * @param array $callback_args Args that would have been passed to the job. * @param string $group The group the job is assigned to. * @return void */ protected function cancel_all( $hook, $callback_args, $group ) { if ( empty( $hook ) && empty( $group ) ) { \WP_CLI::error( __( 'Please specify hook and/or group of actions to cancel.', 'action-scheduler' ) ); } try { $result = as_unschedule_all_actions( $hook, $callback_args, $group ); } catch ( \Exception $e ) { $this->print_error( $e, $multiple ); } /** * Because as_unschedule_all_actions() does not provide a result, * neither confirm or deny actions cancelled. */ \WP_CLI::success( __( 'Request to cancel scheduled actions completed.', 'action-scheduler' ) ); } /** * Print a success message. * * @return void */ protected function print_success() { \WP_CLI::success( __( 'Scheduled action cancelled.', 'action-scheduler' ) ); } /** * Convert an exception into a WP CLI error. * * @param \Exception $e The error object. * @param bool $multiple Boolean if multiple actions. * @throws \WP_CLI\ExitException When an error occurs. * @return void */ protected function print_error( \Exception $e, $multiple ) { \WP_CLI::error( sprintf( /* translators: %1$s: singular or plural %2$s: refers to the exception error message. */ __( 'There was an error cancelling the %1$s: %2$s', 'action-scheduler' ), $multiple ? __( 'scheduled actions', 'action-scheduler' ) : __( 'scheduled action', 'action-scheduler' ), $e->getMessage() ) ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/List_Command.php 0000644 00000006067 15174671617 0022612 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaping output is not necessary in WP CLI. /** * WP-CLI command: action-scheduler action list */ class List_Command extends \ActionScheduler_WPCLI_Command { const PARAMETERS = array( 'hook', 'args', 'date', 'date_compare', 'modified', 'modified_compare', 'group', 'status', 'claimed', 'per_page', 'offset', 'orderby', 'order', ); /** * Execute command. * * @return void */ public function execute() { $store = \ActionScheduler::store(); $logger = \ActionScheduler::logger(); $fields = array( 'id', 'hook', 'status', 'group', 'recurring', 'scheduled_date', ); $this->process_csv_arguments_to_arrays(); if ( ! empty( $this->assoc_args['fields'] ) ) { $fields = $this->assoc_args['fields']; } $formatter = new \WP_CLI\Formatter( $this->assoc_args, $fields ); $query_args = $this->assoc_args; /** * The `claimed` parameter expects a boolean or integer: * check for string 'false', and set explicitly to `false` boolean. */ if ( array_key_exists( 'claimed', $query_args ) && 'false' === strtolower( $query_args['claimed'] ) ) { $query_args['claimed'] = false; } $return_format = 'OBJECT'; if ( in_array( $formatter->format, array( 'ids', 'count' ), true ) ) { $return_format = '\'ids\''; } // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export $params = var_export( $query_args, true ); if ( empty( $query_args ) ) { $params = 'array()'; } \WP_CLI::debug( sprintf( 'as_get_scheduled_actions( %s, %s )', $params, $return_format ) ); if ( ! empty( $query_args['args'] ) ) { $query_args['args'] = json_decode( $query_args['args'], true ); } switch ( $formatter->format ) { case 'ids': $actions = as_get_scheduled_actions( $query_args, 'ids' ); echo implode( ' ', $actions ); break; case 'count': $actions = as_get_scheduled_actions( $query_args, 'ids' ); $formatter->display_items( $actions ); break; default: $actions = as_get_scheduled_actions( $query_args, OBJECT ); $actions_arr = array(); foreach ( $actions as $action_id => $action ) { $action_arr = array( 'id' => $action_id, 'hook' => $action->get_hook(), 'status' => $store->get_status( $action_id ), 'args' => $action->get_args(), 'group' => $action->get_group(), 'recurring' => $action->get_schedule()->is_recurring() ? 'yes' : 'no', 'scheduled_date' => $this->get_schedule_display_string( $action->get_schedule() ), 'log_entries' => array(), ); foreach ( $logger->get_logs( $action_id ) as $log_entry ) { $action_arr['log_entries'][] = array( 'date' => $log_entry->get_date()->format( static::DATE_FORMAT ), 'message' => $log_entry->get_message(), ); } $actions_arr[] = $action_arr; } $formatter->display_items( $actions_arr ); break; } } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Generate_Command.php 0000644 00000006737 15174671617 0023435 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; use function \WP_CLI\Utils\get_flag_value; /** * WP-CLI command: action-scheduler action generate */ class Generate_Command extends \ActionScheduler_WPCLI_Command { /** * Execute command. * * @return void */ public function execute() { $hook = $this->args[0]; $schedule_start = $this->args[1]; $callback_args = get_flag_value( $this->assoc_args, 'args', array() ); $group = get_flag_value( $this->assoc_args, 'group', '' ); $interval = (int) get_flag_value( $this->assoc_args, 'interval', 0 ); // avoid absint() to support negative intervals $count = absint( get_flag_value( $this->assoc_args, 'count', 1 ) ); if ( ! empty( $callback_args ) ) { $callback_args = json_decode( $callback_args, true ); } $schedule_start = as_get_datetime_object( $schedule_start ); $function_args = array( 'start' => absint( $schedule_start->format( 'U' ) ), 'interval' => $interval, 'count' => $count, 'hook' => $hook, 'callback_args' => $callback_args, 'group' => $group, ); $function_args = array_values( $function_args ); try { $actions_added = $this->generate( ...$function_args ); } catch ( \Exception $e ) { $this->print_error( $e ); } $num_actions_added = count( (array) $actions_added ); $this->print_success( $num_actions_added, 'single' ); } /** * Schedule multiple single actions. * * @param int $schedule_start Starting timestamp of first action. * @param int $interval How long to wait between runs. * @param int $count Limit number of actions to schedule. * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * @return int[] IDs of actions added. */ protected function generate( $schedule_start, $interval, $count, $hook, array $args = array(), $group = '' ) { $actions_added = array(); $progress_bar = \WP_CLI\Utils\make_progress_bar( sprintf( /* translators: %d is number of actions to create */ _n( 'Creating %d action', 'Creating %d actions', $count, 'action-scheduler' ), number_format_i18n( $count ) ), $count ); for ( $i = 0; $i < $count; $i++ ) { $actions_added[] = as_schedule_single_action( $schedule_start + ( $i * $interval ), $hook, $args, $group ); $progress_bar->tick(); } $progress_bar->finish(); return $actions_added; } /** * Print a success message with the action ID. * * @param int $actions_added Number of actions generated. * @param string $action_type Type of actions scheduled. * @return void */ protected function print_success( $actions_added, $action_type ) { \WP_CLI::success( sprintf( /* translators: %1$d refers to the total number of tasks added, %2$s is the action type */ _n( '%1$d %2$s action scheduled.', '%1$d %2$s actions scheduled.', $actions_added, 'action-scheduler' ), number_format_i18n( $actions_added ), $action_type ) ); } /** * Convert an exception into a WP CLI error. * * @param \Exception $e The error object. * @throws \WP_CLI\ExitException When an error occurs. * @return void */ protected function print_error( \Exception $e ) { \WP_CLI::error( sprintf( /* translators: %s refers to the exception error message. */ __( 'There was an error creating the scheduled action: %s', 'action-scheduler' ), $e->getMessage() ) ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Get_Command.php 0000644 00000004240 15174671617 0022405 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; /** * WP-CLI command: action-scheduler action get */ class Get_Command extends \ActionScheduler_WPCLI_Command { /** * Execute command. * * @return void */ public function execute() { $action_id = $this->args[0]; $store = \ActionScheduler::store(); $logger = \ActionScheduler::logger(); $action = $store->fetch_action( $action_id ); if ( is_a( $action, ActionScheduler_NullAction::class ) ) { /* translators: %d is action ID. */ \WP_CLI::error( sprintf( esc_html__( 'Unable to retrieve action %d.', 'action-scheduler' ), $action_id ) ); } $only_logs = ! empty( $this->assoc_args['field'] ) && 'log_entries' === $this->assoc_args['field']; $only_logs = $only_logs || ( ! empty( $this->assoc_args['fields'] ) && 'log_entries' === $this->assoc_args['fields'] ); $log_entries = array(); foreach ( $logger->get_logs( $action_id ) as $log_entry ) { $log_entries[] = array( 'date' => $log_entry->get_date()->format( static::DATE_FORMAT ), 'message' => $log_entry->get_message(), ); } if ( $only_logs ) { $args = array( 'format' => \WP_CLI\Utils\get_flag_value( $this->assoc_args, 'format', 'table' ), ); $formatter = new \WP_CLI\Formatter( $args, array( 'date', 'message' ) ); $formatter->display_items( $log_entries ); return; } try { $status = $store->get_status( $action_id ); } catch ( \Exception $e ) { \WP_CLI::error( $e->getMessage() ); } $action_arr = array( 'id' => $this->args[0], 'hook' => $action->get_hook(), 'status' => $status, 'args' => $action->get_args(), 'group' => $action->get_group(), 'recurring' => $action->get_schedule()->is_recurring() ? 'yes' : 'no', 'scheduled_date' => $this->get_schedule_display_string( $action->get_schedule() ), 'log_entries' => $log_entries, ); $fields = array_keys( $action_arr ); if ( ! empty( $this->assoc_args['fields'] ) ) { $fields = explode( ',', $this->assoc_args['fields'] ); } $formatter = new \WP_CLI\Formatter( $this->assoc_args, $fields ); $formatter->display_item( $action_arr ); } } vendor/woocommerce/action-scheduler/classes/WP_CLI/Action/Run_Command.php 0000644 00000011161 15174671617 0022432 0 ustar 00 <?php namespace Action_Scheduler\WP_CLI\Action; /** * WP-CLI command: action-scheduler action run */ class Run_Command extends \ActionScheduler_WPCLI_Command { /** * Array of action IDs to execute. * * @var int[] */ protected $action_ids = array(); /** * Number of executed, failed, ignored, invalid, and total actions. * * @var array<string, int> */ protected $action_counts = array( 'executed' => 0, 'failed' => 0, 'ignored' => 0, 'invalid' => 0, 'total' => 0, ); /** * Construct. * * @param string[] $args Positional arguments. * @param array<string, string> $assoc_args Keyed arguments. */ public function __construct( array $args, array $assoc_args ) { parent::__construct( $args, $assoc_args ); $this->action_ids = array_map( 'absint', $args ); $this->action_counts['total'] = count( $this->action_ids ); add_action( 'action_scheduler_execution_ignored', array( $this, 'on_action_ignored' ) ); add_action( 'action_scheduler_after_execute', array( $this, 'on_action_executed' ) ); add_action( 'action_scheduler_failed_execution', array( $this, 'on_action_failed' ), 10, 2 ); add_action( 'action_scheduler_failed_validation', array( $this, 'on_action_invalid' ), 10, 2 ); } /** * Execute. * * @return void */ public function execute() { $runner = \ActionScheduler::runner(); $progress_bar = \WP_CLI\Utils\make_progress_bar( sprintf( /* translators: %d: number of actions */ _n( 'Executing %d action', 'Executing %d actions', $this->action_counts['total'], 'action-scheduler' ), number_format_i18n( $this->action_counts['total'] ) ), $this->action_counts['total'] ); foreach ( $this->action_ids as $action_id ) { $runner->process_action( $action_id, 'Action Scheduler CLI' ); $progress_bar->tick(); } $progress_bar->finish(); foreach ( array( 'ignored', 'invalid', 'failed', ) as $type ) { $count = $this->action_counts[ $type ]; if ( empty( $count ) ) { continue; } /* * translators: * %1$d: count of actions evaluated. * %2$s: type of action evaluated. */ $format = _n( '%1$d action %2$s.', '%1$d actions %2$s.', $count, 'action-scheduler' ); \WP_CLI::warning( sprintf( $format, number_format_i18n( $count ), $type ) ); } \WP_CLI::success( sprintf( /* translators: %d: number of executed actions */ _n( 'Executed %d action.', 'Executed %d actions.', $this->action_counts['executed'], 'action-scheduler' ), number_format_i18n( $this->action_counts['executed'] ) ) ); } /** * Action: action_scheduler_execution_ignored * * @param int $action_id Action ID. * @return void */ public function on_action_ignored( $action_id ) { if ( 'action_scheduler_execution_ignored' !== current_action() ) { return; } $action_id = absint( $action_id ); if ( ! in_array( $action_id, $this->action_ids, true ) ) { return; } $this->action_counts['ignored']++; \WP_CLI::debug( sprintf( 'Action %d was ignored.', $action_id ) ); } /** * Action: action_scheduler_after_execute * * @param int $action_id Action ID. * @return void */ public function on_action_executed( $action_id ) { if ( 'action_scheduler_after_execute' !== current_action() ) { return; } $action_id = absint( $action_id ); if ( ! in_array( $action_id, $this->action_ids, true ) ) { return; } $this->action_counts['executed']++; \WP_CLI::debug( sprintf( 'Action %d was executed.', $action_id ) ); } /** * Action: action_scheduler_failed_execution * * @param int $action_id Action ID. * @param \Exception $e Exception. * @return void */ public function on_action_failed( $action_id, \Exception $e ) { if ( 'action_scheduler_failed_execution' !== current_action() ) { return; } $action_id = absint( $action_id ); if ( ! in_array( $action_id, $this->action_ids, true ) ) { return; } $this->action_counts['failed']++; \WP_CLI::debug( sprintf( 'Action %d failed execution: %s', $action_id, $e->getMessage() ) ); } /** * Action: action_scheduler_failed_validation * * @param int $action_id Action ID. * @param \Exception $e Exception. * @return void */ public function on_action_invalid( $action_id, \Exception $e ) { if ( 'action_scheduler_failed_validation' !== current_action() ) { return; } $action_id = absint( $action_id ); if ( ! in_array( $action_id, $this->action_ids, true ) ) { return; } $this->action_counts['invalid']++; \WP_CLI::debug( sprintf( 'Action %d failed validation: %s', $action_id, $e->getMessage() ) ); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php 0000644 00000012237 15174671617 0024161 0 ustar 00 <?php /** * Class ActionScheduler_wcSystemStatus */ class ActionScheduler_wcSystemStatus { /** * The active data stores * * @var ActionScheduler_Store */ protected $store; /** * Constructor method for ActionScheduler_wcSystemStatus. * * @param ActionScheduler_Store $store Active store object. * * @return void */ public function __construct( $store ) { $this->store = $store; } /** * Display action data, including number of actions grouped by status and the oldest & newest action in each status. * * Helpful to identify issues, like a clogged queue. */ public function render() { $action_counts = $this->store->action_counts(); $status_labels = $this->store->get_status_labels(); $oldest_and_newest = $this->get_oldest_and_newest( array_keys( $status_labels ) ); $this->get_template( $status_labels, $action_counts, $oldest_and_newest ); } /** * Get oldest and newest scheduled dates for a given set of statuses. * * @param array $status_keys Set of statuses to find oldest & newest action for. * @return array */ protected function get_oldest_and_newest( $status_keys ) { $oldest_and_newest = array(); foreach ( $status_keys as $status ) { $oldest_and_newest[ $status ] = array( 'oldest' => '–', 'newest' => '–', ); if ( 'in-progress' === $status ) { continue; } $oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' ); $oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' ); } return $oldest_and_newest; } /** * Get oldest or newest scheduled date for a given status. * * @param string $status Action status label/name string. * @param string $date_type Oldest or Newest. * @return DateTime */ protected function get_action_status_date( $status, $date_type = 'oldest' ) { $order = 'oldest' === $date_type ? 'ASC' : 'DESC'; $action = $this->store->query_actions( array( 'status' => $status, 'per_page' => 1, 'order' => $order, ) ); if ( ! empty( $action ) ) { $date_object = $this->store->get_date( $action[0] ); $action_date = $date_object->format( 'Y-m-d H:i:s O' ); } else { $action_date = '–'; } return $action_date; } /** * Get oldest or newest scheduled date for a given status. * * @param array $status_labels Set of statuses to find oldest & newest action for. * @param array $action_counts Number of actions grouped by status. * @param array $oldest_and_newest Date of the oldest and newest action with each status. */ protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) { $as_version = ActionScheduler_Versions::instance()->latest_version(); $as_datastore = get_class( ActionScheduler_Store::instance() ); ?> <table class="wc_status_table widefat" cellspacing="0"> <thead> <tr> <th colspan="5" data-export-label="Action Scheduler"><h2><?php esc_html_e( 'Action Scheduler', 'action-scheduler' ); ?><?php echo wc_help_tip( esc_html__( 'This section shows details of Action Scheduler.', 'action-scheduler' ) ); ?></h2></th> </tr> <tr> <td colspan="2" data-export-label="Version"><?php esc_html_e( 'Version:', 'action-scheduler' ); ?></td> <td colspan="3"><?php echo esc_html( $as_version ); ?></td> </tr> <tr> <td colspan="2" data-export-label="Data store"><?php esc_html_e( 'Data store:', 'action-scheduler' ); ?></td> <td colspan="3"><?php echo esc_html( $as_datastore ); ?></td> </tr> <tr> <td><strong><?php esc_html_e( 'Action Status', 'action-scheduler' ); ?></strong></td> <td class="help"> </td> <td><strong><?php esc_html_e( 'Count', 'action-scheduler' ); ?></strong></td> <td><strong><?php esc_html_e( 'Oldest Scheduled Date', 'action-scheduler' ); ?></strong></td> <td><strong><?php esc_html_e( 'Newest Scheduled Date', 'action-scheduler' ); ?></strong></td> </tr> </thead> <tbody> <?php foreach ( $action_counts as $status => $count ) { // WC uses the 3rd column for export, so we need to display more data in that (hidden when viewed as part of the table) and add an empty 2nd column. printf( '<tr><td>%1$s</td><td> </td><td>%2$s<span style="display: none;">, Oldest: %3$s, Newest: %4$s</span></td><td>%3$s</td><td>%4$s</td></tr>', esc_html( $status_labels[ $status ] ), esc_html( number_format_i18n( $count ) ), esc_html( $oldest_and_newest[ $status ]['oldest'] ), esc_html( $oldest_and_newest[ $status ]['newest'] ) ); } ?> </tbody> </table> <?php } /** * Is triggered when invoking inaccessible methods in an object context. * * @param string $name Name of method called. * @param array $arguments Parameters to invoke the method with. * * @return mixed * @link https://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods */ public function __call( $name, $arguments ) { switch ( $name ) { case 'print': _deprecated_function( __CLASS__ . '::print()', '2.2.4', __CLASS__ . '::render()' ); return call_user_func_array( array( $this, 'render' ), $arguments ); } return null; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php 0000644 00000017607 15174671617 0023523 0 ustar 00 <?php /** * Class ActionScheduler_QueueCleaner */ class ActionScheduler_QueueCleaner { /** * The batch size. * * @var int */ protected $batch_size; /** * ActionScheduler_Store instance. * * @var ActionScheduler_Store */ private $store = null; /** * 31 days in seconds. * * @var int */ private $month_in_seconds = 2678400; /** * Default list of statuses purged by the cleaner process. * * @var string[] */ private $default_statuses_to_purge = array( ActionScheduler_Store::STATUS_COMPLETE, ActionScheduler_Store::STATUS_CANCELED, ); /** * ActionScheduler_QueueCleaner constructor. * * @param ActionScheduler_Store|null $store The store instance. * @param int $batch_size The batch size. */ public function __construct( ?ActionScheduler_Store $store = null, $batch_size = 20 ) { $this->store = $store ? $store : ActionScheduler_Store::instance(); $this->batch_size = $batch_size; } /** * Default queue cleaner process used by queue runner. * * @return array */ public function delete_old_actions() { /** * Filter the minimum scheduled date age for action deletion. * * @param int $retention_period Minimum scheduled age in seconds of the actions to be deleted. */ $lifespan = apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds ); try { $cutoff = as_get_datetime_object( $lifespan . ' seconds ago' ); } catch ( Exception $e ) { _doing_it_wrong( __METHOD__, sprintf( /* Translators: %s is the exception message. */ esc_html__( 'It was not possible to determine a valid cut-off time: %s.', 'action-scheduler' ), esc_html( $e->getMessage() ) ), '3.5.5' ); return array(); } /** * Filter the statuses when cleaning the queue. * * @param string[] $default_statuses_to_purge Action statuses to clean. */ $statuses_to_purge = (array) apply_filters( 'action_scheduler_default_cleaner_statuses', $this->default_statuses_to_purge ); return $this->clean_actions( $statuses_to_purge, $cutoff, $this->get_batch_size() ); } /** * Delete selected actions limited by status and date. * * @param string[] $statuses_to_purge List of action statuses to purge. Defaults to canceled, complete. * @param DateTime $cutoff_date Date limit for selecting actions. Defaults to 31 days ago. * @param int|null $batch_size Maximum number of actions per status to delete. Defaults to 20. * @param string $context Calling process context. Defaults to `old`. * @return array Actions deleted. */ public function clean_actions( array $statuses_to_purge, DateTime $cutoff_date, $batch_size = null, $context = 'old' ) { $batch_size = ! is_null( $batch_size ) ? $batch_size : $this->batch_size; $cutoff = ! is_null( $cutoff_date ) ? $cutoff_date : as_get_datetime_object( $this->month_in_seconds . ' seconds ago' ); $lifespan = time() - $cutoff->getTimestamp(); if ( empty( $statuses_to_purge ) ) { $statuses_to_purge = $this->default_statuses_to_purge; } $deleted_actions = array(); foreach ( $statuses_to_purge as $status ) { $actions_to_delete = $this->store->query_actions( array( 'status' => $status, 'modified' => $cutoff, 'modified_compare' => '<=', 'per_page' => $batch_size, 'orderby' => 'none', ) ); $deleted_actions = array_merge( $deleted_actions, $this->delete_actions( $actions_to_delete, $lifespan, $context ) ); } return $deleted_actions; } /** * Delete actions. * * @param int[] $actions_to_delete List of action IDs to delete. * @param int $lifespan Minimum scheduled age in seconds of the actions being deleted. * @param string $context Context of the delete request. * @return array Deleted action IDs. */ private function delete_actions( array $actions_to_delete, $lifespan = null, $context = 'old' ) { $deleted_actions = array(); if ( is_null( $lifespan ) ) { $lifespan = $this->month_in_seconds; } foreach ( $actions_to_delete as $action_id ) { try { $this->store->delete_action( $action_id ); $deleted_actions[] = $action_id; } catch ( Exception $e ) { /** * Notify 3rd party code of exceptions when deleting a completed action older than the retention period * * This hook provides a way for 3rd party code to log or otherwise handle exceptions relating to their * actions. * * @param int $action_id The scheduled actions ID in the data store * @param Exception $e The exception thrown when attempting to delete the action from the data store * @param int $lifespan The retention period, in seconds, for old actions * @param int $count_of_actions_to_delete The number of old actions being deleted in this batch * @since 2.0.0 */ do_action( "action_scheduler_failed_{$context}_action_deletion", $action_id, $e, $lifespan, count( $actions_to_delete ) ); } } return $deleted_actions; } /** * Unclaim pending actions that have not been run within a given time limit. * * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed * as a parameter is 10x the time limit used for queue processing. * * @param int $time_limit The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes). */ public function reset_timeouts( $time_limit = 300 ) { $timeout = apply_filters( 'action_scheduler_timeout_period', $time_limit ); if ( $timeout < 0 ) { return; } $cutoff = as_get_datetime_object( $timeout . ' seconds ago' ); $actions_to_reset = $this->store->query_actions( array( 'status' => ActionScheduler_Store::STATUS_PENDING, 'modified' => $cutoff, 'modified_compare' => '<=', 'claimed' => true, 'per_page' => $this->get_batch_size(), 'orderby' => 'none', ) ); foreach ( $actions_to_reset as $action_id ) { $this->store->unclaim_action( $action_id ); do_action( 'action_scheduler_reset_action', $action_id ); } } /** * Mark actions that have been running for more than a given time limit as failed, based on * the assumption some uncatchable and unloggable fatal error occurred during processing. * * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed * as a parameter is 10x the time limit used for queue processing. * * @param int $time_limit The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes). */ public function mark_failures( $time_limit = 300 ) { $timeout = apply_filters( 'action_scheduler_failure_period', $time_limit ); if ( $timeout < 0 ) { return; } $cutoff = as_get_datetime_object( $timeout . ' seconds ago' ); $actions_to_reset = $this->store->query_actions( array( 'status' => ActionScheduler_Store::STATUS_RUNNING, 'modified' => $cutoff, 'modified_compare' => '<=', 'per_page' => $this->get_batch_size(), 'orderby' => 'none', ) ); foreach ( $actions_to_reset as $action_id ) { $this->store->mark_failure( $action_id ); do_action( 'action_scheduler_failed_action', $action_id, $timeout ); } } /** * Do all of the cleaning actions. * * @param int $time_limit The number of seconds to use as the timeout and failure period. Default 300 (5 minutes). */ public function clean( $time_limit = 300 ) { $this->delete_old_actions(); $this->reset_timeouts( $time_limit ); $this->mark_failures( $time_limit ); } /** * Get the batch size for cleaning the queue. * * @return int */ protected function get_batch_size() { /** * Filter the batch size when cleaning the queue. * * @param int $batch_size The number of actions to clean in one batch. */ return absint( apply_filters( 'action_scheduler_cleanup_batch_size', $this->batch_size ) ); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_OptionLock.php 0000644 00000007754 15174671617 0023230 0 ustar 00 <?php /** * Provide a way to set simple transient locks to block behaviour * for up-to a given duration. * * Class ActionScheduler_OptionLock * * @since 3.0.0 */ class ActionScheduler_OptionLock extends ActionScheduler_Lock { /** * Set a lock using options for a given amount of time (60 seconds by default). * * Using an autoloaded option avoids running database queries or other resource intensive tasks * on frequently triggered hooks, like 'init' or 'shutdown'. * * For example, ActionScheduler_QueueRunner->maybe_dispatch_async_request() uses a lock to avoid * calling ActionScheduler_QueueRunner->has_maximum_concurrent_batches() every time the 'shutdown', * hook is triggered, because that method calls ActionScheduler_QueueRunner->store->get_claim_count() * to find the current number of claims in the database. * * @param string $lock_type A string to identify different lock types. * @bool True if lock value has changed, false if not or if set failed. */ public function set( $lock_type ) { global $wpdb; $lock_key = $this->get_key( $lock_type ); $existing_lock_value = $this->get_existing_lock( $lock_type ); $new_lock_value = $this->new_lock_value( $lock_type ); // The lock may not exist yet, or may have been deleted. if ( empty( $existing_lock_value ) ) { return (bool) $wpdb->insert( $wpdb->options, array( 'option_name' => $lock_key, 'option_value' => $new_lock_value, 'autoload' => 'no', ) ); } if ( $this->get_expiration_from( $existing_lock_value ) >= time() ) { return false; } // Otherwise, try to obtain the lock. return (bool) $wpdb->update( $wpdb->options, array( 'option_value' => $new_lock_value ), array( 'option_name' => $lock_key, 'option_value' => $existing_lock_value, ) ); } /** * If a lock is set, return the timestamp it was set to expiry. * * @param string $lock_type A string to identify different lock types. * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire. */ public function get_expiration( $lock_type ) { return $this->get_expiration_from( $this->get_existing_lock( $lock_type ) ); } /** * Given the lock string, derives the lock expiration timestamp (or false if it cannot be determined). * * @param string $lock_value String containing a timestamp, or pipe-separated combination of unique value and timestamp. * * @return false|int */ private function get_expiration_from( $lock_value ) { $lock_string = explode( '|', $lock_value ); // Old style lock? if ( count( $lock_string ) === 1 && is_numeric( $lock_string[0] ) ) { return (int) $lock_string[0]; } // New style lock? if ( count( $lock_string ) === 2 && is_numeric( $lock_string[1] ) ) { return (int) $lock_string[1]; } return false; } /** * Get the key to use for storing the lock in the transient * * @param string $lock_type A string to identify different lock types. * @return string */ protected function get_key( $lock_type ) { return sprintf( 'action_scheduler_lock_%s', $lock_type ); } /** * Supplies the existing lock value, or an empty string if not set. * * @param string $lock_type A string to identify different lock types. * * @return string */ private function get_existing_lock( $lock_type ) { global $wpdb; // Now grab the existing lock value, if there is one. return (string) $wpdb->get_var( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s", $this->get_key( $lock_type ) ) ); } /** * Supplies a lock value consisting of a unique value and the current timestamp, which are separated by a pipe * character. * * Example: (string) "649de012e6b262.09774912|1688068114" * * @param string $lock_type A string to identify different lock types. * * @return string */ private function new_lock_value( $lock_type ) { return uniqid( '', true ) . '|' . ( time() + $this->get_duration( $lock_type ) ); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_FatalErrorMonitor.php 0000644 00000005005 15174671617 0024543 0 ustar 00 <?php /** * Class ActionScheduler_FatalErrorMonitor */ class ActionScheduler_FatalErrorMonitor { /** * ActionScheduler_ActionClaim instance. * * @var ActionScheduler_ActionClaim */ private $claim = null; /** * ActionScheduler_Store instance. * * @var ActionScheduler_Store */ private $store = null; /** * Current action's ID. * * @var int */ private $action_id = 0; /** * Construct. * * @param ActionScheduler_Store $store Action store. */ public function __construct( ActionScheduler_Store $store ) { $this->store = $store; } /** * Start monitoring. * * @param ActionScheduler_ActionClaim $claim Claimed actions. */ public function attach( ActionScheduler_ActionClaim $claim ) { $this->claim = $claim; add_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); add_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0, 1 ); add_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0, 0 ); add_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0, 0 ); add_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0, 0 ); } /** * Stop monitoring. */ public function detach() { $this->claim = null; $this->untrack_action(); remove_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); remove_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0 ); remove_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0 ); remove_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0 ); remove_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0 ); } /** * Track specified action. * * @param int $action_id Action ID to track. */ public function track_current_action( $action_id ) { $this->action_id = $action_id; } /** * Un-track action. */ public function untrack_action() { $this->action_id = 0; } /** * Handle unexpected shutdown. */ public function handle_unexpected_shutdown() { $error = error_get_last(); if ( $error ) { if ( in_array( $error['type'], array( E_ERROR, E_PARSE, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR ), true ) ) { if ( ! empty( $this->action_id ) ) { $this->store->mark_failure( $this->action_id ); do_action( 'action_scheduler_unexpected_shutdown', $this->action_id, $error ); } } $this->store->release_claim( $this->claim ); } } } vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_NullAction.php 0000644 00000001131 15174671617 0024636 0 ustar 00 <?php /** * Class ActionScheduler_NullAction */ class ActionScheduler_NullAction extends ActionScheduler_Action { /** * Construct. * * @param string $hook Action hook. * @param mixed[] $args Action arguments. * @param null|ActionScheduler_Schedule $schedule Action schedule. */ public function __construct( $hook = '', array $args = array(), ?ActionScheduler_Schedule $schedule = null ) { $this->set_schedule( new ActionScheduler_NullSchedule() ); } /** * Execute action. */ public function execute() { // don't execute. } } vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php 0000644 00000001563 15174671617 0025433 0 ustar 00 <?php /** * Class ActionScheduler_CanceledAction * * Stored action which was canceled and therefore acts like a finished action but should always return a null schedule, * regardless of schedule passed to its constructor. */ class ActionScheduler_CanceledAction extends ActionScheduler_FinishedAction { /** * Construct. * * @param string $hook Action's hook. * @param array $args Action's arguments. * @param null|ActionScheduler_Schedule $schedule Action's schedule. * @param string $group Action's group. */ public function __construct( $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) { parent::__construct( $hook, $args, $schedule, $group ); if ( is_null( $schedule ) ) { $this->set_schedule( new ActionScheduler_NullSchedule() ); } } } vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php 0000644 00000007510 15174671617 0024012 0 ustar 00 <?php /** * Class ActionScheduler_Action */ class ActionScheduler_Action { /** * Action's hook. * * @var string */ protected $hook = ''; /** * Action's args. * * @var array<string, mixed> */ protected $args = array(); /** * Action's schedule. * * @var ActionScheduler_Schedule */ protected $schedule = null; /** * Action's group. * * @var string */ protected $group = ''; /** * Priorities are conceptually similar to those used for regular WordPress actions. * Like those, a lower priority takes precedence over a higher priority and the default * is 10. * * Unlike regular WordPress actions, the priority of a scheduled action is strictly an * integer and should be kept within the bounds 0-255 (anything outside the bounds will * be brought back into the acceptable range). * * @var int */ protected $priority = 10; /** * Construct. * * @param string $hook Action's hook. * @param mixed[] $args Action's arguments. * @param null|ActionScheduler_Schedule $schedule Action's schedule. * @param string $group Action's group. */ public function __construct( $hook, array $args = array(), ?ActionScheduler_Schedule $schedule = null, $group = '' ) { $schedule = empty( $schedule ) ? new ActionScheduler_NullSchedule() : $schedule; $this->set_hook( $hook ); $this->set_schedule( $schedule ); $this->set_args( $args ); $this->set_group( $group ); } /** * Executes the action. * * If no callbacks are registered, an exception will be thrown and the action will not be * fired. This is useful to help detect cases where the code responsible for setting up * a scheduled action no longer exists. * * @throws Exception If no callbacks are registered for this action. */ public function execute() { $hook = $this->get_hook(); if ( ! has_action( $hook ) ) { throw new Exception( sprintf( /* translators: 1: action hook. */ __( 'Scheduled action for %1$s will not be executed as no callbacks are registered.', 'action-scheduler' ), $hook ) ); } do_action_ref_array( $hook, array_values( $this->get_args() ) ); } /** * Set action's hook. * * @param string $hook Action's hook. */ protected function set_hook( $hook ) { $this->hook = $hook; } /** * Get action's hook. */ public function get_hook() { return $this->hook; } /** * Set action's schedule. * * @param ActionScheduler_Schedule $schedule Action's schedule. */ protected function set_schedule( ActionScheduler_Schedule $schedule ) { $this->schedule = $schedule; } /** * Action's schedule. * * @return ActionScheduler_Schedule */ public function get_schedule() { return $this->schedule; } /** * Set action's args. * * @param mixed[] $args Action's arguments. */ protected function set_args( array $args ) { $this->args = $args; } /** * Get action's args. */ public function get_args() { return $this->args; } /** * Section action's group. * * @param string $group Action's group. */ protected function set_group( $group ) { $this->group = $group; } /** * Action's group. * * @return string */ public function get_group() { return $this->group; } /** * Action has not finished. * * @return bool */ public function is_finished() { return false; } /** * Sets the priority of the action. * * @param int $priority Priority level (lower is higher priority). Should be in the range 0-255. * * @return void */ public function set_priority( $priority ) { if ( $priority < 0 ) { $priority = 0; } elseif ( $priority > 255 ) { $priority = 255; } $this->priority = (int) $priority; } /** * Gets the action priority. * * @return int */ public function get_priority() { return $this->priority; } } vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php 0000644 00000000450 15174671617 0025460 0 ustar 00 <?php /** * Class ActionScheduler_FinishedAction */ class ActionScheduler_FinishedAction extends ActionScheduler_Action { /** * Execute action. */ public function execute() { // don't execute. } /** * Get finished state. */ public function is_finished() { return true; } } vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php 0000644 00000003453 15174671617 0026137 0 ustar 00 <?php /** * Class ActionScheduler_DBStoreMigrator * * A class for direct saving of actions to the table data store during migration. * * @since 3.0.0 */ class ActionScheduler_DBStoreMigrator extends ActionScheduler_DBStore { /** * Save an action with optional last attempt date. * * Normally, saving an action sets its attempted date to 0000-00-00 00:00:00 because when an action is first saved, * it can't have been attempted yet, but migrated completed actions will have an attempted date, so we need to save * that when first saving the action. * * @param ActionScheduler_Action $action Action to migrate. * @param null|DateTime $scheduled_date Optional date of the first instance to store. * @param null|DateTime $last_attempt_date Optional date the action was last attempted. * * @return string The action ID * @throws \RuntimeException When the action is not saved. */ public function save_action( ActionScheduler_Action $action, ?DateTime $scheduled_date = null, ?DateTime $last_attempt_date = null ) { try { /** * Global. * * @var \wpdb $wpdb */ global $wpdb; $action_id = parent::save_action( $action, $scheduled_date ); if ( null !== $last_attempt_date ) { $data = array( 'last_attempt_gmt' => $this->get_scheduled_date_string( $action, $last_attempt_date ), 'last_attempt_local' => $this->get_scheduled_date_string_local( $action, $last_attempt_date ), ); $wpdb->update( $wpdb->actionscheduler_actions, $data, array( 'action_id' => $action_id ), array( '%s', '%s' ), array( '%d' ) ); } return $action_id; } catch ( \Exception $e ) { // translators: %s is an error message. throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 ); } } } vendor/woocommerce/action-scheduler/classes/migration/LogMigrator.php 0000644 00000002441 15174671617 0022216 0 ustar 00 <?php namespace Action_Scheduler\Migration; use ActionScheduler_Logger; /** * Class LogMigrator * * @package Action_Scheduler\Migration * * @since 3.0.0 * * @codeCoverageIgnore */ class LogMigrator { /** * Source logger instance. * * @var ActionScheduler_Logger */ private $source; /** * Destination logger instance. * * @var ActionScheduler_Logger */ private $destination; /** * ActionMigrator constructor. * * @param ActionScheduler_Logger $source_logger Source logger object. * @param ActionScheduler_Logger $destination_logger Destination logger object. */ public function __construct( ActionScheduler_Logger $source_logger, ActionScheduler_Logger $destination_logger ) { $this->source = $source_logger; $this->destination = $destination_logger; } /** * Migrate an action log. * * @param int $source_action_id Source logger object. * @param int $destination_action_id Destination logger object. */ public function migrate( $source_action_id, $destination_action_id ) { $logs = $this->source->get_logs( $source_action_id ); foreach ( $logs as $log ) { if ( absint( $log->get_action_id() ) === absint( $source_action_id ) ) { $this->destination->log( $destination_action_id, $log->get_message(), $log->get_date() ); } } } } vendor/woocommerce/action-scheduler/classes/migration/DryRun_LogMigrator.php 0000644 00000000713 15174671617 0023521 0 ustar 00 <?php namespace Action_Scheduler\Migration; /** * Class DryRun_LogMigrator * * @package Action_Scheduler\Migration * * @codeCoverageIgnore */ class DryRun_LogMigrator extends LogMigrator { /** * Simulate migrating an action log. * * @param int $source_action_id Source logger object. * @param int $destination_action_id Destination logger object. */ public function migrate( $source_action_id, $destination_action_id ) { // no-op. } } vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php 0000644 00000003350 15174671617 0022312 0 ustar 00 <?php namespace Action_Scheduler\Migration; use ActionScheduler_Store as Store; /** * Class BatchFetcher * * @package Action_Scheduler\Migration * * @since 3.0.0 * * @codeCoverageIgnore */ class BatchFetcher { /** * Store instance. * * @var ActionScheduler_Store */ private $store; /** * BatchFetcher constructor. * * @param ActionScheduler_Store $source_store Source store object. */ public function __construct( Store $source_store ) { $this->store = $source_store; } /** * Retrieve a list of actions. * * @param int $count The number of actions to retrieve. * * @return int[] A list of action IDs */ public function fetch( $count = 10 ) { foreach ( $this->get_query_strategies( $count ) as $query ) { $action_ids = $this->store->query_actions( $query ); if ( ! empty( $action_ids ) ) { return $action_ids; } } return array(); } /** * Generate a list of prioritized of action search parameters. * * @param int $count Number of actions to find. * * @return array */ private function get_query_strategies( $count ) { $now = as_get_datetime_object(); $args = array( 'date' => $now, 'per_page' => $count, 'offset' => 0, 'orderby' => 'date', 'order' => 'ASC', ); $priorities = array( Store::STATUS_PENDING, Store::STATUS_FAILED, Store::STATUS_CANCELED, Store::STATUS_COMPLETE, Store::STATUS_RUNNING, '', // any other unanticipated status. ); foreach ( $priorities as $status ) { yield wp_parse_args( array( 'status' => $status, 'date_compare' => '<=', ), $args ); yield wp_parse_args( array( 'status' => $status, 'date_compare' => '>=', ), $args ); } } } vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php 0000644 00000001052 15174671617 0024212 0 ustar 00 <?php namespace Action_Scheduler\Migration; /** * Class DryRun_ActionMigrator * * @package Action_Scheduler\Migration * * @since 3.0.0 * * @codeCoverageIgnore */ class DryRun_ActionMigrator extends ActionMigrator { /** * Simulate migrating an action. * * @param int $source_action_id Action ID. * * @return int */ public function migrate( $source_action_id ) { do_action( 'action_scheduler/migrate_action_dry_run', $source_action_id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores return 0; } } vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php 0000644 00000010253 15174671617 0022712 0 ustar 00 <?php namespace Action_Scheduler\Migration; /** * Class ActionMigrator * * @package Action_Scheduler\Migration * * @since 3.0.0 * * @codeCoverageIgnore */ class ActionMigrator { /** * Source store instance. * * @var ActionScheduler_Store */ private $source; /** * Destination store instance. * * @var ActionScheduler_Store */ private $destination; /** * LogMigrator instance. * * @var LogMigrator */ private $log_migrator; /** * ActionMigrator constructor. * * @param \ActionScheduler_Store $source_store Source store object. * @param \ActionScheduler_Store $destination_store Destination store object. * @param LogMigrator $log_migrator Log migrator object. */ public function __construct( \ActionScheduler_Store $source_store, \ActionScheduler_Store $destination_store, LogMigrator $log_migrator ) { $this->source = $source_store; $this->destination = $destination_store; $this->log_migrator = $log_migrator; } /** * Migrate an action. * * @param int $source_action_id Action ID. * * @return int 0|new action ID * @throws \RuntimeException When unable to delete action from the source store. */ public function migrate( $source_action_id ) { try { $action = $this->source->fetch_action( $source_action_id ); $status = $this->source->get_status( $source_action_id ); } catch ( \Exception $e ) { $action = null; $status = ''; } if ( is_null( $action ) || empty( $status ) || ! $action->get_schedule()->get_date() ) { // null action or empty status means the fetch operation failed or the action didn't exist. // null schedule means it's missing vital data. // delete it and move on. try { $this->source->delete_action( $source_action_id ); } catch ( \Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch // nothing to do, it didn't exist in the first place. } do_action( 'action_scheduler/no_action_to_migrate', $source_action_id, $this->source, $this->destination ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores return 0; } try { // Make sure the last attempt date is set correctly for completed and failed actions. $last_attempt_date = ( \ActionScheduler_Store::STATUS_PENDING !== $status ) ? $this->source->get_date( $source_action_id ) : null; $destination_action_id = $this->destination->save_action( $action, null, $last_attempt_date ); } catch ( \Exception $e ) { do_action( 'action_scheduler/migrate_action_failed', $source_action_id, $this->source, $this->destination ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores return 0; // could not save the action in the new store. } try { switch ( $status ) { case \ActionScheduler_Store::STATUS_FAILED: $this->destination->mark_failure( $destination_action_id ); break; case \ActionScheduler_Store::STATUS_CANCELED: $this->destination->cancel_action( $destination_action_id ); break; } $this->log_migrator->migrate( $source_action_id, $destination_action_id ); $this->source->delete_action( $source_action_id ); $test_action = $this->source->fetch_action( $source_action_id ); if ( ! is_a( $test_action, 'ActionScheduler_NullAction' ) ) { // translators: %s is an action ID. throw new \RuntimeException( sprintf( __( 'Unable to remove source migrated action %s', 'action-scheduler' ), $source_action_id ) ); } do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores return $destination_action_id; } catch ( \Exception $e ) { // could not delete from the old store. $this->source->mark_migrated( $source_action_id ); // phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores do_action( 'action_scheduler/migrate_action_incomplete', $source_action_id, $destination_action_id, $this->source, $this->destination ); do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination ); // phpcs:enable return $destination_action_id; } } } vendor/woocommerce/action-scheduler/classes/migration/Runner.php 0000644 00000010174 15174671617 0021243 0 ustar 00 <?php namespace Action_Scheduler\Migration; /** * Class Runner * * @package Action_Scheduler\Migration * * @since 3.0.0 * * @codeCoverageIgnore */ class Runner { /** * Source store instance. * * @var ActionScheduler_Store */ private $source_store; /** * Destination store instance. * * @var ActionScheduler_Store */ private $destination_store; /** * Source logger instance. * * @var ActionScheduler_Logger */ private $source_logger; /** * Destination logger instance. * * @var ActionScheduler_Logger */ private $destination_logger; /** * Batch fetcher instance. * * @var BatchFetcher */ private $batch_fetcher; /** * Action migrator instance. * * @var ActionMigrator */ private $action_migrator; /** * Log migrator instance. * * @var LogMigrator */ private $log_migrator; /** * Progress bar instance. * * @var ProgressBar */ private $progress_bar; /** * Runner constructor. * * @param Config $config Migration configuration object. */ public function __construct( Config $config ) { $this->source_store = $config->get_source_store(); $this->destination_store = $config->get_destination_store(); $this->source_logger = $config->get_source_logger(); $this->destination_logger = $config->get_destination_logger(); $this->batch_fetcher = new BatchFetcher( $this->source_store ); if ( $config->get_dry_run() ) { $this->log_migrator = new DryRun_LogMigrator( $this->source_logger, $this->destination_logger ); $this->action_migrator = new DryRun_ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator ); } else { $this->log_migrator = new LogMigrator( $this->source_logger, $this->destination_logger ); $this->action_migrator = new ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator ); } if ( defined( 'WP_CLI' ) && WP_CLI ) { $this->progress_bar = $config->get_progress_bar(); } } /** * Run migration batch. * * @param int $batch_size Optional batch size. Default 10. * * @return int Size of batch processed. */ public function run( $batch_size = 10 ) { $batch = $this->batch_fetcher->fetch( $batch_size ); $batch_size = count( $batch ); if ( ! $batch_size ) { return 0; } if ( $this->progress_bar ) { /* translators: %d: amount of actions */ $this->progress_bar->set_message( sprintf( _n( 'Migrating %d action', 'Migrating %d actions', $batch_size, 'action-scheduler' ), $batch_size ) ); $this->progress_bar->set_count( $batch_size ); } $this->migrate_actions( $batch ); return $batch_size; } /** * Migration a batch of actions. * * @param array $action_ids List of action IDs to migrate. */ public function migrate_actions( array $action_ids ) { do_action( 'action_scheduler/migration_batch_starting', $action_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores \ActionScheduler::logger()->unhook_stored_action(); $this->destination_logger->unhook_stored_action(); foreach ( $action_ids as $source_action_id ) { $destination_action_id = $this->action_migrator->migrate( $source_action_id ); if ( $destination_action_id ) { $this->destination_logger->log( $destination_action_id, sprintf( /* translators: 1: source action ID 2: source store class 3: destination action ID 4: destination store class */ __( 'Migrated action with ID %1$d in %2$s to ID %3$d in %4$s', 'action-scheduler' ), $source_action_id, get_class( $this->source_store ), $destination_action_id, get_class( $this->destination_store ) ) ); } if ( $this->progress_bar ) { $this->progress_bar->tick(); } } if ( $this->progress_bar ) { $this->progress_bar->finish(); } \ActionScheduler::logger()->hook_stored_action(); do_action( 'action_scheduler/migration_batch_complete', $action_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } /** * Initialize destination store and logger. */ public function init_destination() { $this->destination_store->init(); $this->destination_logger->init(); } } vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php 0000644 00000006050 15174671617 0021706 0 ustar 00 <?php namespace Action_Scheduler\Migration; /** * Class Scheduler * * @package Action_Scheduler\WP_CLI * * @since 3.0.0 * * @codeCoverageIgnore */ class Scheduler { /** Migration action hook. */ const HOOK = 'action_scheduler/migration_hook'; /** Migration action group. */ const GROUP = 'action-scheduler-migration'; /** * Set up the callback for the scheduled job. */ public function hook() { add_action( self::HOOK, array( $this, 'run_migration' ), 10, 0 ); } /** * Remove the callback for the scheduled job. */ public function unhook() { remove_action( self::HOOK, array( $this, 'run_migration' ), 10 ); } /** * The migration callback. */ public function run_migration() { $migration_runner = $this->get_migration_runner(); $count = $migration_runner->run( $this->get_batch_size() ); if ( 0 === $count ) { $this->mark_complete(); } else { $this->schedule_migration( time() + $this->get_schedule_interval() ); } } /** * Mark the migration complete. */ public function mark_complete() { $this->unschedule_migration(); \ActionScheduler_DataController::mark_migration_complete(); do_action( 'action_scheduler/migration_complete' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } /** * Get a flag indicating whether the migration is scheduled. * * @return bool Whether there is a pending action in the store to handle the migration */ public function is_migration_scheduled() { $next = as_next_scheduled_action( self::HOOK ); return ! empty( $next ); } /** * Schedule the migration. * * @param int $when Optional timestamp to run the next migration batch. Defaults to now. * * @return string The action ID */ public function schedule_migration( $when = 0 ) { $next = as_next_scheduled_action( self::HOOK ); if ( ! empty( $next ) ) { return $next; } if ( empty( $when ) ) { $when = time() + MINUTE_IN_SECONDS; } return as_schedule_single_action( $when, self::HOOK, array(), self::GROUP ); } /** * Remove the scheduled migration action. */ public function unschedule_migration() { as_unschedule_action( self::HOOK, null, self::GROUP ); } /** * Get migration batch schedule interval. * * @return int Seconds between migration runs. Defaults to 0 seconds to allow chaining migration via Async Runners. */ private function get_schedule_interval() { return (int) apply_filters( 'action_scheduler/migration_interval', 0 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } /** * Get migration batch size. * * @return int Number of actions to migrate in each batch. Defaults to 250. */ private function get_batch_size() { return (int) apply_filters( 'action_scheduler/migration_batch_size', 250 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } /** * Get migration runner object. * * @return Runner */ private function get_migration_runner() { $config = Controller::instance()->get_migration_config_object(); return new Runner( $config ); } } vendor/woocommerce/action-scheduler/classes/migration/Config.php 0000644 00000010156 15174671617 0021177 0 ustar 00 <?php namespace Action_Scheduler\Migration; use Action_Scheduler\WP_CLI\ProgressBar; use ActionScheduler_Logger as Logger; use ActionScheduler_Store as Store; /** * Class Config * * @package Action_Scheduler\Migration * * @since 3.0.0 * * A config builder for the ActionScheduler\Migration\Runner class */ class Config { /** * Source store instance. * * @var ActionScheduler_Store */ private $source_store; /** * Source logger instance. * * @var ActionScheduler_Logger */ private $source_logger; /** * Destination store instance. * * @var ActionScheduler_Store */ private $destination_store; /** * Destination logger instance. * * @var ActionScheduler_Logger */ private $destination_logger; /** * Progress bar object. * * @var Action_Scheduler\WP_CLI\ProgressBar */ private $progress_bar; /** * Flag indicating a dryrun. * * @var bool */ private $dry_run = false; /** * Config constructor. */ public function __construct() { } /** * Get the configured source store. * * @return ActionScheduler_Store * @throws \RuntimeException When source store is not configured. */ public function get_source_store() { if ( empty( $this->source_store ) ) { throw new \RuntimeException( __( 'Source store must be configured before running a migration', 'action-scheduler' ) ); } return $this->source_store; } /** * Set the configured source store. * * @param ActionScheduler_Store $store Source store object. */ public function set_source_store( Store $store ) { $this->source_store = $store; } /** * Get the configured source logger. * * @return ActionScheduler_Logger * @throws \RuntimeException When source logger is not configured. */ public function get_source_logger() { if ( empty( $this->source_logger ) ) { throw new \RuntimeException( __( 'Source logger must be configured before running a migration', 'action-scheduler' ) ); } return $this->source_logger; } /** * Set the configured source logger. * * @param ActionScheduler_Logger $logger Logger object. */ public function set_source_logger( Logger $logger ) { $this->source_logger = $logger; } /** * Get the configured destination store. * * @return ActionScheduler_Store * @throws \RuntimeException When destination store is not configured. */ public function get_destination_store() { if ( empty( $this->destination_store ) ) { throw new \RuntimeException( __( 'Destination store must be configured before running a migration', 'action-scheduler' ) ); } return $this->destination_store; } /** * Set the configured destination store. * * @param ActionScheduler_Store $store Action store object. */ public function set_destination_store( Store $store ) { $this->destination_store = $store; } /** * Get the configured destination logger. * * @return ActionScheduler_Logger * @throws \RuntimeException When destination logger is not configured. */ public function get_destination_logger() { if ( empty( $this->destination_logger ) ) { throw new \RuntimeException( __( 'Destination logger must be configured before running a migration', 'action-scheduler' ) ); } return $this->destination_logger; } /** * Set the configured destination logger. * * @param ActionScheduler_Logger $logger Logger object. */ public function set_destination_logger( Logger $logger ) { $this->destination_logger = $logger; } /** * Get flag indicating whether it's a dry run. * * @return bool */ public function get_dry_run() { return $this->dry_run; } /** * Set flag indicating whether it's a dry run. * * @param bool $dry_run Dry run toggle. */ public function set_dry_run( $dry_run ) { $this->dry_run = (bool) $dry_run; } /** * Get progress bar object. * * @return ActionScheduler\WPCLI\ProgressBar */ public function get_progress_bar() { return $this->progress_bar; } /** * Set progress bar object. * * @param ActionScheduler\WPCLI\ProgressBar $progress_bar Progress bar object. */ public function set_progress_bar( ProgressBar $progress_bar ) { $this->progress_bar = $progress_bar; } } vendor/woocommerce/action-scheduler/classes/migration/Controller.php 0000644 00000014574 15174671617 0022125 0 ustar 00 <?php namespace Action_Scheduler\Migration; use ActionScheduler_DataController; use ActionScheduler_LoggerSchema; use ActionScheduler_StoreSchema; use Action_Scheduler\WP_CLI\ProgressBar; /** * Class Controller * * The main plugin/initialization class for migration to custom tables. * * @package Action_Scheduler\Migration * * @since 3.0.0 * * @codeCoverageIgnore */ class Controller { /** * Instance. * * @var self */ private static $instance; /** * Scheduler instance. * * @var Action_Scheduler\Migration\Scheduler */ private $migration_scheduler; /** * Class name of the store object. * * @var string */ private $store_classname; /** * Class name of the logger object. * * @var string */ private $logger_classname; /** * Flag to indicate migrating custom store. * * @var bool */ private $migrate_custom_store; /** * Controller constructor. * * @param Scheduler $migration_scheduler Migration scheduler object. */ protected function __construct( Scheduler $migration_scheduler ) { $this->migration_scheduler = $migration_scheduler; $this->store_classname = ''; } /** * Set the action store class name. * * @param string $class Classname of the store class. * * @return string */ public function get_store_class( $class ) { if ( \ActionScheduler_DataController::is_migration_complete() ) { return \ActionScheduler_DataController::DATASTORE_CLASS; } elseif ( \ActionScheduler_Store::DEFAULT_CLASS !== $class ) { $this->store_classname = $class; return $class; } else { return 'ActionScheduler_HybridStore'; } } /** * Set the action logger class name. * * @param string $class Classname of the logger class. * * @return string */ public function get_logger_class( $class ) { \ActionScheduler_Store::instance(); if ( $this->has_custom_datastore() ) { $this->logger_classname = $class; return $class; } else { return \ActionScheduler_DataController::LOGGER_CLASS; } } /** * Get flag indicating whether a custom datastore is in use. * * @return bool */ public function has_custom_datastore() { return (bool) $this->store_classname; } /** * Set up the background migration process. * * @return void */ public function schedule_migration() { $logging_tables = new ActionScheduler_LoggerSchema(); $store_tables = new ActionScheduler_StoreSchema(); /* * In some unusual cases, the expected tables may not have been created. In such cases * we do not schedule a migration as doing so will lead to fatal error conditions. * * In such cases the user will likely visit the Tools > Scheduled Actions screen to * investigate, and will see appropriate messaging (this step also triggers an attempt * to rebuild any missing tables). * * @see https://github.com/woocommerce/action-scheduler/issues/653 */ if ( ActionScheduler_DataController::is_migration_complete() || $this->migration_scheduler->is_migration_scheduled() || ! $store_tables->tables_exist() || ! $logging_tables->tables_exist() ) { return; } $this->migration_scheduler->schedule_migration(); } /** * Get the default migration config object * * @return ActionScheduler\Migration\Config */ public function get_migration_config_object() { static $config = null; if ( ! $config ) { $source_store = $this->store_classname ? new $this->store_classname() : new \ActionScheduler_wpPostStore(); $source_logger = $this->logger_classname ? new $this->logger_classname() : new \ActionScheduler_wpCommentLogger(); $config = new Config(); $config->set_source_store( $source_store ); $config->set_source_logger( $source_logger ); $config->set_destination_store( new \ActionScheduler_DBStoreMigrator() ); $config->set_destination_logger( new \ActionScheduler_DBLogger() ); if ( defined( 'WP_CLI' ) && WP_CLI ) { $config->set_progress_bar( new ProgressBar( '', 0 ) ); } } return apply_filters( 'action_scheduler/migration_config', $config ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores } /** * Hook dashboard migration notice. */ public function hook_admin_notices() { if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) { return; } add_action( 'admin_notices', array( $this, 'display_migration_notice' ), 10, 0 ); } /** * Show a dashboard notice that migration is in progress. */ public function display_migration_notice() { printf( '<div class="notice notice-warning"><p>%s</p></div>', esc_html__( 'Action Scheduler migration in progress. The list of scheduled actions may be incomplete.', 'action-scheduler' ) ); } /** * Add store classes. Hook migration. */ private function hook() { add_filter( 'action_scheduler_store_class', array( $this, 'get_store_class' ), 100, 1 ); add_filter( 'action_scheduler_logger_class', array( $this, 'get_logger_class' ), 100, 1 ); add_action( 'init', array( $this, 'maybe_hook_migration' ) ); add_action( 'wp_loaded', array( $this, 'schedule_migration' ) ); // Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen. add_action( 'load-tools_page_action-scheduler', array( $this, 'hook_admin_notices' ), 10, 0 ); add_action( 'load-woocommerce_page_wc-status', array( $this, 'hook_admin_notices' ), 10, 0 ); } /** * Possibly hook the migration scheduler action. */ public function maybe_hook_migration() { if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) { return; } $this->migration_scheduler->hook(); } /** * Allow datastores to enable migration to AS tables. */ public function allow_migration() { if ( ! \ActionScheduler_DataController::dependencies_met() ) { return false; } if ( null === $this->migrate_custom_store ) { $this->migrate_custom_store = apply_filters( 'action_scheduler_migrate_data_store', false ); } return ( ! $this->has_custom_datastore() ) || $this->migrate_custom_store; } /** * Proceed with the migration if the dependencies have been met. */ public static function init() { if ( \ActionScheduler_DataController::dependencies_met() ) { self::instance()->hook(); } } /** * Singleton factory. */ public static function instance() { if ( ! isset( self::$instance ) ) { self::$instance = new static( new Scheduler() ); } return self::$instance; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_RecurringActionScheduler.php 0000644 00000006063 15174671617 0026074 0 ustar 00 <?php /** * Class ActionScheduler_RecurringActionScheduler * * This class ensures that the `action_scheduler_ensure_recurring_actions` hook is triggered on a daily interval. This * simplifies the process for other plugins to register their recurring actions without requiring each plugin to query * or schedule actions independently on every request. */ class ActionScheduler_RecurringActionScheduler { /** * @var string The hook of the scheduled recurring action that is run to trigger the * `action_scheduler_ensure_recurring_actions` hook that plugins should use. We can't directly have the * scheduled action hook be the hook plugins should use because the actions will show as failed if no plugin * was actively hooked into it. */ private const RUN_SCHEDULED_RECURRING_ACTIONS_HOOK = 'action_scheduler_run_recurring_actions_schedule_hook'; /** * Initialize the instance. Should only be run on a single instance per request. * * @return void */ public function init(): void { add_action( self::RUN_SCHEDULED_RECURRING_ACTIONS_HOOK, array( $this, 'run_recurring_scheduler_hook' ) ); if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { add_action( 'action_scheduler_init', array( $this, 'schedule_recurring_scheduler_hook' ) ); } } /** * Schedule the recurring `action_scheduler_ensure_recurring_actions` action if not already scheduled. * * @return void */ public function schedule_recurring_scheduler_hook(): void { if ( false === wp_cache_get( 'as_is_ensure_recurring_actions_scheduled' ) ) { if ( ! as_has_scheduled_action( self::RUN_SCHEDULED_RECURRING_ACTIONS_HOOK ) ) { as_schedule_recurring_action( time(), DAY_IN_SECONDS, self::RUN_SCHEDULED_RECURRING_ACTIONS_HOOK, [], 'ActionScheduler', true, 20 ); } wp_cache_set( 'as_is_ensure_recurring_actions_scheduled', true, HOUR_IN_SECONDS ); } } /** * Trigger the hook to allow other plugins to schedule their recurring actions. * * @return void */ public function run_recurring_scheduler_hook(): void { /** * Fires to allow extensions to verify and ensure their recurring actions are scheduled. * * This action is scheduled to trigger once every 24 hrs for the purpose of having 3rd party plugins verify that * any previously scheduled recurring actions are still scheduled. Because recurring actions could stop getting * rescheduled by default due to excessive failures, database issues, or other interruptions, extensions can use * this hook to check for the existence of their recurring actions and reschedule them if necessary. * * Example usage: * * add_action('action_scheduler_ensure_recurring_actions', function() { * // Check if the recurring action is scheduled, and reschedule if missing. * if ( ! as_has_scheduled_action('my_recurring_action') ) { * as_schedule_recurring_action( time(), HOUR_IN_SECONDS, 'my_recurring_action' ); * } * }); * * @since 3.9.3 */ do_action( 'action_scheduler_ensure_recurring_actions' ); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_Compatibility.php 0000644 00000007500 15174671617 0023745 0 ustar 00 <?php /** * Class ActionScheduler_Compatibility */ class ActionScheduler_Compatibility { /** * Converts a shorthand byte value to an integer byte value. * * Wrapper for wp_convert_hr_to_bytes(), moved to load.php in WordPress 4.6 from media.php * * @link https://secure.php.net/manual/en/function.ini-get.php * @link https://secure.php.net/manual/en/faq.using.php#faq.using.shorthandbytes * * @param string $value A (PHP ini) byte value, either shorthand or ordinary. * @return int An integer byte value. */ public static function convert_hr_to_bytes( $value ) { if ( function_exists( 'wp_convert_hr_to_bytes' ) ) { return wp_convert_hr_to_bytes( $value ); } $value = strtolower( trim( $value ) ); $bytes = (int) $value; if ( false !== strpos( $value, 'g' ) ) { $bytes *= GB_IN_BYTES; } elseif ( false !== strpos( $value, 'm' ) ) { $bytes *= MB_IN_BYTES; } elseif ( false !== strpos( $value, 'k' ) ) { $bytes *= KB_IN_BYTES; } // Deal with large (float) values which run into the maximum integer size. return min( $bytes, PHP_INT_MAX ); } /** * Attempts to raise the PHP memory limit for memory intensive processes. * * Only allows raising the existing limit and prevents lowering it. * * Wrapper for wp_raise_memory_limit(), added in WordPress v4.6.0 * * @return bool|int|string The limit that was set or false on failure. */ public static function raise_memory_limit() { if ( function_exists( 'wp_raise_memory_limit' ) ) { return wp_raise_memory_limit( 'admin' ); } $current_limit = @ini_get( 'memory_limit' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged $current_limit_int = self::convert_hr_to_bytes( $current_limit ); if ( -1 === $current_limit_int ) { return false; } $wp_max_limit = WP_MAX_MEMORY_LIMIT; $wp_max_limit_int = self::convert_hr_to_bytes( $wp_max_limit ); $filtered_limit = apply_filters( 'admin_memory_limit', $wp_max_limit ); $filtered_limit_int = self::convert_hr_to_bytes( $filtered_limit ); // phpcs:disable WordPress.PHP.IniSet.memory_limit_Blacklisted // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged if ( -1 === $filtered_limit_int || ( $filtered_limit_int > $wp_max_limit_int && $filtered_limit_int > $current_limit_int ) ) { if ( false !== @ini_set( 'memory_limit', $filtered_limit ) ) { return $filtered_limit; } else { return false; } } elseif ( -1 === $wp_max_limit_int || $wp_max_limit_int > $current_limit_int ) { if ( false !== @ini_set( 'memory_limit', $wp_max_limit ) ) { return $wp_max_limit; } else { return false; } } // phpcs:enable return false; } /** * Attempts to raise the PHP timeout for time intensive processes. * * Only allows raising the existing limit and prevents lowering it. Wrapper for wc_set_time_limit(), when available. * * @param int $limit The time limit in seconds. */ public static function raise_time_limit( $limit = 0 ) { $limit = (int) $limit; $max_execution_time = (int) ini_get( 'max_execution_time' ); // If the max execution time is already set to zero (unlimited), there is no reason to make a further change. if ( 0 === $max_execution_time ) { return; } // Whichever of $max_execution_time or $limit is higher is the amount by which we raise the time limit. $raise_by = 0 === $limit || $limit > $max_execution_time ? $limit : $max_execution_time; if ( function_exists( 'wc_set_time_limit' ) ) { wc_set_time_limit( $raise_by ); } elseif ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.safe_modeDeprecatedRemoved @set_time_limit( $raise_by ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged } } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php 0000644 00000003626 15174671617 0022704 0 ustar 00 <?php /** * Class ActionScheduler_LogEntry */ class ActionScheduler_LogEntry { /** * Action's ID for log entry. * * @var int $action_id */ protected $action_id = ''; /** * Log entry's message. * * @var string $message */ protected $message = ''; /** * Log entry's date. * * @var Datetime $date */ protected $date; /** * Constructor * * @param mixed $action_id Action ID. * @param string $message Message. * @param Datetime $date Datetime object with the time when this log entry was created. If this parameter is * not provided a new Datetime object (with current time) will be created. */ public function __construct( $action_id, $message, $date = null ) { /* * ActionScheduler_wpCommentLogger::get_entry() previously passed a 3rd param of $comment->comment_type * to ActionScheduler_LogEntry::__construct(), goodness knows why, and the Follow-up Emails plugin * hard-codes loading its own version of ActionScheduler_wpCommentLogger with that out-dated method, * goodness knows why, so we need to guard against that here instead of using a DateTime type declaration * for the constructor's 3rd param of $date and causing a fatal error with older versions of FUE. */ if ( null !== $date && ! is_a( $date, 'DateTime' ) ) { _doing_it_wrong( __METHOD__, 'The third parameter must be a valid DateTime instance, or null.', '2.0.0' ); $date = null; } $this->action_id = $action_id; $this->message = $message; $this->date = $date ? $date : new Datetime(); } /** * Returns the date when this log entry was created * * @return Datetime */ public function get_date() { return $this->date; } /** * Get action ID of log entry. */ public function get_action_id() { return $this->action_id; } /** * Get log entry message. */ public function get_message() { return $this->message; } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_InvalidActionException.php 0000644 00000002717 15174671617 0025544 0 ustar 00 <?php /** * InvalidAction Exception. * * Used for identifying actions that are invalid in some way. * * @package ActionScheduler */ class ActionScheduler_InvalidActionException extends \InvalidArgumentException implements ActionScheduler_Exception { /** * Create a new exception when the action's schedule cannot be fetched. * * @param string $action_id The action ID with bad args. * @param mixed $schedule Passed schedule. * @return static */ public static function from_schedule( $action_id, $schedule ) { $message = sprintf( /* translators: 1: action ID 2: schedule */ __( 'Action [%1$s] has an invalid schedule: %2$s', 'action-scheduler' ), $action_id, var_export( $schedule, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export ); return new static( $message ); } /** * Create a new exception when the action's args cannot be decoded to an array. * * @param string $action_id The action ID with bad args. * @param mixed $args Passed arguments. * @return static */ public static function from_decoding_args( $action_id, $args = array() ) { $message = sprintf( /* translators: 1: action ID 2: arguments */ __( 'Action [%1$s] has invalid arguments. It cannot be JSON decoded to an array. $args = %2$s', 'action-scheduler' ), $action_id, var_export( $args, true ) // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export ); return new static( $message ); } } vendor/woocommerce/action-scheduler/classes/ActionScheduler_SystemInformation.php 0000644 00000004701 15174671617 0024626 0 ustar 00 <?php /** * Provides information about active and registered instances of Action Scheduler. */ class ActionScheduler_SystemInformation { /** * Returns information about the plugin or theme which contains the current active version * of Action Scheduler. * * If this cannot be determined, or if Action Scheduler is being loaded via some other * method, then it will return an empty array. Otherwise, if populated, the array will * look like the following: * * [ * 'type' => 'plugin', # or 'theme' * 'name' => 'Name', * ] * * @return array */ public static function active_source(): array { $plugins = get_plugins(); $plugin_files = array_keys( $plugins ); foreach ( $plugin_files as $plugin_file ) { $plugin_path = trailingslashit( WP_PLUGIN_DIR ) . dirname( $plugin_file ); $plugin_file = trailingslashit( WP_PLUGIN_DIR ) . $plugin_file; if ( 0 !== strpos( dirname( __DIR__ ), $plugin_path ) ) { continue; } $plugin_data = get_plugin_data( $plugin_file ); if ( ! is_array( $plugin_data ) || empty( $plugin_data['Name'] ) ) { continue; } return array( 'type' => 'plugin', 'name' => $plugin_data['Name'], ); } $themes = (array) search_theme_directories(); foreach ( $themes as $slug => $data ) { $needle = trailingslashit( $data['theme_root'] ) . $slug . '/'; if ( 0 !== strpos( __FILE__, $needle ) ) { continue; } $theme = wp_get_theme( $slug ); if ( ! is_object( $theme ) || ! is_a( $theme, \WP_Theme::class ) ) { continue; } return array( 'type' => 'theme', // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase 'name' => $theme->Name, ); } return array(); } /** * Returns the directory path for the currently active installation of Action Scheduler. * * @return string */ public static function active_source_path(): string { return trailingslashit( dirname( __DIR__ ) ); } /** * Get registered sources. * * It is not always possible to obtain this information. For instance, if earlier versions (<=3.9.0) of * Action Scheduler register themselves first, then the necessary data about registered sources will * not be available. * * @return array<string, string> */ public static function get_sources() { $versions = ActionScheduler_Versions::instance(); return method_exists( $versions, 'get_sources' ) ? $versions->get_sources() : array(); } } vendor/woocommerce/action-scheduler/functions.php 0000644 00000046430 15174671617 0016360 0 ustar 00 <?php /** * General API functions for scheduling actions * * @package ActionScheduler. */ /** * Enqueue an action to run one time, as soon as possible * * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action ID. Zero if there was an error scheduling the action. */ function as_enqueue_async_action( $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return 0; } /** * Provides an opportunity to short-circuit the default process for enqueuing async * actions. * * Returning a value other than null from the filter will short-circuit the normal * process. The expectation in such a scenario is that callbacks will return an integer * representing the enqueued action ID (enqueued using some alternative process) or else * zero. * * @param int|null $pre_option The value to return instead of the option value. * @param string $hook Action hook. * @param array $args Action arguments. * @param string $group Action group. * @param int $priority Action priority. * @param bool $unique Unique action. */ $pre = apply_filters( 'pre_as_enqueue_async_action', null, $hook, $args, $group, $priority, $unique ); if ( null !== $pre ) { return is_int( $pre ) ? $pre : 0; } return ActionScheduler::factory()->create( array( 'type' => 'async', 'hook' => $hook, 'arguments' => $args, 'group' => $group, 'unique' => $unique, 'priority' => $priority, ) ); } /** * Schedule an action to run one time * * @param int $timestamp When the job will run. * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action ID. Zero if there was an error scheduling the action. */ function as_schedule_single_action( $timestamp, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return 0; } /** * Provides an opportunity to short-circuit the default process for enqueuing single * actions. * * Returning a value other than null from the filter will short-circuit the normal * process. The expectation in such a scenario is that callbacks will return an integer * representing the scheduled action ID (scheduled using some alternative process) or else * zero. * * @param int|null $pre_option The value to return instead of the option value. * @param int $timestamp When the action will run. * @param string $hook Action hook. * @param array $args Action arguments. * @param string $group Action group. * @param int $priorities Action priority. * @param bool $unique Unique action. */ $pre = apply_filters( 'pre_as_schedule_single_action', null, $timestamp, $hook, $args, $group, $priority, $unique ); if ( null !== $pre ) { return is_int( $pre ) ? $pre : 0; } return ActionScheduler::factory()->create( array( 'type' => 'single', 'hook' => $hook, 'arguments' => $args, 'when' => $timestamp, 'group' => $group, 'unique' => $unique, 'priority' => $priority, ) ); } /** * Schedule a recurring action * * @param int $timestamp When the first instance of the job will run. * @param int $interval_in_seconds How long to wait between runs. * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action ID. Zero if there was an error scheduling the action. */ function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return 0; } $interval = (int) $interval_in_seconds; // We expect an integer and allow it to be passed using float and string types, but otherwise // should reject unexpected values. // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison if ( ! is_numeric( $interval_in_seconds ) || $interval_in_seconds != $interval ) { _doing_it_wrong( __METHOD__, sprintf( /* translators: 1: provided value 2: provided type. */ esc_html__( 'An integer was expected but "%1$s" (%2$s) was received.', 'action-scheduler' ), esc_html( $interval_in_seconds ), esc_html( gettype( $interval_in_seconds ) ) ), '3.6.0' ); return 0; } /** * Provides an opportunity to short-circuit the default process for enqueuing recurring * actions. * * Returning a value other than null from the filter will short-circuit the normal * process. The expectation in such a scenario is that callbacks will return an integer * representing the scheduled action ID (scheduled using some alternative process) or else * zero. * * @param int|null $pre_option The value to return instead of the option value. * @param int $timestamp When the action will run. * @param int $interval_in_seconds How long to wait between runs. * @param string $hook Action hook. * @param array $args Action arguments. * @param string $group Action group. * @param int $priority Action priority. * @param bool $unique Unique action. */ $pre = apply_filters( 'pre_as_schedule_recurring_action', null, $timestamp, $interval_in_seconds, $hook, $args, $group, $priority, $unique ); if ( null !== $pre ) { return is_int( $pre ) ? $pre : 0; } return ActionScheduler::factory()->create( array( 'type' => 'recurring', 'hook' => $hook, 'arguments' => $args, 'when' => $timestamp, 'pattern' => $interval_in_seconds, 'group' => $group, 'unique' => $unique, 'priority' => $priority, ) ); } /** * Schedule an action that recurs on a cron-like schedule. * * @param int $timestamp The first instance of the action will be scheduled * to run at a time calculated after this timestamp matching the cron * expression. This can be used to delay the first instance of the action. * @param string $schedule A cron-link schedule string. * @see http://en.wikipedia.org/wiki/Cron * * * * * * * * ┬ ┬ ┬ ┬ ┬ ┬ * | | | | | | * | | | | | + year [optional] * | | | | +----- day of week (0 - 7) (Sunday=0 or 7) * | | | +---------- month (1 - 12) * | | +--------------- day of month (1 - 31) * | +-------------------- hour (0 - 23) * +------------------------- min (0 - 59) * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * @param bool $unique Whether the action should be unique. It will not be scheduled if another pending or running action has the same hook and group parameters. * @param int $priority Lower values take precedence over higher values. Defaults to 10, with acceptable values falling in the range 0-255. * * @return int The action ID. Zero if there was an error scheduling the action. */ function as_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '', $unique = false, $priority = 10 ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return 0; } /** * Provides an opportunity to short-circuit the default process for enqueuing cron * actions. * * Returning a value other than null from the filter will short-circuit the normal * process. The expectation in such a scenario is that callbacks will return an integer * representing the scheduled action ID (scheduled using some alternative process) or else * zero. * * @param int|null $pre_option The value to return instead of the option value. * @param int $timestamp When the action will run. * @param string $schedule Cron-like schedule string. * @param string $hook Action hook. * @param array $args Action arguments. * @param string $group Action group. * @param int $priority Action priority. * @param bool $unique Unique action. */ $pre = apply_filters( 'pre_as_schedule_cron_action', null, $timestamp, $schedule, $hook, $args, $group, $priority, $unique ); if ( null !== $pre ) { return is_int( $pre ) ? $pre : 0; } return ActionScheduler::factory()->create( array( 'type' => 'cron', 'hook' => $hook, 'arguments' => $args, 'when' => $timestamp, 'pattern' => $schedule, 'group' => $group, 'unique' => $unique, 'priority' => $priority, ) ); } /** * Cancel the next occurrence of a scheduled action. * * While only the next instance of a recurring or cron action is unscheduled by this method, that will also prevent * all future instances of that recurring or cron action from being run. Recurring and cron actions are scheduled in * a sequence instead of all being scheduled at once. Each successive occurrence of a recurring action is scheduled * only after the former action is run. If the next instance is never run, because it's unscheduled by this function, * then the following instance will never be scheduled (or exist), which is effectively the same as being unscheduled * by this method also. * * @param string $hook The hook that the job will trigger. * @param array $args Args that would have been passed to the job. * @param string $group The group the job is assigned to. * * @return int|null The scheduled action ID if a scheduled action was found, or null if no matching action found. */ function as_unschedule_action( $hook, $args = array(), $group = '' ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return 0; } $params = array( 'hook' => $hook, 'status' => ActionScheduler_Store::STATUS_PENDING, 'orderby' => 'date', 'order' => 'ASC', 'group' => $group, ); if ( is_array( $args ) ) { $params['args'] = $args; } $action_id = ActionScheduler::store()->query_action( $params ); if ( $action_id ) { try { ActionScheduler::store()->cancel_action( $action_id ); } catch ( Exception $exception ) { ActionScheduler::logger()->log( $action_id, sprintf( /* translators: %1$s is the name of the hook to be cancelled, %2$s is the exception message. */ __( 'Caught exception while cancelling action "%1$s": %2$s', 'action-scheduler' ), $hook, $exception->getMessage() ) ); $action_id = null; } } return $action_id; } /** * Cancel all occurrences of a scheduled action. * * @param string $hook The hook that the job will trigger. * @param array $args Args that would have been passed to the job. * @param string $group The group the job is assigned to. */ function as_unschedule_all_actions( $hook, $args = array(), $group = '' ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return; } if ( empty( $args ) ) { if ( ! empty( $hook ) && empty( $group ) ) { ActionScheduler_Store::instance()->cancel_actions_by_hook( $hook ); return; } if ( ! empty( $group ) && empty( $hook ) ) { ActionScheduler_Store::instance()->cancel_actions_by_group( $group ); return; } } do { $unscheduled_action = as_unschedule_action( $hook, $args, $group ); } while ( ! empty( $unscheduled_action ) ); } /** * Check if there is an existing action in the queue with a given hook, args and group combination. * * An action in the queue could be pending, in-progress or async. If the is pending for a time in * future, its scheduled date will be returned as a timestamp. If it is currently being run, or an * async action sitting in the queue waiting to be processed, in which case boolean true will be * returned. Or there may be no async, in-progress or pending action for this hook, in which case, * boolean false will be the return value. * * @param string $hook Name of the hook to search for. * @param array $args Arguments of the action to be searched. * @param string $group Group of the action to be searched. * * @return int|bool The timestamp for the next occurrence of a pending scheduled action, true for an async or in-progress action or false if there is no matching action. */ function as_next_scheduled_action( $hook, $args = null, $group = '' ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return false; } $params = array( 'hook' => $hook, 'orderby' => 'date', 'order' => 'ASC', 'group' => $group, ); if ( is_array( $args ) ) { $params['args'] = $args; } $params['status'] = ActionScheduler_Store::STATUS_RUNNING; $action_id = ActionScheduler::store()->query_action( $params ); if ( $action_id ) { return true; } $params['status'] = ActionScheduler_Store::STATUS_PENDING; $action_id = ActionScheduler::store()->query_action( $params ); if ( null === $action_id ) { return false; } $action = ActionScheduler::store()->fetch_action( $action_id ); $scheduled_date = $action->get_schedule()->get_date(); if ( $scheduled_date ) { return (int) $scheduled_date->format( 'U' ); } elseif ( null === $scheduled_date ) { // pending async action with NullSchedule. return true; } return false; } /** * Check if there is a scheduled action in the queue but more efficiently than as_next_scheduled_action(). * * It's recommended to use this function when you need to know whether a specific action is currently scheduled * (pending or in-progress). * * @since 3.3.0 * * @param string $hook The hook of the action. * @param array $args Args that have been passed to the action. Null will matches any args. * @param string $group The group the job is assigned to. * * @return bool True if a matching action is pending or in-progress, false otherwise. */ function as_has_scheduled_action( $hook, $args = null, $group = '' ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return false; } $query_args = array( 'hook' => $hook, 'status' => array( ActionScheduler_Store::STATUS_RUNNING, ActionScheduler_Store::STATUS_PENDING ), 'group' => $group, 'orderby' => 'none', ); if ( null !== $args ) { $query_args['args'] = $args; } $action_id = ActionScheduler::store()->query_action( $query_args ); return null !== $action_id; } /** * Find scheduled actions * * @param array $args Possible arguments, with their default values. * 'hook' => '' - the name of the action that will be triggered. * 'args' => NULL - the args array that will be passed with the action. * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='. * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '='. * 'group' => '' - the group the action belongs to. * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING. * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID. * 'per_page' => 5 - Number of results to return. * 'offset' => 0. * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', 'date' or 'none'. * 'order' => 'ASC'. * * @param string $return_format OBJECT, ARRAY_A, or ids. * * @return array */ function as_get_scheduled_actions( $args = array(), $return_format = OBJECT ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return array(); } $store = ActionScheduler::store(); foreach ( array( 'date', 'modified' ) as $key ) { if ( isset( $args[ $key ] ) ) { $args[ $key ] = as_get_datetime_object( $args[ $key ] ); } } $ids = $store->query_actions( $args ); if ( 'ids' === $return_format || 'int' === $return_format ) { return $ids; } $actions = array(); foreach ( $ids as $action_id ) { $actions[ $action_id ] = $store->fetch_action( $action_id ); } if ( ARRAY_A === $return_format ) { foreach ( $actions as $action_id => $action_object ) { $actions[ $action_id ] = get_object_vars( $action_object ); } } return $actions; } /** * Helper function to create an instance of DateTime based on a given * string and timezone. By default, will return the current date/time * in the UTC timezone. * * Needed because new DateTime() called without an explicit timezone * will create a date/time in PHP's timezone, but we need to have * assurance that a date/time uses the right timezone (which we almost * always want to be UTC), which means we need to always include the * timezone when instantiating datetimes rather than leaving it up to * the PHP default. * * @param mixed $date_string A date/time string. Valid formats are explained in http://php.net/manual/en/datetime.formats.php. * @param string $timezone A timezone identifier, like UTC or Europe/Lisbon. The list of valid identifiers is available http://php.net/manual/en/timezones.php. * * @return ActionScheduler_DateTime */ function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) { if ( is_object( $date_string ) && $date_string instanceof DateTime ) { $date = new ActionScheduler_DateTime( $date_string->format( 'Y-m-d H:i:s' ), new DateTimeZone( $timezone ) ); } elseif ( is_numeric( $date_string ) ) { $date = new ActionScheduler_DateTime( '@' . $date_string, new DateTimeZone( $timezone ) ); } else { $date = new ActionScheduler_DateTime( null === $date_string ? 'now' : $date_string, new DateTimeZone( $timezone ) ); } return $date; } /** * Check if a specific feature is supported by the current version of Action Scheduler. * * @since 3.9.3 * * @param string $feature The feature to check support for. * * @return bool True if the feature is supported, false otherwise. */ function as_supports( string $feature ): bool { $supported_features = array( 'ensure_recurring_actions_hook' ); return in_array( $feature, $supported_features, true ); } vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php 0000644 00000001500 15174671617 0025445 0 ustar 00 <?php /** * Class ActionScheduler_Abstract_Schedule */ abstract class ActionScheduler_Schedule_Deprecated implements ActionScheduler_Schedule { /** * Get the date & time this schedule was created to run, or calculate when it should be run * after a given date & time. * * @param DateTime $after DateTime to calculate against. * * @return DateTime|null */ public function next( ?DateTime $after = null ) { if ( empty( $after ) ) { $return_value = $this->get_date(); $replacement_method = 'get_date()'; } else { $return_value = $this->get_next( $after ); $replacement_method = 'get_next( $after )'; } _deprecated_function( __METHOD__, '3.0.0', __CLASS__ . '::' . $replacement_method ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped return $return_value; } } vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php 0000644 00000001524 15174671617 0030020 0 ustar 00 <?php /** * Abstract class with common Queue Cleaner functionality. */ abstract class ActionScheduler_Abstract_QueueRunner_Deprecated { /** * Get the maximum number of seconds a batch can run for. * * @deprecated 2.1.1 * @return int The number of seconds. */ protected function get_maximum_execution_time() { _deprecated_function( __METHOD__, '2.1.1', 'ActionScheduler_Abstract_QueueRunner::get_time_limit()' ); $maximum_execution_time = 30; // Apply deprecated filter. if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) { _deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' ); $maximum_execution_time = apply_filters( 'action_scheduler_maximum_execution_time', $maximum_execution_time ); } return absint( $maximum_execution_time ); } } vendor/woocommerce/action-scheduler/deprecated/functions.php 0000644 00000012231 15174671617 0020450 0 ustar 00 <?php /** * Deprecated API functions for scheduling actions * * Functions with the wc prefix were deprecated to avoid confusion with * Action Scheduler being included in WooCommerce core, and it providing * a different set of APIs for working with the action queue. * * @package ActionScheduler */ /** * Schedule an action to run one time. * * @param int $timestamp When the job will run. * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * * @return string The job ID */ function wc_schedule_single_action( $timestamp, $hook, $args = array(), $group = '' ) { _deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_single_action()' ); return as_schedule_single_action( $timestamp, $hook, $args, $group ); } /** * Schedule a recurring action. * * @param int $timestamp When the first instance of the job will run. * @param int $interval_in_seconds How long to wait between runs. * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * * @deprecated 2.1.0 * * @return string The job ID */ function wc_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '' ) { _deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_recurring_action()' ); return as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args, $group ); } /** * Schedule an action that recurs on a cron-like schedule. * * @param int $timestamp The schedule will start on or after this time. * @param string $schedule A cron-link schedule string. * @see http://en.wikipedia.org/wiki/Cron * * * * * * * * ┬ ┬ ┬ ┬ ┬ ┬ * | | | | | | * | | | | | + year [optional] * | | | | +----- day of week (0 - 7) (Sunday=0 or 7) * | | | +---------- month (1 - 12) * | | +--------------- day of month (1 - 31) * | +-------------------- hour (0 - 23) * +------------------------- min (0 - 59) * @param string $hook The hook to trigger. * @param array $args Arguments to pass when the hook triggers. * @param string $group The group to assign this job to. * * @deprecated 2.1.0 * * @return string The job ID */ function wc_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) { _deprecated_function( __FUNCTION__, '2.1.0', 'as_schedule_cron_action()' ); return as_schedule_cron_action( $timestamp, $schedule, $hook, $args, $group ); } /** * Cancel the next occurrence of a job. * * @param string $hook The hook that the job will trigger. * @param array $args Args that would have been passed to the job. * @param string $group Action's group. * * @deprecated 2.1.0 */ function wc_unschedule_action( $hook, $args = array(), $group = '' ) { _deprecated_function( __FUNCTION__, '2.1.0', 'as_unschedule_action()' ); as_unschedule_action( $hook, $args, $group ); } /** * Get next scheduled action. * * @param string $hook Action's hook. * @param array $args Action's args. * @param string $group Action's group. * * @deprecated 2.1.0 * * @return int|bool The timestamp for the next occurrence, or false if nothing was found */ function wc_next_scheduled_action( $hook, $args = null, $group = '' ) { _deprecated_function( __FUNCTION__, '2.1.0', 'as_next_scheduled_action()' ); return as_next_scheduled_action( $hook, $args, $group ); } /** * Find scheduled actions * * @param array $args Possible arguments, with their default values: * 'hook' => '' - the name of the action that will be triggered * 'args' => NULL - the args array that will be passed with the action * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' * 'group' => '' - the group the action belongs to * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID * 'per_page' => 5 - Number of results to return * 'offset' => 0 * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date' * 'order' => 'ASC'. * @param string $return_format OBJECT, ARRAY_A, or ids. * * @deprecated 2.1.0 * * @return array */ function wc_get_scheduled_actions( $args = array(), $return_format = OBJECT ) { _deprecated_function( __FUNCTION__, '2.1.0', 'as_get_scheduled_actions()' ); return as_get_scheduled_actions( $args, $return_format ); } vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php 0000644 00000002043 15174671617 0025010 0 ustar 00 <?php /** * Class ActionScheduler_Store_Deprecated * * @codeCoverageIgnore */ abstract class ActionScheduler_Store_Deprecated { /** * Mark an action that failed to fetch correctly as failed. * * @since 2.2.6 * * @param int $action_id The ID of the action. */ public function mark_failed_fetch_action( $action_id ) { _deprecated_function( __METHOD__, '3.0.0', 'ActionScheduler_Store::mark_failure()' ); self::$store->mark_failure( $action_id ); } /** * Add base hooks * * @since 2.2.6 */ protected static function hook() { _deprecated_function( __METHOD__, '3.0.0' ); } /** * Remove base hooks * * @since 2.2.6 */ protected static function unhook() { _deprecated_function( __METHOD__, '3.0.0' ); } /** * Get the site's local time. * * @deprecated 2.1.0 * @return DateTimeZone */ protected function get_local_timezone() { _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' ); return ActionScheduler_TimezoneHelper::get_local_timezone(); } } vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_AdminView_Deprecated.php 0000644 00000012532 15174671617 0025603 0 ustar 00 <?php /** * Class ActionScheduler_AdminView_Deprecated * * Store deprecated public functions previously found in the ActionScheduler_AdminView class. * Keeps them out of the way of the main class. * * @codeCoverageIgnore */ class ActionScheduler_AdminView_Deprecated { /** * Adjust parameters for custom post type. * * @param array $args Args. */ public function action_scheduler_post_type_args( $args ) { _deprecated_function( __METHOD__, '2.0.0' ); return $args; } /** * Customise the post status related views displayed on the Scheduled Actions administration screen. * * @param array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen. * @return array $views An associative array of views and view labels which can be used to filter the 'scheduled-action' posts displayed on the Scheduled Actions administration screen. */ public function list_table_views( $views ) { _deprecated_function( __METHOD__, '2.0.0' ); return $views; } /** * Do not include the "Edit" action for the Scheduled Actions administration screen. * * Hooked to the 'bulk_actions-edit-action-scheduler' filter. * * @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. * @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. */ public function bulk_actions( $actions ) { _deprecated_function( __METHOD__, '2.0.0' ); return $actions; } /** * Completely customer the columns displayed on the Scheduled Actions administration screen. * * Because we can't filter the content of the default title and date columns, we need to recreate our own * custom columns for displaying those post fields. For the column content, @see self::list_table_column_content(). * * @param array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen. * @return array $columns An associative array of columns that are use for the table on the Scheduled Actions administration screen. */ public function list_table_columns( $columns ) { _deprecated_function( __METHOD__, '2.0.0' ); return $columns; } /** * Make our custom title & date columns use defaulting title & date sorting. * * @param array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen. * @return array $columns An associative array of columns that can be used to sort the table on the Scheduled Actions administration screen. */ public static function list_table_sortable_columns( $columns ) { _deprecated_function( __METHOD__, '2.0.0' ); return $columns; } /** * Print the content for our custom columns. * * @param string $column_name The key for the column for which we should output our content. * @param int $post_id The ID of the 'scheduled-action' post for which this row relates. */ public static function list_table_column_content( $column_name, $post_id ) { _deprecated_function( __METHOD__, '2.0.0' ); } /** * Hide the inline "Edit" action for all 'scheduled-action' posts. * * Hooked to the 'post_row_actions' filter. * * @param array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. * @param WP_Post $post The 'scheduled-action' post object. * @return array $actions An associative array of actions which can be performed on the 'scheduled-action' post type. */ public static function row_actions( $actions, $post ) { _deprecated_function( __METHOD__, '2.0.0' ); return $actions; } /** * Run an action when triggered from the Action Scheduler administration screen. * * @codeCoverageIgnore */ public static function maybe_execute_action() { _deprecated_function( __METHOD__, '2.0.0' ); } /** * Convert an interval of seconds into a two part human friendly string. * * The WordPress human_time_diff() function only calculates the time difference to one degree, meaning * even if an action is 1 day and 11 hours away, it will display "1 day". This function goes one step * further to display two degrees of accuracy. * * Based on Crontrol::interval() function by Edward Dale: https://wordpress.org/plugins/wp-crontrol/ * * @return void */ public static function admin_notices() { _deprecated_function( __METHOD__, '2.0.0' ); } /** * Filter search queries to allow searching by Claim ID (i.e. post_password). * * @param string $orderby MySQL orderby string. * @param WP_Query $query Instance of a WP_Query object. * @return void */ public function custom_orderby( $orderby, $query ) { _deprecated_function( __METHOD__, '2.0.0' ); } /** * Filter search queries to allow searching by Claim ID (i.e. post_password). * * @param string $search MySQL search string. * @param WP_Query $query Instance of a WP_Query object. * @return void */ public function search_post_password( $search, $query ) { _deprecated_function( __METHOD__, '2.0.0' ); } /** * Change messages when a scheduled action is updated. * * @param array $messages Messages. * @return array */ public function post_updated_messages( $messages ) { _deprecated_function( __METHOD__, '2.0.0' ); return $messages; } } vendor/woocommerce/action-scheduler/changelog.txt 0000644 00000022512 15174671617 0016322 0 ustar 00 *** Changelog *** = 3.9.3 - 2025-07-15 = * Add hook 'action_scheduler_ensure_recurring_actions' specifically for scheduling recurring actions. * Assume an action is valid until proven otherwise. * Implement SKIP LOCKED during action claiming. * Import `get_flag_value()` from `WP_CLI\Utils` before using. * Make `$unique` available to all pre-creation/short-circuit hooks. * Make version/source information available via new class. * Only release claims on pending actions. * Tweak - WP 6.8 compatibility. * Update minimum supported php and phpunit versions. * Update readme.txt. * WP CLI get action command: correct parentheses/nesting of conditional checks. = 3.9.2 - 2025-02-03 = * Fixed fatal errors by moving version info methods to a new class and deprecating conflicting ones in ActionScheduler_Versions = 3.9.1 - 2025-01-21 = * A number of new WP CLI commands have been added, making it easier to manage actions in the terminal and from scripts. * New wp action-scheduler source command to help determine how Action Scheduler is being loaded. * Additional information about the active instance of Action Scheduler is now available in the Help pull-down drawer. * Make some other nullable parameters explicitly nullable. * Set option value to `no` rather than deleting. = 3.9.0 - 2024-11-14 = * Minimum required version of PHP is now 7.1. * Performance improvements for the `as_pending_actions_due()` function. * Existing filter hook `action_scheduler_claim_actions_order_by` enhanced to provide callbacks with additional information. * Improved compatibility with PHP 8.4, specifically by making implicitly nullable parameters explicitly nullable. * A large number of coding standards-enhancements, to help reduce friction when submitting plugins to marketplaces and plugin directories. Special props @crstauf for this effort. * Minor documentation tweaks and improvements. = 3.8.2 - 2024-09-12 = * Add missing parameter to the `pre_as_enqueue_async_action` hook. * Bump minimum PHP version to 7.0. * Bump minimum WordPress version to 6.4. * Make the batch size adjustable during processing. = 3.8.1 - 2024-06-20 = * Fix typos. * Improve the messaging in our unidentified action exceptions. = 3.8.0 - 2024-05-22 = * Documentation - Fixed typos in perf.md. * Update - We now require WordPress 6.3 or higher. * Update - We now require PHP 7.0 or higher. = 3.7.4 - 2024-04-05 = * Give a clear description of how the $unique parameter works. * Preserve the tab field if set. * Tweak - WP 6.5 compatibility. = 3.7.3 - 2024-03-20 = * Do not iterate over all of GET when building form in list table. * Fix a few issues reported by PCP (Plugin Check Plugin). * Try to save actions as unique even when the store doesn't support it. * Tweak - WP 6.4 compatibility. * Update "Tested up to" tag to WordPress 6.5. * update version in package-lock.json. = 3.7.2 - 2024-02-14 = * No longer user variables in `_n()` translation function. = 3.7.1 - 2023-12-13 = * update semver to 5.7.2 because of a security vulnerability in 5.7.1. = 3.7.0 - 2023-11-20 = * Important: starting with this release, Action Scheduler follows an L-2 version policy (WordPress, and consequently PHP). * Add extended indexes for hook_status_scheduled_date_gmt and status_scheduled_date_gmt. * Catch and log exceptions thrown when actions can't be created, e.g. under a corrupt database schema. * Tweak - WP 6.4 compatibility. * Update unit tests for upcoming dependency version policy. * make sure hook action_scheduler_failed_execution can access original exception object. * mention dependency version policy in usage.md. = 3.6.4 - 2023-10-11 = * Performance improvements when bulk cancelling actions. * Dev-related fixes. = 3.6.3 - 2023-09-13 = * Use `_doing_it_wrong` in initialization check. = 3.6.2 - 2023-08-09 = * Add guidance about passing arguments. * Atomic option locking. * Improve bulk delete handling. * Include database error in the exception message. * Tweak - WP 6.3 compatibility. = 3.6.1 - 2023-06-14 = * Document new optional `$priority` arg for various API functions. * Document the new `--exclude-groups` WP CLI option. * Document the new `action_scheduler_init` hook. * Ensure actions within each claim are executed in the expected order. * Fix incorrect text domain. * Remove SHOW TABLES usage when checking if tables exist. = 3.6.0 - 2023-05-10 = * Add $unique parameter to function signatures. * Add a cast-to-int for extra safety before forming new DateTime object. * Add a hook allowing exceptions for consistently failing recurring actions. * Add action priorities. * Add init hook. * Always raise the time limit. * Bump minimatch from 3.0.4 to 3.0.8. * Bump yaml from 2.2.1 to 2.2.2. * Defensive coding relating to gaps in declared schedule types. * Do not process an action if it cannot be set to `in-progress`. * Filter view labels (status names) should be translatable | #919. * Fix WPCLI progress messages. * Improve data-store initialization flow. * Improve error handling across all supported PHP versions. * Improve logic for flushing the runtime cache. * Support exclusion of multiple groups. * Update lint-staged and Node/NPM requirements. * add CLI clean command. * add CLI exclude-group filter. * exclude past-due from list table all filter count. * throwing an exception if as_schedule_recurring_action interval param is not of type integer. = 3.5.4 - 2023-01-17 = * Add pre filters during action registration. * Async scheduling. * Calculate timeouts based on total actions. * Correctly order the parameters for `ActionScheduler_ActionFactory`'s calls to `single_unique`. * Fetch action in memory first before releasing claim to avoid deadlock. * PHP 8.2: declare property to fix creation of dynamic property warning. * PHP 8.2: fix "Using ${var} in strings is deprecated, use {$var} instead". * Prevent `undefined variable` warning for `$num_pastdue_actions`. = 3.5.3 - 2022-11-09 = * Query actions with partial match. = 3.5.2 - 2022-09-16 = * Fix - erroneous 3.5.1 release. = 3.5.1 - 2022-09-13 = * Maintenance on A/S docs. * fix: PHP 8.2 deprecated notice. = 3.5.0 - 2022-08-25 = * Add - The active view link within the "Tools > Scheduled Actions" screen is now clickable. * Add - A warning when there are past-due actions. * Enhancement - Added the ability to schedule unique actions via an atomic operation. * Enhancement - Improvements to cache invalidation when processing batches (when running on WordPress 6.0+). * Enhancement - If a recurring action is found to be consistently failing, it will stop being rescheduled. * Enhancement - Adds a new "Past Due" view to the scheduled actions list table. = 3.4.2 - 2022-06-08 = * Fix - Change the include for better linting. * Fix - update: Added Action scheduler completed action hook. = 3.4.1 - 2022-05-24 = * Fix - Change the include for better linting. * Fix - Fix the documented return type. = 3.4.0 - 2021-10-29 = * Enhancement - Number of items per page can now be set for the Scheduled Actions view (props @ovidiul). #771 * Fix - Do not lower the max_execution_time if it is already set to 0 (unlimited) (props @barryhughes). #755 * Fix - Avoid triggering autoloaders during the version resolution process (props @olegabr). #731 & #776 * Dev - ActionScheduler_wcSystemStatus PHPCS fixes (props @ovidiul). #761 * Dev - ActionScheduler_DBLogger.php PHPCS fixes (props @ovidiul). #768 * Dev - Fixed phpcs for ActionScheduler_Schedule_Deprecated (props @ovidiul). #762 * Dev - Improve actions table indices (props @glagonikas). #774 & #777 * Dev - PHPCS fixes for ActionScheduler_DBStore.php (props @ovidiul). #769 & #778 * Dev - PHPCS Fixes for ActionScheduler_Abstract_ListTable (props @ovidiul). #763 & #779 * Dev - Adds new filter action_scheduler_claim_actions_order_by to allow tuning of the claim query (props @glagonikas). #773 * Dev - PHPCS fixes for ActionScheduler_WpPostStore class (props @ovidiul). #780 = 3.3.0 - 2021-09-15 = * Enhancement - Adds as_has_scheduled_action() to provide a performant way to test for existing actions. #645 * Fix - Improves compatibility with environments where NO_ZERO_DATE is enabled. #519 * Fix - Adds safety checks to guard against errors when our database tables cannot be created. #645 * Dev - Now supports queries that use multiple statuses. #649 * Dev - Minimum requirements for WordPress and PHP bumped (to 5.2 and 5.6 respectively). #723 = 3.2.1 - 2021-06-21 = * Fix - Add extra safety/account for different versions of AS and different loading patterns. #714 * Fix - Handle hidden columns (Tools → Scheduled Actions) | #600. = 3.2.0 - 2021-06-03 = * Fix - Add "no ordering" option to as_next_scheduled_action(). * Fix - Add secondary scheduled date checks when claiming actions (DBStore) | #634. * Fix - Add secondary scheduled date checks when claiming actions (wpPostStore) | #634. * Fix - Adds a new index to the action table, reducing the potential for deadlocks (props: @glagonikas). * Fix - Fix unit tests infrastructure and adapt tests to PHP 8. * Fix - Identify in-use data store. * Fix - Improve test_migration_is_scheduled. * Fix - PHP notice on list table. * Fix - Speed up clean up and batch selects. * Fix - Update pending dependencies. * Fix - [PHP 8.0] Only pass action arg values through to do_action_ref_array(). * Fix - [PHP 8] Set the PHP version to 7.1 in composer.json for PHP 8 compatibility. * Fix - add is_initialized() to docs. * Fix - fix file permissions. * Fix - fixes #664 by replacing __ with esc_html__. = 3.1.6 - 2020-05-12 = * Change log starts. vendor/woocommerce/action-scheduler/readme.txt 0000644 00000030032 15174671617 0015624 0 ustar 00 === Action Scheduler === Contributors: Automattic, wpmuguru, claudiosanches, peterfabian1000, vedjain, jamosova, obliviousharmony, konamiman, sadowski, royho, barryhughes-1 Tags: scheduler, cron Stable tag: 3.9.3 License: GPLv3 Requires at least: 6.5 Tested up to: 6.8 Requires PHP: 7.2 Action Scheduler - Job Queue for WordPress == Description == Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It's specially designed to be distributed in WordPress plugins. Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occasions. Think of it like an extension to `do_action()` which adds the ability to delay and repeat a hook. ## Battle-Tested Background Processing Every month, Action Scheduler processes millions of payments for [Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/), webhooks for [WooCommerce](https://wordpress.org/plugins/woocommerce/), as well as emails and other events for a range of other plugins. It's been seen on live sites processing queues in excess of 50,000 jobs and doing resource intensive operations, like processing payments and creating orders, at a sustained rate of over 10,000 / hour without negatively impacting normal site operations. This is all on infrastructure and WordPress sites outside the control of the plugin author. If your plugin needs background processing, especially of large sets of tasks, Action Scheduler can help. ## Learn More To learn more about how Action Scheduler works, and how to use it in your plugin, check out the docs on [ActionScheduler.org](https://actionscheduler.org). There you will find: * [Usage guide](https://actionscheduler.org/usage/): instructions on installing and using Action Scheduler * [WP CLI guide](https://actionscheduler.org/wp-cli/): instructions on running Action Scheduler at scale via WP CLI * [API Reference](https://actionscheduler.org/api/): complete reference guide for all API functions * [Administration Guide](https://actionscheduler.org/admin/): guide to managing scheduled actions via the administration screen * [Guide to Background Processing at Scale](https://actionscheduler.org/perf/): instructions for running Action Scheduler at scale via the default WP Cron queue runner ## Credits Action Scheduler is developed and maintained by [Automattic](http://automattic.com/) with significant early development completed by [Flightless](https://flightless.us/). Collaboration is cool. We'd love to work with you to improve Action Scheduler. [Pull Requests](https://github.com/woocommerce/action-scheduler/pulls) welcome. == Changelog == = 3.9.3 - 2025-07-15 = * Add hook 'action_scheduler_ensure_recurring_actions' specifically for scheduling recurring actions. * Assume an action is valid until proven otherwise. * Implement SKIP LOCKED during action claiming. * Import `get_flag_value()` from `WP_CLI\Utils` before using. * Make `$unique` available to all pre-creation/short-circuit hooks. * Make version/source information available via new class. * Only release claims on pending actions. * Tweak - WP 6.8 compatibility. * Update minimum supported php and phpunit versions. * Update readme.txt. * WP CLI get action command: correct parentheses/nesting of conditional checks. = 3.9.2 - 2025-02-03 = * Fixed fatal errors by moving version info methods to a new class and deprecating conflicting ones in ActionScheduler_Versions = 3.9.1 - 2025-01-21 = * A number of new WP CLI commands have been added, making it easier to manage actions in the terminal and from scripts. * New wp action-scheduler source command to help determine how Action Scheduler is being loaded. * Additional information about the active instance of Action Scheduler is now available in the Help pull-down drawer. * Make some other nullable parameters explicitly nullable. * Set option value to `no` rather than deleting. = 3.9.0 - 2024-11-14 = * Minimum required version of PHP is now 7.1. * Performance improvements for the `as_pending_actions_due()` function. * Existing filter hook `action_scheduler_claim_actions_order_by` enhanced to provide callbacks with additional information. * Improved compatibility with PHP 8.4, specifically by making implicitly nullable parameters explicitly nullable. * A large number of coding standards-enhancements, to help reduce friction when submitting plugins to marketplaces and plugin directories. Special props @crstauf for this effort. * Minor documentation tweaks and improvements. = 3.8.2 - 2024-09-12 = * Add missing parameter to the `pre_as_enqueue_async_action` hook. * Bump minimum PHP version to 7.0. * Bump minimum WordPress version to 6.4. * Make the batch size adjustable during processing. = 3.8.1 - 2024-06-20 = * Fix typos. * Improve the messaging in our unidentified action exceptions. = 3.8.0 - 2024-05-22 = * Documentation - Fixed typos in perf.md. * Update - We now require WordPress 6.3 or higher. * Update - We now require PHP 7.0 or higher. = 3.7.4 - 2024-04-05 = * Give a clear description of how the $unique parameter works. * Preserve the tab field if set. * Tweak - WP 6.5 compatibility. = 3.7.3 - 2024-03-20 = * Do not iterate over all of GET when building form in list table. * Fix a few issues reported by PCP (Plugin Check Plugin). * Try to save actions as unique even when the store doesn't support it. * Tweak - WP 6.4 compatibility. * Update "Tested up to" tag to WordPress 6.5. * update version in package-lock.json. = 3.7.2 - 2024-02-14 = * No longer user variables in `_n()` translation function. = 3.7.1 - 2023-12-13 = * update semver to 5.7.2 because of a security vulnerability in 5.7.1. = 3.7.0 - 2023-11-20 = * Important: starting with this release, Action Scheduler follows an L-2 version policy (WordPress, and consequently PHP). * Add extended indexes for hook_status_scheduled_date_gmt and status_scheduled_date_gmt. * Catch and log exceptions thrown when actions can't be created, e.g. under a corrupt database schema. * Tweak - WP 6.4 compatibility. * Update unit tests for upcoming dependency version policy. * make sure hook action_scheduler_failed_execution can access original exception object. * mention dependency version policy in usage.md. = 3.6.4 - 2023-10-11 = * Performance improvements when bulk cancelling actions. * Dev-related fixes. = 3.6.3 - 2023-09-13 = * Use `_doing_it_wrong` in initialization check. = 3.6.2 - 2023-08-09 = * Add guidance about passing arguments. * Atomic option locking. * Improve bulk delete handling. * Include database error in the exception message. * Tweak - WP 6.3 compatibility. = 3.6.1 - 2023-06-14 = * Document new optional `$priority` arg for various API functions. * Document the new `--exclude-groups` WP CLI option. * Document the new `action_scheduler_init` hook. * Ensure actions within each claim are executed in the expected order. * Fix incorrect text domain. * Remove SHOW TABLES usage when checking if tables exist. = 3.6.0 - 2023-05-10 = * Add $unique parameter to function signatures. * Add a cast-to-int for extra safety before forming new DateTime object. * Add a hook allowing exceptions for consistently failing recurring actions. * Add action priorities. * Add init hook. * Always raise the time limit. * Bump minimatch from 3.0.4 to 3.0.8. * Bump yaml from 2.2.1 to 2.2.2. * Defensive coding relating to gaps in declared schedule types. * Do not process an action if it cannot be set to `in-progress`. * Filter view labels (status names) should be translatable | #919. * Fix WPCLI progress messages. * Improve data-store initialization flow. * Improve error handling across all supported PHP versions. * Improve logic for flushing the runtime cache. * Support exclusion of multiple groups. * Update lint-staged and Node/NPM requirements. * add CLI clean command. * add CLI exclude-group filter. * exclude past-due from list table all filter count. * throwing an exception if as_schedule_recurring_action interval param is not of type integer. = 3.5.4 - 2023-01-17 = * Add pre filters during action registration. * Async scheduling. * Calculate timeouts based on total actions. * Correctly order the parameters for `ActionScheduler_ActionFactory`'s calls to `single_unique`. * Fetch action in memory first before releasing claim to avoid deadlock. * PHP 8.2: declare property to fix creation of dynamic property warning. * PHP 8.2: fix "Using ${var} in strings is deprecated, use {$var} instead". * Prevent `undefined variable` warning for `$num_pastdue_actions`. = 3.5.3 - 2022-11-09 = * Query actions with partial match. = 3.5.2 - 2022-09-16 = * Fix - erroneous 3.5.1 release. = 3.5.1 - 2022-09-13 = * Maintenance on A/S docs. * fix: PHP 8.2 deprecated notice. = 3.5.0 - 2022-08-25 = * Add - The active view link within the "Tools > Scheduled Actions" screen is now clickable. * Add - A warning when there are past-due actions. * Enhancement - Added the ability to schedule unique actions via an atomic operation. * Enhancement - Improvements to cache invalidation when processing batches (when running on WordPress 6.0+). * Enhancement - If a recurring action is found to be consistently failing, it will stop being rescheduled. * Enhancement - Adds a new "Past Due" view to the scheduled actions list table. = 3.4.2 - 2022-06-08 = * Fix - Change the include for better linting. * Fix - update: Added Action scheduler completed action hook. = 3.4.1 - 2022-05-24 = * Fix - Change the include for better linting. * Fix - Fix the documented return type. = 3.4.0 - 2021-10-29 = * Enhancement - Number of items per page can now be set for the Scheduled Actions view (props @ovidiul). #771 * Fix - Do not lower the max_execution_time if it is already set to 0 (unlimited) (props @barryhughes). #755 * Fix - Avoid triggering autoloaders during the version resolution process (props @olegabr). #731 & #776 * Dev - ActionScheduler_wcSystemStatus PHPCS fixes (props @ovidiul). #761 * Dev - ActionScheduler_DBLogger.php PHPCS fixes (props @ovidiul). #768 * Dev - Fixed phpcs for ActionScheduler_Schedule_Deprecated (props @ovidiul). #762 * Dev - Improve actions table indices (props @glagonikas). #774 & #777 * Dev - PHPCS fixes for ActionScheduler_DBStore.php (props @ovidiul). #769 & #778 * Dev - PHPCS Fixes for ActionScheduler_Abstract_ListTable (props @ovidiul). #763 & #779 * Dev - Adds new filter action_scheduler_claim_actions_order_by to allow tuning of the claim query (props @glagonikas). #773 * Dev - PHPCS fixes for ActionScheduler_WpPostStore class (props @ovidiul). #780 = 3.3.0 - 2021-09-15 = * Enhancement - Adds as_has_scheduled_action() to provide a performant way to test for existing actions. #645 * Fix - Improves compatibility with environments where NO_ZERO_DATE is enabled. #519 * Fix - Adds safety checks to guard against errors when our database tables cannot be created. #645 * Dev - Now supports queries that use multiple statuses. #649 * Dev - Minimum requirements for WordPress and PHP bumped (to 5.2 and 5.6 respectively). #723 = 3.2.1 - 2021-06-21 = * Fix - Add extra safety/account for different versions of AS and different loading patterns. #714 * Fix - Handle hidden columns (Tools → Scheduled Actions) | #600. = 3.2.0 - 2021-06-03 = * Fix - Add "no ordering" option to as_next_scheduled_action(). * Fix - Add secondary scheduled date checks when claiming actions (DBStore) | #634. * Fix - Add secondary scheduled date checks when claiming actions (wpPostStore) | #634. * Fix - Adds a new index to the action table, reducing the potential for deadlocks (props: @glagonikas). * Fix - Fix unit tests infrastructure and adapt tests to PHP 8. * Fix - Identify in-use data store. * Fix - Improve test_migration_is_scheduled. * Fix - PHP notice on list table. * Fix - Speed up clean up and batch selects. * Fix - Update pending dependencies. * Fix - [PHP 8.0] Only pass action arg values through to do_action_ref_array(). * Fix - [PHP 8] Set the PHP version to 7.1 in composer.json for PHP 8 compatibility. * Fix - add is_initialized() to docs. * Fix - fix file permissions. * Fix - fixes #664 by replacing __ with esc_html__. wp-mail-smtp.php 0000644 00000002701 15174671617 0007623 0 ustar 00 <?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Autoloader. We need it being separate and not using Composer autoloader because of the Gmail libs, * which are huge and not needed for most users. * Inspired by PSR-4 examples: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md * * @since 1.0.0 * * @param string $class The fully-qualified class name. */ spl_autoload_register( function ( $class ) { list( $plugin_space ) = explode( '\\', $class ); if ( $plugin_space !== 'WPMailSMTP' ) { return; } /* * This folder can be both "wp-mail-smtp" and "wp-mail-smtp-pro". */ $plugin_dir = basename( __DIR__ ); // Default directory for all code is plugin's /src/. $base_dir = plugin_dir_path( __DIR__ ) . '/' . $plugin_dir . '/src/'; // Get the relative class name. $relative_class = substr( $class, strlen( $plugin_space ) + 1 ); // Prepare a path to a file. $file = wp_normalize_path( $base_dir . $relative_class . '.php' ); // If the file exists, require it. if ( is_readable( $file ) ) { /** @noinspection PhpIncludeInspection */ require_once $file; } } ); /** * Global function-holder. Works similar to a singleton's instance(). * * @since 1.0.0 * * @return WPMailSMTP\Core */ function wp_mail_smtp() { /** * @var \WPMailSMTP\Core */ static $core; if ( ! isset( $core ) ) { $core = new \WPMailSMTP\Core(); } return $core; } wp_mail_smtp(); wp_mail_smtp.php 0000644 00000024637 15174671617 0010003 0 ustar 00 <?php /** * Plugin Name: WP Mail SMTP * Version: 4.7.1 * Requires at least: 5.5 * Requires PHP: 7.4 * Plugin URI: https://wpmailsmtp.com/ * Description: Send WordPress emails reliably via SMTP or API using SendLayer, Brevo, SMTP.com, Gmail, Outlook, or another email service of your choice. * Author: WP Mail SMTP * Author URI: https://wpmailsmtp.com/ * Network: false * Text Domain: wp-mail-smtp * Domain Path: /assets/languages */ /** * @author WPForms * @copyright WPForms, 2007-23, All Rights Reserved * This code is released under the GPL licence version 3 or later, available here * https://www.gnu.org/licenses/gpl.txt */ /** * Setting options in wp-config.php * * Specifically aimed at WP Multisite users, you can set the options for this plugin as * constants in wp-config.php. Copy the code below into wp-config.php and tweak settings. * Values from constants are NOT stripslash()'ed. * * When enabled, make sure to comment out (at the beginning of the line using //) those constants that you do not need, * or remove them completely, so they won't interfere with plugin settings. */ /* define( 'WPMS_ON', true ); // True turns on the whole constants support and usage, false turns it off. define( 'WPMS_DO_NOT_SEND', true ); // Or false, in that case constant is ignored. define( 'WPMS_MAIL_FROM', 'mail@example.com' ); define( 'WPMS_MAIL_FROM_FORCE', true ); // True turns it on, false turns it off. define( 'WPMS_MAIL_FROM_NAME', 'From Name' ); define( 'WPMS_MAIL_FROM_NAME_FORCE', true ); // True turns it on, false turns it off. define( 'WPMS_MAILER', 'sendinblue' ); // Possible values: 'mail', 'smtpcom', 'sendinblue', 'mailgun', 'sendgrid', 'gmail', 'smtp'. define( 'WPMS_SET_RETURN_PATH', true ); // Sets $phpmailer->Sender if true, relevant only for Other SMTP mailer. // Recommended mailers. define( 'WPMS_SMTPCOM_API_KEY', '' ); define( 'WPMS_SMTPCOM_CHANNEL', '' ); define( 'WPMS_SENDINBLUE_API_KEY', '' ); define( 'WPMS_SENDINBLUE_DOMAIN', '' ); define( 'WPMS_ZOHO_DOMAIN', '' ); define( 'WPMS_ZOHO_CLIENT_ID', '' ); define( 'WPMS_ZOHO_CLIENT_SECRET', '' ); define( 'WPMS_PEPIPOST_API_KEY', '' ); define( 'WPMS_SENDINBLUE_API_KEY', '' ); define( 'WPMS_MAILGUN_API_KEY', '' ); define( 'WPMS_MAILGUN_DOMAIN', '' ); define( 'WPMS_MAILGUN_REGION', 'US' ); // or 'EU' for Europe. define( 'WPMS_SENDGRID_API_KEY', '' ); define( 'WPMS_GMAIL_CLIENT_ID', '' ); define( 'WPMS_GMAIL_CLIENT_SECRET', '' ); define( 'WPMS_SMTP_HOST', 'localhost' ); // The SMTP mail host. define( 'WPMS_SMTP_PORT', 25 ); // The SMTP server port number. define( 'WPMS_SSL', '' ); // Possible values '', 'ssl', 'tls' - note TLS is not STARTTLS. define( 'WPMS_SMTP_AUTH', true ); // True turns it on, false turns it off. define( 'WPMS_SMTP_USER', 'username' ); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true. define( 'WPMS_SMTP_PASS', 'password' ); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true. define( 'WPMS_SMTP_AUTOTLS', true ); // True turns it on, false turns it off. */ /** * Don't allow multiple versions of 1.5.x (Lite and Pro) and above to be active. * * @since 1.5.0 */ if ( function_exists( 'wp_mail_smtp' ) ) { if ( ! function_exists( 'wp_mail_smtp_deactivate' ) ) { /** * Deactivate if plugin already activated. * Needed when transitioning from 1.5+ Lite to Pro. * * @since 1.5.0 */ function wp_mail_smtp_deactivate() { /* * Prevent issues of WP functions not being available for other plugins that hook into * this early deactivation. GH issue #861. */ require_once ABSPATH . WPINC . '/pluggable.php'; deactivate_plugins( plugin_basename( __FILE__ ) ); } } add_action( 'admin_init', 'wp_mail_smtp_deactivate' ); // Do not process the plugin code further. return; } if ( ! function_exists( 'wp_mail_smtp_check_pro_loading_allowed' ) ) { /** * Don't allow 1.4.x and below to break when 1.5+ Pro is activated. * This will stop the current plugin from loading and display a message in admin area. * * @since 1.5.0 */ function wp_mail_smtp_check_pro_loading_allowed() { // Check for pro without using wp_mail_smtp()->is_pro(), because at this point it's too early. if ( ! is_readable( rtrim( plugin_dir_path( __FILE__ ), '/\\' ) . '/src/Pro/Pro.php' ) ) { // Currently, not a pro version of the plugin is loaded. return false; } if ( ! function_exists( 'is_plugin_active' ) ) { require_once ABSPATH . '/wp-admin/includes/plugin.php'; } $lite_plugin_slug = 'wp-mail-smtp/wp_mail_smtp.php'; // Search for old plugin name. if ( is_plugin_active( $lite_plugin_slug ) ) { /* * Prevent issues of WP functions not being available for other plugins that hook into * this early deactivation. GH issue #861. */ require_once ABSPATH . WPINC . '/pluggable.php'; if ( is_multisite() && is_plugin_active_for_network( plugin_basename( __FILE__ ) ) && ! is_plugin_active_for_network( $lite_plugin_slug ) ) { // Deactivate Lite plugin if Pro activated on Network level. deactivate_plugins( $lite_plugin_slug ); } else { // As Pro is loaded and Lite too - deactivate *silently* itself not to break older SMTP plugin. deactivate_plugins( plugin_basename( __FILE__ ) ); if ( is_network_admin() ) { add_action( 'network_admin_notices', 'wp_mail_smtp_lite_deactivation_notice' ); } else { add_action( 'admin_notices', 'wp_mail_smtp_lite_deactivation_notice' ); } return true; } } return false; } if ( ! function_exists( 'wp_mail_smtp_lite_deactivation_notice' ) ) { /** * Display the notice after deactivation. * * @since 1.5.0 */ function wp_mail_smtp_lite_deactivation_notice() { echo '<div class="notice notice-warning"><p>' . esc_html__( 'Please deactivate the free version of the WP Mail SMTP plugin before activating WP Mail SMTP Pro.', 'wp-mail-smtp' ) . '</p></div>'; if ( isset( $_GET['activate'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended unset( $_GET['activate'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended } } } // Stop the plugin loading. if ( wp_mail_smtp_check_pro_loading_allowed() === true ) { return; } } if ( ! function_exists( 'wp_mail_smtp_insecure_php_version_notice' ) ) { /** * Display admin notice, if the server is using old/insecure PHP version. * * @since 2.0.0 */ function wp_mail_smtp_insecure_php_version_notice() { ?> <div class="notice notice-error"> <p> <?php printf( wp_kses( /* translators: %1$s - WPBeginner URL for recommended WordPress hosting. */ __( 'Your site is running an <strong>insecure version</strong> of PHP that is no longer supported. Please contact your web hosting provider to update your PHP version or switch to a <a href="%1$s" target="_blank" rel="noopener noreferrer">recommended WordPress hosting company</a>.', 'wp-mail-smtp' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array(), ), 'strong' => array(), ) ), 'https://www.wpbeginner.com/wordpress-hosting/' ); ?> <br><br> <?php $doc_link = add_query_arg( [ 'utm_source' => 'WordPress', 'utm_medium' => 'Admin Notice', 'utm_campaign' => is_readable( rtrim( plugin_dir_path( __FILE__ ), '/\\' ) . '/src/Pro/Pro.php' ) ? 'plugin' : 'liteplugin', 'utm_content' => 'Minimal Required PHP Version', ], 'https://wpmailsmtp.com/docs/supported-php-versions-for-wp-mail-smtp/' ); printf( wp_kses( /* translators: %s - WPMailSMTP.com docs URL with more details. */ __( '<strong>WP Mail SMTP plugin is disabled</strong> on your site until you fix the issue. <a href="%s" target="_blank" rel="noopener noreferrer">Read more for additional information.</a>', 'wp-mail-smtp' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array(), ), 'strong' => array(), ) ), esc_url( $doc_link ) ); ?> </p> </div> <?php // In case this is on plugin activation. if ( isset( $_GET['activate'] ) ) { //phpcs:ignore unset( $_GET['activate'] ); //phpcs:ignore } } } if ( ! defined( 'WPMS_PLUGIN_VER' ) ) { /** * Plugin version. * * @since 0.11.1 */ define( 'WPMS_PLUGIN_VER', '4.7.1' ); } if ( ! defined( 'WPMS_PHP_VER' ) ) { /** * Minimum supported PHP version. * * @since 1.0.0 */ define( 'WPMS_PHP_VER', '7.4' ); } if ( ! defined( 'WPMS_WP_VER' ) ) { /** * Minimum supported WordPress version. * * @since 3.3.0 */ define( 'WPMS_WP_VER', '5.5' ); } if ( ! defined( 'WPMS_PLUGIN_FILE' ) ) { /** * Plugin main file path. * * @since 2.1.2 */ define( 'WPMS_PLUGIN_FILE', __FILE__ ); } if ( ! function_exists( 'wp_mail_smtp_unsupported_wp_version_notice' ) ) { /** * Display admin notice, if the site is using unsupported WP version. * * @since 3.3.0 */ function wp_mail_smtp_unsupported_wp_version_notice() { ?> <div class="notice notice-error"> <p> <?php printf( wp_kses( /* translators: %s The minimal WP version supported by WP Mail SMTP. */ __( 'Your site is running an <strong>old version</strong> of WordPress that is no longer supported by WP Mail SMTP. Please update your WordPress site to at least version <strong>%s</strong>.', 'wp-mail-smtp' ), [ 'strong' => [], ] ), esc_html( WPMS_WP_VER ) ); ?> <br><br> <?php echo wp_kses( __( '<strong>WP Mail SMTP plugin is disabled</strong> on your site until WordPress is updated to the required version.', 'wp-mail-smtp' ), [ 'strong' => [], ] ); ?> </p> </div> <?php // In case this is on plugin activation. if ( isset( $_GET['activate'] ) ) { //phpcs:ignore unset( $_GET['activate'] ); //phpcs:ignore } } } /** * Display admin notice and prevent plugin code execution, if the server is * using old/insecure PHP version. * * @since 2.0.0 */ if ( version_compare( phpversion(), WPMS_PHP_VER, '<' ) ) { add_action( 'admin_notices', 'wp_mail_smtp_insecure_php_version_notice' ); return; } /** * Display admin notice and prevent plugin code execution, if the WP version is lower than WPMS_WP_VER. * * @since 3.3.0 */ if ( version_compare( get_bloginfo( 'version' ), WPMS_WP_VER, '<' ) ) { add_action( 'admin_notices', 'wp_mail_smtp_unsupported_wp_version_notice' ); return; } require_once dirname( __FILE__ ) . '/wp-mail-smtp.php'; assets/images/about/plugin-trustpulse.png 0000644 00000002401 15174671617 0014675 0 ustar 00 �PNG IHDR d d G<ef BPLTEGpL�� �� ������ �� �� �� �� �� �� �� ��W�W�W� ��W�W�X�W�RV�� tRNS %�� ���a��7wa��O7��Lؖ XIDATx��a�����������0�PQޏ<?�L���Fr�B�N�wѽ1�:�&Λ�0з���'3՛�ب�#%��eDoMB�,�nd�8��g[�_۟��'���,Ӻ��]?�)�)���dgs�ú�ボ���1Tݥ8��մo��r�N������:�rN�-�*��9�k7�,����z�$��&���b'���a{�;"!�Ԗ��3�ĝ���p:��}ˌ�T�Gq��GoAD��Q�����o�N$"=m�Xx �E���;wd�f���q�XD�?�_���N<|P=��I#��"��#؛�H�Di���e���D4�h'��*���(�u�;�MK��j.��ƶЍH�E�5ƴ�N��|��V$֊p���e���G��UPĕ�DOk�N�5vEOE��.��#b�q�>];�+�N��a++�м���fy�Q�wz��� �8������OU"�S�gA�ƫ4ׁy�z,�v��rX��T�W�kN�0��d�eKL_�o�a%��LI�6��.ʙ8��;��߆E*M�F����a�{X�;`���rJǚ�?k�j�=��yc� `Qc+��<p�)_cE��:z� ��ʄ�����Ί����� 6B!�V���O_>�����`#�*�ħV��j�X� gV��X���v��ѭl��/����+l��Ã��C�}`;Q���� ���ÏLl�弼� l��D�K�}�G�'��A��>? ���D�.�|�2������2��i`��T� gT����Dy_��\��Zq�kdj�Z�����i��#+�Y�QHp ���z��qԁ��ۇӥ�It�>7� ;,����qR��{6'i����{?�M�2����W/��,�\p���w7�_����� ��v9�R�՞ �ߨ�93���g��,T��ϊh*URc)���TQ��ڪH|���2�,� ڰ��M��HU��7"O�~`b� 3�g�� �G��([���䩖٦�苍��l��ٖ��$��;����F�?j-�ք\�i!�IHeno��r44����h�|ڛ��hL�i���x���� � 8�| IEND�B`� assets/images/about/affiliatewp.png 0000644 00000002424 15174671617 0013447 0 ustar 00 �PNG IHDR � � �� �PLTE�OC����������������������錈�������rl���제�����釃�QE��������������죠�{u������~�^U�UJ���ﴲ�e\�������똔�le�vp�aX�YO�~x�ia뜘��q�$ 3IDATx���i��0� �����[�}�o�7D;���|�s�|h(��K.&�a�a�a�a�-+�n2��E�)�/��I�&x��t����];�+P� �pv�\�~mI~`�ԯ 6�}.�Q�P=}��H�%^ ����Zt5�+|Ѝ���tc�P�1��t�H9B�B�X��(LP�wb~�S��2ԫ��6�W�%�k9��M�s`s�P� b�A{�:�#�J=hG�!��� ���6��Ν�d�>]uv�v���Lz��Xe���'I�\2�9)B_�Lg@��:\&x.y��v$��3���c����Ble'� A D� 1�T�s�W�~�0�2�s ���s���9�[��Df=͚�eo��d��7�knO��$-|ъI�MQ�l���b�;�V�[O2��,3�g�d'(�E7�w��U'�"w�Ҿ�D�!_�̹���i��!�$��Л��},s�Tm����XsT�ey�����GpHqV?Pm^֜�+�-8_m]�B ���ݘy��ޭ�X������ 4�A:7_^��Ԓ�߂�^�2��qލ8�o���ߪ���hɟ% +����ǫC����K$�4� H� 6A��ً�}���V�%C`�Σ�σ��BtIu���*��rT�bN����2t��?�]��V�5)��)��v��T�-�=$���z�g�Hߒ�5β�v�#[��ҕl�z��<\�dcɳ�7�@!�/|��e�P<�� �$�>