Version Description
Download this release
Release Info
Developer | pross |
Plugin | WordPress Page Builder – Beaver Builder |
Version | 2.3.2.8 |
Comparing to | |
See all releases |
Code changes from version 2.3.2.5 to 2.3.2.8
- changelog.txt +22 -0
- classes/class-fl-builder-loader.php +2 -1
- classes/class-fl-builder-model.php +20 -0
- classes/class-fl-builder-seo.php +23 -0
- classes/class-fl-builder-service-email-address.php +6 -5
- classes/class-fl-builder-service-mailerlite.php +23 -24
- classes/class-fl-builder.php +9 -2
- css/fl-builder.css +30 -3
- css/fl-builder.min.css +1 -1
- css/fl-lightbox.css +1 -0
- extensions/fl-builder-cache-helper/plugins/autooptimize.php +4 -2
- fl-builder.php +1 -1
- includes/column-settings.php +1 -0
- includes/module-settings.php +1 -0
- includes/row-settings.php +1 -0
- includes/ui-js-config.php +1 -1
- includes/updater-config.php +1 -1
- includes/updater/classes/class-fl-updater.php +90 -39
- includes/vendor/mailerlite/FL_ML_Rest.php +0 -65
- includes/vendor/mailerlite/FL_ML_Rest_Base.php +0 -224
- includes/vendor/mailerlite/autoload.php +7 -0
- includes/vendor/mailerlite/clue/stream-filter/src/CallbackFilter.php +120 -0
- includes/vendor/mailerlite/clue/stream-filter/src/functions.php +146 -0
- includes/vendor/mailerlite/clue/stream-filter/src/functions_include.php +5 -0
- includes/vendor/mailerlite/composer/ClassLoader.php +445 -0
- includes/vendor/mailerlite/composer/LICENSE +21 -0
- includes/vendor/mailerlite/composer/autoload_classmap.php +9 -0
- includes/vendor/mailerlite/composer/autoload_files.php +13 -0
- includes/vendor/mailerlite/composer/autoload_namespaces.php +9 -0
- includes/vendor/mailerlite/composer/autoload_psr4.php +18 -0
- includes/vendor/mailerlite/composer/autoload_real.php +70 -0
- includes/vendor/mailerlite/composer/autoload_static.php +91 -0
- includes/vendor/mailerlite/composer/installed.json +632 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/AppendStream.php +241 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/BufferStream.php +137 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/CachingStream.php +138 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/DroppingStream.php +42 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/FnStream.php +158 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/InflateStream.php +52 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/LazyOpenStream.php +39 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/LimitStream.php +155 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/MessageTrait.php +213 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/MultipartStream.php +153 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/NoSeekStream.php +22 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/PumpStream.php +165 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/Request.php +151 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/Response.php +154 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/Rfc7230.php +18 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/ServerRequest.php +376 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/Stream.php +267 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/StreamDecoratorTrait.php +149 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/StreamWrapper.php +161 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/UploadedFile.php +316 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/Uri.php +760 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/UriNormalizer.php +216 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/UriResolver.php +219 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/functions.php +899 -0
- includes/vendor/mailerlite/guzzlehttp/psr7/src/functions_include.php +6 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Campaigns.php +81 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Fields.php +11 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php +105 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Segments.php +11 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Settings.php +36 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Stats.php +25 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Subscribers.php +69 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/ApiAbstract.php +224 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/ApiConstants.php +10 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/Collection.php +147 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php +146 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Exceptions/MailerLiteSdkException.php +7 -0
- includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/MailerLite.php +109 -0
- includes/vendor/mailerlite/php-http/curl-client/.php_cs +9 -0
- includes/vendor/mailerlite/php-http/curl-client/.styleci.yml +4 -0
- includes/vendor/mailerlite/php-http/curl-client/src/Client.php +372 -0
- includes/vendor/mailerlite/php-http/curl-client/src/CurlPromise.php +109 -0
- includes/vendor/mailerlite/php-http/curl-client/src/MultiRunner.php +129 -0
- includes/vendor/mailerlite/php-http/curl-client/src/PromiseCore.php +241 -0
- includes/vendor/mailerlite/php-http/curl-client/src/ResponseBuilder.php +22 -0
- includes/vendor/mailerlite/php-http/discovery/src/ClassDiscovery.php +246 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception.php +12 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception/ClassInstantiationFailedException.php +14 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception/DiscoveryFailedException.php +51 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception/NoCandidateFoundException.php +48 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception/NotFoundException.php +16 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception/PuliUnavailableException.php +12 -0
- includes/vendor/mailerlite/php-http/discovery/src/Exception/StrategyUnavailableException.php +15 -0
- includes/vendor/mailerlite/php-http/discovery/src/HttpAsyncClientDiscovery.php +32 -0
- includes/vendor/mailerlite/php-http/discovery/src/HttpClientDiscovery.php +32 -0
- includes/vendor/mailerlite/php-http/discovery/src/MessageFactoryDiscovery.php +34 -0
- includes/vendor/mailerlite/php-http/discovery/src/NotFoundException.php +14 -0
- includes/vendor/mailerlite/php-http/discovery/src/Psr17FactoryDiscovery.php +124 -0
- includes/vendor/mailerlite/php-http/discovery/src/Psr18ClientDiscovery.php +32 -0
- includes/vendor/mailerlite/php-http/discovery/src/Strategy/CommonClassesStrategy.php +163 -0
- includes/vendor/mailerlite/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php +93 -0
- includes/vendor/mailerlite/php-http/discovery/src/Strategy/DiscoveryStrategy.php +23 -0
- includes/vendor/mailerlite/php-http/discovery/src/Strategy/MockClientStrategy.php +27 -0
- includes/vendor/mailerlite/php-http/discovery/src/Strategy/PuliBetaStrategy.php +92 -0
- includes/vendor/mailerlite/php-http/discovery/src/StreamFactoryDiscovery.php +34 -0
- includes/vendor/mailerlite/php-http/discovery/src/UriFactoryDiscovery.php +34 -0
- includes/vendor/mailerlite/php-http/httplug/src/Exception.php +12 -0
- includes/vendor/mailerlite/php-http/httplug/src/Exception/HttpException.php +74 -0
- includes/vendor/mailerlite/php-http/httplug/src/Exception/NetworkException.php +14 -0
- includes/vendor/mailerlite/php-http/httplug/src/Exception/RequestException.php +43 -0
- includes/vendor/mailerlite/php-http/httplug/src/Exception/TransferException.php +14 -0
- includes/vendor/mailerlite/php-http/httplug/src/HttpAsyncClient.php +27 -0
- includes/vendor/mailerlite/php-http/httplug/src/HttpClient.php +28 -0
- includes/vendor/mailerlite/php-http/httplug/src/Promise/HttpFulfilledPromise.php +57 -0
- includes/vendor/mailerlite/php-http/httplug/src/Promise/HttpRejectedPromise.php +56 -0
- includes/vendor/mailerlite/php-http/message-factory/src/MessageFactory.php +12 -0
- includes/vendor/mailerlite/php-http/message-factory/src/RequestFactory.php +34 -0
- includes/vendor/mailerlite/php-http/message-factory/src/ResponseFactory.php +35 -0
- includes/vendor/mailerlite/php-http/message-factory/src/StreamFactory.php +25 -0
- includes/vendor/mailerlite/php-http/message-factory/src/UriFactory.php +24 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication.php +25 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/AutoBasicAuth.php +48 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/BasicAuth.php +44 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/Bearer.php +37 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/Chain.php +47 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/Matching.php +74 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/QueryParam.php +50 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/RequestConditional.php +47 -0
- includes/vendor/mailerlite/php-http/message/src/Authentication/Wsse.php +58 -0
- includes/vendor/mailerlite/php-http/message/src/Builder/ResponseBuilder.php +148 -0
- includes/vendor/mailerlite/php-http/message/src/Cookie.php +526 -0
- includes/vendor/mailerlite/php-http/message/src/CookieJar.php +220 -0
- includes/vendor/mailerlite/php-http/message/src/CookieUtil.php +53 -0
- includes/vendor/mailerlite/php-http/message/src/Decorator/MessageDecorator.php +133 -0
- includes/vendor/mailerlite/php-http/message/src/Decorator/RequestDecorator.php +88 -0
- includes/vendor/mailerlite/php-http/message/src/Decorator/ResponseDecorator.php +57 -0
- includes/vendor/mailerlite/php-http/message/src/Decorator/StreamDecorator.php +138 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/ChunkStream.php +39 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/CompressStream.php +46 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/DechunkStream.php +29 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/DecompressStream.php +46 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/DeflateStream.php +42 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/Filter/Chunk.php +30 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/FilteredStream.php +236 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/GzipDecodeStream.php +46 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/GzipEncodeStream.php +46 -0
- includes/vendor/mailerlite/php-http/message/src/Encoding/InflateStream.php +46 -0
- includes/vendor/mailerlite/php-http/message/src/Exception.php +10 -0
- includes/vendor/mailerlite/php-http/message/src/Exception/UnexpectedValueException.php +9 -0
- includes/vendor/mailerlite/php-http/message/src/Formatter.php +32 -0
- includes/vendor/mailerlite/php-http/message/src/Formatter/CurlCommandFormatter.php +94 -0
- includes/vendor/mailerlite/php-http/message/src/Formatter/FullHttpMessageFormatter.php +96 -0
- includes/vendor/mailerlite/php-http/message/src/Formatter/SimpleFormatter.php +42 -0
- includes/vendor/mailerlite/php-http/message/src/MessageFactory/DiactorosMessageFactory.php +61 -0
- includes/vendor/mailerlite/php-http/message/src/MessageFactory/GuzzleMessageFactory.php +53 -0
- includes/vendor/mailerlite/php-http/message/src/MessageFactory/SlimMessageFactory.php +72 -0
- includes/vendor/mailerlite/php-http/message/src/RequestMatcher.php +26 -0
- includes/vendor/mailerlite/php-http/message/src/RequestMatcher/CallbackRequestMatcher.php +35 -0
- includes/vendor/mailerlite/php-http/message/src/RequestMatcher/RegexRequestMatcher.php +41 -0
- includes/vendor/mailerlite/php-http/message/src/RequestMatcher/RequestMatcher.php +78 -0
- includes/vendor/mailerlite/php-http/message/src/Stream/BufferedStream.php +270 -0
- includes/vendor/mailerlite/php-http/message/src/StreamFactory/DiactorosStreamFactory.php +36 -0
- includes/vendor/mailerlite/php-http/message/src/StreamFactory/GuzzleStreamFactory.php +21 -0
- includes/vendor/mailerlite/php-http/message/src/StreamFactory/SlimStreamFactory.php +37 -0
- includes/vendor/mailerlite/php-http/message/src/UriFactory/DiactorosUriFactory.php +29 -0
- includes/vendor/mailerlite/php-http/message/src/UriFactory/GuzzleUriFactory.php +22 -0
- includes/vendor/mailerlite/php-http/message/src/UriFactory/SlimUriFactory.php +31 -0
- includes/vendor/mailerlite/php-http/message/src/filters.php +6 -0
- includes/vendor/mailerlite/php-http/promise/src/FulfilledPromise.php +58 -0
- includes/vendor/mailerlite/php-http/promise/src/Promise.php +69 -0
- includes/vendor/mailerlite/php-http/promise/src/RejectedPromise.php +58 -0
- includes/vendor/mailerlite/psr/http-message/src/MessageInterface.php +187 -0
- includes/vendor/mailerlite/psr/http-message/src/RequestInterface.php +129 -0
- includes/vendor/mailerlite/psr/http-message/src/ResponseInterface.php +68 -0
- includes/vendor/mailerlite/psr/http-message/src/ServerRequestInterface.php +261 -0
- includes/vendor/mailerlite/psr/http-message/src/StreamInterface.php +158 -0
- includes/vendor/mailerlite/psr/http-message/src/UploadedFileInterface.php +123 -0
- includes/vendor/mailerlite/psr/http-message/src/UriInterface.php +323 -0
- includes/vendor/mailerlite/ralouphie/getallheaders/src/getallheaders.php +46 -0
- js/fl-builder-ui-settings-copy-paste.js +1 -1
- js/fl-builder.min.js +1 -1
- languages/cs_CZ.mo +0 -0
- languages/de_DE.mo +0 -0
- languages/en_GB.mo +0 -0
- languages/es_CO.mo +0 -0
- languages/es_ES.mo +0 -0
- languages/fa_IR.mo +0 -0
- languages/fi.mo +0 -0
- languages/fr_CA.mo +0 -0
- languages/fr_FR.mo +0 -0
- languages/it_IT.mo +0 -0
- languages/ja.mo +0 -0
- languages/ko_KR.mo +0 -0
- languages/nb_NO.mo +0 -0
- languages/nl_NL.mo +0 -0
- languages/pl_PL.mo +0 -0
- languages/pt_BR.mo +0 -0
- languages/pt_PT.mo +0 -0
- languages/sl_SI.mo +0 -0
- languages/th.mo +0 -0
- languages/tr_TR.mo +0 -0
- languages/uk.mo +0 -0
- modules/photo/photo.php +2 -1
- readme.txt +6 -2
changelog.txt
CHANGED
@@ -1,3 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<h4>2.3.2.5 - 03/24/2020</h4>
|
2 |
<strong>Hot Fix</strong>
|
3 |
<ul>
|
1 |
+
<h4>2.3.2.8 - 08/11/2020</h4>
|
2 |
+
<strong>Hot Fix</strong>
|
3 |
+
<ul>
|
4 |
+
<li>Added support for WP 5.5 auto updates system for plugins and themes.</li>
|
5 |
+
<li>Fixed Rich Text editor issues in WP 5.5</li>
|
6 |
+
<li>Fixed broken image cropping on Flywheel hosting.</li>
|
7 |
+
</ul>
|
8 |
+
|
9 |
+
<h4>2.3.2.7 - 07/29/2020</h4>
|
10 |
+
<strong>Hot Fix</strong>
|
11 |
+
<ul>
|
12 |
+
<li>Fixed deprecated function warning in WP 5.5</li>
|
13 |
+
<li>Fixed an WordPress object cache bug when duplicating node templates.</li>
|
14 |
+
<li>Update Tested Up To for WP 5.5</li>
|
15 |
+
</ul>
|
16 |
+
|
17 |
+
<h4>2.3.2.6 - 06/30/2020</h4>
|
18 |
+
<strong>Hot Fix</strong>
|
19 |
+
<ul>
|
20 |
+
<li>Update Mailerlite API files.</li>
|
21 |
+
</ul>
|
22 |
+
|
23 |
<h4>2.3.2.5 - 03/24/2020</h4>
|
24 |
<strong>Hot Fix</strong>
|
25 |
<ul>
|
classes/class-fl-builder-loader.php
CHANGED
@@ -46,7 +46,7 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
|
|
46 |
* @return void
|
47 |
*/
|
48 |
static private function define_constants() {
|
49 |
-
define( 'FL_BUILDER_VERSION', '2.3.2.
|
50 |
define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
|
51 |
define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
|
52 |
define( 'FL_BUILDER_URL', plugins_url( '/', FL_BUILDER_FILE ) );
|
@@ -106,6 +106,7 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
|
|
106 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-settings.php';
|
107 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-utils.php';
|
108 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpml.php';
|
|
|
109 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-privacy.php';
|
110 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-presets.php';
|
111 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-compatibility.php';
|
46 |
* @return void
|
47 |
*/
|
48 |
static private function define_constants() {
|
49 |
+
define( 'FL_BUILDER_VERSION', '2.3.2.8' );
|
50 |
define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
|
51 |
define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
|
52 |
define( 'FL_BUILDER_URL', plugins_url( '/', FL_BUILDER_FILE ) );
|
106 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-settings.php';
|
107 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-utils.php';
|
108 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpml.php';
|
109 |
+
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-seo.php';
|
110 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-privacy.php';
|
111 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-presets.php';
|
112 |
require_once FL_BUILDER_DIR . 'classes/class-fl-builder-compatibility.php';
|
classes/class-fl-builder-model.php
CHANGED
@@ -258,6 +258,23 @@ final class FLBuilderModel {
|
|
258 |
return apply_filters( 'fl_builder_store_url', $url, $path );
|
259 |
}
|
260 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
/**
|
262 |
* Returns an array of post data from either $_POST['fl_builder_data']
|
263 |
* or $_POST if that is not set.
|
@@ -4202,6 +4219,9 @@ final class FLBuilderModel {
|
|
4202 |
}
|
4203 |
}
|
4204 |
|
|
|
|
|
|
|
4205 |
// Duplicate post terms.
|
4206 |
$taxonomies = get_object_taxonomies( $post->post_type );
|
4207 |
|
258 |
return apply_filters( 'fl_builder_store_url', $url, $path );
|
259 |
}
|
260 |
|
261 |
+
/**
|
262 |
+
* Returns the relative URL for the plugin folder.
|
263 |
+
*
|
264 |
+
* @since 2.3
|
265 |
+
* @return string
|
266 |
+
*/
|
267 |
+
static public function get_relative_plugin_url() {
|
268 |
+
$url = str_ireplace( home_url(), '', FL_BUILDER_URL );
|
269 |
+
$parsed_path = parse_url( FL_BUILDER_URL, PHP_URL_PATH );
|
270 |
+
|
271 |
+
if ( strstr( $url, '://' ) && $parsed_path ) {
|
272 |
+
$url = $parsed_path;
|
273 |
+
}
|
274 |
+
|
275 |
+
return $url;
|
276 |
+
}
|
277 |
+
|
278 |
/**
|
279 |
* Returns an array of post data from either $_POST['fl_builder_data']
|
280 |
* or $_POST if that is not set.
|
4219 |
}
|
4220 |
}
|
4221 |
|
4222 |
+
// Flush the cache so new meta is returned in wp meta functions.
|
4223 |
+
wp_cache_flush();
|
4224 |
+
|
4225 |
// Duplicate post terms.
|
4226 |
$taxonomies = get_object_taxonomies( $post->post_type );
|
4227 |
|
classes/class-fl-builder-seo.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @since 2.4
|
4 |
+
*/
|
5 |
+
final class FLBuilderSEO {
|
6 |
+
public function __construct() {
|
7 |
+
$this->filters();
|
8 |
+
}
|
9 |
+
private function filters() {
|
10 |
+
/**
|
11 |
+
* WordPress 5.5 adds native support for sitemaps so we need to remove our post type and taxonomy.
|
12 |
+
*/
|
13 |
+
add_filter( 'wp_sitemaps_post_types', function( $post_types ) {
|
14 |
+
unset( $post_types['fl-builder-template'] );
|
15 |
+
return $post_types;
|
16 |
+
} );
|
17 |
+
add_filter( 'wp_sitemaps_taxonomies', function( $taxonomies ) {
|
18 |
+
unset( $taxonomies['fl-builder-template-category'] );
|
19 |
+
return $taxonomies;
|
20 |
+
} );
|
21 |
+
}
|
22 |
+
}
|
23 |
+
new FLBuilderSEO;
|
classes/class-fl-builder-service-email-address.php
CHANGED
@@ -55,11 +55,12 @@ final class FLBuilderServiceEmailAddress extends FLBuilderService {
|
|
55 |
ob_start();
|
56 |
|
57 |
FLBuilder::render_settings_field( 'email', array(
|
58 |
-
'row_class'
|
59 |
-
'class'
|
60 |
-
'type'
|
61 |
-
'label'
|
62 |
-
'
|
|
|
63 |
'type' => 'none',
|
64 |
),
|
65 |
));
|
55 |
ob_start();
|
56 |
|
57 |
FLBuilder::render_settings_field( 'email', array(
|
58 |
+
'row_class' => 'fl-builder-service-connect-row',
|
59 |
+
'class' => 'fl-builder-service-connect-input',
|
60 |
+
'type' => 'text',
|
61 |
+
'label' => __( 'Email Address', 'fl-builder' ),
|
62 |
+
'description' => sprintf( '%s <a target="_blank" href="https://docs.wpbeaverbuilder.com/beaver-builder/how-to-tips/use-smtp-to-send-form-notifications">%s</a>', __( 'Note: Please read the following info on email deliverability for this module.', 'fl-builder' ), __( 'Link to Doc', 'fl-builder' ) ),
|
63 |
+
'preview' => array(
|
64 |
'type' => 'none',
|
65 |
),
|
66 |
));
|
classes/class-fl-builder-service-mailerlite.php
CHANGED
@@ -41,14 +41,19 @@ final class FLBuilderServiceMailerLite extends FLBuilderService {
|
|
41 |
if ( $this->api_instance ) {
|
42 |
return $this->api_instance;
|
43 |
}
|
44 |
-
if ( ! class_exists( 'FL_ML_Rest' ) ) {
|
45 |
-
|
46 |
-
}
|
47 |
-
|
48 |
-
$this->api_instance = new FL_ML_Rest( $api_key );
|
49 |
-
$this->api_instance->setUrl( $this->api_url );
|
50 |
-
|
51 |
-
return $this->api_instance;
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
/**
|
@@ -75,17 +80,15 @@ final class FLBuilderServiceMailerLite extends FLBuilderService {
|
|
75 |
} else {
|
76 |
|
77 |
$api = $this->get_api( $fields['api_key'] );
|
78 |
-
$api->setPath( 'groups' );
|
79 |
-
$api->getAll();
|
80 |
-
$get_api_response = $api->getResponseInfo();
|
81 |
|
82 |
-
|
|
|
|
|
83 |
$response['data'] = array(
|
84 |
'api_key' => $fields['api_key'],
|
85 |
);
|
86 |
} else {
|
87 |
-
|
88 |
-
$response['error'] = sprintf( __( 'Error: Could not connect to MailerLite. %s', 'fl-builder' ), $get_api_response['http_code'] );
|
89 |
}
|
90 |
}
|
91 |
|
@@ -128,10 +131,9 @@ final class FLBuilderServiceMailerLite extends FLBuilderService {
|
|
128 |
*/
|
129 |
public function render_fields( $account, $settings ) {
|
130 |
$account_data = $this->get_account_data( $account );
|
131 |
-
$api = $this->get_api( $account_data['api_key'] );
|
132 |
-
$api->
|
133 |
-
$
|
134 |
-
$lists = array();
|
135 |
|
136 |
if ( $get_lists && ! isset( $get_lists->error ) && count( $get_lists ) > 0 ) {
|
137 |
$lists = $get_lists;
|
@@ -231,13 +233,10 @@ final class FLBuilderServiceMailerLite extends FLBuilderService {
|
|
231 |
}*/
|
232 |
|
233 |
// Add new
|
234 |
-
$api->
|
235 |
-
$api->add( $data );
|
236 |
-
$result = $api->getResponseInfo();
|
237 |
|
238 |
-
if (
|
239 |
-
|
240 |
-
$response['error'] = sprintf( __( 'There was an error subscribing to MailerLite. Code: %s', 'fl-builder' ), $result['http_code'] );
|
241 |
}
|
242 |
}
|
243 |
|
41 |
if ( $this->api_instance ) {
|
42 |
return $this->api_instance;
|
43 |
}
|
44 |
+
// if ( ! class_exists( 'FL_ML_Rest' ) ) {
|
45 |
+
// require_once FL_BUILDER_DIR . 'includes/vendor/mailerlite/FL_ML_Rest.php';
|
46 |
+
// }
|
47 |
+
//
|
48 |
+
// $this->api_instance = new FL_ML_Rest( $api_key );
|
49 |
+
// $this->api_instance->setUrl( $this->api_url );
|
50 |
+
//
|
51 |
+
// return $this->api_instance;
|
52 |
+
require_once FL_BUILDER_DIR . 'includes/vendor/mailerlite/autoload.php';
|
53 |
+
// $mailerliteClient = new \MailerLiteApi\MailerLite('your-api-key');
|
54 |
+
|
55 |
+
$groupsapi = new \MailerLiteApi\MailerLite( $api_key );
|
56 |
+
return $groupsapi;
|
57 |
}
|
58 |
|
59 |
/**
|
80 |
} else {
|
81 |
|
82 |
$api = $this->get_api( $fields['api_key'] );
|
|
|
|
|
|
|
83 |
|
84 |
+
$get_api_response = $api->groups()->count();
|
85 |
+
|
86 |
+
if ( isset( $get_api_response->count ) ) {
|
87 |
$response['data'] = array(
|
88 |
'api_key' => $fields['api_key'],
|
89 |
);
|
90 |
} else {
|
91 |
+
$response['error'] = __( 'Error: Could not connect to MailerLite.', 'fl-builder' );
|
|
|
92 |
}
|
93 |
}
|
94 |
|
131 |
*/
|
132 |
public function render_fields( $account, $settings ) {
|
133 |
$account_data = $this->get_account_data( $account );
|
134 |
+
$api = $this->get_api( $account_data['api_key'] )->groups();
|
135 |
+
$get_lists = $api->get();
|
136 |
+
$lists = array();
|
|
|
137 |
|
138 |
if ( $get_lists && ! isset( $get_lists->error ) && count( $get_lists ) > 0 ) {
|
139 |
$lists = $get_lists;
|
233 |
}*/
|
234 |
|
235 |
// Add new
|
236 |
+
$result = $api->groups()->addSubscriber( $settings->list_id, $data );
|
|
|
|
|
237 |
|
238 |
+
if ( ! is_object( $result ) || ! isset( $result->id ) ) {
|
239 |
+
$response['error'] = __( 'There was an error subscribing to MailerLite.', 'fl-builder' );
|
|
|
240 |
}
|
241 |
}
|
242 |
|
classes/class-fl-builder.php
CHANGED
@@ -255,8 +255,13 @@ final class FLBuilder {
|
|
255 |
}
|
256 |
|
257 |
static public function rich_edit() {
|
|
|
258 |
if ( FLBuilderModel::is_builder_active() ) {
|
259 |
-
|
|
|
|
|
|
|
|
|
260 |
}
|
261 |
}
|
262 |
|
@@ -1730,7 +1735,9 @@ final class FLBuilder {
|
|
1730 |
}
|
1731 |
|
1732 |
// Add srcset attrs to images with the class wp-image-<ID>.
|
1733 |
-
if ( function_exists( '
|
|
|
|
|
1734 |
$content = wp_make_content_images_responsive( $content );
|
1735 |
}
|
1736 |
|
255 |
}
|
256 |
|
257 |
static public function rich_edit() {
|
258 |
+
global $wp_version;
|
259 |
if ( FLBuilderModel::is_builder_active() ) {
|
260 |
+
if ( version_compare( $wp_version, '5.4.99', '<' ) ) {
|
261 |
+
add_filter( 'get_user_option_rich_editing', '__return_true' );
|
262 |
+
} else {
|
263 |
+
add_filter( 'user_can_richedit', '__return_true' ); // WP 5.5
|
264 |
+
}
|
265 |
}
|
266 |
}
|
267 |
|
1735 |
}
|
1736 |
|
1737 |
// Add srcset attrs to images with the class wp-image-<ID>.
|
1738 |
+
if ( function_exists( 'wp_filter_content_tags' ) ) {
|
1739 |
+
$content = wp_filter_content_tags( $content );
|
1740 |
+
} else if ( function_exists( 'wp_make_content_images_responsive' ) ) {
|
1741 |
$content = wp_make_content_images_responsive( $content );
|
1742 |
}
|
1743 |
|
css/fl-builder.css
CHANGED
@@ -3677,6 +3677,7 @@ body .fl-lightbox-has-tab-overflow .fl-builder-settings-tabs-more {
|
|
3677 |
------------------------------------------------------ */
|
3678 |
|
3679 |
.fl-lightbox .fl-form-table {
|
|
|
3680 |
background: none transparent;
|
3681 |
border: none;
|
3682 |
width: calc(100% - 35px); /* extra 25px for field connections toggle) */
|
@@ -4700,8 +4701,11 @@ input[type=number].fl-field-popup-slider-focus {
|
|
4700 |
.fl-builder-edit .media-frame.hide-menu {
|
4701 |
visibility: visible;
|
4702 |
}
|
4703 |
-
.fl-builder-edit .media-router
|
4704 |
-
|
|
|
|
|
|
|
4705 |
}
|
4706 |
span.select2-container.select2-container--open {
|
4707 |
z-index: 9999999;
|
@@ -6106,7 +6110,6 @@ Rules to ensure compatibility with v2.0.
|
|
6106 |
font-size: 13px !important;
|
6107 |
line-height: 15px !important;
|
6108 |
outline: none;
|
6109 |
-
/* width: 100% !important; */
|
6110 |
}
|
6111 |
|
6112 |
.select2-dropdown {
|
@@ -6123,3 +6126,27 @@ Rules to ensure compatibility with v2.0.
|
|
6123 |
.fl-lightbox .select2-selection--single .select2-selection__arrow {
|
6124 |
height: 32px;
|
6125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3677 |
------------------------------------------------------ */
|
3678 |
|
3679 |
.fl-lightbox .fl-form-table {
|
3680 |
+
display: table;
|
3681 |
background: none transparent;
|
3682 |
border: none;
|
3683 |
width: calc(100% - 35px); /* extra 25px for field connections toggle) */
|
4701 |
.fl-builder-edit .media-frame.hide-menu {
|
4702 |
visibility: visible;
|
4703 |
}
|
4704 |
+
.fl-builder-edit .media-modal .media-frame-router .media-router * {
|
4705 |
+
color: #808080;
|
4706 |
+
}
|
4707 |
+
.fl-builder-edit .media-modal .media-frame-content * {
|
4708 |
+
color: #808080;
|
4709 |
}
|
4710 |
span.select2-container.select2-container--open {
|
4711 |
z-index: 9999999;
|
6110 |
font-size: 13px !important;
|
6111 |
line-height: 15px !important;
|
6112 |
outline: none;
|
|
|
6113 |
}
|
6114 |
|
6115 |
.select2-dropdown {
|
6126 |
.fl-lightbox .select2-selection--single .select2-selection__arrow {
|
6127 |
height: 32px;
|
6128 |
}
|
6129 |
+
.fl-builder-ui-skin--light .fl-lightbox .select2-selection__rendered {
|
6130 |
+
color: #808080 !important;
|
6131 |
+
}
|
6132 |
+
.fl-builder-ui-skin--light .select2-dropdown {
|
6133 |
+
color: #808080 !important;
|
6134 |
+
}
|
6135 |
+
.fl-builder-ui-skin--light .select2-search__field {
|
6136 |
+
color: #808080 !important;
|
6137 |
+
}
|
6138 |
+
.fl-builder-ui-skin--light .select2-search__field::placeholder {
|
6139 |
+
color: #808080 !important;
|
6140 |
+
}
|
6141 |
+
.fl-builder-ui-skin--light .select2-search__field::-webkit-input-placeholder {
|
6142 |
+
color: #808080 !important;
|
6143 |
+
}
|
6144 |
+
.fl-builder-ui-skin--light .select2-search__field::-moz-placeholder{
|
6145 |
+
color: #808080 !important;
|
6146 |
+
}
|
6147 |
+
.fl-builder-ui-skin--light .select2-search__field:-ms-input-placeholder{
|
6148 |
+
color: #808080 !important;
|
6149 |
+
}
|
6150 |
+
.fl-builder-ui-skin--light .select2-search__field:-moz-placeholder {
|
6151 |
+
color: #808080 !important;
|
6152 |
+
}
|
css/fl-builder.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.fl-color-picker-ui{width:300px}.fl-color-picker-ui.fl-color-alpha-enabled{width:334px}.fl-color-picker-ui .iris-picker{float:left;width:100%;height:224px;display:block;position:relative;border-top:1px solid rgba(0,0,0,.1)}.fl-color-picker-ui .iris-picker .iris-square-inner,.fl-color-picker-ui .iris-picker-inner{position:absolute;left:0;top:0;bottom:0;right:0}.fl-color-picker-ui .iris-picker,.iris-picker *{box-sizing:content-box}.fl-color-picker-ui .iris-error{background-color:#ffafaf}.fl-color-picker-ui .iris-picker .iris-square{width:300px;height:200px}.fl-color-picker-ui .iris-picker .iris-palette,.fl-color-picker-ui .iris-picker .iris-slider,.fl-color-picker-ui .iris-picker .iris-square-inner{height:100%;width:12.5%}.fl-color-picker-ui .iris-picker .iris-placeholder,.fl-color-picker-ui .iris-picker .iris-square{position:relative}.fl-color-picker-ui .iris-picker .iris-square-inner{width:auto;margin:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square,.fl-color-picker-ui .iris-ie-9 .iris-square-inner{box-shadow:none;border-radius:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square{outline:rgba(0,0,0,.1) solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-palette,.fl-color-picker-ui .iris-ie-lt9 .iris-slider,.fl-color-picker-ui .iris-ie-lt9 .iris-square,.fl-color-picker-ui .iris-ie-lt9 .iris-square-inner{outline:#999 solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-square .ui-slider-handle{outline:#999 solid 1px;background-color:#fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.fl-color-picker-ui .iris-ie-lt9 .iris-square .iris-square-handle{background:0 0;border:3px solid #fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.fl-color-picker-ui .iris-picker .iris-strip{box-sizing:border-box;width:calc(300px - 12px);margin:5px 6px 6px;border-radius:4px;position:relative;height:22px;transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle{width:6px;position:absolute;right:0;top:-2px;bottom:-2px;margin:0;border-radius:3px;background:#fff;box-shadow:0 0 2px rgba(0,0,0,.5);z-index:5;cursor:ew-resize}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle:focus{outline:#00a0d2 solid 2px}.fl-color-picker-ui .iris-picker .iris-slider-offset{position:absolute;top:0;left:6px;right:0;bottom:0;width:auto;height:auto;background:0 0;border:none;border-radius:0;transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-square-handle{background:0 0;border:5px solid #999;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.fl-color-picker-ui .iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover{border-color:#999}.fl-color-picker-ui .iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover::after{border-color:#fff}.fl-color-picker-ui .iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.fl-color-picker-ui .iris-picker .iris-square-value{width:0;height:0;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.fl-color-picker-wrapper{position:relative;width:48px;height:32px}.fl-color-picker{box-shadow:0 2px 4px 0 rgba(0,0,0,.12);background:url(../img/transp_bg.png) #fff;border-radius:4px;width:120px;height:36px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-color-picker-color{-ms-flex:1 1 100%;flex:1 1 100%;box-sizing:border-box!important;position:relative;border-radius:4px;background-color:transparent;cursor:pointer;border:2px solid transparent;padding:0;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:flex}.fl-color-picker-clear:hover,.fl-color-picker-color:hover{background:0 0;border:2px solid transparent}.fl-color-picker-clear:focus,.fl-color-picker-color.fl-color-picker-empty:focus,.fl-color-picker-color:focus{outline:0;top:0;border:2px solid #00a0d2;background:0 0}.fl-color-picker.fl-color-picker-has-reset .fl-color-picker-color:not(.fl-color-picker-empty){border-top-right-radius:0;border-bottom-right-radius:0}.fl-color-picker-icon{display:none;margin:auto}.fl-color-picker-color.fl-color-picker-empty{border-color:transparent;background-color:transparent}.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon{display:block}.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon path{fill:inherit}.fl-color-picker-clear{box-sizing:border-box;position:relative;display:-ms-flexbox!important;display:flex!important;-ms-flex:0 0 36px;flex:0 0 36px;-ms-flex-pack:center;justify-content:center;padding:0;border:2px solid transparent;fill:#A2AABE;background-color:#E7EBEF!important;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:0 4px 4px 0}.fl-color-picker-clear:hover{fill:#6B6E75;background-color:#E7EBEF}.fl-color-picker-color.fl-color-picker-empty+.fl-color-picker-clear{display:none}.fl-color-picker-ui{display:inline-block;font-family:Helvetica,Verdana,sans-serif;z-index:1;position:fixed;overflow:hidden;padding-bottom:45px;border:1px solid rgba(0,0,0,.1);color:#999;background-color:#FAFAFA;border-radius:3px;box-shadow:0 9px 20px rgba(0,0,0,.17);transition:opacity .2s,visibility .2s;visibility:hidden;opacity:0;-webkit-transform:translate3d(0,0,0)}.fl-color-picker-ui.fl-color-picker-active{visibility:visible;opacity:1;z-index:999999}.fl-color-picker-ui .fl-color-picker-input,.fl-color-picker-ui .fl-color-picker-input:focus{width:100%;height:30px;border:none!important;font-size:14px!important;padding:0 8px;vertical-align:middle;color:#656c6e;background-color:#fff;border-radius:0;box-shadow:none}.fl-color-picker-ui .iris-square-value{transition:none}.fl-color-picker-preset-add{position:absolute;top:8px;right:8px;width:14px;height:14px;background-color:#656c6e;border-radius:50%;cursor:pointer;transition:all .2s}.fl-color-picker-preset-add:hover{background-color:#333}.fl-color-picker-preset-add:after,.fl-color-picker-preset-add:before{content:'';display:block;position:relative;background-color:#fff}.fl-color-picker-preset-add:before{top:6px;left:3px;width:8px;height:2px}.fl-color-picker-preset-add:after{left:6px;top:1px;width:2px;height:8px}.fl-color-picker-presets{position:absolute;left:0;bottom:0;width:100%;z-index:15;overflow:auto;border-top:1px solid rgba(0,0,0,.1);background-color:#FAFAFA}.fl-color-picker-presets-list .fl-color-picker-preset:hover,.fl-color-picker-presets-toggle:hover{background-color:#EDEDED}.fl-color-picker-presets-toggle{position:relative;overflow:hidden;width:100%;height:35px;text-align:center;line-height:35px;font-size:12px;font-weight:700;cursor:pointer;transition:all .1s}.fl-color-picker-presets-close-label,.fl-color-picker-presets-open-label{position:absolute;top:50%;left:50%;visibility:hidden;color:#999;transition:all .5s;transform:translate(-50%,-50%);opacity:0;width:100%}.fl-color-picker-presets-close-label.fl-color-picker-active,.fl-color-picker-presets-open-label.fl-color-picker-active{color:#656c6e;visibility:visible;opacity:1;z-index:999999}.fl-color-picker-presets-list{width:100%;list-style:none;margin:0;padding:0;overflow:auto}.fl-color-picker-presets-list .fl-color-picker-no-preset,.fl-color-picker-presets-list .fl-color-picker-preset{position:relative;padding:5px;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .1s}.fl-color-picker-presets-list .fl-color-picker-no-preset{padding:18px 5px;text-align:center}.fl-color-picker-presets-list .fl-color-picker-preset-color{display:inline-block;width:40px;height:20px;margin-right:3px;vertical-align:middle;border:1px solid rgba(0,0,0,.1);border-radius:2px;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-label{vertical-align:middle;color:#333;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-remove{position:absolute;top:50%;cursor:pointer;transform:translateY(-50%)}.fl-color-picker-clear .fl-color-picker-icon-remove{right:auto;top:auto;margin:auto}.fl-color-picker-presets-list .fl-color-picker-preset-remove{right:5px}.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:after,.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:before{background-color:#333}.fl-color-picker-added{position:absolute;width:100%;top:0;left:0;right:0;bottom:35px;z-index:10;color:#fff;text-align:center;background-color:rgba(0,0,0,.8)}.fl-color-picker-added-text{position:absolute;top:50%;left:50%;width:80%;font-size:14px;color:#fff!important;transform:translate(-50%,-50%)}.fl-color-picker-icon-check{position:relative;width:50px;height:50px;margin:5px auto}.fl-color-picker-icon-check:before{content:'';display:block;position:relative;width:15px;height:30px;margin-left:14px;border:7px solid #fff;border-left:none;border-top:none;transform:rotate(45deg)}.fl-color-picker-icon-arrow-down,.fl-color-picker-icon-arrow-up{display:inline-block;position:relative;width:10px;height:10px;margin-left:5px}.fl-color-picker-icon-arrow-down:before,.fl-color-picker-icon-arrow-up:before{content:'';display:block;position:relative;width:6px;height:6px;border:2px solid #999;border-left:none;border-top:none;transform:rotate(45deg)}.fl-color-picker-icon-arrow-up{top:2px;transform:rotate(180deg)}.fl-color-picker-icon-remove{width:15px;height:15px}.fl-color-picker-icon-remove:after,.fl-color-picker-icon-remove:before{content:'';display:block;position:relative;background-color:#6f7881}.fl-color-picker-icon-remove:before{left:6px;width:2px;height:10px;margin-top:3px;transform:rotate(-45deg)}.fl-color-picker-icon-remove:after{left:6px;width:2px;height:10px;margin-top:-10px;transform:rotate(45deg)}.fl-alpha-wrap{position:absolute;width:32px;height:215px;padding:0 5px;right:4px;border-top:none}.fl-alpha-slider{height:190px;position:absolute;top:12px;width:28px}.fl-alpha-slider .ui-slider-handle{background:rgba(0,0,0,0);border-color:#aaa;border-radius:4px;border-style:solid;border-width:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);cursor:ns-resize;height:12px;left:0;opacity:.9;position:absolute;right:0;width:30px;z-index:14}.fl-alpha-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.fl-alpha-slider-offset{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAASCAYAAAAe/ZHXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkNEQUQ0ODM4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkNEQUQ0ODQ4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2Q0RBRDQ4MThFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2Q0RBRDQ4MjhFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/r/N8AAAWYSURBVHjarFvvR3VBEN45JZGIPkREHyIiIhJJf3qUSERE9CGiDxERkcg9z9u92uucvTszz5z7xnHPj93Z2d359cxscn5+jpTS+EoiMr3/+51cZ2dn4+e29i2/u7y8RKf/pO3vc+o+n5ycoNK31+f6+jrfZ37yuG2mf3R01H3fa5N/b29vU6dP5qft0G4PDg5MGuPr/v4+jz1t27mfvN/b21P75+fHx8eZfiV/Ozs7rUJnSu/5+RlFv+m6ZJpbW1s1PnrvXl9fZ/qX89zY2LB4mfy+v7/nsdV1XltbK/dr5vnz87OcV5bJabuVlRVLBifjfX9/l/xkGtM+S0tLNXnu0szfU/P3IMn/k0678h6ddqjQFGccVL6hoCsVfsq+NZ5QtCv5rfFS41sq37W+UPhMyhxEWTetvce3NR8oewqD39qalXuGAK/WPltjajIC4x2c9Ye1f43SGcqGwRBeTZjhMNntL4pCWZMQYhE05RVl02EovRgC4RkCbUNSQAGhGB/GsKG4h6FQoigDa2i8fRBy3uLMXYIG3Vr3aZvRaCRdBYlYIMZywhBGCVhgzzOlgRuUSOvC0GMEWxOM/+EtQFh1OIIXtfwg1tRaayGjg5px0jyZKEaTle3e+AsLCygVRAh3FlEgKbReE3oYGj9EgIR00QiEgKw3ZBQbRGjBeAMtDETQmHiKDsezJNLgCTFGItZXlAgCSiQggblP+9c8SDI0lXWlFv5g3K63KZ51FOcZzthQ3LomoNHwJmKIQISI3vqzSpwIQ8liSjGMFQjDpoVgaQ6cWgvLhOC7qiAwiHrWbEg4JMSmeUrBuHoYwioOQNXmhmAcrs096s1gJCGi3hSEVU8DQxYElYHhKwUUGAa+NqOBMsSSAQJuhQhCAH4vxozExsxiihPuaIrjCVYKWlYEsjSM52G8Kxxryngl5j0j+EyGTIiED4s1Itm0ZGWxMFCLJaBAcEI6OBkmFgNBoc8Cait2ZnENE/6wQN8LJSJeSMNAjKVm+LUMAIt3PR5AQgIGp1Z5zxhE8PtXUYReYeXi4mKmOPNXBMzt2tPT07LIUtJqr66uusXEbkFnWiQ6Pj72ikrtzc1NKopuvbbj58PDwxqNHp27u7tuYWumUDV+v7+/Xyu6pc59+/DwUCsC9ujt7u6qRbt8//T01C3elbyN70fb29uZ/1FSincvLy/lPGb42tzc9IqJeHt7q61Pr2C6vr7u7tfHx8fMPhV0sLq6WhZtU0n36+uru8elPE7aLi8v1wqJPXn++fmZKYgX8ozFxcXJb0NaQTHClZT8+gBjsYdaFc+zWcUkGTCWENY66ta92oSVzo3WI6IZKGtukeyfBLFKBNAj6bUOBgaoe9wE4n04IBNkLMoC7+Skj630ZlTJMYdyMsU2T8AwpzALkVFilZgJcT2l9PCWDDSAMBSjVlJgZNk0lE1AIby0qCiCnBQNj6aBGQslZIZJ5hB6D/AzQHto5Z9Nk8tARdN4q2ExBnsyIJ311EymShyjan2rKk0zh1Ay1oQVWAZQRnkUA8RFw7TahjBnmNgMVMQrsCGZJezRtGlU0cUZ1zuaxGZPpbhApM+ZpFQqQ6xadoMtBrEKpBVo4GRXvNSxpaRixKiR+TChCYhsDwZkfFj8IkErjAHejcUI0XQrgwehhNSMHAz21E0wZ23FcCAmj8Sd/PXy2xLYLAuwRw4IMsqjFaWYOpMEhDySAPFCWyFkgAHrEcA+BNeJ4UE8HCzJPpCrerUmQIx1pWJkjqxJD8EikUo2c5aI8ZYgsAkM4WQtnHd0ns0ORgVTBghy5ISy928SGsbTMqYg523RUY8oNYG4FIYiyRyZCnFCJC87IoRAIMVOqQ7BKexxCS2hYVl9JhvlpYjnAe4MhmRPMWhhvLfXINaI9WKM0Zu0+SfAAFLE1EgfVSv7AAAAAElFTkSuQmCC) center;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;width:200px;height:22px;transform:rotate(-90deg);bottom:48%;left:-80px;position:absolute}.fl-alpha-text{width:30px;font-size:12px;text-align:center;color:#999;position:absolute;bottom:-5px}.fl-lightbox-mask,.fl-lightbox-wrap{bottom:0;left:0;position:fixed;right:0;z-index:100010}@keyframes fl-lightbox-zoom{from{transform:scale(.4)}to{transform:scale(1)}}.fl-lightbox-wrap{display:none;overflow:auto;padding:0;top:43px;-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);pointer-events:none}.fl-builder-draggable-is-dragging .fl-lightbox-wrap,.fl-builder-resizable-is-resizing .fl-lightbox-wrap,.fl-lightbox,.fl-lightbox-mask{pointer-events:auto}.fl-lightbox-mask{background:#000;opacity:.7;filter:alpha(opacity=70);top:0}.fl-lightbox{background:#F5F7F9;border-radius:4px;box-shadow:rgba(0,0,0,1) 0 4px 30px;-moz-box-shadow:rgba(0,0,0,1) 0 4px 30px;-webkit-box-shadow:rgba(0,0,0,1) 0 4px 30px;position:relative;display:-ms-flexbox;display:flex;z-index:100011;transform-origin:center;animation-name:fl-lightbox-zoom;animation-duration:.25s}.fl-lightbox.fl-lightbox-prevent-animation{animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-lightbox :not(i){color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12px;line-height:14px;text-decoration:none;text-transform:none}.fl-lightbox *,.fl-lightbox :after,.fl-lightbox :before{box-sizing:content-box}#fl-ui-root .fl-nanoscroller-pane,.fl-builder--content-library-panel .fl-nanoscroller-pane,.fl-lightbox .fl-nanoscroller-pane{bottom:2px;right:2px;width:6px}.fl-nanoscroller>.fl-nanoscroller-pane>.fl-nanoscroller-slider{background-color:#bac0ca;transition-property:height,background-color;transition-duration:.25s}#wpadminbar,html{transition-duration:.35s}.fl-nanoscroller>.fl-nanoscroller-pane>.fl-nanoscroller-slider:hover{background-color:#c8cdd4}.fl-nanoscroller>.fl-nanoscroller-pane.active>.fl-nanoscroller-slider{background-color:#029fd2}.fl-lightbox .dashicons{font-family:dashicons}.fl-lightbox.ui-draggable{box-shadow:rgba(0,0,0,.2) 0 7px 30px;-moz-box-shadow:rgba(0,0,0,.2) 0 7px 30px;-webkit-box-shadow:rgba(0,0,0,.2) 0 7px 30px}#wpadminbar,.fl-builder-bar.is-hidden{pointer-events:none}.fl-lightbox-resizable{height:500px;width:380px}@media (max-width:500px){.fl-lightbox-resizable{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-resizable .ui-resizable-handle{display:none!important}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:default!important}.fl-lightbox-controls{display:none}}.fl-lightbox-width-full{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-width-full .fl-lightbox-header{cursor:inherit!important}.fl-lightbox-controls{position:absolute;right:10px;top:10px;z-index:5}.fl-lightbox-controls .fa{color:#bdbdbd;font-size:14px;padding:5px}.fl-lightbox-controls .fa:hover{color:#aaa;cursor:pointer}.fl-lightbox-header-wrap{border-top-left-radius:4px;border-top-right-radius:4px}.fl-lightbox-header{position:relative}.fl-builder-settings-lightbox .fl-lightbox-header h1:before{content:none!important}.fl-lightbox-header h1{color:#333!important;font-size:16px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;font-weight:400!important;margin:0!important;padding:14px 34px 15px 28px!important;text-align:left!important;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;line-height:1}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:move}.fl-lightbox-header h1 .fl-builder-badge{margin-left:10px;color:#fff;background-color:#F7A408}.fl-lightbox-content,.fl-lightbox-content-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1 100%;flex:1 100%;max-width:100%}.fl-lightbox-footer{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex:0 0;flex:0 0;-ms-flex-preferred-size:44px;flex-basis:44px;padding:4px;text-align:right}.fl-lightbox-footer .fl-builder-button{height:36px;margin-left:5px!important;-ms-flex:0 0 0%;flex:0 0 0%;-ms-flex-pack:center;justify-content:center}.fl-lightbox-width-slim .fl-lightbox-footer{-ms-flex-pack:stretch;justify-content:stretch;padding:4px 5px}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button{-ms-flex:1 1 100%;flex:1 1 100%;display:block;text-align:center}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button:first-child{margin-left:0!important}.fl-lightbox table,.fl-lightbox td,.fl-lightbox th,.fl-lightbox tr{border:none}.fl-lightbox-wrap.fl-icon-selector{z-index:1000111}.fl-icon-selector .fl-lightbox{height:100%}.fl-icons-filter{height:auto!important;margin:0!important;position:absolute!important;right:0;top:0;padding:10px 16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-icons-filter select{vertical-align:middle;width:195px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;color:#000;border:2px solid #e4e7ea!important;border-right:none!important;margin:0;padding:2px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;-ms-flex:1 1 195px;flex:1 1 195px;border-radius:0}.fl-icons-filter input[type=text]{line-height:18px;vertical-align:middle;width:160px;-ms-flex:1 1 160px;flex:1 1 160px;border:2px solid #e4e7ea!important;border-radius:0!important;padding:2px 10px!important}.fl-icons-filter input[type=text]:focus,.fl-icons-filter select:focus{border:2px solid #00A0D2!important}.fl-icons-list{bottom:52px;left:0;overflow:auto;padding:20px;position:absolute;right:0;top:48px}.fl-icons-list::-webkit-scrollbar{background-color:#ccc;-webkit-appearance:none;width:10px}.fl-icons-list::-webkit-scrollbar-thumb{background-color:#666;border:1px solid #ccc}.fl-icons-section{text-align:center}.fl-icons-section h2{border-bottom:1px solid #dfdfdf;color:#333!important;font-family:Helvetica,Verdana,sans-serif!important;font-size:16px!important;font-weight:700!important;margin:0 0 20px!important;padding:0 0 10px!important;text-align:left}.fl-builder-button,.fl-responsive-preview-message,a.fl-builder-button,body .fl-builder-bar .fl-builder-bar-content,button.fl-builder-button{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-icons-list i{cursor:pointer;display:inline-block;font-size:40px;height:60px;line-height:60px;width:60px;background:0 0}.fl-icons-list i:hover{background:#fff;box-shadow:0 10px 20px rgba(0,0,0,.15);border-radius:4px}.fl-icon-selector-footer{bottom:0;left:0;position:absolute;right:0}html{transition-property:margin}html.fl-builder-is-showing-toolbar{margin-top:calc(44px + 1px)!important}.fl-builder-edit body{position:static!important}.fl-builder-edit:after,.fl-builder-edit:before{z-index:0!important}.fl-builder-edit .fl-builder-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none}#wpadminbar{transition-property:transform,opacity;transform-origin:bottom;transform-style:preserve-3d;transform:rotateX(89deg) translateY(46px);opacity:0;will-change:transform}html.fl-builder-show-admin-bar{margin-top:32px}html.fl-builder-show-admin-bar #wpadminbar{transform:rotateX(0) translateY(0);pointer-events:auto;opacity:1}@media screen and (max-width:782px){html.fl-builder-show-admin-bar{margin-top:46px}}.fl-clear{clear:both}.screen-reader-text{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}.fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(240,240,240,.8);bottom:0;display:none;left:0;position:fixed;right:0;text-align:center;top:0;z-index:12000000}.fl-builder-settings .fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(255,255,255,.8);display:block;position:absolute}.fl-field-loader{color:#B3B3B3!important;font-style:italic}.fl-builder-node-loading{opacity:.35!important}.fl-builder-node-loading-placeholder{background:url(../img/ajax-loader.svg) center center no-repeat;height:50px}.fl-col-group-has-child-loading{display:-ms-flexbox;display:flex}.fl-col-group-has-child-loading>.fl-builder-node-loading-placeholder{width:50px}.fl-node-hidden{display:none}.fl-builder-edit .fl-node-hidden{display:block}html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-desktop,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-desktop-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-medium-mobile,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-mobile{display:block!important}html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-desktop,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-desktop-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-medium-mobile,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-mobile{display:-ms-flexbox!important;display:flex!important}.fl-responsive-preview-enabled body{overflow:hidden!important}.fl-responsive-preview-mask{background:#F7F7F7;bottom:0;left:0;position:fixed;right:0;top:0;z-index:99999}.fl-responsive-preview{bottom:0;left:0;position:fixed;right:0;top:0;margin-top:50px;z-index:100000}.fl-builder-preview .fl-responsive-preview{margin:0!important}.fl-responsive-preview-content{background:#F5F7F9;padding:20px 20px 45px;overflow:scroll;position:absolute;top:45px;right:0;bottom:0;left:0}.fl-responsive-preview-content .fl-builder-content-editing{overflow:visible!important}.fl-responsive-preview-message{background:#F5F7F9;color:#b3b3b3;font-size:14px;font-weight:400;padding:15px;text-align:center;position:absolute;top:0;left:0;right:0;z-index:999999}.fl-responsive-preview-message span{display:inline-block;margin-right:8px}.fl-responsive-preview-message .fl-builder-button{display:inline-block;margin-left:2px;padding:0 10px}.fl-responsive-preview-message .fl-builder-button i{font-size:14px;height:14px;width:14px}.fl-responsive-preview .fl-builder-content{box-shadow:0 0 8px rgba(0,0,0,.2);margin-left:auto;margin-right:auto;max-width:100%;overflow:visible;position:relative}#fl-builder-preview-frame,#fl-builder-preview-mask{bottom:0;height:100%;position:fixed;top:0;width:100%;right:0}.fl-responsive-preview .fl-block-col-resize{display:none}#fl-builder-preview-mask{background:url(../img/ajax-loader.svg) center center no-repeat #F7F7F7;left:0;z-index:999999}#fl-builder-preview-frame{left:50%;transform:translateX(-50%);-moz-transform:translateX(-50%);-webkit-transform:translateX(-50%);z-index:1000000}body button[class*=fl-builder],body button[class*=fl-builder]:focus,body button[class*=fl-builder]:hover{box-shadow:none;max-height:none;max-width:none;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;letter-spacing:normal}.fl-builder-button,a.fl-builder-button,button.fl-builder-button{-webkit-appearance:none;-ms-flex-align:center;align-items:center;background:#e7ebef;border:2px solid transparent;border-radius:3px;-webkit-border-radius:3px;box-sizing:border-box!important;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;color:#676F7A!important;cursor:pointer;display:-ms-flexbox;display:flex;fill:#676F7A!important;font-size:14px!important;font-style:normal!important;font-weight:500!important;height:33px;letter-spacing:normal!important;line-height:1!important;margin:0;padding:0 12px;text-align:center;transition-property:background-color,width;transition-duration:.2s;white-space:nowrap;width:auto;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder--search-results-panel,.fl-builder-bar,.fl-builder-panel{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}.fl-builder-button:hover{background:#dadfe5;color:#222;border:2px solid transparent!important}.fl-builder-button:active{background:#DCDCDC}button.fl-builder-button:focus{position:static;top:auto;outline:0;background:#E4E7EA;border:2px solid #00A0D0!important}.fl-builder-button-primary,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button{background:#00A0D2;color:#fff!important;text-decoration:none;border:2px solid transparent!important}.fl-builder-button.fl-builder-button-primary:focus,body.fl-builder--layout-has-drafted-changes .fl-builder-button.fl-builder-done-button:focus{background:#00A0D2;border:2px solid #ffc217!important}.fl-builder-button-primary:hover,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:hover{background:#0197C6;color:#fff!important}.fl-builder-button-primary:active,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:active{background:#0484AC}.fl-builder-button-large{height:30px}.fl-builder-button-small{font-size:11px!important;line-height:1!important}.fl-builder-help-button{color:#b3b3b3;font-size:16px!important}.fl-builder-help-button i{position:relative;top:-1px}.fl-builder-help-button:hover{color:#666}.fl-builder-publish-button{line-height:45px!important}.fl-builder-content-panel-button,.fl-builder-content-panel-button:hover{fill:#00A0D2!important;font-size:30px!important;padding:2px 8px!important}.fl-builder-button-silent,.fl-builder-button-silent:hover{padding:0 12px;background:0 0!important;border:2px solid transparent!important;box-shadow:none!important}.fl-builder-done-button,.fl-builder-done-button:hover{font-weight:600}.fl-field .fl-builder-button{display:inline-block;height:auto;padding:11px 12px;vertical-align:middle;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.fl-builder-button svg{max-width:none}.fl-builder-edit .media-modal-content button,.fl-builder-settings-fields button{letter-spacing:normal}.fl-builder-badge{background:#333;border-radius:2px;color:#fff!important;display:inline;font-size:11px!important;font-weight:400;letter-spacing:1px;margin-left:2px;padding:2px 4px;vertical-align:middle}.fl-builder-badge-global{background:#ff9600;transform:translateY(0);transition-duration:.25s;transition-property:transform}.fl-builder-blocks-node-template .fl-builder-badge-global{position:absolute;right:0;top:0}.fl-builder-block:hover .fl-builder-badge-global{display:none}.fl-builder-bar{left:0;position:fixed;right:0;top:0;z-index:999999;user-select:none;transition-property:transform opacity;transition-duration:.35s;transform-style:preserve-3d;perspective:1100px}.fl-builder-bar.is-hidden .fl-builder-bar-content{transform:translateY(-100%) rotateX(90deg)}body .fl-builder-bar .fl-builder-bar-content{display:-ms-flexbox;display:flex;box-sizing:border-box;background:#fff;border-bottom:1px solid #eceef1;color:#999;font-size:14px!important;height:calc(44px + 1px);transition-property:background-color,opacity,transform;transition-duration:.35s;pointer-events:auto}.fl-builder-draggable-is-dragging .fl-builder-content,.fl-builder-draggable-is-dragging .fl-builder-panel .fl-lightbox,.fl-builder-resizable-is-resizing .fl-builder-content,.fl-builder-resizable-is-resizing .fl-builder-panel .fl-lightbox,body .fl-builder-bar .fl-builder-bar-content.is-muted{pointer-events:none}body .fl-builder-bar .fl-builder-bar-content.is-muted>:not(.fl-builder-publish-actions){-webkit-filter:saturate(20%) blur(1px);filter:saturate(20%) blur(1px);opacity:.4}.fl-builder-bar-title{box-sizing:border-box;color:#333;display:-ms-flexbox;display:flex;-ms-flex:0 0 380px;flex:0 0 380px;max-width:380px;border-right:1px solid #eceef1;cursor:pointer}.fl-builder-bar-title:hover{background:#fff}.fl-builder-bar-title.is-showing-menu .fl-builder-bar-title-caret>svg{transform:rotate(180deg)}.fl-builder-simple .fl-builder-bar-title{cursor:auto}.fl-builder-simple .fl-builder-bar-title:hover{cursor:auto;background:0 0}.fl-builder-bar-title span{vertical-align:middle}.fl-builder-bar-title-icon{box-sizing:border-box;background:0 0;-ms-flex:0 0 46px;flex:0 0 46px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:4px}.fl-builder-bar-title-icon img{max-width:100%!important;height:auto!important}.fl-builder-bar-title.fl-builder-bar-title-no-icon{padding-left:12px}.fl-builder-bar-title-area{box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:4px}.fl-builder-layout-title,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{font-size:16px;font-weight:400;line-height:1.3;color:#161B20;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret,.fl-builder-layout-pretitle,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{font-size:12px;font-weight:500;line-height:1.3;color:#656d77;text-align:left;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret i,.fl-theme-builder-preview-select-title i{color:inherit!important;font-size:14px}.fl-builder-bar-title-caret{margin-left:auto!important;-ms-flex:0 0 46px;flex:0 0 46px}.fl-theme-builder-preview-select-title i{padding:12px}.fl-theme-builder-preview-select-title i:before{content:"\f078"}.fl-theme-builder-preview-select.fl-builder-button{position:relative;border-radius:0;background:0 0;min-width:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 360px;flex:0 0 360px;max-width:360px;margin:0!important;padding:4px 10px;border:none!important;border-right:2px solid #d5dadd!important;box-shadow:none}.fl-theme-builder-preview-select.fl-builder-button:hover{border:none!important;border-right:2px solid #d5dadd!important}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fl-theme-builder-preview-select-title div{-ms-flex:1;flex:1}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{display:block}.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items{position:absolute;top:calc(48px + 10px);left:10px;width:calc(100% - 20px)!important;background:#fff;border-radius:4px;border:2px solid #D5DADD;border-top:3px solid #00a0d2;box-shadow:0 15px 45px 8px rgba(0,0,0,.04);margin:0!important;padding:0;z-index:-1;font-size:16px;overflow-y:scroll;height:auto!important;max-height:calc(100vh - 66px);min-height:300px;display:-ms-flexbox!important;display:flex!important;-ms-flex-direction:column;flex-direction:column}.fl-theme-builder-preview-select-item{padding:4px 0!important;border-bottom:none!important;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:initial}.fl-theme-builder-preview-select-item:hover{text-decoration:none;color:#111;background:0 0!important}body .fl-theme-builder-preview-select .fa-caret-down{float:none}body .fl-theme-builder-preview-select-item-title{padding:10px 15px;color:#222;font-size:14px}body .fl-theme-builder-preview-select .fa-caret-down i:before,body .fl-theme-builder-preview-select-item-title i:before{content:"\f078"}body .fl-theme-builder-preview-select-item-children{overflow:auto}body .fl-theme-builder-preview-select-item-child{overflow:hidden;text-overflow:ellipsis;line-height:1.1;margin:0 10px;border:2px solid transparent;border-radius:4px;padding:8px 10px 10px;font-size:14px;font-weight:400;color:#222}body .fl-theme-builder-preview-select-item-child:hover{background:#e6eaed!important}.fl-theme-builder-preview-select-item .fa-caret-down{color:#606D77}.fl-builder-bar-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex:1 1 100%;flex:1 1 100%;padding:4px}.fl-builder-bar .fl-builder-button{height:auto;margin:0 0 0 4px}.fl-builder-bar-actions .fl-builder-button:last-child{margin:0}.fl-builder-bar-actions:after{clear:both}.fl-builder-bar .fl-builder-content-panel-button{-ms-flex-align:baseline!important;align-items:baseline!important;padding-top:1px;font-weight:400}.fl-builder-content-panel-button svg{transition-property:transform;transition-duration:.25s;transform:rotate(0) scale(1);transform-origin:center}.fl-builder-content-panel-is-showing .fl-builder-content-panel-button svg{transform:rotate(135deg) scale(1.1) translate(.5px,-.5px)}.fl-builder--saving-indicator{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;padding:0 10px;font-size:12px;font-style:italic;color:#676f7a;-ms-flex-align:center;align-items:center;line-height:1.2;min-width:180px;-ms-flex-pack:end;justify-content:flex-end}.fl-builder--saving-indicator:hover{color:#676f7a}.fl-builder--saving-indicator .fa-question-circle{font-size:13px;margin:3px 0 3px 5px}.fl-builder-button.fl-builder-buy-button,.fl-builder-button.fl-builder-feedback-button,.fl-builder-button.fl-builder-upgrade-button{background:#F7A407;color:#fff!important;text-decoration:none}.fl-builder-buy-button i.fa-external-link-alt,.fl-builder-feedback-button i.fa-external-link-alt,.fl-builder-upgrade-button i.fa-external-link-alt{color:#FFC733;margin:0 0 0 6px}.fl-builder-buy-button:hover,.fl-builder-feedback-button:hover,.fl-builder-upgrade-button:hover{background:#EE8E0D;color:#fff!important}@media (max-width:980px){.fl-builder--main-menu-panel{width:calc(100% - 20px)!important}.fl-builder--main-menu-panel:before{right:auto;left:20px}.fl-builder-bar-title,.fl-theme-builder-preview-select{-ms-flex:1 .5 380px!important;flex:1 .5 380px!important}}@media (max-width:620px){.fl-theme-builder-preview-select.fl-builder-button{display:none}}@media (max-width:500px){#fl-builder-toggle-notifications,.fl-builder--main-menu-panel:before,.fl-builder--panel-arrow,.fl-builder-bar-title-area,.fl-builder-panel-drag-handle,.fl-builder-panel:before{display:none}.fl-builder--main-menu-panel,.fl-builder-panel{width:auto!important;top:44px!important;left:0!important;right:0!important;bottom:0!important;border-radius:0!important;box-shadow:none!important}.fl-builder--main-menu-panel{border-left:transparent!important;border-right:transparent!important;border-bottom:transparent!important;max-height:calc(100% - 44px)!important}.fl-builder-bar-title{-ms-flex:0 0 80px!important;flex:0 0 80px!important}.fl-builder-bar-title-caret{padding-left:0;padding-right:0;max-width:24px}.fl-builder-bar-actions{max-width:calc(100% - 80px);overflow:hidden}.fl-builder--panel-header{border-radius:0!important;cursor:default!important}.fl-builder--panel-header .fl-builder--tabs{cursor:default!important}.fl-builder-publish-actions{width:100%!important;padding-left:4px!important}.fl-builder-bar-actions .fl-builder-button{padding:0 8px!important}}.fl-notifications-panel .fl-builder-ui-post .wp-block-image,.fl-notifications-panel .fl-builder-ui-post .wp-block-image figure{margin-top:10px!important;margin-bottom:10px!important}.fl-builder--preview-actions{display:none;position:fixed;top:4px;left:4px;z-index:10000001;padding:4px;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder-preview .fl-builder--preview-actions{display:-ms-flexbox;display:flex}.fl-builder--preview-actions .device-icons{color:#555;background:#e4e4e4;border:none!important;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;text-decoration:none;font-size:14px!important;line-height:1!important;margin:0 4px 0 0;padding:0 6px;cursor:pointer;-webkit-border-radius:3px;-webkit-appearance:none;border-radius:3px}.fl-builder--preview-actions .device-icons i{margin:0 6px}@keyframes fl-builder-ui-pin-zone-pulse{0%,100%{opacity:1;filter:alpha( opacity=1 )}50%{opacity:.5;filter:alpha( opacity=35 )}}.fl-builder-ui-pin-zone{animation:fl-builder-ui-pin-zone-pulse 2s infinite;transition:width .3s ease;background:rgba(0,160,210,.5);bottom:0;top:0;position:fixed;width:35px;z-index:100001}.fl-builder-ui-show-pin-zone-left .fl-builder-ui-pin-zone-left,.fl-builder-ui-show-pin-zone-right .fl-builder-ui-pin-zone-right{width:75px}.fl-builder-ui-pin-zone-left{left:0}.fl-builder-ui-pin-zone-right{right:0}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button{display:-ms-flexbox!important;display:flex!important;background:rgba(0,160,210,.5)!important;padding:2px 4px;width:80px;animation:fl-builder-ui-pin-zone-pulse 2s infinite}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button svg{display:none}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button{width:120px}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button svg{display:none!important;width:100%;transform:none!important;fill:#00A0D2!important;border-radius:3px}.fl-builder-ui-is-pinned .fl-builder-content-panel-button,.fl-builder-ui-pinned-container .fl-lightbox-controls{display:none}.fl-builder-content-panel-pin-zone .fl-builder-done-button{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.fl-builder-panel.fl-builder-ui-pinned{top:45px!important;bottom:0!important;height:auto!important;border-radius:0;border:none;box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s;z-index:11}.fl-builder-panel.fl-builder-ui-pinned-right{left:auto!important;right:0;border-left:1px solid #eceef1}.fl-builder-panel.fl-builder-ui-pinned-left{left:0;right:auto;border-right:1px solid #eceef1}.fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-radius:0!important}.fl-builder-ui-pinned-container .fl-lightbox-wrap{position:absolute;z-index:11}.fl-builder-ui-pinned-container .fl-lightbox{position:absolute;top:0;bottom:0;left:0;right:0;width:auto!important;height:auto;border-radius:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-builder-ui-pinned-container .fl-lightbox-header-wrap{border-radius:0}.fl-builder-ui-pinned-container .fl-lightbox.ui-draggable .fl-lightbox-header{cursor:auto}.fl-builder-ui-pinned-container .fl-lightbox-header h1{padding:12px 20px 10px!important}.fl-builder-ui-pinned-content-transform{transform:scale(1);transform-origin:center top 0}.fl-builder-ui-pinned-collapse{cursor:pointer;display:none;position:absolute!important;bottom:2px;padding:5px;border:2px solid transparent;background:0 0!important;width:36px;height:36px;border-radius:4px;fill:#778794;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.fl-builder-ui-pinned-collapse:focus,.fl-builder-ui-pinned-collapse:hover{top:auto!important;background:0 0;border:2px solid transparent;outline:0;fill:#00A0D2}.fl-builder-ui-pinned-collapse:focus{background:#E4E7EA}.fl-builder-ui-pinned-collapse>*{margin:auto;line-height:1}.fl-builder-ui-pinned-collapse svg g{fill:inherit}.fl-builder-ui-is-pinned-right .fl-builder-ui-pinned-right-collapse{display:-ms-flexbox;display:flex;left:-40px}.fl-builder-ui-is-pinned-left .fl-builder-ui-pinned-left-collapse{display:-ms-flexbox;display:flex;right:-40px}.fl-builder-ui-pinned-collapse i[data-toggle=show],.fl-builder-ui-pinned-is-collapsed i[data-toggle=hide]{display:none}.fl-builder-ui-pinned-is-collapsed i[data-toggle=show]{display:block}.fl-builder--panel-no-settings,.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--panel-content,.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--panel-controls,.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--tab-wrap,.fl-builder-ui-pinned-is-collapsed .fl-builder--panel-header{display:none}.fl-builder-ui-is-pinned-left [data-toggle=hide],.fl-builder-ui-is-pinned-right [data-toggle=show]{transform:rotateY(180deg)}.fl-builder-ui-pinned-is-collapsed .fl-lightbox{box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none}.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--panel-header{background:0 0;border:none;z-index:10}.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-lightbox-wrap{top:0}.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-lightbox-header h1{padding:14px 28px 15px!important}.fl-builder-simple-pinned .fl-builder--panel-no-settings{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:absolute;top:0;left:0;right:0;bottom:0}@keyframes fl-builder-show-panel{from{transform:scale(.8)}to{transform:scale(1)}}.fl-builder--search-results-panel,.fl-builder-panel{box-sizing:border-box;position:fixed!important;right:20px;top:calc(43px + 10px);width:380px;bottom:20px;background:#F5F7F9;color:#676F7A;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;border-radius:4px;box-shadow:0 8px 40px 4px rgba(0,0,0,.3);z-index:10000007;will-change:transform;user-select:none}.fl-builder-panel{transform-origin:top right;animation-name:fl-builder-show-panel;animation-duration:.15s;animation-fill-mode:both;-ms-flex:1;flex:1;display:none}.fl-builder--search-results-panel{display:none;position:absolute;right:0;top:93px;left:0;bottom:0;width:auto!important;border:none;border-radius:0;box-shadow:none;min-height:100px;max-height:calc(100vh - 54px);overflow:auto;z-index:1}.fl-builder-content-panel-is-showing .fl-builder-panel,.fl-builder-search-results-panel-is-showing .fl-builder--search-results-panel{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.fl-builder-panel .fl-lightbox .fl-builder-panel-drag-handle,.fl-builder-ui-is-pinned .fl-builder--panel-arrow,.fl-lightbox-width-full .fl-builder-panel-drag-handle,body.fl-builder-draggable-is-dragging .fl-builder--panel-arrow{display:none}.fl-builder--search-results-panel .fl-builder--no-results{text-align:center;padding:50px 20px}.fl-builder--panel-arrow{position:absolute;top:-13px;right:10px}.fl-builder--panel-arrow polygon{fill:#00a0d2}.fl-builder--panel-header{border-top:3px solid #00a0d2;border-top-right-radius:4px;border-top-left-radius:4px}.fl-builder-ui-is-pinned .fl-builder--panel-header{border-top:none}.fl-builder-panel-drag-handle{position:absolute;top:7px;left:10px;fill:#ccd4da;width:6px}.fl-builder-ui-is-pinned-left .fl-builder-panel-drag-handle{left:auto;right:10px}.fl-builder--panel-header .fl-builder--panel-controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-content-group-select{-ms-flex:1 1;flex:1 1}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-panel-search{-ms-flex:0 0;flex:0 0;padding:0 10px 6px 0;margin-left:-4px}.fl-builder--panel-controls .fl-builder-panel-search button{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:30px;background:0 0!important;border:2px solid transparent!important;font-size:inherit;height:36px;margin:0;padding:0}.fl-builder--panel-controls .fl-builder-panel-search button:active,.fl-builder--panel-controls .fl-builder-panel-search button:focus{top:0;outline:0}.fl-builder-panel-search button svg{height:auto;width:20px}.fl-builder-panel-search button.fl-builder-dismiss-panel-search svg{width:16px}.fl-builder-panel-search button svg .filled-shape{fill:#000}.fl-builder--panel-controls .fl-builder-panel-search button:active svg .filled-shape,.fl-builder--panel-controls .fl-builder-panel-search button:focus svg .filled-shape{fill:#00A0D2}.fl-builder-panel-search .fl-builder-panel-search-input{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:#f5f7f9}.fl-builder-panel-search.is-showing-input .fl-builder-panel-search-input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0 10px 6px}.fl-builder-panel-search-input input{-ms-flex:1 1 100%;flex:1 1 100%;border:2px solid #e6eaed;background:#fff;border-radius:4px;margin:0 4px 0 0;padding:10px;color:#333}.fl-builder-panel-search-input input:focus{border-color:#0197C6;outline:0}.fl-builder-panel-content-wrap{bottom:0;height:auto;left:0;overflow:hidden;position:absolute;right:0;top:43px}.fl-builder-panel-content{padding-bottom:60px}.fl-builder--panel-view .fl-builder-blocks-section:first-child{border-top:none}.fl-builder-blocks-group:first-child{padding:20px 0 0}.fl-builder-blocks-group .fl-builder-blocks-section-group-name{display:block;padding:0 30px 15px;color:#000;font-size:20px;font-weight:600;line-height:1.4}.fl-builder-blocks-section .fl-builder-block{display:block;line-height:1.1;padding:15px 20px}.fl-builder--template-collection-section-header,.fl-builder-blocks-section .fl-builder-blocks-section-header{line-height:1.2;color:#333;margin:0!important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e7ebef;border-top:4px solid #e7ebef;height:30px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-builder-blocks-section .fl-builder-blocks-section-title{background:#F5F7F9;color:#353535;padding:2px 16px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.fl-builder-blocks-section .fl-builder-blocks-section-title i{color:#bfbfbf;float:right}.fl-builder-blocks-section-content{overflow:auto;padding:10px 10px 20px}.fl-builder-blocks-section-content:before{content:none}.fl-builder-blocks-section-content:after{float:none;clear:both}.fl-builder-blocks-section-content.fl-builder-modules,.fl-builder-blocks-section-content.fl-builder-rows,.fl-builder-blocks-section-content.fl-builder-widgets{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}@supports (display:grid){.fl-builder--template-collection-section-content,.fl-builder-blocks-section-content.fl-builder-modules,.fl-builder-blocks-section-content.fl-builder-rows,.fl-builder-blocks-section-content.fl-builder-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr))}.fl-builder--template-collection-section-content>*,.fl-builder-blocks-section-content.fl-builder-modules>*,.fl-builder-blocks-section-content.fl-builder-rows>*,.fl-builder-blocks-section-content.fl-builder-widgets>*{width:auto!important}}.fl-builder-blocks-section-content .fl-builder-block-module,.fl-builder-blocks-section-content .fl-builder-block-row{-ms-flex:1 1 50%;flex:1 1 50%;width:50%;box-sizing:border-box}.fl-builder--search-results-panel .fl-builder-blocks-section-content .fl-builder-block-module{-ms-flex:1 1 100%;flex:1 1 100%;width:100%}.fl-builder-blocks-section.fl-active .fl-builder-blocks-section-content{display:block}.fl-builder-blocks-section-content .fl-builder-block{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:13px;line-height:1.1;font-weight:400;color:#38404a}.fl-builder-block{position:relative;height:47px}.fl-builder-block.fl-builder-block-col-group{height:84px}.fl-builder-block.fl-builder-block-has-thumbnail{height:auto!important;padding:10px!important}.fl-builder-block.fl-builder-block-has-thumbnail:hover{padding:0!important}.fl-builder-block.fl-builder-block-has-thumbnail .fl-builder-block-content{position:relative!important}.fl-builder-block.fl-builder-block-has-thumbnail:hover .fl-builder-block-content{padding:10px!important}.fl-builder-block.fl-builder-block-has-thumbnail .fl-builder-block-details{margin:0 10px 4px!important}.fl-builder-block:hover{overflow:visible;z-index:1}.fl-builder-block:hover .fl-builder-block-content{display:block;box-sizing:border-box;position:absolute;top:0;left:0;width:100%;padding:15px 20px;border-radius:4px;background:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);text-decoration:none;color:#111;cursor:move;overflow:hidden}.fl-builder-blocks-node-template .fl-builder-block,.fl-builder-blocks-section-content .fl-builder-block .fl-builder-block-details{position:relative}.fl-builder-block-module:hover .fl-builder-block-content{width:auto;min-width:100%}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual{display:block;margin-bottom:7px}.fl-builder-block-drag-helper .fl-builder-block-content .fl-builder-block-visual{display:none!important}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual.fl-cols-visual{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:30px}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{-ms-flex:1 100%;flex:1 100%;background:#464a4c;height:30px;margin:0 2px;border-radius:2px}.fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#000}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:first-child{margin-left:0!important}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:last-child{margin-right:0!important}.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:last-child,.fl-cols-visual.left-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.right-sidebar .fl-cols-visual-col:last-child{-ms-flex-preferred-size:60px;flex-basis:60px}.fl-builder-block-saved-column.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-column:hover .fl-builder-block-title,.fl-builder-block-saved-module.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-module:hover .fl-builder-block-title,.fl-builder-block-saved-row.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-row:hover .fl-builder-block-title,.fl-builder-touch .fl-builder-block-saved-column .fl-builder-block-title,.fl-builder-touch .fl-builder-block-saved-module .fl-builder-block-title,.fl-builder-touch .fl-builder-block-saved-row .fl-builder-block-title{margin-right:70px}.fl-builder-block-module:nth-child(even):hover .fl-builder-block-content{left:auto;right:0}.fl-builder-block-thumbnail{border-radius:4px;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:rgba(0,0,0,.06);margin-bottom:10px;transform-origin:bottom;transition-property:transform,box-shadow;transition-duration:.15s}.fl-builder-block:hover .fl-builder-block-thumbnail{transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder-block .fl-builder-block-icon{margin-right:7px;fill:#000;display:inline-block;width:20px;height:20px;vertical-align:middle}.fl-builder-block-thumbnail:before{content:"";display:block;padding-top:50%}.fl-builder-block-thumbnail img{max-width:100%;max-height:160px;margin:0;-o-object-fit:cover;object-fit:cover}.fl-builder-blocks-section-content .fl-builder-block{box-shadow:0 0 0 transparent;transition-property:box-shadow;transition-duration:.15s}.fl-builder-blocks-section-content .fl-builder-block i,.fl-user-template-actions i{color:#000;margin-right:10px}.fl-builder-blocks-separator{background:#f1f1f1;height:6px}.fl-builder-block:hover .fl-builder-badge{background:#2ea2cc}.ui-sortable-helper .fl-builder-badge{display:none!important}.fl-builder-modules-cta a{color:#999!important;display:block!important;font-size:12px!important;font-style:italic!important;padding:15px 20px!important;line-height:16px!important}.fl-builder-modules-cta a:hover{background:#e5e5e5!important;color:#666!important;text-decoration:none!important}.fl-builder-modules-cta a:focus{text-decoration:none!important}.fl-builder-modules-cta .fa{float:right!important;font-size:14px!important;margin:3px 0 0 9px!important}.fl-builder--panel-message{text-align:center;padding:40px 20px;font-size:16px}.fl-builder--panel-message .fl-builder-button{display:inline-block;padding:10px}.fl-builder--panel-cta{padding:20px 30px;font-size:16px;text-align:center}.fl-builder--panel-cta a{color:inherit;text-decoration:none}.fl-builder--panel-cta a:hover{text-decoration:none}.fl-builder-block-template-image{margin:5px 0 10px;max-width:100%;border:1px solid #dfdfdf}.fl-builder-block .fl-builder-block-title{overflow:hidden;text-overflow:ellipsis;vertical-align:middle;line-height:1.3}.ui-sortable-helper .fl-builder-block-template-image{display:none!important}@keyframes fl-builder-template-item-enter{from{transform:translateY(100px) scale(.3);opacity:0}to{transform:scale(1);opacity:1}}.fl-builder--template-collection{clear:both;padding:10px 0}.fl-builder--template-collection-section-content{padding:0 10px}.fl-builder--template-collection-item{box-sizing:border-box;width:50%;float:left;padding:10px;cursor:pointer;font-size:13px;transform-origin:center;opacity:1}.fl-builder--template-thumbnail{background-size:cover;background-clip:content-box;background-position:center top;background-color:#fff;border:2px solid transparent;transform-origin:bottom;transition-property:transform,box-shadow;transition-duration:.15s}.fl-builder--template-collection-item[data-id="0"] .fl-builder--template-thumbnail,.fl-user-template .fl-builder--template-thumbnail{border-color:#e4e7ea}.fl-builder--template-thumbnail:before{display:block;content:"";padding-top:120%}.fl-builder--template-thumbnail:hover{transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder--template-name{text-align:center;padding:4px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fl-builder--template-collection-section{padding-bottom:10px;border-bottom:1px solid #dfdfdf}.fl-builder--template-collection-section:last-child{border-bottom:none}.fl-builder--template-collection-section:after,.fl-builder--template-collection-section:before{content:"";display:block;clear:both}.fl-builder--template-collection-section-name{padding:15px 10px 10px}span.fl-builder-block-no-node-templates{display:block;padding:15px 20px;text-align:center}span.fl-builder-block-no-node-templates:hover{cursor:default}.fl-builder-blocks-section-content .fl-builder-node-template-actions{bottom:0;cursor:default;display:none;position:absolute;right:0;top:0}.fl-builder-blocks-section-content .fl-builder-node-template-actions a:hover{text-decoration:none}.fl-builder-blocks-section-content .fl-builder-node-template-delete,.fl-builder-blocks-section-content .fl-builder-node-template-edit{display:inline;cursor:pointer;margin:0;padding:15px 10px;text-align:center;width:30px}.fl-builder-block-details .fl-builder-node-template-delete,.fl-builder-block-details .fl-builder-node-template-edit{padding-top:0!important}.fl-builder-blocks-section-content .fl-builder-node-template-delete i,.fl-builder-blocks-section-content .fl-builder-node-template-edit i{color:#676F7A;margin:0}.fl-builder-blocks-section-content .fl-builder-node-template-delete:hover i,.fl-builder-blocks-section-content .fl-builder-node-template-edit:hover i{color:#444}.fl-builder-blocks-node-template .fl-builder-block:hover .fl-builder-node-template-actions,.fl-builder-touch .fl-builder-blocks-section-content .fl-builder-node-template-actions{display:block}.ui-sortable-helper .fl-builder-node-template-delete,.ui-sortable-helper .fl-builder-node-template-edit{display:none!important}.fl-builder--tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.fl-builder-panel .fl-builder--panel-header{cursor:move}.fl-builder-panel .fl-builder--tabs{-ms-flex-pack:distribute;justify-content:space-around;padding:4px 24px;cursor:pointer}.fl-builder--tab-wrap{-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:justify;justify-content:space-between;margin:auto;max-width:400px}.fl-builder--tabs button,.fl-builder--tabs button:active,.fl-builder--tabs button:focus,.fl-builder--tabs button:hover{-ms-flex:1 1 100%;flex:1 1 100%;display:inline-block;text-decoration:none;text-transform:none;color:inherit;text-align:center;letter-spacing:normal!important;margin:0;padding:5px;cursor:pointer;font-size:13px!important;font-weight:500!important;line-height:1.3!important;background:0 0!important;outline:0!important;border:2px solid transparent;border-radius:4px;min-height:36px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;top:0;transition-property:background,color;transition-duration:.25s}.fl-builder--tabs button:focus{background:#e6eaed!important}.fl-builder--tabs button.is-showing{color:#0086b0}.fl-builder--panel-content{-ms-flex:1;flex:1}.fl-builder--panel-view{display:none;overflow:hidden}.fl-builder--panel-view.is-showing{display:block}.fl-builder--content-library-panel.ui-draggable-dragging{height:500px!important}.fl-builder--content-library-panel .fl-builder-drop-zone{display:none!important}.fl-builder--panel-header .fl-builder--tabs{cursor:move}.fl-builder--category-select{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.fl-builder--selector-display{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-ms-flex-pack:justify;justify-content:space-between;color:#161B20;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;cursor:pointer;font-size:13px;font-weight:700;line-height:16px;border-radius:4px;-ms-flex-align:stretch;align-items:stretch}.fl-builder--selector-display-label{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;font-size:inherit;line-height:inherit;width:100%;margin:0!important;padding:0!important;color:#6D6D6D;background:0 0!important;border:2px solid transparent;box-shadow:0 1px 2px 0 rgba(0,0,0,.12)!important;border-radius:4px;font-family:inherit;text-transform:none}.fl-builder--selector-display-label:hover{top:0;color:inherit;background:0 0!important;border:2px solid transparent;border-radius:4px}.fl-builder--selector-display-label:active{top:0;color:inherit;background:0 0;border:2px solid #e4e7ea;border-radius:4px}.fl-builder--selector-display-label:focus{top:0;color:inherit;background:0 0;border:2px solid #00A0D2;outline:0}.fl-builder--group-label{color:inherit;-ms-flex:0 0 auto;flex:0 0 auto;padding:4px 12px 4px 10px;background:#e7ebef;border-radius:3px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.fl-builder--current-view-name{-ms-flex:1 1 100%;flex:1 1 100%;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;padding:8px 10px;text-align:left}.fl-builder--selector-menu{display:none;color:#293138;position:absolute;top:46px;left:0;width:100%;background:#fff;border-radius:4px;box-shadow:0 0 20px 2px rgba(0,0,0,.2);overflow:visible;z-index:2}.fl-builder--selector-menu:before{bottom:100%;right:8px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}.fl-builder--category-select.is-showing .fl-builder--selector-menu{display:-ms-flexbox;display:flex;max-height:calc(100vh - 150px)}.fl-builder--category-select.is-showing .fl-builder--selector-menu .fl-builder--menu{margin:10px 0;-ms-flex:1 100%;flex:1 100%;overflow:auto}button.fl-builder-button.fl-builder-bar-title-caret{margin:4px}button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#e6eaed!important;border-color:transparent!important}.fl-builder--category-select.is-showing .fl-builder-bar-title-caret i{transform:rotate(180deg)}.fl-builder--menu{margin-bottom:2px}.fl-builder--menu>a,.fl-builder--menu>button,.fl-builder--menu>span{display:block;padding:8px 10px 10px;border-radius:4px;color:inherit;text-decoration:none;background:0 0!important;border:2px solid transparent!important;font-weight:400;font-family:inherit}.fl-builder--menu>a:active,.fl-builder--menu>a:focus,.fl-builder--menu>a:hover,.fl-builder--menu>button:active,.fl-builder--menu>button:focus,.fl-builder--menu>button:hover{background:#e6eaed!important;border:2px solid transparent!important;top:0}.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging,.fl-builder-drop-zone,.fl-builder-empty{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-builder--menu>a:focus,.fl-builder--menu>button:focus{outline:0;color:inherit;text-decoration:none}.fl-builder--menu .fl-has-children>svg{float:right;margin:0 7px 0 0;height:16px;width:9px;transition-property:transform;transition-duration:.15s;transform:rotate(-90deg)}.fl-builder--menu .fl-has-children.fl-has-children-showing>svg{transform:rotate(0)}.fl-builder--menu .fl-inset{display:none;padding-left:35px;font-size:14px;line-height:1.25}.fl-builder--menu a.fl-template-collection{color:#161B20}.fl-builder--menu>:after{clear:both}.fl-builder--menu * .fl-builder--menu-item-accessory{float:right;color:#000;text-transform:uppercase;text-align:center;min-width:20px;letter-spacing:2px}.fl-builder--menu * .fl-builder--menu-item-accessory i{font-size:1em;margin-top:2px}.fl-builder--menu hr::after,.fl-builder--menu hr::before{display:none!important;content:none!important;height:auto}.fl-builder--menu .fl-builder-video-wrap iframe{display:block;margin:4px 0;width:100%}.fl-builder-publish-actions{display:-ms-flexbox;display:flex;box-sizing:border-box;position:absolute;top:0;right:0;width:380px;max-width:100%;height:44px;padding:4px 4px 4px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;opacity:1;pointer-events:auto;transform:scaleX(1) translateX(0);transform-origin:right;transition-property:transform,opacity;transition-duration:.15s}.fl-builder-publish-actions.is-hidden{transform:scaleX(.23) translateX(68px);opacity:0;pointer-events:none}.fl-builder-bar .fl-builder-button-group{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:100%;flex-basis:100%}.fl-builder-bar .fl-builder-button-group>.fl-builder-button{border-radius:0;margin-left:0;-ms-flex:1 0 auto;flex:1 0 auto;text-align:center;-ms-flex-pack:distribute;justify-content:space-around;box-shadow:none}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.fl-builder-publish-actions-click-away-mask{display:none;position:fixed;top:0;left:0;right:0;height:100vh;background:0 0}.fl-builder-dragging .fl-builder-content:not(.fl-builder-empty){padding:16px 0}.fl-builder-empty{display:none;border:2px dashed #969696;border-radius:8px;color:#909090;font-size:20px;font-weight:700;margin:10px;padding:250px 20px;position:relative;text-align:center;text-transform:uppercase}.fl-builder-drop-zone,.fl-builder-has-submenu>ul.fl-builder-submenu li a{font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fl-builder-edit .fl-builder-empty{display:block}.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging{background:rgba(255,255,255,.95)!important;border:2px solid #000;border-radius:4px;box-shadow:0 0 8px rgba(0,0,0,.2);-moz-box-shadow:0 0 8px rgba(0,0,0,.2);-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);color:#333!important;font-size:13px!important;height:47px!important;line-height:40px!important;overflow:hidden;padding:0 20px;position:absolute!important;text-overflow:ellipsis;white-space:nowrap;width:180px!important;z-index:100010!important;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:start;justify-content:flex-start}.fl-builder-block.fl-builder-block-drag-helper:hover{padding:0;box-shadow:none}.fl-builder-block-drag-helper:hover .fl-builder-block-content{position:static;padding:0 20px}.fl-col-has-highlight-guide .fl-col-content,.fl-col-highlight,.fl-row-highlight .fl-col-group{position:relative}.fl-builder-block-saved-column.fl-builder-block-drag-helper:hover .fl-builder-block-content,.fl-builder-block-saved-module.fl-builder-block-drag-helper:hover .fl-builder-block-content,.fl-builder-block-saved-row.fl-builder-block-drag-helper:hover .fl-builder-block-content{padding:14px 20px}.fl-builder-block-drag-helper .fl-builder-block-icon{fill:#000;margin-top:-10px}.fl-builder-drop-zone{animation:fl-builder-drop-zone-pulse 2s infinite;background:#00A2D7;border-radius:4px;color:#fff!important;display:block;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;text-shadow:none;text-transform:none;z-index:10}@keyframes fl-builder-drop-zone-pulse{0%,100%{background-color:#00A2D7}50%{background-color:#79DEFF}}.fl-builder-drop-zone-global{animation:fl-builder-drop-zone-global-pulse 2s infinite;background:#ff9600}@keyframes fl-builder-drop-zone-global-pulse{0%,100%{background-color:#FFBC5C}50%{background-color:#ff9600}}.fl-builder-content>.fl-builder-drop-zone{margin:10px 20px}.fl-row-content>.fl-builder-drop-zone{margin:3px 7px}.fl-col-has-cols>.fl-col-content>.fl-builder-drop-zone{margin:3px 10px}.fl-sortable-disabled>.fl-builder-drop-zone{display:none!important}.fl-col-group-equal-height.fl-col-group-align-center .fl-col-content>.fl-builder-drop-zone{width:100%}.fl-row-highlight{padding:16px 0}.fl-row-highlight .fl-row-content{border:2px dashed rgba(203,205,206,.5);padding:8px;border-radius:6px}.fl-row-highlight.fl-node-global .fl-row-content{border-color:#ff9600}.fl-col-highlight{padding:8px}.fl-col-highlight .fl-col-content{border-style:dashed!important;border-color:#00a0d2!important;border-radius:4px;min-height:100px;overflow-x:hidden;border-width:2px!important}.fl-col-has-cols.fl-col-highlight>.fl-col-content{padding:8px}.fl-col-highlight.fl-node-global .fl-col-content{border-color:#ff9600!important}.fl-builder-simple .fl-col-highlight .fl-col-content{border:none!important}.fl-col-highlight-guide{background:rgba(0,160,210,.05);border:2px solid #00A0D2;border-radius:4px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;z-index:1}.fl-node-global .fl-col-highlight-guide{border-color:#ff9600!important;background-color:rgba(255,150,0,.06)!important}.fl-col-has-highlight-guide .fl-block-overlay{background:0 0;border-color:transparent}.fl-col-has-highlight-guide .fl-block-col-resize{display:none}.fl-col-has-highlight-guide .fl-col-highlight .fl-col-content{border-color:transparent!important}.fl-col-drop-target{bottom:8px;display:none;left:-9px;position:absolute;top:8px;width:18px;z-index:1}.fl-col-highlight .fl-col-drop-target{display:block}.fl-col-drop-target-last{left:auto;right:-9px}.fl-col-drop-target .fl-builder-drop-zone{bottom:0;left:2px;margin:0;padding:0;position:absolute;right:2px;top:0}.fl-col-group-drop-target{display:none;left:8px;height:18px;position:absolute;right:8px;top:-9px;z-index:1}.fl-row-highlight .fl-col-group-drop-target{display:block}.fl-col-group-drop-target-last{top:auto;bottom:-9px}.fl-col-group-drop-target .fl-builder-drop-zone{bottom:2px;left:0;margin:0;padding:0;position:absolute;right:0;top:2px}.fl-row-content>.fl-col-group-drop-target{position:static}.fl-row-content>.fl-col-group-drop-target .fl-builder-drop-zone{height:18px;position:static}.fl-row-drop-target{display:none;left:0;height:24px;margin-top:-28px;position:absolute;right:0;z-index:1}.fl-row-highlight .fl-row-drop-target{display:block}.fl-row-drop-target-last{margin-top:4px}.fl-row .fl-row-drop-target .fl-builder-drop-zone{bottom:0;left:4px;margin:0;position:absolute;right:4px;top:0}.fl-builder-content>.fl-row-drop-target{margin:0;position:static}.fl-builder-dragging .fl-builder-content.fl-builder-empty>.fl-row-drop-target{bottom:10px;display:block;height:auto;left:0;position:absolute;right:0;top:10px}.fl-builder-content .fl-row-drop-target .fl-builder-drop-zone{margin-bottom:0;margin-top:0}.fl-col-group:focus,.fl-col:focus,.fl-module:focus,.fl-row:focus{outline:0}.fl-sortable-proxy{display:none}.fl-block-overlay,.fl-block-overlay *{text-shadow:none;-webkit-touch-callout:none;transition-property:border-color;transition-duration:.3s}.fl-block-overlay-active{position:relative}.fl-block-overlay-actions{background:#00A0D2;float:left;height:30px;margin:-1px -1px 0;padding:0 4px;text-shadow:none;border-bottom-right-radius:5px;border-top-left-radius:3px;transition-property:background-color;transition-duration:.3s}.fl-row-overlay-header-bottom .fl-block-overlay-actions{border-radius:0 5px 0 3px}.fl-builder-col-resizing .fl-block-overlay-actions,.fl-builder-row-resizing .fl-block-overlay-actions{overflow:hidden}.fl-block-overlay-actions>span{display:block;float:left}.fl-block-overlay-actions i{color:#fff!important;cursor:pointer;display:block!important;float:left;font-size:16px!important;height:28px!important;line-height:28px!important;opacity:.8;filter:alpha(opacity=80);text-align:center;width:32px!important}.fl-block-overlay-actions i:hover{opacity:1;filter:alpha(opacity=100)}.fl-block-overlay-actions>i:first-child{padding-left:4px}.fl-block-overlay-actions>i:last-child{padding-right:2px}.fl-block-overlay-actions .fl-block-move{cursor:move}.fl-block-has-rules{color:#00A0D2!important;cursor:pointer;padding:7px;position:absolute;right:0;top:0}.fl-block-has-rules.logic{color:red!important}.fl-block-overlay-title,.fl-builder-has-submenu>ul.fl-builder-submenu li a{color:#fff!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-block-overlay-title{float:left;font-size:14px;height:30px;line-height:29px;margin-right:2px;padding:0 12px 0 8px}.fl-col-overlay,.fl-module-overlay,.fl-row-overlay{background:rgba(190,239,255,0);color:#fff}.fl-builder-touch .fl-block-overlay-actions{height:32px}.fl-builder-touch .fl-block-overlay-actions i{font-size:20px!important;height:32px!important;line-height:32px!important;width:38px!important}.fl-row-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:0;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;left:0;position:absolute;top:-33px;right:0;z-index:100006}.fl-row-overlay.fl-row-menu-active,.fl-row-overlay.fl-row-menu-active.fl-block-overlay.fl-block-overlay-global{z-index:100007}.fl-row-full-width .fl-row-overlay{left:2px;right:2px;bottom:2px}.fl-row-overlay-header-bottom{bottom:-32px!important;top:0}.fl-row-overlay-header-bottom .fl-block-overlay-header{position:absolute;bottom:0}.fl-block-overlay-active .fl-row-content-wrap{position:relative}.fl-block-overlay-active .fl-row-content{position:relative;z-index:100007!important}.fl-builder-row-resizing .fl-col.fl-block-overlay-active,.fl-builder-row-resizing .fl-module.fl-block-overlay-active{position:static}.fl-col-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:8px;cursor:pointer;left:8px;position:absolute;right:8px;top:8px;z-index:100008}.fl-module-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:4px;cursor:pointer;left:4px;min-height:32px;position:absolute;right:4px;top:4px;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-module-overlay{cursor:default}.fl-module-adjust-height{padding-bottom:15px;padding-top:15px}.fl-col-bg-overlay .fl-block-overlay-active.fl-module{z-index:100008}.fl-block-overlay-global{background:rgba(255,150,0,0);border:2px solid #F7A407;border-radius:4px}.fl-block-overlay-global .fl-block-overlay-actions{background:#F7A407}.fl-block-overlay-title-global{background:#fff;color:#ff9600!important;font-size:11px;letter-spacing:1px;margin-left:4px;padding:2px 4px;vertical-align:top}.fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:pointer;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-row-overlay{cursor:default}.fl-builder-row-template .fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:default;z-index:100006}.fl-block-overlay-global.fl-row-overlay .fl-block-col-resize{display:none}.fl-block-overlay-muted .fl-row-overlay{background:rgba(85,93,102,0);border:2px solid #555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-overlay-actions{background:#555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-has-rules{color:#555D66!important}.fl-block-overlay-muted .fl-row-overlay .fl-block-col-resize{display:none}.fl-node-disabled .fl-row-content-wrap,.fl-node-disabled>.fl-col-content{opacity:.3}.fl-block-col-resize{bottom:0!important;position:absolute;top:0!important;width:6px}.fl-block-col-resize-e{cursor:ew-resize;left:auto!important;right:-2px!important}.fl-block-col-resize-w{cursor:ew-resize;left:-7px!important}.fl-block-col-resize-handle-wrap{margin:-4px 0 0 -5px;padding:0 5px;position:absolute;top:50%!important}.fl-block-col-resize-e .fl-block-col-resize-handle-wrap{margin-left:-6px}.fl-block-col-resize-handle{background:#fff;border:2px solid #00A0D2;border-radius:50%;height:12px;width:12px}.fl-node-global .fl-block-col-resize-handle{border-color:#ff9600}.fl-block-col-resize-feedback{color:#333!important;display:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:11px!important;position:absolute}.fl-block-col-resize-feedback-left,.fl-block-col-resize-feedback-right{background:#fff;border:1px solid #3ba0ff;padding:2px 4px}.fl-block-col-resize-feedback-left{right:20px;top:-7px}.fl-block-col-resize-feedback-right{left:20px;top:-7px}.fl-builder-has-submenu{position:relative}.fl-builder-has-submenu>ul.fl-builder-submenu{background:#00A0D2;box-shadow:0 0 20px rgba(0,0,0,.2);border-radius:0 4px 4px;display:none;left:0;list-style:none;margin:0;padding:6px 0;position:absolute;text-align:left;top:100%;width:165px;z-index:100008}.fl-builder-has-submenu>ul.fl-builder-submenu li{list-style:none;margin:0;padding:0}.fl-builder-submenu-right ul.fl-builder-submenu{left:auto;right:0}.fl-builder-has-submenu.fl-builder-submenu-open>ul.fl-builder-submenu{display:block}.fl-builder-has-submenu>ul.fl-builder-submenu li a{border-bottom:0 none;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;display:block;line-height:13px;font-size:13px;opacity:.8;filter:alpha(opacity=80);padding:6px 12px;text-decoration:none}.fl-builder-has-submenu>ul.fl-builder-submenu li a:hover{background:#0197C6;color:#fff;opacity:1;filter:alpha(opacity=100);text-decoration:none}.fl-builder-actions-title,.fl-builder-alert-lightbox .fl-lightbox-message,.fl-builder-alert-lightbox .fl-lightbox-message-info{color:#333!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px!important}.fl-builder-has-submenu .fl-builder-submenu .fa,.fl-builder-has-submenu .fl-builder-submenu .far,.fl-builder-has-submenu .fl-builder-submenu .fas{float:right;height:12px!important;line-height:12px!important;position:relative;right:-5px;width:14px!important}.fl-builder-has-submenu .fl-builder-has-submenu .fl-builder-submenu{display:none;left:100%;top:0}.fl-builder-has-submenu .fl-builder-submenu-right.fl-builder-has-submenu .fl-builder-submenu{left:auto;right:100%}.fl-builder-has-submenu .fl-builder-has-submenu:hover .fl-builder-submenu{display:block}.fl-builder-submenu-sep{padding:7px 0!important}.fl-builder-submenu-sep div{border-bottom:1px solid rgba(255,255,255,.4)}.fl-block-col-move,.fl-block-col-move-parent{cursor:move;position:relative}.fl-builder-submenu .fa-arrows-alt{cursor:move;display:none!important}.fl-builder-submenu a:hover .fa-arrows-alt{display:block!important;float:right;line-height:12px!important;height:12px!important}.fl-block-overlay-global ul.fl-builder-submenu{background:#ff9600!important}.fl-block-overlay-global ul.fl-builder-submenu li a:hover{background:#fa3}.fl-builder-actions-lightbox .fl-lightbox{display:block;width:300px;border-radius:4px}.fl-builder-actions-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-actions-lightbox .fl-builder-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:25px;text-align:center}.fl-builder-actions-title{display:block;margin-bottom:20px}.fl-builder-actions .fl-builder-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin-bottom:7px;min-height:36px}.fl-builder-alert-lightbox{padding:20px;z-index:30000000;top:0;pointer-events:auto}.fl-builder-alert-lightbox .fl-lightbox{max-width:440px;width:auto}.fl-builder-alert-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-alert-lightbox .fl-lightbox-message,.fl-builder-alert-lightbox .fl-lightbox-message-info{line-height:24px;padding:30px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox{max-width:60%}.fl-lightbox-width-slim .fl-compound-field,.fl-lightbox-width-slim .fl-dimension-field-units{max-width:none}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-content{padding:20px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-message{padding:10px 20px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-message h1{font-size:20px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-message p{font-size:14px;padding-top:5px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .link{color:#428bca;text-decoration:underline}.fl-builder-alert-lightbox .fl-lightbox-message-info{padding:0 20px;font-size:14px!important}.fl-builder-alert-lightbox .fl-lightbox-message-info p{line-height:20px;padding:10px 0 0 10px}.fl-builder-alert-lightbox .fl-lightbox-message-info a{font-size:14px}@keyframes fl-builder-content-section-entry{from{transform:translateY(150px) translateX(100px) scale(.3);opacity:0}to{transform:translateY(0) translateX(0) scale(1);opacity:1}}.fl-template-category-select{width:180px!important}.fl-template-selector .fl-builder-settings-section{margin:0 0 10px}.fl-template-selector .fl-builder-settings-fields{height:470px}.fl-template-selector .fl-builder-settings-tab{width:560px}.fl-template-selector .fl-builder-settings-tab-description{font-size:15px!important;margin:0!important;padding:10px 0 25px;text-align:center}.fl-template-preview{float:left;margin:0 25px 30px 0;position:relative;text-align:center;width:170px}.fl-template-preview.fl-last{margin-right:0}.fl-template-image{border:1px solid #d9d9d9;cursor:pointer;margin-bottom:12px;height:164px;overflow:hidden}.fl-template-image:hover{border-color:red}.fl-template-image img{max-height:none;width:100%}.fl-template-preview span{display:block;text-align:center}.fl-user-template-category-name{background:#f2f2f2;border-bottom:3px solid #dfdfdf;border-top:2px solid #dfdfdf;font-weight:700;padding:8px 15px}.fl-user-templates{border-bottom:1px solid #dfdfdf;padding:10px 0 20px}.fl-builder--user-templates-section-content{border-bottom:2px solid #e6eaed;padding:10px}.fl-builder--user-templates-section-content:first-child{padding-top:0}.fl-builder--user-templates-section-content:last-child,.fl-user-templates:last-child{border-bottom:none}.fl-builder--user-templates-section-name{font-weight:700;font-size:16px;color:#333;z-index:9999;padding:15px 10px;margin:0 10px}@keyframes fl-list-item-entry{from{opacity:0;transform:scale(.5) translateY(100px)}to{opacity:1;transform:scale(1) translateY(0)}}.fl-builder--save-new-user-template,.fl-user-template{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:16px;font-weight:200;line-height:1.1;padding:10px 20px;color:#6d6d6d}.fl-user-template:hover{cursor:pointer;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.08);text-decoration:none;color:#111;padding-right:68px}.fl-user-template-name{overflow:hidden;text-overflow:ellipsis;-ms-flex:1;flex:1}.fl-user-template-actions{display:none;bottom:0;position:absolute;right:0;top:0}.fl-user-template:hover .fl-user-template-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.fl-user-template-actions a{display:inline-block;padding:15px 0;width:30px}.fl-user-template:hover a:hover i{color:#444!important}.fl-user-templates-message{display:none}.fl-user-template-thumbnail{-ms-flex:0;flex:0;margin-right:20px}.fl-user-template-thumbnail .fl-builder--template-thumbnail{background-size:cover;background-position:center top;width:45px}.fl-user-template-thumbnail .fl-builder--template-thumbnail:hover{box-shadow:none;transform:scale(1);transition-property:none}.fl-builder--save-new-user-template .fl-user-template-thumbnail .fl-builder--template-thumbnail{border-style:dashed;border-width:2px;border-color:#ccd4da}.fl-builder--save-new-user-template .fl-save-control{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex:1;flex:1}.fl-builder--save-new-user-template .fl-save-control input{background:0 0;border:none!important;-ms-flex:1;flex:1;font-size:16px;margin-right:10px;margin-left:-12px;color:#000}.fl-builder--save-new-user-template .fl-save-control input::-webkit-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input::-moz-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-ms-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-moz-placeholder{color:#777}@keyframes fl-slide-in-right{from{transform:translateX(50px)}to{transform:translateX(0)}}.fl-builder--save-new-user-template .fl-save-control button{display:none;animation-name:fl-slide-in-right;animation-duration:.25s;background-color:#00a0d2;border:none;padding:0 15px}.fl-save-control-mask{display:none;background:0 0;position:absolute;top:-50px;left:0;bottom:0;right:0;z-index:-1;min-height:80vh}.fl-builder-templates-cta{margin-bottom:20px}.fl-builder-templates-cta p{display:inline-block!important;width:75%!important;font-size:14px!important;line-height:1.5!important;margin-bottom:0!important}.fl-builder-templates-cta .fl-builder-upgrade-button{font-size:13px!important;line-height:13px!important;position:relative;top:8px;left:15px;padding:1px 12px}.fl-builder-settings-message,.fl-builder-settings-message *{font-size:15px!important;line-height:23px!important}.single-fl-builder-template .fl-content{width:100%!important}form.fl-builder-settings{height:100%;margin:0;padding:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.fl-builder-settings-message{padding:20px 25px!important;background:#f2f2f2!important}.fl-builder-preview-loader{position:relative;top:-2px;margin-left:3px}.fl-lightbox-header .fl-builder-preview-loader{margin:0;position:absolute;right:40px;top:15px}@keyframes fl-grab-attention{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}.fl-lightbox-width-slim .fl-form-table{margin:10px 12px 10px 10px!important;width:calc(100% - 40px)}.fl-lightbox-width-slim.fl-lightbox .fl-form-table th{display:block;position:relative;padding:10px 0 0 12px!important;width:auto!important}.fl-lightbox-width-slim .fl-form-table td{display:block}.fl-lightbox-width-slim .fl-form-table .fl-field[data-type=editor] td:first-child,.fl-lightbox-width-slim .fl-form-table td:first-child{padding-left:0!important}.fl-field-label .fl-field-responsive-toggle,.fl-lightbox-width-slim .fl-field-control-wrapper .fl-field-responsive-toggle{display:none}.fl-lightbox-width-slim .fl-field-label .fl-field-responsive-toggle{display:inline-block;padding:0 5px!important}.fl-lightbox-width-slim input.text-full+.fl-field-description,.fl-lightbox-width-slim select+.fl-field-description{display:block;padding:8px 10px;margin:0}.fl-lightbox-width-slim .fl-builder-settings-fields select{width:100%}.fl-lightbox-width-slim .fl-color-picker{display:-ms-flexbox;display:flex;width:auto}.fl-lightbox-width-slim .fl-color-picker-clear{-ms-flex:0 0 40px;flex:0 0 40px}.fl-lightbox-width-slim .fl-field[data-type=dimension] .fl-field-responsive-setting{width:100%}.fl-lightbox-width-slim .fl-dimension-field-unit-select select{width:auto!important}.fl-lightbox-width-slim .fl-gradient-picker-color-row{width:50%}.fl-lightbox-width-slim .fl-color-picker.fl-gradient-picker-color,.fl-lightbox-width-slim .fl-typography-field-align .fl-button-group-field-option{width:100%}.fl-lightbox-width-slim .fl-typography-field-align .fl-button-group-field-options{float:none}.fl-lightbox-width-slim .mce-menubtn.mce-fixed-width button{width:72px!important}.fl-lightbox-width-slim .fl-builder-settings-tab-description{margin:20px 10px}.fl-lightbox-width-micro .mce-menubtn.mce-fixed-width button{width:38px!important}.fl-lightbox-width-micro .mce-btn[aria-label=Fullscreen],.fl-lightbox-width-micro .mce-btn[aria-label=Blockquote]{display:none}.fl-lightbox-width-micro .mce-toolbar i.mce-ico{width:18px}.fl-lightbox-width-slim .fl-field[data-type=editor] .fl-field-control-wrapper,.fl-lightbox-width-slim .fl-field[data-type=code] .fl-field-control-wrapper{margin-left:-10px;margin-right:-30px}.fl-lightbox .wp-editor-tools{padding-left:6px;padding-right:28px}.fl-lightbox .mce-top-part::before{box-shadow:none!important}.mce-container .mce-stack-layout span{color:initial}.fl-lightbox div.mce-toolbar-grp{background:0 0;border:none}.fl-lightbox div.mce-toolbar-grp>div{padding:0 3px}.fl-lightbox .fl-builder-settings .wp-switch-editor{background:#e7ebef;border:1px solid transparent}.fl-lightbox .html-active .switch-html,.fl-lightbox .quicktags-toolbar,.fl-lightbox .tmce-active .switch-tmce{background:#fff}.fl-lightbox .quicktags-toolbar,.fl-lightbox .wp-editor-container{border:none}.fl-lightbox .mce-toolbar .mce-container-body{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-lightbox-width-slim .mce-toolbar .mce-container-body{-ms-flex-pack:center;justify-content:center}.fl-lightbox textarea.wp-editor-area{line-height:1.5;padding:20px;width:calc(100% - 10px)}.fl-lightbox .wp-core-ui .button,.fl-lightbox .wp-core-ui .button-secondary{border:none;box-shadow:none;background:#e7ebef}.fl-lightbox-width-slim .fl-shadow-field .fl-dimension-field-units{width:auto}.fl-lightbox-width-slim .fl-shadow-field .fl-dimension-field-units input{max-width:none;width:100%!important}.fl-lightbox-width-slim .fl-builder-field-multiple{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-control,.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-label{width:100%!important}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-form-field-preview-text{max-width:225px}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-builder-field-actions{position:absolute!important;top:0;right:0;width:70px;z-index:1}.fl-lightbox-width-slim .fl-builder-field-actions-single .fl-builder-field-copy{float:right!important;margin-right:5px}.fl-lightbox-width-slim .fl-field[data-type=time] select{width:auto}.fl-builder-settings-tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;overflow:hidden;height:32px;background:#e7ebef}.fl-builder-content-group-select{padding:0 10px 6px;display:none}.fl-builder-content-group-select select{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;padding:8px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;border:2px solid #e4e7ea;color:#161B20}select:focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;outline:0!important}.fl-legacy-settings-tab{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings-tab:first-child .fl-legacy-settings-tab{background:0 0;height:auto}body .fl-builder-settings-tabs>*{box-sizing:border-box;color:#676F7A!important;fill:#676F7A!important;background:0 0;border:2px solid transparent;border-radius:0;margin:0;outline:0;padding:1px 16px;text-decoration:none!important;font-size:13px;font-weight:400!important;-ms-flex:0 0 auto;flex:0 0 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.fl-builder-custom-field a,.fl-builder-settings-tab-description a{text-decoration:underline!important}body .fl-lightbox-width-slim .fl-builder-settings-tabs>*{-ms-flex:1 1 auto;flex:1 1 auto}body .fl-builder-settings-tabs>.fl-builder-settings-tabs-more{-ms-flex:0 0 60px;flex:0 0 60px;display:none;margin-left:auto;-ms-flex-pack:center;justify-content:center}.fl-builder-settings-tabs-more svg{width:16px;height:auto;margin:auto}.fl-builder-settings-tabs-more g,.fl-builder-settings-tabs-more path,.fl-builder-settings-tabs-more svg{fill:inherit}body .fl-lightbox-has-tab-overflow .fl-builder-settings-tabs-more{display:-ms-flexbox;display:flex}.fl-builder-settings-tabs>:active,.fl-builder-settings-tabs>:hover{top:0;color:#333;background:0 0;border:2px solid transparent}.fl-builder-settings-tabs>:focus{top:0;outline:0;border:2px solid transparent;background:0 0;color:#0086b0;fill:#0086b0}.fl-builder-settings-tabs .fl-active,.fl-builder-settings-tabs-more.fl-contains-active,.fl-builder-settings-tabs-overflow-menu .fl-active{color:#0086b0!important;fill:#0086b0!important;position:relative;background:#fff}.fl-builder-settings-tabs .fl-active.fl-overflowed,.fl-builder-settings-tabs .fl-overflowed{display:none!important}.fl-builder-settings-tabs .error{color:#d03436;padding-right:10px}.fl-builder-settings-tabs .error .fl-error-icon,.fl-builder-settings-tabs-overflow-menu .error .fl-error-icon{background:url(../img/sprite.png) -148px -5px no-repeat;display:inline-block;height:16px;margin-left:7px;position:relative;top:3px;width:16px}.fl-builder-settings-tabs-more.fl-contains-errors{fill:#d03436!important}.fl-builder-settings-tab{display:none;width:auto!important}.fl-builder-settings-tab.fl-active{display:block}.fl-builder-settings-tab-description{background:#e4e7ea;padding:10px 15px;border-radius:4px;margin:20px}.fl-builder-settings-tab-description a:hover{color:#333}.fl-builder-settings-tabs-overflow-menu{display:none;position:absolute;left:0;right:0;border:2px solid #e6eaed;border-top:3px solid #00a0d2;border-radius:4px;background:#fff;z-index:9999;margin:0 6px;padding:10px;-ms-flex-direction:column;flex-direction:column;box-shadow:0 0 20px 2px rgba(0,0,0,.2)}.fl-builder-settings-tabs-overflow-menu:before{bottom:100%;right:20px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:10px;margin-left:-10px}.fl-builder-settings-tabs-overflow-menu>a{display:block;padding:10px 15px;font-size:14px;font-weight:600!important;border:2px solid transparent;border-radius:4px;outline:0}.fl-builder-settings-tabs-overflow-menu>a:hover{background:#e6eaed;text-decoration:none}.fl-builder-settings-tabs-overflow-click-mask{display:none;position:fixed;top:0;bottom:0;left:0;right:0;background:0 0;z-index:11}.fl-lightbox .fl-form-table{background:none;border:none;width:calc(100% - 35px)}.fl-lightbox .fl-form-table tbody{border:none}.fl-form-table tr:nth-child(even),.fl-lightbox .fl-form-table tr{background:0 0}.fl-lightbox .fl-form-table td,.fl-lightbox .fl-form-table th{background:0 0!important;border:none!important;font-weight:400!important;text-align:left!important}.fl-lightbox .fl-form-table th{padding:10px 15px 10px 30px!important;vertical-align:top!important;width:200px!important}.fl-lightbox .fl-form-table td:first-child{padding-left:30px!important}.fl-lightbox .fl-form-table th label{color:#333;width:auto;max-width:100%}.fl-lightbox .fl-form-table th label i{color:grey}.fl-lightbox .fl-form-table th label i:hover{color:#555}.fl-lightbox .fl-form-table td{padding:8px 10px}.fl-lightbox-width-slim .fl-form-table td{padding:4px 0 5px}.fl-builder-settings-fields{margin:0;overflow:hidden;position:relative;-ms-flex:1 100%;flex:1 100%;visibility:hidden}.fl-lightbox-header .fl-builder-settings-fields{height:auto;margin:0;position:absolute;right:10px;top:10px}.fl-builder-settings-fields .fl-nanoscroller-content{padding:4px 0 0}.fl-builder-settings-fields .fl-field-control-wrapper{position:relative}.fl-field{animation-duration:.25s;animation-delay:.1s}.fl-builder-settings-fields input[type=date],.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select,.fl-builder-settings-fields textarea{background:#fff!important;border-color:transparent!important;border-style:solid;border-width:2px;border-radius:4px!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);color:#333!important;display:inline;font-size:13px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px 6px;width:auto;box-sizing:border-box}i.fl-dimension-field-link,i.fl-field-responsive-toggle{line-height:18px!important;cursor:pointer;vertical-align:middle}.fl-builder-settings-fields input[type=date],.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select:not(multiple){height:36px!important}.fl-builder-settings-fields select,.fl-builder-settings-fields select[multiple]{height:auto!important}.fl-builder-settings-fields input[type=number]{width:70px}.fl-builder-lightbox .fl-builder-settings-fields input[type=date]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=email]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=file]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=number]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=password]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=search]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=text]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=url]:focus,.fl-builder-lightbox .fl-builder-settings-fields select:focus,.fl-builder-lightbox .fl-builder-settings-fields textarea:not(.wp-editor-area):focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)!important}.fl-builder-settings-fields ::-webkit-input-placeholder{color:#999!important;font-size:13px}.fl-builder-settings-fields input:-moz-placeholder{color:#999;font-size:13px}.fl-builder-settings-fields ::-moz-placeholder{color:#999!important;font-size:13px}.fl-builder-settings-fields input:-ms-input-placeholder{color:#999;font-size:13px}.fl-builder-settings-fields label{display:inline-block;font-weight:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:3px;font-size:12px}.fl-builder-settings-fields select{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;color:#000;margin:0 0 2px;padding:2px 10px;padding-right:30px!important;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important}.fl-dimension-field-unit input[type=number],.fl-unit-field-inputs input[type=number]{-moz-appearance:textfield}.fl-builder-settings-fields select[multiple]{height:60px;background-image:none!important}.fl-builder-custom-field select,.fl-photo-field select{box-shadow:none;border-color:#e6eaed!important}.fl-builder-settings-section:first-child{border-top:none!important}.fl-builder-settings-section-header{background-color:#e7ebef;border-top:4px solid #e7ebef;cursor:pointer;height:30px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-builder-settings-description{padding:0 10px 10px;margin:0;font-style:italic;opacity:.75}.fl-builder-settings-fields table{margin:20px 0}.fl-builder-settings-fields .fl-builder-settings-title{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:#F5F7F9;color:#353535;padding:2px 10px;margin:0;font-size:13px!important;font-weight:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:2px solid transparent;border-radius:0}.fl-builder-settings-fields .fl-builder-settings-title:active,.fl-builder-settings-fields .fl-builder-settings-title:hover{top:0}.fl-builder-settings-fields .fl-builder-settings-title:focus{top:0;border-color:#e0e4ea}.fl-builder-settings-fields .fl-builder-settings-title>svg{height:6px;width:9px;margin-right:7px;transition-property:transform;transition-duration:.15s}.fl-builder-settings-section-collapsed{margin-bottom:4px}.fl-builder-settings-section-collapsed .fl-builder-settings-section-content{display:none}.fl-builder-settings-section-collapsed .fl-builder-settings-title{background:0 0;-ms-flex:1 1 100%;flex:1 1 100%}.fl-builder-settings-section-collapsed .fl-builder-settings-title>svg{transform:rotate(-90deg)}.wp-core-ui h1,.wp-core-ui h2,.wp-core-ui h3,.wp-core-ui h4,.wp-core-ui h5,.wp-core-ui h6,.wp-core-ui p{color:#333;font-family:inherit}.wp-core-ui #media-attachment-date-filters{width:auto}.wp-core-ui input[type=search]::-webkit-input-placeholder{color:#333}.wp-core-ui input[type=search]:-ms-input-placeholder{color:#333}.wp-core-ui input[type=search]::-ms-input-placeholder{color:#333}.wp-core-ui input[type=search]::placeholder{color:#333}.wp-core-ui .submitbox .submitdelete{color:#a00}.wp-core-ui button{font-weight:400}.wp-core-ui input[type=date],.wp-core-ui input[type=email],.wp-core-ui input[type=file],.wp-core-ui input[type=number],.wp-core-ui input[type=password],.wp-core-ui input[type=search],.wp-core-ui input[type=tel],.wp-core-ui input[type=text],.wp-core-ui input[type=url],.wp-core-ui select,.wp-core-ui textarea{background-color:#fff;border-color:#dfdfdf;border-style:solid;border-width:1px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;color:#333;font-weight:400}.wp-core-ui input[type=date]:focus,.wp-core-ui input[type=email]:focus,.wp-core-ui input[type=file]:focus,.wp-core-ui input[type=number]:focus,.wp-core-ui input[type=password]:focus,.wp-core-ui input[type=search]:focus,.wp-core-ui input[type=tel]:focus,.wp-core-ui input[type=text]:focus,.wp-core-ui input[type=url]:focus,.wp-core-ui select:focus,.wp-core-ui textarea:focus{background:0 0;border-color:#aaa}.wp-core-ui input[type=search]{background-image:none;padding:6px}.fl-field-responsive-setting{display:inline-block;width:100%}.fl-field-responsive-setting-medium,.fl-field-responsive-setting-responsive{display:none}.fl-field-control-wrapper i.fl-field-responsive-toggle{padding:9px 0 0;position:absolute;left:-25px}i.fl-field-responsive-toggle{color:grey;display:inline-block;font-size:15px!important;height:auto;text-align:left;width:20px}.fl-builder-settings-fields input.text-full,.fl-builder-settings-fields textarea{width:100%}i.fl-field-responsive-toggle:hover{color:#000}.fl-builder-settings-fields .fl-text-field-add-value{min-width:50%;margin-top:.62em}.fl-field[data-type=shadow] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-shadow-field .fl-color-picker{margin-bottom:15px;width:100%}.fl-color-picker{cursor:pointer}.fl-color-picker .fl-color-picker-clear{box-sizing:border-box;display:inline-block}.fl-color-picker .fl-color-picker-clear:hover{background-color:#ededed}.colorpicker input{padding:0!important;font-size:11px!important;color:#fff!important;width:29px!important;height:auto!important;background:0 0!important;border:none!important}.colorpicker .colorpicker_hex input{width:45px!important}.fl-gradient-picker-type{display:-ms-flexbox;display:flex;margin-bottom:15px}.fl-gradient-picker-type input{margin:0!important}.fl-gradient-picker-type select{margin-bottom:0!important}.fl-gradient-picker-type-select{margin-right:10px!important}.fl-gradient-picker-colors{display:-ms-flexbox;display:flex}.fl-gradient-picker-color-row{display:-ms-flexbox;display:flex;margin-right:15px}.fl-color-picker.fl-gradient-picker-color,.fl-gradient-picker-color-row:last-child{margin-right:0}.fl-color-picker.fl-gradient-picker-color .fl-color-picker-color{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.fl-gradient-picker .fl-gradient-picker-stop input{border-top-left-radius:0!important;border-bottom-left-radius:0!important;margin:0!important}.fl-field[data-type=dimension] .fl-field-label label{padding-right:35px}.fl-field[data-type=dimension] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-field[data-type=dimension] .fl-field-description{padding:9px 0 0 5px}.fl-field[data-type=dimension] .fl-field-responsive-setting{width:auto}.fl-dimension-field-units{border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);display:-ms-flexbox;display:flex;height:36px;margin:1px 1px 20px;position:relative;max-width:350px}.fl-dimension-field-units>*{border-right:1px solid #e6eaed;width:100%}body .fl-dimension-field-units>:last-child{border-right:none!important}body .fl-dimension-field-units>:first-child>input[type]{border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}body .fl-dimension-field-units>:last-child>*{border-top-right-radius:4px!important;border-bottom-right-radius:4px!important}.fl-dimension-field-unit input[type],.fl-dimension-field-units .fl-field-unit-select{box-shadow:none!important;margin:0!important;border-radius:0!important}.fl-dimension-field-unit input{width:100%!important}.fl-dimension-field-unit input::-webkit-inner-spin-button,.fl-dimension-field-unit input::-webkit-outer-spin-button{-webkit-appearance:none}.fl-dimension-field-unit label{padding:5px 0 0;font-size:11px;font-weight:700;color:inherit!important;display:block;text-align:center;opacity:.5}.fl-dimension-field-unit .fl-field-popup-slider{margin-top:27px}i.fl-dimension-field-link{color:grey;font-size:15px!important;height:auto;text-align:left;width:20px}i.fl-dimension-field-link:hover{color:#000}i.fl-dimension-field-link.dashicons-editor-unlink,i.fl-dimension-field-link.dashicons-editor-unlink:hover{color:#0086b0}.fl-field-label .fl-dimension-field-link,.fl-lightbox-width-slim .fl-dimension-field-link{display:none}.fl-lightbox-width-slim .fl-field-label .fl-dimension-field-link{display:inline-block}.fl-field-control-wrapper .fl-dimension-field-link{padding:9px 0 0;left:-50px;position:absolute}.fl-dimension-field-unit-select{display:-ms-flexbox;display:flex;width:auto!important}.fl-field[data-type=unit] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-field[data-type=unit] .fl-field-description{margin-left:7px!important;padding-top:9px}.fl-field[data-type=unit] .fl-field-responsive-setting{width:auto}.fl-unit-field-inputs{background:0 0;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);display:-ms-flexbox;display:flex}.fl-unit-field-inputs .fl-field-unit-select,.fl-unit-field-inputs input[type]{box-shadow:none!important;margin:0!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.fl-unit-field-inputs .fl-field-unit-select{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.fl-unit-field-inputs input::-webkit-inner-spin-button,.fl-unit-field-inputs input::-webkit-outer-spin-button{-webkit-appearance:none}.fl-unit-field-input{border-right:1px solid #e6eaed!important}body .fl-unit-field-input:last-child{border-right:none!important}body .fl-unit-field-input:last-child>*{border-top-right-radius:4px!important;border-bottom-right-radius:4px!important}.fl-unit-field-unit-select{display:-ms-flexbox;display:flex;width:auto!important}select.fl-field-unit-select{background-color:#E7EBEF!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}div.fl-field-unit-select{background-color:#E7EBEF!important;padding:9px 7px!important;-ms-flex:1 0 auto;flex:1 0 auto}.fl-field-popup-slider{background:#fff;border-radius:4px;box-shadow:0 4px 25px 0 rgba(0,0,0,.18);display:none;margin-top:10px;padding:15px;position:absolute;left:0;right:0;z-index:9999}.fl-field-popup-slider-top{margin-top:0!important;top:-100%;transform:translateY(-10px)}.fl-field-popup-slider-input{background:#E7EBEF;cursor:pointer;height:4px;text-align:left;position:relative;border-radius:3px}.fl-field-popup-slider-input .ui-slider-handle{background:#fff;border:2px solid #3AA4CC;border-radius:100%;cursor:pointer;height:12px;width:12px;position:absolute;top:-6px;margin-left:-7px}.fl-field-popup-slider-input .ui-slider-handle:focus{outline:0}.fl-field-popup-slider-arrow{position:absolute;top:-22px}.fl-field-popup-slider-arrow:after{content:' ';border-color:transparent transparent #fff;border-style:solid;border-width:0 8px 8px;width:0;height:0}.fl-field-popup-slider-top .fl-field-popup-slider-arrow{top:auto;bottom:-24px}.fl-field-popup-slider-top .fl-field-popup-slider-arrow:after{border-bottom-width:0;border-top-width:8px;border-top-color:#fff}input[type=number].fl-field-popup-slider-focus{border:2px solid #00a0d2!important}.fl-font-field{display:-ms-flexbox;display:flex}.fl-font-field label{display:block!important;margin:0!important;padding:0 0 6px 12px}.fl-font-field .fl-font-field-font-wrapper{margin-right:8px;width:70%!important}.fl-font-field .fl-font-field-weight-wrapper{width:30%!important}.fl-compound-field{max-width:350px}.fl-compound-field-section-toggle{background:#E7EAEF;border-radius:4px;border-top:2px solid transparent;border-bottom:2px solid transparent;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:32px;margin-bottom:8px;padding:0 12px}.fl-compound-field-section-toggle:hover{background:#dadfe5}.fl-compound-field-section-toggle .dashicons{font-size:15px;height:15px;margin-right:5px;width:15px}.fl-compound-field-section:last-child .fl-compound-field-section-toggle{margin-bottom:0}.fl-compound-field-section.fl-compound-field-section-visible{padding-bottom:12px}.fl-compound-field-section.fl-compound-field-section-visible:last-child{padding-bottom:0}.fl-compound-field-section-visible .fl-compound-field-section-toggle{background:0 0;border-top:2px solid #E7EBEF;border-radius:0}.fl-compound-field-section-visible .fl-compound-field-section-toggle:hover{background:0 0}.fl-compound-field-section-visible .fl-compound-field-section-toggle .dashicons:before{content:'\f347'}.fl-compound-field-row{display:none;padding-bottom:12px}.fl-compound-field-section-visible .fl-compound-field-row{display:-ms-flexbox;display:flex}.fl-compound-field-label{display:block!important;margin:0!important;padding:0 0 6px 12px}.fl-compound-field-label-bottom{padding:6px 0 0 12px}.fl-compound-field-label .fl-dimension-field-link{display:inline-block;padding:0 0 0 2px;position:relative;left:auto;top:-1px}.fl-compound-field-setting{padding-right:8px;width:100%}.fl-compound-field-setting:last-child{padding-right:0}.fl-compound-field-setting select{margin:0!important;width:100%}.fl-compound-field-setting .fl-unit-field-input input{width:100%!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.fl-compound-field-setting .fl-unit-field-input{width:50%!important}.fl-compound-field-setting .fl-unit-field-input select.fl-field-unit-select{background-position:center right 2px!important;padding:2px 5px!important;width:100%;font-size:11px}.fl-typography-field .fl-font-field-font-wrapper{margin-right:8px!important}.fl-typography-field-spacing{width:calc(33.33% - 8px)}.fl-typography-field-transform{width:66.66%}.fl-typography-field-transform .fl-button-group-field-options{float:none}.fl-typography-field-transform .fl-button-group-field-option{width:auto;padding:0 7px}.fl-typography-field .fl-shadow-field{display:-ms-flexbox;display:flex}.fl-typography-field .fl-shadow-field .fl-color-picker{margin:0 8px 0 0;width:calc(33.33% - 8px)}.fl-typography-field .fl-shadow-field .fl-dimension-field-units{margin-left:0;margin-top:0;margin-right:0;width:66.66%}.fl-button-group-field-options{background:#E7EBEF;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);display:-ms-flexbox;display:flex;float:left;height:36px;overflow:hidden}.fl-button-group-field-option{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:0 5px;border-radius:0;border:2px solid transparent;background:0 0!important}.fl-button-group-field-option:hover{top:0;background-color:transparent;color:#000;border:2px solid transparent}.fl-button-group-field-option:focus{top:0;background-color:transparent;border:2px solid #00a0d2;color:#333}.fl-button-group-field-option:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.fl-button-group-field-option:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.fl-button-group-field-option[data-selected="1"]{background-color:#fff!important;color:#000}.fl-button-group-field-option i{color:#6B6E75}.fl-button-group-field-option:hover i{color:#333}.fl-compound-field-cell{width:50%;display:block;float:left;padding-top:13px}.fl-compound-field-cell:first-child{padding-right:4px}.fl-compound-field-cell:last-child{padding-left:4px}.fl-compound-field-cell label{padding:5px 0 0;font-size:11px;font-weight:700;color:inherit!important;display:block;text-align:center;opacity:.5}.fl-shape-transform-field .fl-compound-field-row{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-shape-transform-field .fl-compound-field-row>*{width:auto;-ms-flex:1 1 auto;flex:1 1 auto}.fl-shape-transform-field .fl-compound-field-row>:first-child{-ms-flex:0 0 auto;flex:0 0 auto}.fl-shape-transform-field .fl-shape-orientation-controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-shape-transform-field .fl-shape-orientation-controls>*{-ms-flex:0 0 auto;flex:0 0 auto}.fl-shape-transform-field .fl-shape-orientation-controls .fl-button-group-field>*,.fl-shape-transform-field .fl-shape-orientation-controls .fl-button-group-field>* button{border-radius:0}.fl-shape-orientation-controls .fl-button-group-field:first-child>*,.fl-shape-orientation-controls .fl-button-group-field:first-child>* button{border-top-left-radius:4px;border-bottom-left-radius:4px}.fl-shape-orientation-controls .fl-button-group-field:last-child>*,.fl-shape-orientation-controls .fl-button-group-field:last-child>* button{border-top-right-radius:4px;border-bottom-right-radius:4px}.fl-builder-custom-field{background:#fff;border:2px solid transparent;border-radius:4px;padding:7px 10px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);min-height:36px;box-sizing:border-box}.fl-builder-field-multiple .fl-builder-custom-field{cursor:move}.fl-builder-custom-field a{color:#21759b!important}.fl-builder-custom-field a:hover{color:#d54e21!important}.fl-builder-custom-field label.error{margin-top:5px}.fl-photo-field .fl-photo-preview{display:-ms-flexbox;display:flex}.fl-photo-field .fl-photo-select,.fl-photo-field.fl-photo-empty .fl-photo-preview{display:none}.fl-photo-field.fl-photo-empty .fl-photo-select{display:block}.fl-photo-field .fl-photo-preview-img{line-height:0;margin:5px 0}.fl-photo-field .fl-photo-preview-img img{max-width:60px}.fl-photo-field .fl-photo-preview select{margin:8px 0 8px 10px;width:calc(100% - 10px)}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview select{display:none}.fl-photo-field .fl-photo-preview-filename{display:none;font-size:13px;font-weight:700;margin:5px 0 9px 11px}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview-filename{display:inline-block;word-break:break-all}.fl-multiple-photos-field .fl-multiple-photos-select,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-add,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-count,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-edit,.fl-multiple-photos-lightbox .gallery-settings,.fl-photo-field.fl-photo-no-attachment .fl-photo-edit{display:none}.fl-photo-field .fl-photo-edit{margin:0 0 0 11px}.fl-photo-field .fl-photo-remove,.fl-photo-field .fl-photo-replace{margin:0 0 0 8px}.fl-builder-edit .media-modal{z-index:9999991}.fl-builder-edit .media-modal-backdrop{z-index:999999}.fl-builder-edit .media-frame{-webkit-backface-visibility:hidden;backface-visibility:hidden}.fl-builder-edit .media-modal-content h1{font-family:inherit}.fl-builder-edit form#wp-link,.popover[class*=tour-],ul.as-list{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-builder-edit .media-modal-content .thumbnail{padding:0;border:none;border-radius:0}.fl-builder-edit .media-modal-content .attachment-preview .thumbnail{margin-bottom:0}.fl-builder-edit .media-modal-content .attachment-preview .thumbnail img{max-width:none}.fl-builder-edit button.media-modal-close{position:absolute;box-shadow:none;-webkit-box-shadow:none}.fl-builder-edit .media-frame.hide-menu{visibility:visible}.fl-builder-edit .media-router button{color:inherit}span.select2-container.select2-container--open{z-index:9999999}.fl-multiple-photos-field .fl-multiple-photos-add{margin:0 0 0 8px}.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-select{display:inline}.fl-multiple-photos-count{font-weight:700;margin-bottom:3px}.fl-video-field .fl-video-select,.fl-video-field.fl-video-empty .fl-video-preview{display:none}.fl-video-field.fl-video-empty .fl-video-select{display:block}.fl-video-field .fl-video-preview-img{float:left;line-height:0;margin:5px 0}.fl-video-field .fl-video-preview-img img{max-width:60px}.fl-video-field .fl-video-preview-img .dashicons.dashicons-media-video{display:block;font-size:60px;height:60px;line-height:60px;width:60px}.fl-video-field .fl-video-preview-filename{display:inline-block;font-size:14px;font-weight:700;margin:7px 0 5px 11px}.fl-video-field .fl-video-remove,.fl-video-field .fl-video-replace{margin:0 0 0 11px}.fl-multiple-audios-field .fl-multiple-audios-select,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-add,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-edit{display:none}.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-select{display:block}.fl-multiple-audios-field .fl-multiple-audios-add{margin:0 0 0 8px}.fl-icon-field .fl-icon-select,.fl-icon-field.fl-icon-empty .fl-icon-preview{display:none}.fl-icon-field.fl-icon-empty .fl-icon-select{display:block}.fl-icon-field .fl-icon-preview i{display:inline-block;font-size:28px;margin:10px 10px 9px;vertical-align:middle}.fl-icon-field .fl-icon-remove{margin:0 0 0 8px}.fl-builder-hidden-editor{display:none}.fl-builder-settings .wp-switch-editor{border-radius:0;color:#333;margin-top:2px}.fl-builder-settings .mce-toolbar .mce-btn-group .mce-btn{margin:2px 0}.fl-builder-settings .mce-menubtn.mce-fixed-width button{width:100px}.fl-builder-settings .mce-menubtn.mce-fixed-width span{width:100%}.mce-close:active,.mce-close:hover,.mce-toolbar .mce-btn button:active,.mce-toolbar .mce-btn button:hover,.mce-window .mce-btn button:active,.mce-window .mce-btn button:hover{background:0 0;border:none}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:1px!important}.wp-editor-container textarea.wp-editor-area{background:0 0;border:none;padding:10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.fl-builder-edit form#wp-link{color:#000;font-size:13px}.fl-builder-edit form#wp-link #link-options label{display:block;margin-bottom:2px}.fl-builder-edit form#wp-link #link-options label span{padding-right:10px;vertical-align:middle}.fl-builder-edit form#wp-link #link-options input[type=text]{display:inline-block;height:auto;margin:5px 0 0;padding:3px 5px;width:80%}.fl-builder-edit form#wp-link .query-results{top:225px}.fl-code-field{border:1px solid #E6E6E6;border-left:none}.ace_editor,.ace_editor *{font-family:Monaco,Menlo,"Ubuntu Mono","Droid Sans Mono",Consolas,monospace!important;font-size:12px!important;font-weight:400!important;letter-spacing:0!important}.fl-layout-field-option{border:2px solid #d9d9d9;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;cursor:pointer;float:left;line-height:0;max-width:23%;margin:0 1% 2%;padding:5px}.fl-layout-field-option-selected,.fl-layout-field-option:hover{border-color:red}.fl-layout-field-option img{max-width:100%}.fl-link-field .fl-link-field-input-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-link-field-input{width:auto!important;-ms-flex:1 1 100%;flex:1 1 100%}.fl-link-field .fl-link-field-input-wrap button{-ms-flex:0 0 0%;flex:0 0 0%;height:36px;margin:1px 1px 1px 5px}.fl-link-field-options-wrap{padding:7px 0 0 12px}.fl-link-field-options-wrap label{margin-right:7px}.fl-link-field-options-wrap span{font-size:11px;font-weight:700;color:inherit!important;text-align:center;opacity:.5}.fl-link-field-search{display:none;border:2px solid #e6eaed;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin:4px 0 0;padding:10px}.fl-link-field-search-title{display:block;margin:0 0 3px 2px}.fl-link-field-search-cancel{margin-top:6px}.fl-link-field-search input{box-shadow:none!important;width:100%!important;padding:3px 9px!important}.fl-link-field-search #as-original-link-search{width:100%}.fl-field-connections-toggle{padding:10px 0}.fl-field[data-type=editor] .fl-field-connections-toggle{-ms-flex-align:start;align-items:flex-start}.fl-field[data-type=link] .fl-field-connections-toggle{height:24px;margin-top:1px;-ms-flex-align:start;align-items:flex-start}.fl-field[data-type=link] .fl-field-connection{bottom:20px}.fl-field-connections-menu[data-field=fl-field-text]{margin-top:30px}.fl-help-tooltip{display:inline-block;position:relative}.fl-lightbox-width-slim .fl-help-tooltip{position:static}.fl-help-tooltip-icon{color:#999!important;cursor:pointer;font-size:15px!important;padding:5px;vertical-align:middle}.fl-help-tooltip-text{box-sizing:border-box;background:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ccc;-moz-box-shadow:0 0 5px #ccc;-webkit-box-shadow:0 0 5px #ccc;display:none;font-weight:400;left:23px;padding:10px 13px;position:absolute;top:-6px;width:250px;z-index:1000;border-radius:4px}.fl-lightbox-width-slim .fl-help-tooltip-text{top:30px;left:0;width:100%}.fl-field-control .fl-form-field{margin-bottom:0}.fl-form-field[data-preview-text=icon]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.fl-form-field-preview-text i{display:inline-block;font-size:18px;line-height:22px;margin-right:10px}.fl-builder-field-actions{padding-left:0!important;padding-right:0!important;text-align:center;width:85px}.fl-builder-field-actions i{color:#999!important;cursor:pointer;font-size:13px!important;line-height:29px!important;width:16px}.fl-builder-field-actions i:hover{color:#000!important}.fl-builder-field-actions i.fl-builder-field-copy,.fl-builder-field-actions i.fl-builder-field-delete{margin-left:5px}.fl-builder-field-actions i.fl-builder-field-move{cursor:move}.fl-builder-field-dd-helper{background:#ccc;height:30px!important;float:left;width:130px!important}.fl-builder-field-dd-zone{border:1px dashed #ccc;height:30px}.fl-builder-field-actions-single .fl-builder-field-delete,.fl-builder-field-actions-single .fl-builder-field-move{display:none!important}.fl-builder-field-multiple .fl-builder-field-actions,.fl-builder-field-multiple .fl-field-control,.fl-builder-field-multiple .fl-field-label{padding-top:2px!important;padding-bottom:2px!important}.fl-builder-field-multiple .fl-builder-field-actions{min-width:70px!important}.fl-builder-field-multiple[data-field=icons] .fl-builder-field-actions{width:70px!important}.fl-builder-field-multiple.ui-sortable-helper .fl-field-control{width:60%}.fl-builder-field-multiple.ui-sortable-helper .fl-builder-field-actions{display:none}.fl-builder-widget-settings input{display:inline-block!important;margin:5px 10px 8px!important}.fl-builder-lightbox-loading{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings .error,.fl-builder-settings input.error{color:#d03436!important}.fl-builder-settings label.error,.fl-builder-settings p.error{color:#d03436;display:block;margin-top:5px}.fl-builder-settings .fl-form-table .fl-field-description{color:#464646;font-style:normal;margin-left:2px}.fl-lightbox .fl-field-connection{right:-1px}.fl-lightbox .fl-field-connection-content{border:2px solid transparent!important;background:#e7ebef!important}.fl-field-connection-content .fl-field-connection-label{color:#676f7a!important}.fl-field-connections-toggle{pointer-events:none;width:20px;right:-25px}.has-scrollbar .fl-field-connections-toggle{right:-22px}.fl-lightbox-width-slim tr[data-type=code] .fl-field-connections-toggle{right:10px}.fl-lightbox-width-slim .fl-code-field{width:90%}.fl-field-connections-toggle-open{transform:none!important}.fl-field-connections-toggle i{pointer-events:auto;color:#abb1ba;font-size:13px!important;transition-property:transform;transition-duration:.15s}.fl-field-connections-toggle-open i{transform:rotate(-45deg)}ul.as-selections{background-color:#fff;border:none;border-radius:4px;box-shadow:none;color:#333;font-size:12px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px;width:auto}ul.as-selections.loading{background:url(../img/ajax-loader-small.svg) 98% center no-repeat}ul.as-selections li.as-selection-item{background:#d4eaf6;border:none;font-size:11px;line-height:14px;padding:8px 15px;border-radius:4px;margin:2px}ul.as-selections li.as-selection-item.blur{background:#f4f4f4}ul.as-selections li.as-selection-item a.as-close{line-height:12px}ul.as-selections li.as-original{margin:0}ul.as-selections li.as-original input{height:auto;font-size:12px;margin:0;padding:0;box-shadow:none}ul.as-list{margin:0;font-size:13px;color:#000;background-color:#fff;background-color:rgba(255,255,255,.95);z-index:2;box-shadow:0 0 10px rgba(0,0,0,.1);border:none;border:1px solid #dfdfdf;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}li.as-message,li.as-result-item{border:none}li.as-result-item.active{background:#e5e5e5;border-radius:0;color:#333;text-shadow:none}li.as-result-item em{background:0 0!important;color:#333!important;font-size:12px;padding:0!important;font-weight:700}.fl-custom-query-filter{display:none}.fl-custom-query .fl-field[data-type=suggest] select{margin-bottom:5px;width:100%}.fl-builder-service-settings{position:relative}.fl-builder-service-error{color:red!important;padding:15px 0 0}.fl-builder-service-account-delete{color:red!important;margin-left:10px;position:relative;top:2px}.fl-lightbox-width-slim .fl-builder-service-account-delete{display:block;padding-top:7px}#fl-field-visibility_user_capability .fl-field-description,.fl-builder-service-connect-row .fl-field-description{background:#f0f0f0;color:#333!important;display:block;float:none;margin:10px 0 0;padding:10px}#fl-field-visibility_user_capability .fl-field-description a,.fl-builder-service-connect-row .fl-field-description a{color:#21759b!important;text-decoration:underline!important}.fl-ordering-field-option{background:#fff;border:1px solid #dfdfdf;border-radius:3px;cursor:move;margin-bottom:5px;padding:5px 10px}.fl-ordering-field-option .fa{color:#ccc;float:right;line-height:16px}#tiptip_holder{z-index:1000000}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:#333}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:#333}#tiptip_holder.tip_right #tiptip_arrow_inner{border-right-color:#333}#tiptip_holder.tip_left #tiptip_arrow_inner{border-left-color:#333}#tiptip_content{background:#333;box-shadow:none}.fl-builder-row-settings .fl-field-responsive-setting input[name=bg_position_custom_right],.fl-builder-row-settings .fl-field-responsive-setting input[name=bg_position_custom_left]{display:none!important}.fl-builder-getting-started-video{line-height:0!important;padding:10px}.fl-builder-getting-started-video iframe{border:none;height:326px;width:100%}.fl-builder-tour-actions .fl-builder-actions-title{font-size:14px!important;line-height:19px}.fl-builder-tour-mask{bottom:0;left:0;position:fixed;right:0;top:0;z-index:100000000}.fl-builder-tour-dimmed{background:rgba(0,0,0,.7);bottom:0;left:0;position:absolute;right:0;top:0}body>.fl-builder-tour-dimmed{position:fixed}.tour-backdrop{z-index:110000}.popover[class*=tour-]{border:1px solid #ccc;border-radius:0;box-shadow:0 0 40px rgba(0,0,0,.3);color:#666;font-size:13px;font-weight:400;line-height:18px;max-width:none;padding:0;width:300px;z-index:100000001}.popover[class*=tour-].bottom>.arrow{border-bottom-color:#ccc}.popover[class*=tour-].bottom>.arrow:after{border-bottom-color:#f7f7f7}.popover[class*=tour-] .popover-title{border-radius:0;color:#333;letter-spacing:normal;text-transform:none}.popover[class*=tour-] .fa-times{color:#b3b3b3;cursor:pointer;font-size:16px;padding:5px;position:absolute;right:3px;top:2px}.popover[class*=tour-] .fa-times:hover{color:#666}.popover[class*=tour-] .popover-content{border-bottom:1px solid #d9d9d9;padding:13px 15px}.popover[class*=tour-] .fl-builder-tour-next{display:block;float:none;width:100%}.popover-navigation button{min-height:36px}.fl-builder-shortcode-mask-wrap{position:relative;pointer-events:none}.fl-builder-shortcode-mask{bottom:-1px;left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fl-builder--search{border:2px solid transparent;position:relative;padding:0;width:54px;transition-property:width;transition-delay:.1s;transition-duration:.15s}.fl-builder--search.is-expanded{border:2px solid #00A0D0}.fl-builder--search input[type=text],.fl-builder--search input[type=text]:focus{background-color:transparent;border:none!important;box-sizing:border-box;width:100%;font-size:16px;text-align:center}.fl-builder--search:before{display:-ms-flexbox;display:flex;top:0;left:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;content:"\f002";font:normal normal normal 14px/1 Font Awesome\ 5 Free;text-align:center;width:100%;height:100%;position:absolute;pointer-events:none;color:rgba(128,128,128,.6);font-size:17px;opacity:1;transition-property:opacity;transition-duration:.15s}.fl-builder--main-menu-panel,.fl-builder-ui-keyboard-shortcuts{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-builder--search.has-text:before,.fl-builder--search.is-expanded:before{opacity:0}.fl-builder--search input::-webkit-input-placeholder{color:rgba(128,128,128,0)!important;transition:color .25s}.fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(128,128,128,.4)!important}.fl-builder--search .search-label{cursor:text}.fl-builder--search .search-clear{display:none;padding:10px 10px 10px 30px;color:#a7a7a7;font-size:12px;position:absolute;right:0;top:0;background-color:#eff1f2;background:linear-gradient(to left,#e4e7ea,#e4e7ea 75%,rgba(228,231,234,0))}.fl-builder--search.has-text .search-clear,.fl-builder--search.is-expanded input{display:inline-block}.fl-builder--search:hover .search-clear{color:#888;background-color:#eff1f2;background:linear-gradient(to left,#dadfe5,#dadfe5 75%,rgba(218,223,229,0))}.fl-builder--search.is-expanded{width:246px}@keyframes fl-builder-show-menu-item{from{transform:translateY(10px) scale(.8);opacity:0}to{transform:translateX(0) translateY(0) scale(1);opacity:1}}.fl-builder--main-menu-panel{display:none;box-sizing:border-box;position:fixed;top:calc(45px + 10px);left:10px;width:360px;color:#222;max-height:calc(100% - 66px);border-radius:4px;background:#fff;border:none;border-top:3px solid #00a0d2;box-shadow:0 11px 45px 8px rgba(0,0,0,.1);font-size:14px!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10000009;pointer-events:auto}.fl-builder--main-menu-panel.is-showing{display:-ms-flexbox;display:flex}.fl-builder--main-menu-panel:before,.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items:before{bottom:100%;right:6px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:13px;margin-left:-13px}.fl-builder--main-menu-panel-views{-ms-flex:1 1 100%;flex:1 1 100%;overflow:auto}.fl-builder--main-menu-panel-mask{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000119}.fl-builder--main-menu-panel .fl-builder--tabs{padding-left:20px;padding-top:15px}.fl-builder--main-menu-panel-view{display:none}.fl-builder--main-menu-panel-view.is-showing{display:block}.fl-builder--main-menu-panel-view-title{font-size:24px;font-weight:600;padding:25px 22px 0;line-height:1;white-space:nowrap}.fl-builder--main-menu-panel-view-title .title-accessory{float:right;color:#b1b1b1}.fl-builder--main-menu-panel-view-title .title-accessory>i{font-size:20px!important;width:25px!important}.fl-builder--main-menu-panel-view-title .title-accessory>i:hover{color:#222}.fl-builder--main-menu-panel-view-title .pop-view{padding:10px;margin-left:-10px;opacity:.5;font-size:25px;font-weight:400;cursor:pointer;background:0 0;outline:0;border:none;color:inherit}.fl-builder--main-menu-panel-view-title .pop-view:focus{outline:0;top:0;background:#E5EAED!important}.fl-builder--menu-item:before{display:block;content:"";float:none;clear:both}.fl-builder--menu-item{color:inherit;text-align:left;box-sizing:border-box;display:block;padding:10px 15px;margin:0 10px;width:calc(100% - 20px);background:0 0;border:none;border-radius:4px;font-size:14px;line-height:1.1;cursor:pointer;opacity:1;text-transform:none}.fl-builder--menu-item .menu-view.view-revisions{opacity:.5;padding-left:5px}.fl-builder--menu-item .menu-event.event-showGlobalSettings,.fl-builder--menu-item .menu-event.event-showLayoutSettings{color:#6bc373;padding-left:5px}.fl-builder--menu-item:hover{background:#eaf1f8;border:none;text-decoration:none;color:#000}.fl-builder--selector-menu .fl-builder--menu-item:hover{background:#fff}.fl-builder--menu-item-accessory{float:right;text-align:center;display:inline-block;min-width:40px;font-size:14px}.fl-builder--menu-item-accessory.view-arrow{font-size:18px}.fl-builder--menu{padding:0;margin:20px 0}.fl-builder--menu hr{margin:8px 0;background:#e6eaed!important;height:1px;border:none}.fl-builder--menu .fl-builder-video-wrap{padding:0 10px 10px}.fl-revision-list-item{display:-ms-flexbox;display:flex}.fl-revision-list-item-text{padding-left:15px}.fl-revision-list-item-date{padding-bottom:5px}.fl-builder--revision-actions{display:none;position:fixed;top:4px;left:4px;z-index:100008;padding:4px 4px 6px;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder--revision-actions *{margin-right:5px}.fl-builder--revision-actions :last-child{margin:0}.fl-builder--menu-item[data-event=noRevisionsMessage]:hover{background:0 0;box-shadow:none;cursor:default}.fl-no-revisions-message-title{font-weight:700;margin-bottom:10px}.fl-no-revisions-message-text{line-height:22px}.fl-builder--main-menu-panel-view[data-name=history] .fl-builder--menu-item,.fl-builder--main-menu-panel-view[data-name=history] .fl-builder--menu-item:focus{border:none!important;padding:0;margin-bottom:2px}.fl-history-list-item{border:1px solid transparent;border-radius:4px;padding:10px 12px 12px}.fl-history-list-item i.fa-check-circle{display:none}.fl-history-list-item[data-current="1"]{border-color:#D3DADF;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.fl-history-list-item[data-current="1"] .fl-history-list-item-label{width:100%}.fl-history-list-item[data-current="1"] i.fa-check-circle{display:block}.fl-builder-module-placeholder-message{border:1px dashed #ccc;overflow:hidden;padding:20px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.module-import-wrap{display:-ms-flexbox;display:flex}.module-import-input{width:100%!important}.module-import-apply{height:35px;margin:1px 1px 1px 5px}.module-import-error{color:red!important;display:none;padding:5px 12px}.fl-field-connections-menu{z-index:999999}.fl-field[data-type=editor] .fl-field-connections-toggle{right:5px!important}.fl-field-connections-inline-toggle{display:inline;color:#9a9b9c;margin-left:6px}.fl-field-connections-inline-toggle i{transition-property:transform;transition-duration:.15s}.fl-field-connections-inline-toggle.fl-field-connections-toggle-open i{transform:rotate(45deg)}.fl-builder-add-ultimate-presets-button,.fl-builder-add-ultimate-rows-button,.fl-builder-pp-add-template-button,.pp-preview-button,.uabb-live-preview-button{display:none!important}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;background:0 0;transition-property:background;transition-duration:.15s}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-ne,.ui-resizable-nw,.ui-resizable-se,.ui-resizable-sw{width:12px;height:12px}.ui-resizable-se{cursor:se-resize;right:-4px;bottom:-4px}.ui-resizable-sw{cursor:sw-resize;left:-4px;bottom:-4px}.ui-resizable-nw{cursor:nw-resize;left:-4px;top:-4px}.ui-resizable-ne{cursor:ne-resize;right:-4px;top:-4px}.fl-builder-resizable-iframe-fix{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100000000}.fl-builder-panel .ui-resizable-handle:active,.fl-builder-panel .ui-resizable-handle:hover,.fl-lightbox .ui-resizable-handle:active,.fl-lightbox .ui-resizable-handle:hover{background:#00a0d2}.fl-builder-panel .ui-resizable-n,.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-n,.fl-lightbox .ui-resizable-s{height:6px}.fl-builder-panel .ui-resizable-n,.fl-lightbox .ui-resizable-n{top:-3px}.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-s{bottom:-3px}.fl-builder-panel .ui-resizable-e,.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-e,.fl-lightbox .ui-resizable-w{width:6px}.fl-builder-panel .ui-resizable-e,.fl-lightbox .ui-resizable-e{right:-3px}.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-w{left:-3px}.fl-lightbox .ui-resizable-ne,.fl-lightbox .ui-resizable-nw,.fl-lightbox .ui-resizable-se,.fl-lightbox .ui-resizable-sw{background:0 0;border:6px solid transparent}.fl-lightbox .ui-resizable-ne:active,.fl-lightbox .ui-resizable-ne:hover,.fl-lightbox .ui-resizable-nw:active,.fl-lightbox .ui-resizable-nw:hover,.fl-lightbox .ui-resizable-se:active,.fl-lightbox .ui-resizable-se:hover,.fl-lightbox .ui-resizable-sw:active,.fl-lightbox .ui-resizable-sw:hover{background:0 0;border-color:#00a0d2}.fl-lightbox .ui-resizable-ne{border-bottom:none;border-left:none;border-top-right-radius:4px}.fl-lightbox .ui-resizable-nw{border-bottom:none;border-right:none;border-top-left-radius:4px}.fl-lightbox .ui-resizable-se{border-top:none;border-left:none;border-bottom-right-radius:4px}.fl-lightbox .ui-resizable-sw{border-top:none;border-right:none;border-bottom-left-radius:4px}.fl-builder-ui-keyboard-shortcuts{display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:999999;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background:rgba(50,50,50,.88);font-size:15px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder-ui-keyboard-shortcuts.is-showing{display:-ms-flexbox;display:flex}.fl-builder-ui-keyboard-shortcuts-content{box-sizing:border-box;width:500px;background:#f5f7f9;border-radius:4px;padding:30px 0 0;box-shadow:0 10px 30px rgba(0,0,0,.15)}.fl-builder-ui-keyboard-shortcut-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:12px 40px}.fl-builder-ui-keyboard-shortcut-item:nth-child(even){background:#eef2f5}.fl-builder-ui-shortcut-keycode{margin-left:auto;text-transform:uppercase;letter-spacing:2px}.fl-builder-ui-keyboard-shortcust-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;padding:10px}.dismiss-shortcut-ui{padding:10px;border-radius:4px;background:#fff;color:#000;font-size:14px;border:2px solid #fff}.dismiss-shortcut-ui:focus,.dismiss-shortcut-ui:hover{top:0;color:#000;background:#eef2f5;border:2px solid #eef2f5}.fl-lightbox .select2-container--default .selection .select2-selection--single,.select2-dropdown{border-color:transparent!important;border-style:solid!important;border-radius:4px!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.fl-lightbox .select2-container--default .selection .select2-selection--single{border-width:2px!important;height:36px!important;font-size:13px!important;line-height:15px!important;outline:0}.fl-lightbox .select2-selection--single .select2-selection__rendered{line-height:32px!important;font-size:13px}.fl-lightbox .select2-selection--single .select2-selection__arrow{height:32px}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel,.fl-builder-ui-skin--dark .fl-builder--preview-actions,.fl-builder-ui-skin--dark .fl-builder--search-results-panel,.fl-builder-ui-skin--dark .fl-builder-panel,.fl-builder-ui-skin--dark .fl-lightbox,body.fl-builder-ui-skin--dark .fl-builder-bar .fl-builder-bar-content{background:#23282d;color:#b4b9be;border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-header{color:#b4b9be;border-bottom-color:#1d1d1d;border-top-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-top-color:#1d2227}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel:before{border-bottom-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-arrow polygon{fill:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel-search .fl-builder-panel-search-input{background:#24282e}.fl-builder-ui-skin--dark .fl-responsive-preview-content{background:#131619}.fl-builder-ui-skin--dark .fl-form-table th{background:#23282d!important;color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--preview-actions .device-icons,.fl-builder-ui-skin--dark .fl-builder-button{background:#2c333a}.fl-builder-ui-skin--dark .fl-builder-button:focus{background:#131a22}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-primary{color:#fff!important;fill:#fff!important;background:#00A0D2}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-buy-button,.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-feedback-button,.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-upgrade-button{background-color:#F7A407;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-silent:focus{border:2px solid #00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{color:#00A0D2!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:hover,.fl-builder-ui-skin--dark .fl-builder--menu>button:hover{background:#101215!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:focus,.fl-builder-ui-skin--dark .fl-builder--menu>button:focus{background:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-bar-title{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:#181b1f}.fl-builder-simple.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:transparent}.fl-builder-ui-skin--dark .fl-builder-layout-title{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-bar-title-caret i,.fl-builder-ui-skin--dark .fl-builder-layout-pretitle,.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{color:#7d8690}.fl-builder-ui-skin--dark button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#101215!important}.fl-builder-ui-skin--dark .fl-builder--search:before{color:rgba(162,173,184,.73)}.fl-builder-ui-skin--dark .fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(162,173,184,.73)!important}.fl-builder-ui-skin--dark .fl-builder--search .search-clear{color:rgba(162,173,184,.5);background-color:#e4e4e4;background:linear-gradient(to left,#383f46,#383f46 75%,rgba(56,63,70,0))}.fl-builder-ui-skin--dark .fl-builder--menu hr{background-color:#23282d!important;border:none}.fl-builder-ui-skin--dark .fl-builder--tabs{border-color:#383f46!important}.fl-builder-ui-skin--dark .fl-builder--tabs .is-showing,.fl-builder-ui-skin--dark .fl-builder-settings-tabs a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-more.fl-contains-active{color:#fff!important;fill:#fff!important;background:#181b20!important}.fl-builder-ui-skin--dark .fl-builder--tabs :focus{background-color:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder--tabs .is-showing:focus{color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder--menu-item:hover{background:#383f46;color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--menu * .fl-builder--menu-item-accessory,.fl-builder-ui-skin--dark .fl-builder-blocks-section-group-name{color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--selector-display{color:#c6cdd6;background:url(../img/svg/select-arrow-down-alt2-light.svg) center right 10px no-repeat #1a1b22!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label{color:#b5becb}.fl-builder-ui-skin--dark .fl-builder-panel-search-input input{border-color:#5b656f;color:#b8c2ce;background:#171b1f!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label:focus,.fl-builder-ui-skin--dark .fl-builder-panel-search-input input:focus{border-color:#00a0d2}.fl-builder-ui-skin--dark .fl-builder--group-label{color:#aaafb5!important;background:#24282e}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu{border-color:#101215!important;color:#7c858e;background-color:#101215}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu:before{border-bottom-color:#101215}.fl-builder-ui-skin--dark .fl-builder--menu>a,.fl-builder-ui-skin--dark .fl-builder--menu>button,.fl-builder-ui-skin--dark .fl-builder--menu>span{color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:hover{background:#23282d!important;color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:focus{background:#23282d!important;color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-panel-drag-handle{fill:#5b656f}.fl-builder-ui-skin--dark .fl-builder--template-collection-section-header,.fl-builder-ui-skin--dark .fl-builder-blocks-section .fl-builder-blocks-section-header,.fl-builder-ui-skin--dark .fl-builder-settings-section-header{background-color:#191b21;border-color:#191b21}.fl-builder-ui-skin--dark .fl-builder--template-collection-section-name,.fl-builder-ui-skin--dark .fl-builder--user-templates-section-name,.fl-builder-ui-skin--dark .fl-builder-blocks-section .fl-builder-blocks-section-title,.fl-builder-ui-skin--dark .fl-builder-settings-fields .fl-builder-settings-title{color:#7d8690!important;fill:#7d8690;background:#24282e}.fl-builder-ui-skin--dark .fl-builder-settings-fields .fl-builder-settings-title:focus{border-color:#7d8690}.fl-builder-ui-skin--dark .fl-builder-blocks-section-content .fl-builder-block,.fl-builder-ui-skin--dark .fl-user-template{color:#b8c2ce}.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-content,.fl-builder-ui-skin--dark .fl-user-template:hover{background:#171b1f;color:#fff}.fl-builder-ui-skin--dark .fl-builder-block:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover i{color:#6d7782!important}.fl-builder-ui-skin--dark .fl-builder-block:hover a:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover a:hover i{color:#9eacbb!important}.fl-builder-ui-skin--dark .fl-builder-block .fl-builder-block-icon{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col,.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#7d8690}.fl-builder-ui-skin--dark .fl-user-templates{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder--template-thumbnail{border-color:#393f44}.fl-builder-ui-skin--dark .fl-builder--menu a.fl-template-collection{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-lightbox .fl-lightbox-header h1{color:#fff!important}.fl-builder-ui-skin--dark .fl-form-table th label{color:#a8b3bf!important}.fl-builder-ui-skin--dark .fl-builder-settings-tabs{background-color:#2c333a!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields h3.fl-builder-settings-title{background:#24282e}.fl-builder-ui-skin--dark h3.fl-builder-settings-title .fl-builder-settings-title-text-wrap{color:#a8b3bf;background-color:#1b2025}.fl-builder-ui-skin--dark .fl-lightbox :not(i){color:#a7b1bb!important}.fl-builder-ui-skin--dark .fl-builder-button{color:#c6cdd6!important;fill:#c6cdd6!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{fill:#00A0D2!important}.fl-builder-ui-skin--dark .fl-lightbox .fl-builder-button.fl-builder-button-primary{color:#fff!important}.fl-builder-ui-skin--dark .fl-color-picker-color.fl-color-picker-empty{background:#1a1b22}.fl-color-picker-color.fl-color-picker-empty .fl-color-picker-icon{fill:#6f7881}.fl-builder-ui-skin--dark .fl-color-picker-clear{background-color:#121a23}.fl-builder-ui-skin--dark .fl-color-picker-clear:hover{background-color:#373f46}.fl-builder-ui-skin--dark span.fl-builder-block-no-node-templates:hover{background:#1d2025}.fl-builder-ui-skin--dark .fl-builder-settings-tab-description{background:#1d2227}.fl-builder-ui-skin--dark .fl-builder-custom-field,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url],.fl-builder-ui-skin--dark .fl-builder-settings-fields select,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea,.fl-builder-ui-skin--dark .fl-lightbox .select2-selection__rendered,.fl-builder-ui-skin--dark .select2-dropdown{background-color:#181b20!important}.fl-builder-ui-skin--dark .fl-builder-panel-search button svg .filled-shape{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields select:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea:focus{border-color:#00a0d2!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields select{background-image:url(../img/svg/select-arrow-down-alt2-light.svg)!important}.fl-builder-ui-skin--dark .fl-lightbox .select2-container--default .selection .select2-selection--single{border-color:#181b20!important}.fl-builder-ui-skin--dark .select2-search__field{background-color:#2c333a!important}.fl-builder-ui-skin--dark .fl-builder-custom-field select,.fl-builder-ui-skin--dark .fl-photo-field select{border-color:#7d8690!important}.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle{color:#6b747d}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel-view-title,.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle:hover{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--saving-indicator{color:#858f99}.fl-builder-ui-skin--dark .fl-icons-list i:hover{background-color:#16191d;color:#fff}.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:after,.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:before{background:#6f7881}.fl-builder-ui-skin--dark .fl-builder--user-templates-section-content{border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button{background:0 0;border-right-color:#101215!important}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button:hover{background:#181b1f}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu{background:#131a22;border-color:#353c43 #131a22 #131a22}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu:before{border-bottom-color:#353c43}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:focus,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover{background:#383f46}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover.fl-active{color:#fff!important;background:#383f46}.fl-builder-ui-skin--dark ul.as-selections{background-color:#121a23}.fl-builder-ui-skin--dark .fl-custom-query .fl-builder-settings-section{border-top:2px solid #1b2026!important}.fl-builder-ui-skin--dark div.fl-field-unit-select{background-color:#181b20!important}.fl-builder-ui-skin--dark .fl-dimension-field-units>*{border-right:1px solid #383f46}.fl-builder-ui-skin--dark .fl-field-popup-slider,.fl-builder-ui-skin--dark .fl-field-popup-slider-input .ui-slider-handle{background:#383f46}.fl-builder-ui-skin--dark .fl-field-popup-slider-arrow:after{border-bottom-color:#383f46}.fl-builder-ui-skin--dark .fl-field-popup-slider-input{background-color:#121a23}.fl-builder-ui-skin--dark .fl-unit-field-input{border-right:1px solid #383f46!important}.fl-builder-ui-skin--dark .fl-button-group-field-option[data-selected="1"]{background-color:#383f46!important;color:#fff}.fl-builder-ui-skin--dark .fl-button-group-field-option[data-selected="1"] i{color:#fff!important}.fl-builder-ui-skin--dark .fl-button-group-field-options{background:#181b20}.fl-builder-ui-skin--dark .fl-compound-field-section-toggle{background-color:#181b20}.fl-builder-ui-skin--dark .fl-compound-field-section-toggle:hover{background-color:#383f46}.fl-builder-ui-skin--dark .fl-compound-field-section-visible .fl-compound-field-section-toggle{border-top-color:#121a23!important;background-color:transparent}.fl-builder-ui-skin--dark .fl-field-connections-toggle i{color:#7c8590}.fl-builder-ui-skin--dark .fl-lightbox .fl-field-connection-content{background-color:#191b20!important}.fl-builder-ui-skin--dark .fl-nanoscroller>.fl-nanoscroller-pane>.fl-nanoscroller-slider{background-color:#181b20}.fl-builder-ui-skin--dark .fl-nanoscroller>.fl-nanoscroller-pane:hover>.fl-nanoscroller-slider{background-color:#5a646f}.fl-builder-ui-skin--dark .fl-nanoscroller>.fl-nanoscroller-pane.active>.fl-nanoscroller-slider{background-color:#00A0D2}.fl-builder-ui-skin--dark .fl-lightbox div.mce-panel{background:#383f46}.fl-builder-ui-skin--dark .fl-lightbox .mce-toolbar .mce-ico{color:#a7b1bb}.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button-secondary{background:#383f46;border:none;box-shadow:none}.fl-builder-ui-skin--dark .fl-lightbox .fl-builder-settings .wp-switch-editor{background:#23282d}.fl-builder-ui-skin--dark .fl-lightbox .html-active .switch-html,.fl-builder-ui-skin--dark .fl-lightbox .quicktags-toolbar,.fl-builder-ui-skin--dark .fl-lightbox .tmce-active .switch-tmce{background:#383f46}.fl-builder-ui-skin--dark .fl-lightbox textarea.wp-editor-area{background:0 0!important}.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button-secondary:focus,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button-secondary:hover,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button.focus,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button.hover,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button:focus,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button:hover{background:#191b20}
|
1 |
+
.fl-color-picker-ui{width:300px}.fl-color-picker-ui.fl-color-alpha-enabled{width:334px}.fl-color-picker-ui .iris-picker{float:left;width:100%;height:224px;display:block;position:relative;border-top:1px solid rgba(0,0,0,.1)}.fl-color-picker-ui .iris-picker .iris-square-inner,.fl-color-picker-ui .iris-picker-inner{position:absolute;left:0;top:0;bottom:0;right:0}.fl-color-picker-ui .iris-picker,.iris-picker *{box-sizing:content-box}.fl-color-picker-ui .iris-error{background-color:#ffafaf}.fl-color-picker-ui .iris-picker .iris-square{width:300px;height:200px}.fl-color-picker-ui .iris-picker .iris-palette,.fl-color-picker-ui .iris-picker .iris-slider,.fl-color-picker-ui .iris-picker .iris-square-inner{height:100%;width:12.5%}.fl-color-picker-ui .iris-picker .iris-placeholder,.fl-color-picker-ui .iris-picker .iris-square{position:relative}.fl-color-picker-ui .iris-picker .iris-square-inner{width:auto;margin:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square,.fl-color-picker-ui .iris-ie-9 .iris-square-inner{box-shadow:none;border-radius:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square{outline:rgba(0,0,0,.1) solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-palette,.fl-color-picker-ui .iris-ie-lt9 .iris-slider,.fl-color-picker-ui .iris-ie-lt9 .iris-square,.fl-color-picker-ui .iris-ie-lt9 .iris-square-inner{outline:#999 solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-square .ui-slider-handle{outline:#999 solid 1px;background-color:#fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.fl-color-picker-ui .iris-ie-lt9 .iris-square .iris-square-handle{background:0 0;border:3px solid #fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.fl-color-picker-ui .iris-picker .iris-strip{box-sizing:border-box;width:calc(300px - 12px);margin:5px 6px 6px;border-radius:4px;position:relative;height:22px;transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle{width:6px;position:absolute;right:0;top:-2px;bottom:-2px;margin:0;border-radius:3px;background:#fff;box-shadow:0 0 2px rgba(0,0,0,.5);z-index:5;cursor:ew-resize}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle:focus{outline:#00a0d2 solid 2px}.fl-color-picker-ui .iris-picker .iris-slider-offset{position:absolute;top:0;left:6px;right:0;bottom:0;width:auto;height:auto;background:0 0;border:none;border-radius:0;transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-square-handle{background:0 0;border:5px solid #999;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.fl-color-picker-ui .iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover{border-color:#999}.fl-color-picker-ui .iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover::after{border-color:#fff}.fl-color-picker-ui .iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.fl-color-picker-ui .iris-picker .iris-square-value{width:0;height:0;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.fl-color-picker-wrapper{position:relative;width:48px;height:32px}.fl-color-picker{box-shadow:0 2px 4px 0 rgba(0,0,0,.12);background:url(../img/transp_bg.png) #fff;border-radius:4px;width:120px;height:36px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-color-picker-color{-ms-flex:1 1 100%;flex:1 1 100%;box-sizing:border-box!important;position:relative;border-radius:4px;background-color:transparent;cursor:pointer;border:2px solid transparent;padding:0;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:flex}.fl-color-picker-clear:hover,.fl-color-picker-color:hover{background:0 0;border:2px solid transparent}.fl-color-picker-clear:focus,.fl-color-picker-color.fl-color-picker-empty:focus,.fl-color-picker-color:focus{outline:0;top:0;border:2px solid #00a0d2;background:0 0}.fl-color-picker.fl-color-picker-has-reset .fl-color-picker-color:not(.fl-color-picker-empty){border-top-right-radius:0;border-bottom-right-radius:0}.fl-color-picker-icon{display:none;margin:auto}.fl-color-picker-color.fl-color-picker-empty{border-color:transparent;background-color:transparent}.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon{display:block}.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon path{fill:inherit}.fl-color-picker-clear{box-sizing:border-box;position:relative;display:-ms-flexbox!important;display:flex!important;-ms-flex:0 0 36px;flex:0 0 36px;-ms-flex-pack:center;justify-content:center;padding:0;border:2px solid transparent;fill:#A2AABE;background-color:#E7EBEF!important;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:0 4px 4px 0}.fl-color-picker-clear:hover{fill:#6B6E75;background-color:#E7EBEF}.fl-color-picker-color.fl-color-picker-empty+.fl-color-picker-clear{display:none}.fl-color-picker-ui{display:inline-block;font-family:Helvetica,Verdana,sans-serif;z-index:1;position:fixed;overflow:hidden;padding-bottom:45px;border:1px solid rgba(0,0,0,.1);color:#999;background-color:#FAFAFA;border-radius:3px;box-shadow:0 9px 20px rgba(0,0,0,.17);transition:opacity .2s,visibility .2s;visibility:hidden;opacity:0;-webkit-transform:translate3d(0,0,0)}.fl-color-picker-ui.fl-color-picker-active{visibility:visible;opacity:1;z-index:999999}.fl-color-picker-ui .fl-color-picker-input,.fl-color-picker-ui .fl-color-picker-input:focus{width:100%;height:30px;border:none!important;font-size:14px!important;padding:0 8px;vertical-align:middle;color:#656c6e;background-color:#fff;border-radius:0;box-shadow:none}.fl-color-picker-ui .iris-square-value{transition:none}.fl-color-picker-preset-add{position:absolute;top:8px;right:8px;width:14px;height:14px;background-color:#656c6e;border-radius:50%;cursor:pointer;transition:all .2s}.fl-color-picker-preset-add:hover{background-color:#333}.fl-color-picker-preset-add:after,.fl-color-picker-preset-add:before{content:'';display:block;position:relative;background-color:#fff}.fl-color-picker-preset-add:before{top:6px;left:3px;width:8px;height:2px}.fl-color-picker-preset-add:after{left:6px;top:1px;width:2px;height:8px}.fl-color-picker-presets{position:absolute;left:0;bottom:0;width:100%;z-index:15;overflow:auto;border-top:1px solid rgba(0,0,0,.1);background-color:#FAFAFA}.fl-color-picker-presets-list .fl-color-picker-preset:hover,.fl-color-picker-presets-toggle:hover{background-color:#EDEDED}.fl-color-picker-presets-toggle{position:relative;overflow:hidden;width:100%;height:35px;text-align:center;line-height:35px;font-size:12px;font-weight:700;cursor:pointer;transition:all .1s}.fl-color-picker-presets-close-label,.fl-color-picker-presets-open-label{position:absolute;top:50%;left:50%;visibility:hidden;color:#999;transition:all .5s;transform:translate(-50%,-50%);opacity:0;width:100%}.fl-color-picker-presets-close-label.fl-color-picker-active,.fl-color-picker-presets-open-label.fl-color-picker-active{color:#656c6e;visibility:visible;opacity:1;z-index:999999}.fl-color-picker-presets-list{width:100%;list-style:none;margin:0;padding:0;overflow:auto}.fl-color-picker-presets-list .fl-color-picker-no-preset,.fl-color-picker-presets-list .fl-color-picker-preset{position:relative;padding:5px;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .1s}.fl-color-picker-presets-list .fl-color-picker-no-preset{padding:18px 5px;text-align:center}.fl-color-picker-presets-list .fl-color-picker-preset-color{display:inline-block;width:40px;height:20px;margin-right:3px;vertical-align:middle;border:1px solid rgba(0,0,0,.1);border-radius:2px;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-label{vertical-align:middle;color:#333;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-remove{position:absolute;top:50%;cursor:pointer;transform:translateY(-50%)}.fl-color-picker-clear .fl-color-picker-icon-remove{right:auto;top:auto;margin:auto}.fl-color-picker-presets-list .fl-color-picker-preset-remove{right:5px}.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:after,.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:before{background-color:#333}.fl-color-picker-added{position:absolute;width:100%;top:0;left:0;right:0;bottom:35px;z-index:10;color:#fff;text-align:center;background-color:rgba(0,0,0,.8)}.fl-color-picker-added-text{position:absolute;top:50%;left:50%;width:80%;font-size:14px;color:#fff!important;transform:translate(-50%,-50%)}.fl-color-picker-icon-check{position:relative;width:50px;height:50px;margin:5px auto}.fl-color-picker-icon-check:before{content:'';display:block;position:relative;width:15px;height:30px;margin-left:14px;border:7px solid #fff;border-left:none;border-top:none;transform:rotate(45deg)}.fl-color-picker-icon-arrow-down,.fl-color-picker-icon-arrow-up{display:inline-block;position:relative;width:10px;height:10px;margin-left:5px}.fl-color-picker-icon-arrow-down:before,.fl-color-picker-icon-arrow-up:before{content:'';display:block;position:relative;width:6px;height:6px;border:2px solid #999;border-left:none;border-top:none;transform:rotate(45deg)}.fl-color-picker-icon-arrow-up{top:2px;transform:rotate(180deg)}.fl-color-picker-icon-remove{width:15px;height:15px}.fl-color-picker-icon-remove:after,.fl-color-picker-icon-remove:before{content:'';display:block;position:relative;background-color:#6f7881}.fl-color-picker-icon-remove:before{left:6px;width:2px;height:10px;margin-top:3px;transform:rotate(-45deg)}.fl-color-picker-icon-remove:after{left:6px;width:2px;height:10px;margin-top:-10px;transform:rotate(45deg)}.fl-alpha-wrap{position:absolute;width:32px;height:215px;padding:0 5px;right:4px;border-top:none}.fl-alpha-slider{height:190px;position:absolute;top:12px;width:28px}.fl-alpha-slider .ui-slider-handle{background:rgba(0,0,0,0);border-color:#aaa;border-radius:4px;border-style:solid;border-width:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);cursor:ns-resize;height:12px;left:0;opacity:.9;position:absolute;right:0;width:30px;z-index:14}.fl-alpha-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.fl-alpha-slider-offset{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAASCAYAAAAe/ZHXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkNEQUQ0ODM4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkNEQUQ0ODQ4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2Q0RBRDQ4MThFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2Q0RBRDQ4MjhFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/r/N8AAAWYSURBVHjarFvvR3VBEN45JZGIPkREHyIiIhJJf3qUSERE9CGiDxERkcg9z9u92uucvTszz5z7xnHPj93Z2d359cxscn5+jpTS+EoiMr3/+51cZ2dn4+e29i2/u7y8RKf/pO3vc+o+n5ycoNK31+f6+jrfZ37yuG2mf3R01H3fa5N/b29vU6dP5qft0G4PDg5MGuPr/v4+jz1t27mfvN/b21P75+fHx8eZfiV/Ozs7rUJnSu/5+RlFv+m6ZJpbW1s1PnrvXl9fZ/qX89zY2LB4mfy+v7/nsdV1XltbK/dr5vnz87OcV5bJabuVlRVLBifjfX9/l/xkGtM+S0tLNXnu0szfU/P3IMn/k0678h6ddqjQFGccVL6hoCsVfsq+NZ5QtCv5rfFS41sq37W+UPhMyhxEWTetvce3NR8oewqD39qalXuGAK/WPltjajIC4x2c9Ye1f43SGcqGwRBeTZjhMNntL4pCWZMQYhE05RVl02EovRgC4RkCbUNSQAGhGB/GsKG4h6FQoigDa2i8fRBy3uLMXYIG3Vr3aZvRaCRdBYlYIMZywhBGCVhgzzOlgRuUSOvC0GMEWxOM/+EtQFh1OIIXtfwg1tRaayGjg5px0jyZKEaTle3e+AsLCygVRAh3FlEgKbReE3oYGj9EgIR00QiEgKw3ZBQbRGjBeAMtDETQmHiKDsezJNLgCTFGItZXlAgCSiQggblP+9c8SDI0lXWlFv5g3K63KZ51FOcZzthQ3LomoNHwJmKIQISI3vqzSpwIQ8liSjGMFQjDpoVgaQ6cWgvLhOC7qiAwiHrWbEg4JMSmeUrBuHoYwioOQNXmhmAcrs096s1gJCGi3hSEVU8DQxYElYHhKwUUGAa+NqOBMsSSAQJuhQhCAH4vxozExsxiihPuaIrjCVYKWlYEsjSM52G8Kxxryngl5j0j+EyGTIiED4s1Itm0ZGWxMFCLJaBAcEI6OBkmFgNBoc8Cait2ZnENE/6wQN8LJSJeSMNAjKVm+LUMAIt3PR5AQgIGp1Z5zxhE8PtXUYReYeXi4mKmOPNXBMzt2tPT07LIUtJqr66uusXEbkFnWiQ6Pj72ikrtzc1NKopuvbbj58PDwxqNHp27u7tuYWumUDV+v7+/Xyu6pc59+/DwUCsC9ujt7u6qRbt8//T01C3elbyN70fb29uZ/1FSincvLy/lPGb42tzc9IqJeHt7q61Pr2C6vr7u7tfHx8fMPhV0sLq6WhZtU0n36+uru8elPE7aLi8v1wqJPXn++fmZKYgX8ozFxcXJb0NaQTHClZT8+gBjsYdaFc+zWcUkGTCWENY66ta92oSVzo3WI6IZKGtukeyfBLFKBNAj6bUOBgaoe9wE4n04IBNkLMoC7+Skj630ZlTJMYdyMsU2T8AwpzALkVFilZgJcT2l9PCWDDSAMBSjVlJgZNk0lE1AIby0qCiCnBQNj6aBGQslZIZJ5hB6D/AzQHto5Z9Nk8tARdN4q2ExBnsyIJ311EymShyjan2rKk0zh1Ay1oQVWAZQRnkUA8RFw7TahjBnmNgMVMQrsCGZJezRtGlU0cUZ1zuaxGZPpbhApM+ZpFQqQ6xadoMtBrEKpBVo4GRXvNSxpaRixKiR+TChCYhsDwZkfFj8IkErjAHejcUI0XQrgwehhNSMHAz21E0wZ23FcCAmj8Sd/PXy2xLYLAuwRw4IMsqjFaWYOpMEhDySAPFCWyFkgAHrEcA+BNeJ4UE8HCzJPpCrerUmQIx1pWJkjqxJD8EikUo2c5aI8ZYgsAkM4WQtnHd0ns0ORgVTBghy5ISy928SGsbTMqYg523RUY8oNYG4FIYiyRyZCnFCJC87IoRAIMVOqQ7BKexxCS2hYVl9JhvlpYjnAe4MhmRPMWhhvLfXINaI9WKM0Zu0+SfAAFLE1EgfVSv7AAAAAElFTkSuQmCC) center;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;width:200px;height:22px;transform:rotate(-90deg);bottom:48%;left:-80px;position:absolute}.fl-alpha-text{width:30px;font-size:12px;text-align:center;color:#999;position:absolute;bottom:-5px}.fl-lightbox-mask,.fl-lightbox-wrap{bottom:0;left:0;position:fixed;right:0;z-index:100010}@keyframes fl-lightbox-zoom{from{transform:scale(.4)}to{transform:scale(1)}}.fl-lightbox-wrap{display:none;overflow:auto;padding:0;top:43px;-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);pointer-events:none}.fl-builder-draggable-is-dragging .fl-lightbox-wrap,.fl-builder-resizable-is-resizing .fl-lightbox-wrap,.fl-lightbox,.fl-lightbox-mask{pointer-events:auto}.fl-lightbox-mask{background:#000;opacity:.7;filter:alpha(opacity=70);top:0}.fl-lightbox{background:#F5F7F9;border-radius:4px;box-shadow:rgba(0,0,0,1) 0 4px 30px;-moz-box-shadow:rgba(0,0,0,1) 0 4px 30px;-webkit-box-shadow:rgba(0,0,0,1) 0 4px 30px;position:relative;display:-ms-flexbox;display:flex;z-index:100011;transform-origin:center;animation-name:fl-lightbox-zoom;animation-duration:.25s}.fl-lightbox.fl-lightbox-prevent-animation{animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-lightbox :not(i){color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:12px;line-height:14px;text-decoration:none;text-transform:none}.fl-lightbox *,.fl-lightbox :after,.fl-lightbox :before{box-sizing:content-box}#fl-ui-root .fl-nanoscroller-pane,.fl-builder--content-library-panel .fl-nanoscroller-pane,.fl-lightbox .fl-nanoscroller-pane{bottom:2px;right:2px;width:6px}.fl-nanoscroller>.fl-nanoscroller-pane>.fl-nanoscroller-slider{background-color:#bac0ca;transition-property:height,background-color;transition-duration:.25s}#wpadminbar,html{transition-duration:.35s}.fl-nanoscroller>.fl-nanoscroller-pane>.fl-nanoscroller-slider:hover{background-color:#c8cdd4}.fl-nanoscroller>.fl-nanoscroller-pane.active>.fl-nanoscroller-slider{background-color:#029fd2}.fl-lightbox .dashicons{font-family:dashicons}.fl-lightbox.ui-draggable{box-shadow:rgba(0,0,0,.2) 0 7px 30px;-moz-box-shadow:rgba(0,0,0,.2) 0 7px 30px;-webkit-box-shadow:rgba(0,0,0,.2) 0 7px 30px}#wpadminbar,.fl-builder-bar.is-hidden{pointer-events:none}.fl-lightbox-resizable{height:500px;width:380px}@media (max-width:500px){.fl-lightbox-resizable{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-resizable .ui-resizable-handle{display:none!important}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:default!important}.fl-lightbox-controls{display:none}}.fl-lightbox-width-full{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-width-full .fl-lightbox-header{cursor:inherit!important}.fl-lightbox-controls{position:absolute;right:10px;top:10px;z-index:5}.fl-lightbox-controls .fa{color:#bdbdbd;font-size:14px;padding:5px}.fl-lightbox-controls .fa:hover{color:#aaa;cursor:pointer}.fl-lightbox-header-wrap{border-top-left-radius:4px;border-top-right-radius:4px}.fl-lightbox-header{position:relative}.fl-builder-settings-lightbox .fl-lightbox-header h1:before{content:none!important}.fl-lightbox-header h1{color:#333!important;font-size:16px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;font-weight:400!important;margin:0!important;padding:14px 34px 15px 28px!important;text-align:left!important;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;line-height:1;letter-spacing:0}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:move}.fl-lightbox-header h1 .fl-builder-badge{margin-left:10px;color:#fff;background-color:#F7A408}.fl-lightbox-content,.fl-lightbox-content-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1 100%;flex:1 100%;max-width:100%}.fl-lightbox-footer{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex:0 0;flex:0 0;-ms-flex-preferred-size:44px;flex-basis:44px;padding:4px;text-align:right}.fl-lightbox-footer .fl-builder-button{height:36px;margin-left:5px!important;-ms-flex:0 0 0%;flex:0 0 0%;-ms-flex-pack:center;justify-content:center}.fl-lightbox-width-slim .fl-lightbox-footer{-ms-flex-pack:stretch;justify-content:stretch;padding:4px 5px}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button{-ms-flex:1 1 100%;flex:1 1 100%;display:block;text-align:center}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button:first-child{margin-left:0!important}.fl-lightbox table,.fl-lightbox td,.fl-lightbox th,.fl-lightbox tr{border:none}.fl-lightbox-wrap.fl-icon-selector{z-index:1000111}.fl-icon-selector .fl-lightbox{height:100%}.fl-icons-filter{height:auto!important;margin:0!important;position:absolute!important;right:0;top:0;padding:10px 16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-icons-filter select{vertical-align:middle;width:195px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;color:#000;border:2px solid #e4e7ea!important;border-right:none!important;margin:0;padding:2px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;-ms-flex:1 1 195px;flex:1 1 195px;border-radius:0}.fl-icons-filter input[type=text]{line-height:18px;vertical-align:middle;width:160px;-ms-flex:1 1 160px;flex:1 1 160px;border:2px solid #e4e7ea!important;border-radius:0!important;padding:2px 10px!important}.fl-icons-filter input[type=text]:focus,.fl-icons-filter select:focus{border:2px solid #00A0D2!important}.fl-icons-list{bottom:52px;left:0;overflow:auto;padding:20px;position:absolute;right:0;top:48px}.fl-icons-list::-webkit-scrollbar{background-color:#ccc;-webkit-appearance:none;width:10px}.fl-icons-list::-webkit-scrollbar-thumb{background-color:#666;border:1px solid #ccc}.fl-icons-section{text-align:center}.fl-icons-section h2{border-bottom:1px solid #dfdfdf;color:#333!important;font-family:Helvetica,Verdana,sans-serif!important;font-size:16px!important;font-weight:700!important;margin:0 0 20px!important;padding:0 0 10px!important;text-align:left}.fl-builder-button,.fl-responsive-preview-message,a.fl-builder-button,body .fl-builder-bar .fl-builder-bar-content,button.fl-builder-button{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-icons-list i{cursor:pointer;display:inline-block;font-size:40px;height:60px;line-height:60px;width:60px;background:0 0}.fl-icons-list i:hover{background:#fff;box-shadow:0 10px 20px rgba(0,0,0,.15);border-radius:4px}.fl-icon-selector-footer{bottom:0;left:0;position:absolute;right:0}html{transition-property:margin}html.fl-builder-is-showing-toolbar{margin-top:calc(44px + 1px)!important}.fl-builder-edit body{position:static!important}.fl-builder-edit:after,.fl-builder-edit:before{z-index:0!important}.fl-builder-edit .fl-builder-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none}#wpadminbar{transition-property:transform,opacity;transform-origin:bottom;transform-style:preserve-3d;transform:rotateX(89deg) translateY(46px);opacity:0;will-change:transform}html.fl-builder-show-admin-bar{margin-top:32px}html.fl-builder-show-admin-bar #wpadminbar{transform:rotateX(0) translateY(0);pointer-events:auto;opacity:1}@media screen and (max-width:782px){html.fl-builder-show-admin-bar{margin-top:46px}}.fl-clear{clear:both}.screen-reader-text{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}.fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(240,240,240,.8);bottom:0;display:none;left:0;position:fixed;right:0;text-align:center;top:0;z-index:12000000}.fl-builder-settings .fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(255,255,255,.8);display:block;position:absolute}.fl-field-loader{color:#B3B3B3!important;font-style:italic}.fl-builder-node-loading{opacity:.35!important}.fl-builder-node-loading-placeholder{background:url(../img/ajax-loader.svg) center center no-repeat;height:50px}.fl-col-group-has-child-loading{display:-ms-flexbox;display:flex}.fl-col-group-has-child-loading>.fl-builder-node-loading-placeholder{width:50px}.fl-node-hidden{display:none}.fl-builder-edit .fl-node-hidden{display:block}html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-desktop,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-desktop-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-medium-mobile,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-visible-mobile{display:block!important}html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-desktop,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-desktop-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-medium,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-medium-mobile,html:not(.fl-responsive-preview-enabled) .fl-builder-content-editing .fl-col-group-equal-height .fl-col.fl-visible-mobile{display:-ms-flexbox!important;display:flex!important}.fl-responsive-preview-enabled body{overflow:hidden!important}.fl-responsive-preview-mask{background:#F7F7F7;bottom:0;left:0;position:fixed;right:0;top:0;z-index:99999}.fl-responsive-preview{bottom:0;left:0;position:fixed;right:0;top:0;margin-top:50px;z-index:100000}.fl-builder-preview .fl-responsive-preview{margin:0!important}.fl-responsive-preview-content{background:#F5F7F9;padding:20px 20px 45px;overflow:scroll;position:absolute;top:45px;right:0;bottom:0;left:0}.fl-responsive-preview-content .fl-builder-content-editing{overflow:visible!important}.fl-responsive-preview-message{background:#F5F7F9;color:#b3b3b3;font-size:14px;font-weight:400;padding:15px;text-align:center;position:absolute;top:0;left:0;right:0;z-index:999999}.fl-responsive-preview-message span{display:inline-block;margin-right:8px}.fl-responsive-preview-message .fl-builder-button{display:inline-block;margin-left:2px;padding:0 10px}.fl-responsive-preview-message .fl-builder-button i{font-size:14px;height:14px;width:14px}.fl-responsive-preview .fl-builder-content{box-shadow:0 0 8px rgba(0,0,0,.2);margin-left:auto;margin-right:auto;max-width:100%;overflow:visible;position:relative}#fl-builder-preview-frame,#fl-builder-preview-mask{bottom:0;height:100%;position:fixed;top:0;width:100%;right:0}.fl-responsive-preview .fl-block-col-resize{display:none}#fl-builder-preview-mask{background:url(../img/ajax-loader.svg) center center no-repeat #F7F7F7;left:0;z-index:999999}#fl-builder-preview-frame{left:50%;transform:translateX(-50%);-moz-transform:translateX(-50%);-webkit-transform:translateX(-50%);z-index:1000000}body button[class*=fl-builder],body button[class*=fl-builder]:focus,body button[class*=fl-builder]:hover{box-shadow:none;max-height:none;max-width:none;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;letter-spacing:normal}.fl-builder-button,a.fl-builder-button,button.fl-builder-button{-webkit-appearance:none;-ms-flex-align:center;align-items:center;background:#e7ebef;border:2px solid transparent;border-radius:3px;-webkit-border-radius:3px;box-sizing:border-box!important;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;color:#676F7A!important;cursor:pointer;display:-ms-flexbox;display:flex;fill:#676F7A!important;font-size:14px!important;font-style:normal!important;font-weight:500!important;height:33px;letter-spacing:normal!important;line-height:1!important;margin:0;padding:0 12px;text-align:center;transition-property:background-color,width;transition-duration:.2s;white-space:nowrap;width:auto;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder--search-results-panel,.fl-builder-bar,.fl-builder-panel{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}.fl-builder-button:hover{background:#dadfe5;color:#222;border:2px solid transparent!important}.fl-builder-button:active{background:#DCDCDC}button.fl-builder-button:focus{position:static;top:auto;outline:0;background:#E4E7EA;border:2px solid #00A0D0!important}.fl-builder-button-primary,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button{background:#00A0D2;color:#fff!important;text-decoration:none;border:2px solid transparent!important}.fl-builder-button.fl-builder-button-primary:focus,body.fl-builder--layout-has-drafted-changes .fl-builder-button.fl-builder-done-button:focus{background:#00A0D2;border:2px solid #ffc217!important}.fl-builder-button-primary:hover,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:hover{background:#0197C6;color:#fff!important}.fl-builder-button-primary:active,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:active{background:#0484AC}.fl-builder-button-large{height:30px}.fl-builder-button-small{font-size:11px!important;line-height:1!important}.fl-builder-help-button{color:#b3b3b3;font-size:16px!important}.fl-builder-help-button i{position:relative;top:-1px}.fl-builder-help-button:hover{color:#666}.fl-builder-publish-button{line-height:45px!important}.fl-builder-content-panel-button,.fl-builder-content-panel-button:hover{fill:#00A0D2!important;font-size:30px!important;padding:2px 8px!important}.fl-builder-button-silent,.fl-builder-button-silent:hover{padding:0 12px;background:0 0!important;border:2px solid transparent!important;box-shadow:none!important}.fl-builder-done-button,.fl-builder-done-button:hover{font-weight:600}.fl-field .fl-builder-button{display:inline-block;height:auto;padding:11px 12px;vertical-align:middle;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.fl-builder-button svg{max-width:none}.fl-builder-edit .media-modal-content button,.fl-builder-settings-fields button{letter-spacing:normal}.fl-builder-badge{background:#333;border-radius:2px;color:#fff!important;display:inline;font-size:11px!important;font-weight:400;letter-spacing:1px;margin-left:2px;padding:2px 4px;vertical-align:middle}.fl-builder-badge-global{background:#ff9600;transform:translateY(0);transition-duration:.25s;transition-property:transform}.fl-builder-blocks-node-template .fl-builder-badge-global{position:absolute;right:0;top:0}.fl-builder-block:hover .fl-builder-badge-global{display:none}.fl-builder-bar{left:0;position:fixed;right:0;top:0;z-index:999999;user-select:none;transition-property:transform opacity;transition-duration:.35s;transform-style:preserve-3d;perspective:1100px}.fl-builder-bar.is-hidden .fl-builder-bar-content{transform:translateY(-100%) rotateX(90deg)}body .fl-builder-bar .fl-builder-bar-content{display:-ms-flexbox;display:flex;box-sizing:border-box;background:#fff;border-bottom:1px solid #eceef1;color:#999;font-size:14px!important;height:calc(44px + 1px);transition-property:background-color,opacity,transform;transition-duration:.35s;pointer-events:auto}.fl-builder-draggable-is-dragging .fl-builder-content,.fl-builder-draggable-is-dragging .fl-builder-panel .fl-lightbox,.fl-builder-resizable-is-resizing .fl-builder-content,.fl-builder-resizable-is-resizing .fl-builder-panel .fl-lightbox,body .fl-builder-bar .fl-builder-bar-content.is-muted{pointer-events:none}body .fl-builder-bar .fl-builder-bar-content.is-muted>:not(.fl-builder-publish-actions){-webkit-filter:saturate(20%) blur(1px);filter:saturate(20%) blur(1px);opacity:.4}.fl-builder-bar-title{box-sizing:border-box;color:#333;display:-ms-flexbox;display:flex;-ms-flex:0 0 380px;flex:0 0 380px;max-width:380px;border-right:1px solid #eceef1;cursor:pointer}.fl-builder-bar-title:hover{background:#fff}.fl-builder-bar-title.is-showing-menu .fl-builder-bar-title-caret>svg{transform:rotate(180deg)}.fl-builder-simple .fl-builder-bar-title{cursor:auto}.fl-builder-simple .fl-builder-bar-title:hover{cursor:auto;background:0 0}.fl-builder-bar-title span{vertical-align:middle}.fl-builder-bar-title-icon{box-sizing:border-box;background:0 0;-ms-flex:0 0 46px;flex:0 0 46px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:4px}.fl-builder-bar-title-icon img{max-width:100%!important;height:auto!important}.fl-builder-bar-title.fl-builder-bar-title-no-icon{padding-left:12px}.fl-builder-bar-title-area{box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:4px}.fl-builder-layout-title,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{font-size:16px;font-weight:400;line-height:1.3;color:#161B20;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret,.fl-builder-layout-pretitle,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{font-size:12px;font-weight:500;line-height:1.3;color:#656d77;text-align:left;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret i,.fl-theme-builder-preview-select-title i{color:inherit!important;font-size:14px}.fl-builder-bar-title-caret{margin-left:auto!important;-ms-flex:0 0 46px;flex:0 0 46px}.fl-theme-builder-preview-select-title i{padding:12px}.fl-theme-builder-preview-select-title i:before{content:"\f078"}.fl-theme-builder-preview-select.fl-builder-button{position:relative;border-radius:0;background:0 0;min-width:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 360px;flex:0 0 360px;max-width:360px;margin:0!important;padding:4px 10px;border:none!important;border-right:2px solid #d5dadd!important;box-shadow:none}.fl-theme-builder-preview-select.fl-builder-button:hover{border:none!important;border-right:2px solid #d5dadd!important}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fl-theme-builder-preview-select-title div{-ms-flex:1;flex:1}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{display:block}.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items{position:absolute;top:calc(48px + 10px);left:10px;width:calc(100% - 20px)!important;background:#fff;border-radius:4px;border:2px solid #D5DADD;border-top:3px solid #00a0d2;box-shadow:0 15px 45px 8px rgba(0,0,0,.04);margin:0!important;padding:0;z-index:-1;font-size:16px;overflow-y:scroll;height:auto!important;max-height:calc(100vh - 66px);min-height:300px;display:-ms-flexbox!important;display:flex!important;-ms-flex-direction:column;flex-direction:column}.fl-theme-builder-preview-select-item{padding:4px 0!important;border-bottom:none!important;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:initial}.fl-theme-builder-preview-select-item:hover{text-decoration:none;color:#111;background:0 0!important}body .fl-theme-builder-preview-select .fa-caret-down{float:none}body .fl-theme-builder-preview-select-item-title{padding:10px 15px;color:#222;font-size:14px}body .fl-theme-builder-preview-select .fa-caret-down i:before,body .fl-theme-builder-preview-select-item-title i:before{content:"\f078"}body .fl-theme-builder-preview-select-item-children{overflow:auto}body .fl-theme-builder-preview-select-item-child{overflow:hidden;text-overflow:ellipsis;line-height:1.1;margin:0 10px;border:2px solid transparent;border-radius:4px;padding:8px 10px 10px;font-size:14px;font-weight:400;color:#222}body .fl-theme-builder-preview-select-item-child:hover{background:#e6eaed!important}.fl-theme-builder-preview-select-item .fa-caret-down{color:#606D77}.fl-builder-bar-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex:1 1 100%;flex:1 1 100%;padding:4px}.fl-builder-bar .fl-builder-button{height:auto;margin:0 0 0 4px}.fl-builder-bar-actions .fl-builder-button:last-child{margin:0}.fl-builder-bar-actions:after{clear:both}.fl-builder-bar .fl-builder-content-panel-button{-ms-flex-align:baseline!important;align-items:baseline!important;padding-top:1px;font-weight:400}.fl-builder-content-panel-button svg{transition-property:transform;transition-duration:.25s;transform:rotate(0) scale(1);transform-origin:center}.fl-builder-content-panel-is-showing .fl-builder-content-panel-button svg{transform:rotate(135deg) scale(1.1) translate(.5px,-.5px)}.fl-builder--saving-indicator{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;padding:0 10px;font-size:12px;font-style:italic;color:#676f7a;-ms-flex-align:center;align-items:center;line-height:1.2;min-width:180px;-ms-flex-pack:end;justify-content:flex-end}.fl-builder--saving-indicator:hover{color:#676f7a}.fl-builder--saving-indicator .fa-question-circle{font-size:13px;margin:3px 0 3px 5px}.fl-builder-button.fl-builder-buy-button,.fl-builder-button.fl-builder-feedback-button,.fl-builder-button.fl-builder-upgrade-button{background:#F7A407;color:#fff!important;text-decoration:none}.fl-builder-buy-button i.fa-external-link-alt,.fl-builder-feedback-button i.fa-external-link-alt,.fl-builder-upgrade-button i.fa-external-link-alt{color:#FFC733;margin:0 0 0 6px}.fl-builder-buy-button:hover,.fl-builder-feedback-button:hover,.fl-builder-upgrade-button:hover{background:#EE8E0D;color:#fff!important}@media (max-width:980px){.fl-builder--main-menu-panel{width:calc(100% - 20px)!important}.fl-builder--main-menu-panel:before{right:auto;left:20px}.fl-builder-bar-title,.fl-theme-builder-preview-select{-ms-flex:1 .5 380px!important;flex:1 .5 380px!important}}@media (max-width:620px){.fl-theme-builder-preview-select.fl-builder-button{display:none}}@media (max-width:500px){#fl-builder-toggle-notifications,.fl-builder--main-menu-panel:before,.fl-builder--panel-arrow,.fl-builder-bar-title-area,.fl-builder-panel-drag-handle,.fl-builder-panel:before{display:none}.fl-builder--main-menu-panel,.fl-builder-panel{width:auto!important;top:44px!important;left:0!important;right:0!important;bottom:0!important;border-radius:0!important;box-shadow:none!important}.fl-builder--main-menu-panel{border-left:transparent!important;border-right:transparent!important;border-bottom:transparent!important;max-height:calc(100% - 44px)!important}.fl-builder-bar-title{-ms-flex:0 0 80px!important;flex:0 0 80px!important}.fl-builder-bar-title-caret{padding-left:0;padding-right:0;max-width:24px}.fl-builder-bar-actions{max-width:calc(100% - 80px);overflow:hidden}.fl-builder--panel-header{border-radius:0!important;cursor:default!important}.fl-builder--panel-header .fl-builder--tabs{cursor:default!important}.fl-builder-publish-actions{width:100%!important;padding-left:4px!important}.fl-builder-bar-actions .fl-builder-button{padding:0 8px!important}}.fl-notifications-panel .fl-builder-ui-post .wp-block-image,.fl-notifications-panel .fl-builder-ui-post .wp-block-image figure{margin-top:10px!important;margin-bottom:10px!important}.fl-builder--preview-actions{display:none;position:fixed;top:4px;left:4px;z-index:10000001;padding:4px;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder-preview .fl-builder--preview-actions{display:-ms-flexbox;display:flex}.fl-builder--preview-actions .device-icons{color:#555;background:#e4e4e4;border:none!important;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;text-decoration:none;font-size:14px!important;line-height:1!important;margin:0 4px 0 0;padding:0 6px;cursor:pointer;-webkit-border-radius:3px;-webkit-appearance:none;border-radius:3px}.fl-builder--preview-actions .device-icons i{margin:0 6px}@keyframes fl-builder-ui-pin-zone-pulse{0%,100%{opacity:1;filter:alpha( opacity=1 )}50%{opacity:.5;filter:alpha( opacity=35 )}}.fl-builder-ui-pin-zone{animation:fl-builder-ui-pin-zone-pulse 2s infinite;transition:width .3s ease;background:rgba(0,160,210,.5);bottom:0;top:0;position:fixed;width:35px;z-index:100001}.fl-builder-ui-show-pin-zone-left .fl-builder-ui-pin-zone-left,.fl-builder-ui-show-pin-zone-right .fl-builder-ui-pin-zone-right{width:75px}.fl-builder-ui-pin-zone-left{left:0}.fl-builder-ui-pin-zone-right{right:0}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button{display:-ms-flexbox!important;display:flex!important;background:rgba(0,160,210,.5)!important;padding:2px 4px;width:80px;animation:fl-builder-ui-pin-zone-pulse 2s infinite}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button svg{display:none}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button{width:120px}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button svg{display:none!important;width:100%;transform:none!important;fill:#00A0D2!important;border-radius:3px}.fl-builder-ui-is-pinned .fl-builder-content-panel-button,.fl-builder-ui-pinned-container .fl-lightbox-controls{display:none}.fl-builder-content-panel-pin-zone .fl-builder-done-button{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.fl-builder-panel.fl-builder-ui-pinned{top:45px!important;bottom:0!important;height:auto!important;border-radius:0;border:none;box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s;z-index:11}.fl-builder-panel.fl-builder-ui-pinned-right{left:auto!important;right:0;border-left:1px solid #eceef1}.fl-builder-panel.fl-builder-ui-pinned-left{left:0;right:auto;border-right:1px solid #eceef1}.fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-radius:0!important}.fl-builder-ui-pinned-container .fl-lightbox-wrap{position:absolute;z-index:11}.fl-builder-ui-pinned-container .fl-lightbox{position:absolute;top:0;bottom:0;left:0;right:0;width:auto!important;height:auto;border-radius:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-builder-ui-pinned-container .fl-lightbox-header-wrap{border-radius:0}.fl-builder-ui-pinned-container .fl-lightbox.ui-draggable .fl-lightbox-header{cursor:auto}.fl-builder-ui-pinned-container .fl-lightbox-header h1{padding:12px 20px 10px!important}.fl-builder-ui-pinned-content-transform{transform:scale(1);transform-origin:center top 0}.fl-builder-ui-pinned-collapse{cursor:pointer;display:none;position:absolute!important;bottom:2px;padding:5px;border:2px solid transparent;background:0 0!important;width:36px;height:36px;border-radius:4px;fill:#778794;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.fl-builder-ui-pinned-collapse:focus,.fl-builder-ui-pinned-collapse:hover{top:auto!important;background:0 0;border:2px solid transparent;outline:0;fill:#00A0D2}.fl-builder-ui-pinned-collapse:focus{background:#E4E7EA}.fl-builder-ui-pinned-collapse>*{margin:auto;line-height:1}.fl-builder-ui-pinned-collapse svg g{fill:inherit}.fl-builder-ui-is-pinned-right .fl-builder-ui-pinned-right-collapse{display:-ms-flexbox;display:flex;left:-40px}.fl-builder-ui-is-pinned-left .fl-builder-ui-pinned-left-collapse{display:-ms-flexbox;display:flex;right:-40px}.fl-builder-ui-pinned-collapse i[data-toggle=show],.fl-builder-ui-pinned-is-collapsed i[data-toggle=hide]{display:none}.fl-builder-ui-pinned-is-collapsed i[data-toggle=show]{display:block}.fl-builder--panel-no-settings,.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--panel-content,.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--panel-controls,.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--tab-wrap,.fl-builder-ui-pinned-is-collapsed .fl-builder--panel-header{display:none}.fl-builder-ui-is-pinned-left [data-toggle=hide],.fl-builder-ui-is-pinned-right [data-toggle=show]{transform:rotateY(180deg)}.fl-builder-ui-pinned-is-collapsed .fl-lightbox{box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none}.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-builder--panel-header{background:0 0;border:none;z-index:10}.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-lightbox-wrap{top:0}.fl-builder-simple-pinned .fl-builder--content-library-panel .fl-lightbox-header h1{padding:14px 28px 15px!important}.fl-builder-simple-pinned .fl-builder--panel-no-settings{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:absolute;top:0;left:0;right:0;bottom:0}@keyframes fl-builder-show-panel{from{transform:scale(.8)}to{transform:scale(1)}}.fl-builder--search-results-panel,.fl-builder-panel{box-sizing:border-box;position:fixed!important;right:20px;top:calc(43px + 10px);width:380px;bottom:20px;background:#F5F7F9;color:#676F7A;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;border-radius:4px;box-shadow:0 8px 40px 4px rgba(0,0,0,.3);z-index:10000007;will-change:transform;user-select:none}.fl-builder-panel{transform-origin:top right;animation-name:fl-builder-show-panel;animation-duration:.15s;animation-fill-mode:both;-ms-flex:1;flex:1;display:none}.fl-builder--search-results-panel{display:none;position:absolute;right:0;top:93px;left:0;bottom:0;width:auto!important;border:none;border-radius:0;box-shadow:none;min-height:100px;max-height:calc(100vh - 54px);overflow:auto;z-index:1}.fl-builder-content-panel-is-showing .fl-builder-panel,.fl-builder-search-results-panel-is-showing .fl-builder--search-results-panel{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.fl-builder-panel .fl-lightbox .fl-builder-panel-drag-handle,.fl-builder-ui-is-pinned .fl-builder--panel-arrow,.fl-lightbox-width-full .fl-builder-panel-drag-handle,body.fl-builder-draggable-is-dragging .fl-builder--panel-arrow{display:none}.fl-builder--search-results-panel .fl-builder--no-results{text-align:center;padding:50px 20px}.fl-builder--panel-arrow{position:absolute;top:-13px;right:10px}.fl-builder--panel-arrow polygon{fill:#00a0d2}.fl-builder--panel-header{border-top:3px solid #00a0d2;border-top-right-radius:4px;border-top-left-radius:4px}.fl-builder-ui-is-pinned .fl-builder--panel-header{border-top:none}.fl-builder-panel-drag-handle{position:absolute;top:7px;left:10px;fill:#ccd4da;width:6px}.fl-builder-ui-is-pinned-left .fl-builder-panel-drag-handle{left:auto;right:10px}.fl-builder--panel-header .fl-builder--panel-controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-content-group-select{-ms-flex:1 1;flex:1 1}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-panel-search{-ms-flex:0 0;flex:0 0;padding:0 10px 6px 0;margin-left:-4px}.fl-builder--panel-controls .fl-builder-panel-search button{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:30px;background:0 0!important;border:2px solid transparent!important;font-size:inherit;height:36px;margin:0;padding:0}.fl-builder--panel-controls .fl-builder-panel-search button:active,.fl-builder--panel-controls .fl-builder-panel-search button:focus{top:0;outline:0}.fl-builder-panel-search button svg{height:auto;width:20px}.fl-builder-panel-search button.fl-builder-dismiss-panel-search svg{width:16px}.fl-builder-panel-search button svg .filled-shape{fill:#000}.fl-builder--panel-controls .fl-builder-panel-search button:active svg .filled-shape,.fl-builder--panel-controls .fl-builder-panel-search button:focus svg .filled-shape{fill:#00A0D2}.fl-builder-panel-search .fl-builder-panel-search-input{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:#f5f7f9}.fl-builder-panel-search.is-showing-input .fl-builder-panel-search-input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0 10px 6px}.fl-builder-panel-search-input input{-ms-flex:1 1 100%;flex:1 1 100%;border:2px solid #e6eaed;background:#fff;border-radius:4px;margin:0 4px 0 0;padding:10px;color:#333}.fl-builder-panel-search-input input:focus{border-color:#0197C6;outline:0}.fl-builder-panel-content-wrap{bottom:0;height:auto;left:0;overflow:hidden;position:absolute;right:0;top:43px}.fl-builder-panel-content{padding-bottom:60px}.fl-builder--panel-view .fl-builder-blocks-section:first-child{border-top:none}.fl-builder-blocks-group:first-child{padding:20px 0 0}.fl-builder-blocks-group .fl-builder-blocks-section-group-name{display:block;padding:0 30px 15px;color:#000;font-size:20px;font-weight:600;line-height:1.4}.fl-builder-blocks-section .fl-builder-block{display:block;line-height:1.1;padding:15px 20px}.fl-builder--template-collection-section-header,.fl-builder-blocks-section .fl-builder-blocks-section-header{line-height:1.2;color:#333;margin:0!important;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e7ebef;border-top:4px solid #e7ebef;height:30px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-builder-blocks-section .fl-builder-blocks-section-title{background:#F5F7F9;color:#353535;padding:2px 16px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.fl-builder-blocks-section .fl-builder-blocks-section-title i{color:#bfbfbf;float:right}.fl-builder-blocks-section-content{overflow:auto;padding:10px 10px 20px}.fl-builder-blocks-section-content:before{content:none}.fl-builder-blocks-section-content:after{float:none;clear:both}.fl-builder-blocks-section-content.fl-builder-modules,.fl-builder-blocks-section-content.fl-builder-rows,.fl-builder-blocks-section-content.fl-builder-widgets{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}@supports (display:grid){.fl-builder--template-collection-section-content,.fl-builder-blocks-section-content.fl-builder-modules,.fl-builder-blocks-section-content.fl-builder-rows,.fl-builder-blocks-section-content.fl-builder-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr))}.fl-builder--template-collection-section-content>*,.fl-builder-blocks-section-content.fl-builder-modules>*,.fl-builder-blocks-section-content.fl-builder-rows>*,.fl-builder-blocks-section-content.fl-builder-widgets>*{width:auto!important}}.fl-builder-blocks-section-content .fl-builder-block-module,.fl-builder-blocks-section-content .fl-builder-block-row{-ms-flex:1 1 50%;flex:1 1 50%;width:50%;box-sizing:border-box}.fl-builder--search-results-panel .fl-builder-blocks-section-content .fl-builder-block-module{-ms-flex:1 1 100%;flex:1 1 100%;width:100%}.fl-builder-blocks-section.fl-active .fl-builder-blocks-section-content{display:block}.fl-builder-blocks-section-content .fl-builder-block{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:13px;line-height:1.1;font-weight:400;color:#38404a}.fl-builder-block{position:relative;height:47px}.fl-builder-block.fl-builder-block-col-group{height:84px}.fl-builder-block.fl-builder-block-has-thumbnail{height:auto!important;padding:10px!important}.fl-builder-block.fl-builder-block-has-thumbnail:hover{padding:0!important}.fl-builder-block.fl-builder-block-has-thumbnail .fl-builder-block-content{position:relative!important}.fl-builder-block.fl-builder-block-has-thumbnail:hover .fl-builder-block-content{padding:10px!important}.fl-builder-block.fl-builder-block-has-thumbnail .fl-builder-block-details{margin:0 10px 4px!important}.fl-builder-block:hover{overflow:visible;z-index:1}.fl-builder-block:hover .fl-builder-block-content{display:block;box-sizing:border-box;position:absolute;top:0;left:0;width:100%;padding:15px 20px;border-radius:4px;background:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);text-decoration:none;color:#111;cursor:move;overflow:hidden}.fl-builder-blocks-node-template .fl-builder-block,.fl-builder-blocks-section-content .fl-builder-block .fl-builder-block-details{position:relative}.fl-builder-block-module:hover .fl-builder-block-content{width:auto;min-width:100%}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual{display:block;margin-bottom:7px}.fl-builder-block-drag-helper .fl-builder-block-content .fl-builder-block-visual{display:none!important}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual.fl-cols-visual{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:30px}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{-ms-flex:1 100%;flex:1 100%;background:#464a4c;height:30px;margin:0 2px;border-radius:2px}.fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#000}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:first-child{margin-left:0!important}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:last-child{margin-right:0!important}.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:last-child,.fl-cols-visual.left-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.right-sidebar .fl-cols-visual-col:last-child{-ms-flex-preferred-size:60px;flex-basis:60px}.fl-builder-block-saved-column.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-column:hover .fl-builder-block-title,.fl-builder-block-saved-module.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-module:hover .fl-builder-block-title,.fl-builder-block-saved-row.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-row:hover .fl-builder-block-title,.fl-builder-touch .fl-builder-block-saved-column .fl-builder-block-title,.fl-builder-touch .fl-builder-block-saved-module .fl-builder-block-title,.fl-builder-touch .fl-builder-block-saved-row .fl-builder-block-title{margin-right:70px}.fl-builder-block-module:nth-child(even):hover .fl-builder-block-content{left:auto;right:0}.fl-builder-block-thumbnail{border-radius:4px;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:rgba(0,0,0,.06);margin-bottom:10px;transform-origin:bottom;transition-property:transform,box-shadow;transition-duration:.15s}.fl-builder-block:hover .fl-builder-block-thumbnail{transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder-block .fl-builder-block-icon{margin-right:7px;fill:#000;display:inline-block;width:20px;height:20px;vertical-align:middle}.fl-builder-block-thumbnail:before{content:"";display:block;padding-top:50%}.fl-builder-block-thumbnail img{max-width:100%;max-height:160px;margin:0;-o-object-fit:cover;object-fit:cover}.fl-builder-blocks-section-content .fl-builder-block{box-shadow:0 0 0 transparent;transition-property:box-shadow;transition-duration:.15s}.fl-builder-blocks-section-content .fl-builder-block i,.fl-user-template-actions i{color:#000;margin-right:10px}.fl-builder-blocks-separator{background:#f1f1f1;height:6px}.fl-builder-block:hover .fl-builder-badge{background:#2ea2cc}.ui-sortable-helper .fl-builder-badge{display:none!important}.fl-builder-modules-cta a{color:#999!important;display:block!important;font-size:12px!important;font-style:italic!important;padding:15px 20px!important;line-height:16px!important}.fl-builder-modules-cta a:hover{background:#e5e5e5!important;color:#666!important;text-decoration:none!important}.fl-builder-modules-cta a:focus{text-decoration:none!important}.fl-builder-modules-cta .fa{float:right!important;font-size:14px!important;margin:3px 0 0 9px!important}.fl-builder--panel-message{text-align:center;padding:40px 20px;font-size:16px}.fl-builder--panel-message .fl-builder-button{display:inline-block;padding:10px}.fl-builder--panel-cta{padding:20px 30px;font-size:16px;text-align:center}.fl-builder--panel-cta a{color:inherit;text-decoration:none}.fl-builder--panel-cta a:hover{text-decoration:none}.fl-builder-block-template-image{margin:5px 0 10px;max-width:100%;border:1px solid #dfdfdf}.fl-builder-block .fl-builder-block-title{overflow:hidden;text-overflow:ellipsis;vertical-align:middle;line-height:1.3}.ui-sortable-helper .fl-builder-block-template-image{display:none!important}@keyframes fl-builder-template-item-enter{from{transform:translateY(100px) scale(.3);opacity:0}to{transform:scale(1);opacity:1}}.fl-builder--template-collection{clear:both;padding:10px 0}.fl-builder--template-collection-section-content{padding:0 10px}.fl-builder--template-collection-item{box-sizing:border-box;width:50%;float:left;padding:10px;cursor:pointer;font-size:13px;transform-origin:center;opacity:1}.fl-builder--template-thumbnail{background-size:cover;background-clip:content-box;background-position:center top;background-color:#fff;border:2px solid transparent;transform-origin:bottom;transition-property:transform,box-shadow;transition-duration:.15s}.fl-builder--template-collection-item[data-id="0"] .fl-builder--template-thumbnail,.fl-user-template .fl-builder--template-thumbnail{border-color:#e4e7ea}.fl-builder--template-thumbnail:before{display:block;content:"";padding-top:120%}.fl-builder--template-thumbnail:hover{transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder--template-name{text-align:center;padding:4px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fl-builder--template-collection-section{padding-bottom:10px;border-bottom:1px solid #dfdfdf}.fl-builder--template-collection-section:last-child{border-bottom:none}.fl-builder--template-collection-section:after,.fl-builder--template-collection-section:before{content:"";display:block;clear:both}.fl-builder--template-collection-section-name{padding:15px 10px 10px}span.fl-builder-block-no-node-templates{display:block;padding:15px 20px;text-align:center}span.fl-builder-block-no-node-templates:hover{cursor:default}.fl-builder-blocks-section-content .fl-builder-node-template-actions{bottom:0;cursor:default;display:none;position:absolute;right:0;top:0}.fl-builder-blocks-section-content .fl-builder-node-template-actions a:hover{text-decoration:none}.fl-builder-blocks-section-content .fl-builder-node-template-delete,.fl-builder-blocks-section-content .fl-builder-node-template-edit{display:inline;cursor:pointer;margin:0;padding:15px 10px;text-align:center;width:30px}.fl-builder-block-details .fl-builder-node-template-delete,.fl-builder-block-details .fl-builder-node-template-edit{padding-top:0!important}.fl-builder-blocks-section-content .fl-builder-node-template-delete i,.fl-builder-blocks-section-content .fl-builder-node-template-edit i{color:#676F7A;margin:0}.fl-builder-blocks-section-content .fl-builder-node-template-delete:hover i,.fl-builder-blocks-section-content .fl-builder-node-template-edit:hover i{color:#444}.fl-builder-blocks-node-template .fl-builder-block:hover .fl-builder-node-template-actions,.fl-builder-touch .fl-builder-blocks-section-content .fl-builder-node-template-actions{display:block}.ui-sortable-helper .fl-builder-node-template-delete,.ui-sortable-helper .fl-builder-node-template-edit{display:none!important}.fl-builder--tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.fl-builder-panel .fl-builder--panel-header{cursor:move}.fl-builder-panel .fl-builder--tabs{-ms-flex-pack:distribute;justify-content:space-around;padding:4px 24px;cursor:pointer}.fl-builder--tab-wrap{-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:justify;justify-content:space-between;margin:auto;max-width:400px}.fl-builder--tabs button,.fl-builder--tabs button:active,.fl-builder--tabs button:focus,.fl-builder--tabs button:hover{-ms-flex:1 1 100%;flex:1 1 100%;display:inline-block;text-decoration:none;text-transform:none;color:inherit;text-align:center;letter-spacing:normal!important;margin:0;padding:5px;cursor:pointer;font-size:13px!important;font-weight:500!important;line-height:1.3!important;background:0 0!important;outline:0!important;border:2px solid transparent;border-radius:4px;min-height:36px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;top:0;transition-property:background,color;transition-duration:.25s}.fl-builder--tabs button:focus{background:#e6eaed!important}.fl-builder--tabs button.is-showing{color:#0086b0}.fl-builder--panel-content{-ms-flex:1;flex:1}.fl-builder--panel-view{display:none;overflow:hidden}.fl-builder--panel-view.is-showing{display:block}.fl-builder--content-library-panel.ui-draggable-dragging{height:500px!important}.fl-builder--content-library-panel .fl-builder-drop-zone{display:none!important}.fl-builder--panel-header .fl-builder--tabs{cursor:move}.fl-builder--category-select{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.fl-builder--selector-display{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-ms-flex-pack:justify;justify-content:space-between;color:#161B20;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;cursor:pointer;font-size:13px;font-weight:700;line-height:16px;border-radius:4px;-ms-flex-align:stretch;align-items:stretch}.fl-builder--selector-display-label{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;font-size:inherit;line-height:inherit;width:100%;margin:0!important;padding:0!important;color:#6D6D6D;background:0 0!important;border:2px solid transparent;box-shadow:0 1px 2px 0 rgba(0,0,0,.12)!important;border-radius:4px;font-family:inherit;text-transform:none}.fl-builder--selector-display-label:hover{top:0;color:inherit;background:0 0!important;border:2px solid transparent;border-radius:4px}.fl-builder--selector-display-label:active{top:0;color:inherit;background:0 0;border:2px solid #e4e7ea;border-radius:4px}.fl-builder--selector-display-label:focus{top:0;color:inherit;background:0 0;border:2px solid #00A0D2;outline:0}.fl-builder--group-label{color:inherit;-ms-flex:0 0 auto;flex:0 0 auto;padding:4px 12px 4px 10px;background:#e7ebef;border-radius:3px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.fl-builder--current-view-name{-ms-flex:1 1 100%;flex:1 1 100%;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;padding:8px 10px;text-align:left}.fl-builder--selector-menu{display:none;color:#293138;position:absolute;top:46px;left:0;width:100%;background:#fff;border-radius:4px;box-shadow:0 0 20px 2px rgba(0,0,0,.2);overflow:visible;z-index:2}.fl-builder--selector-menu:before{bottom:100%;right:8px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}.fl-builder--category-select.is-showing .fl-builder--selector-menu{display:-ms-flexbox;display:flex;max-height:calc(100vh - 150px)}.fl-builder--category-select.is-showing .fl-builder--selector-menu .fl-builder--menu{margin:10px 0;-ms-flex:1 100%;flex:1 100%;overflow:auto}button.fl-builder-button.fl-builder-bar-title-caret{margin:4px}button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#e6eaed!important;border-color:transparent!important}.fl-builder--category-select.is-showing .fl-builder-bar-title-caret i{transform:rotate(180deg)}.fl-builder--menu{margin-bottom:2px}.fl-builder--menu>a,.fl-builder--menu>button,.fl-builder--menu>span{display:block;padding:8px 10px 10px;border-radius:4px;color:inherit;text-decoration:none;background:0 0!important;border:2px solid transparent!important;font-weight:400;font-family:inherit}.fl-builder--menu>a:active,.fl-builder--menu>a:focus,.fl-builder--menu>a:hover,.fl-builder--menu>button:active,.fl-builder--menu>button:focus,.fl-builder--menu>button:hover{background:#e6eaed!important;border:2px solid transparent!important;top:0}.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging,.fl-builder-drop-zone,.fl-builder-empty{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-builder--menu>a:focus,.fl-builder--menu>button:focus{outline:0;color:inherit;text-decoration:none}.fl-builder--menu .fl-has-children>svg{float:right;margin:0 7px 0 0;height:16px;width:9px;transition-property:transform;transition-duration:.15s;transform:rotate(-90deg)}.fl-builder--menu .fl-has-children.fl-has-children-showing>svg{transform:rotate(0)}.fl-builder--menu .fl-inset{display:none;padding-left:35px;font-size:14px;line-height:1.25}.fl-builder--menu a.fl-template-collection{color:#161B20}.fl-builder--menu>:after{clear:both}.fl-builder--menu * .fl-builder--menu-item-accessory{float:right;color:#000;text-transform:uppercase;text-align:center;min-width:20px;letter-spacing:2px}.fl-builder--menu * .fl-builder--menu-item-accessory i{font-size:1em;margin-top:2px}.fl-builder--menu hr::after,.fl-builder--menu hr::before{display:none!important;content:none!important;height:auto}.fl-builder--menu .fl-builder-video-wrap iframe{display:block;margin:4px 0;width:100%}.fl-builder-publish-actions{display:-ms-flexbox;display:flex;box-sizing:border-box;position:absolute;top:0;right:0;width:380px;max-width:100%;height:44px;padding:4px 4px 4px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;opacity:1;pointer-events:auto;transform:scaleX(1) translateX(0);transform-origin:right;transition-property:transform,opacity;transition-duration:.15s}.fl-builder-publish-actions.is-hidden{transform:scaleX(.23) translateX(68px);opacity:0;pointer-events:none}.fl-builder-bar .fl-builder-button-group{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:100%;flex-basis:100%}.fl-builder-bar .fl-builder-button-group>.fl-builder-button{border-radius:0;margin-left:0;-ms-flex:1 0 auto;flex:1 0 auto;text-align:center;-ms-flex-pack:distribute;justify-content:space-around;box-shadow:none}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.fl-builder-publish-actions-click-away-mask{display:none;position:fixed;top:0;left:0;right:0;height:100vh;background:0 0}.fl-builder-dragging .fl-builder-content:not(.fl-builder-empty){padding:16px 0}.fl-builder-empty{display:none;border:2px dashed #969696;border-radius:8px;color:#909090;font-size:20px;font-weight:700;margin:10px;padding:250px 20px;position:relative;text-align:center;text-transform:uppercase}.fl-builder-drop-zone,.fl-builder-has-submenu>ul.fl-builder-submenu li a{font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fl-builder-edit .fl-builder-empty{display:block}.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging{background:rgba(255,255,255,.95)!important;border:2px solid #000;border-radius:4px;box-shadow:0 0 8px rgba(0,0,0,.2);-moz-box-shadow:0 0 8px rgba(0,0,0,.2);-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);color:#333!important;font-size:13px!important;height:47px!important;line-height:40px!important;overflow:hidden;padding:0 20px;position:absolute!important;text-overflow:ellipsis;white-space:nowrap;width:180px!important;z-index:100010!important;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:start;justify-content:flex-start}.fl-builder-block.fl-builder-block-drag-helper:hover{padding:0;box-shadow:none}.fl-builder-block-drag-helper:hover .fl-builder-block-content{position:static;padding:0 20px}.fl-col-has-highlight-guide .fl-col-content,.fl-col-highlight,.fl-row-highlight .fl-col-group{position:relative}.fl-builder-block-saved-column.fl-builder-block-drag-helper:hover .fl-builder-block-content,.fl-builder-block-saved-module.fl-builder-block-drag-helper:hover .fl-builder-block-content,.fl-builder-block-saved-row.fl-builder-block-drag-helper:hover .fl-builder-block-content{padding:14px 20px}.fl-builder-block-drag-helper .fl-builder-block-icon{fill:#000;margin-top:-10px}.fl-builder-drop-zone{animation:fl-builder-drop-zone-pulse 2s infinite;background:#00A2D7;border-radius:4px;color:#fff!important;display:block;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;text-shadow:none;text-transform:none;z-index:10}@keyframes fl-builder-drop-zone-pulse{0%,100%{background-color:#00A2D7}50%{background-color:#79DEFF}}.fl-builder-drop-zone-global{animation:fl-builder-drop-zone-global-pulse 2s infinite;background:#ff9600}@keyframes fl-builder-drop-zone-global-pulse{0%,100%{background-color:#FFBC5C}50%{background-color:#ff9600}}.fl-builder-content>.fl-builder-drop-zone{margin:10px 20px}.fl-row-content>.fl-builder-drop-zone{margin:3px 7px}.fl-col-has-cols>.fl-col-content>.fl-builder-drop-zone{margin:3px 10px}.fl-sortable-disabled>.fl-builder-drop-zone{display:none!important}.fl-col-group-equal-height.fl-col-group-align-center .fl-col-content>.fl-builder-drop-zone{width:100%}.fl-row-highlight{padding:16px 0}.fl-row-highlight .fl-row-content{border:2px dashed rgba(203,205,206,.5);padding:8px;border-radius:6px}.fl-row-highlight.fl-node-global .fl-row-content{border-color:#ff9600}.fl-col-highlight{padding:8px}.fl-col-highlight .fl-col-content{border-style:dashed!important;border-color:#00a0d2!important;border-radius:4px;min-height:100px;overflow-x:hidden;border-width:2px!important}.fl-col-has-cols.fl-col-highlight>.fl-col-content{padding:8px}.fl-col-highlight.fl-node-global .fl-col-content{border-color:#ff9600!important}.fl-builder-simple .fl-col-highlight .fl-col-content{border:none!important}.fl-col-highlight-guide{background:rgba(0,160,210,.05);border:2px solid #00A0D2;border-radius:4px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;z-index:1}.fl-node-global .fl-col-highlight-guide{border-color:#ff9600!important;background-color:rgba(255,150,0,.06)!important}.fl-col-has-highlight-guide .fl-block-overlay{background:0 0;border-color:transparent}.fl-col-has-highlight-guide .fl-block-col-resize{display:none}.fl-col-has-highlight-guide .fl-col-highlight .fl-col-content{border-color:transparent!important}.fl-col-drop-target{bottom:8px;display:none;left:-9px;position:absolute;top:8px;width:18px;z-index:1}.fl-col-highlight .fl-col-drop-target{display:block}.fl-col-drop-target-last{left:auto;right:-9px}.fl-col-drop-target .fl-builder-drop-zone{bottom:0;left:2px;margin:0;padding:0;position:absolute;right:2px;top:0}.fl-col-group-drop-target{display:none;left:8px;height:18px;position:absolute;right:8px;top:-9px;z-index:1}.fl-row-highlight .fl-col-group-drop-target{display:block}.fl-col-group-drop-target-last{top:auto;bottom:-9px}.fl-col-group-drop-target .fl-builder-drop-zone{bottom:2px;left:0;margin:0;padding:0;position:absolute;right:0;top:2px}.fl-row-content>.fl-col-group-drop-target{position:static}.fl-row-content>.fl-col-group-drop-target .fl-builder-drop-zone{height:18px;position:static}.fl-row-drop-target{display:none;left:0;height:24px;margin-top:-28px;position:absolute;right:0;z-index:1}.fl-row-highlight .fl-row-drop-target{display:block}.fl-row-drop-target-last{margin-top:4px}.fl-row .fl-row-drop-target .fl-builder-drop-zone{bottom:0;left:4px;margin:0;position:absolute;right:4px;top:0}.fl-builder-content>.fl-row-drop-target{margin:0;position:static}.fl-builder-dragging .fl-builder-content.fl-builder-empty>.fl-row-drop-target{bottom:10px;display:block;height:auto;left:0;position:absolute;right:0;top:10px}.fl-builder-content .fl-row-drop-target .fl-builder-drop-zone{margin-bottom:0;margin-top:0}.fl-col-group:focus,.fl-col:focus,.fl-module:focus,.fl-row:focus{outline:0}.fl-sortable-proxy{display:none}.fl-block-overlay,.fl-block-overlay *{text-shadow:none;-webkit-touch-callout:none;transition-property:border-color;transition-duration:.3s}.fl-block-overlay-active{position:relative}.fl-block-overlay-actions{background:#00A0D2;float:left;height:30px;margin:-1px -1px 0;padding:0 4px;text-shadow:none;border-bottom-right-radius:5px;border-top-left-radius:3px;transition-property:background-color;transition-duration:.3s}.fl-row-overlay-header-bottom .fl-block-overlay-actions{border-radius:0 5px 0 3px}.fl-builder-col-resizing .fl-block-overlay-actions,.fl-builder-row-resizing .fl-block-overlay-actions{overflow:hidden}.fl-block-overlay-actions>span{display:block;float:left}.fl-block-overlay-actions i{color:#fff!important;cursor:pointer;display:block!important;float:left;font-size:16px!important;height:28px!important;line-height:28px!important;opacity:.8;filter:alpha(opacity=80);text-align:center;width:32px!important}.fl-block-overlay-actions i:hover{opacity:1;filter:alpha(opacity=100)}.fl-block-overlay-actions>i:first-child{padding-left:4px}.fl-block-overlay-actions>i:last-child{padding-right:2px}.fl-block-overlay-actions .fl-block-move{cursor:move}.fl-block-has-rules{color:#00A0D2!important;cursor:pointer;padding:7px;position:absolute;right:0;top:0}.fl-block-has-rules.logic{color:red!important}.fl-block-overlay-title,.fl-builder-has-submenu>ul.fl-builder-submenu li a{color:#fff!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-block-overlay-title{float:left;font-size:14px;height:30px;line-height:29px;margin-right:2px;padding:0 12px 0 8px}.fl-col-overlay,.fl-module-overlay,.fl-row-overlay{background:rgba(190,239,255,0);color:#fff}.fl-builder-touch .fl-block-overlay-actions{height:32px}.fl-builder-touch .fl-block-overlay-actions i{font-size:20px!important;height:32px!important;line-height:32px!important;width:38px!important}.fl-row-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:0;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;left:0;position:absolute;top:-33px;right:0;z-index:100006}.fl-row-overlay.fl-row-menu-active,.fl-row-overlay.fl-row-menu-active.fl-block-overlay.fl-block-overlay-global{z-index:100007}.fl-row-full-width .fl-row-overlay{left:2px;right:2px;bottom:2px}.fl-row-overlay-header-bottom{bottom:-32px!important;top:0}.fl-row-overlay-header-bottom .fl-block-overlay-header{position:absolute;bottom:0}.fl-block-overlay-active .fl-row-content-wrap{position:relative}.fl-block-overlay-active .fl-row-content{position:relative;z-index:100007!important}.fl-builder-row-resizing .fl-col.fl-block-overlay-active,.fl-builder-row-resizing .fl-module.fl-block-overlay-active{position:static}.fl-col-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:8px;cursor:pointer;left:8px;position:absolute;right:8px;top:8px;z-index:100008}.fl-module-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:4px;cursor:pointer;left:4px;min-height:32px;position:absolute;right:4px;top:4px;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-module-overlay{cursor:default}.fl-module-adjust-height{padding-bottom:15px;padding-top:15px}.fl-col-bg-overlay .fl-block-overlay-active.fl-module{z-index:100008}.fl-block-overlay-global{background:rgba(255,150,0,0);border:2px solid #F7A407;border-radius:4px}.fl-block-overlay-global .fl-block-overlay-actions{background:#F7A407}.fl-block-overlay-title-global{background:#fff;color:#ff9600!important;font-size:11px;letter-spacing:1px;margin-left:4px;padding:2px 4px;vertical-align:top}.fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:pointer;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-row-overlay{cursor:default}.fl-builder-row-template .fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:default;z-index:100006}.fl-block-overlay-global.fl-row-overlay .fl-block-col-resize{display:none}.fl-block-overlay-muted .fl-row-overlay{background:rgba(85,93,102,0);border:2px solid #555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-overlay-actions{background:#555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-has-rules{color:#555D66!important}.fl-block-overlay-muted .fl-row-overlay .fl-block-col-resize{display:none}.fl-node-disabled .fl-row-content-wrap,.fl-node-disabled>.fl-col-content{opacity:.3}.fl-block-col-resize{bottom:0!important;position:absolute;top:0!important;width:6px}.fl-block-col-resize-e{cursor:ew-resize;left:auto!important;right:-2px!important}.fl-block-col-resize-w{cursor:ew-resize;left:-7px!important}.fl-block-col-resize-handle-wrap{margin:-4px 0 0 -5px;padding:0 5px;position:absolute;top:50%!important}.fl-block-col-resize-e .fl-block-col-resize-handle-wrap{margin-left:-6px}.fl-block-col-resize-handle{background:#fff;border:2px solid #00A0D2;border-radius:50%;height:12px;width:12px}.fl-node-global .fl-block-col-resize-handle{border-color:#ff9600}.fl-block-col-resize-feedback{color:#333!important;display:none;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:11px!important;position:absolute}.fl-block-col-resize-feedback-left,.fl-block-col-resize-feedback-right{background:#fff;border:1px solid #3ba0ff;padding:2px 4px}.fl-block-col-resize-feedback-left{right:20px;top:-7px}.fl-block-col-resize-feedback-right{left:20px;top:-7px}.fl-builder-has-submenu{position:relative}.fl-builder-has-submenu>ul.fl-builder-submenu{background:#00A0D2;box-shadow:0 0 20px rgba(0,0,0,.2);border-radius:0 4px 4px;display:none;left:0;list-style:none;margin:0;padding:6px 0;position:absolute;text-align:left;top:100%;width:165px;z-index:100008}.fl-builder-has-submenu>ul.fl-builder-submenu li{list-style:none;margin:0;padding:0}.fl-builder-submenu-right ul.fl-builder-submenu{left:auto;right:0}.fl-builder-has-submenu.fl-builder-submenu-open>ul.fl-builder-submenu{display:block}.fl-builder-has-submenu>ul.fl-builder-submenu li a{border-bottom:0 none;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;display:block;line-height:13px;font-size:13px;opacity:.8;filter:alpha(opacity=80);padding:6px 12px;text-decoration:none}.fl-builder-has-submenu>ul.fl-builder-submenu li a:hover{background:#0197C6;color:#fff;opacity:1;filter:alpha(opacity=100);text-decoration:none}.fl-builder-actions-title,.fl-builder-alert-lightbox .fl-lightbox-message,.fl-builder-alert-lightbox .fl-lightbox-message-info{color:#333!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px!important}.fl-builder-has-submenu .fl-builder-submenu .fa,.fl-builder-has-submenu .fl-builder-submenu .far,.fl-builder-has-submenu .fl-builder-submenu .fas{float:right;height:12px!important;line-height:12px!important;position:relative;right:-5px;width:14px!important}.fl-builder-has-submenu .fl-builder-has-submenu .fl-builder-submenu{display:none;left:100%;top:0}.fl-builder-has-submenu .fl-builder-submenu-right.fl-builder-has-submenu .fl-builder-submenu{left:auto;right:100%}.fl-builder-has-submenu .fl-builder-has-submenu:hover .fl-builder-submenu{display:block}.fl-builder-submenu-sep{padding:7px 0!important}.fl-builder-submenu-sep div{border-bottom:1px solid rgba(255,255,255,.4)}.fl-block-col-move,.fl-block-col-move-parent{cursor:move;position:relative}.fl-builder-submenu .fa-arrows-alt{cursor:move;display:none!important}.fl-builder-submenu a:hover .fa-arrows-alt{display:block!important;float:right;line-height:12px!important;height:12px!important}.fl-block-overlay-global ul.fl-builder-submenu{background:#ff9600!important}.fl-block-overlay-global ul.fl-builder-submenu li a:hover{background:#fa3}.fl-builder-actions-lightbox .fl-lightbox{display:block;width:300px;border-radius:4px}.fl-builder-actions-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-actions-lightbox .fl-builder-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:25px;text-align:center}.fl-builder-actions-title{display:block;margin-bottom:20px}.fl-builder-actions .fl-builder-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin-bottom:7px;min-height:36px}.fl-builder-alert-lightbox{padding:20px;z-index:30000000;top:0;pointer-events:auto}.fl-builder-alert-lightbox .fl-lightbox{max-width:440px;width:auto}.fl-builder-alert-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-alert-lightbox .fl-lightbox-message,.fl-builder-alert-lightbox .fl-lightbox-message-info{line-height:24px;padding:30px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox{max-width:60%}.fl-lightbox-width-slim .fl-compound-field,.fl-lightbox-width-slim .fl-dimension-field-units{max-width:none}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-content{padding:20px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-message{padding:10px 20px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-message h1{font-size:20px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .fl-lightbox-message p{font-size:14px;padding-top:5px}.fl-builder-alert-lightbox.fl-builder-crash-lightbox .link{color:#428bca;text-decoration:underline}.fl-builder-alert-lightbox .fl-lightbox-message-info{padding:0 20px;font-size:14px!important}.fl-builder-alert-lightbox .fl-lightbox-message-info p{line-height:20px;padding:10px 0 0 10px}.fl-builder-alert-lightbox .fl-lightbox-message-info a{font-size:14px}@keyframes fl-builder-content-section-entry{from{transform:translateY(150px) translateX(100px) scale(.3);opacity:0}to{transform:translateY(0) translateX(0) scale(1);opacity:1}}.fl-template-category-select{width:180px!important}.fl-template-selector .fl-builder-settings-section{margin:0 0 10px}.fl-template-selector .fl-builder-settings-fields{height:470px}.fl-template-selector .fl-builder-settings-tab{width:560px}.fl-template-selector .fl-builder-settings-tab-description{font-size:15px!important;margin:0!important;padding:10px 0 25px;text-align:center}.fl-template-preview{float:left;margin:0 25px 30px 0;position:relative;text-align:center;width:170px}.fl-template-preview.fl-last{margin-right:0}.fl-template-image{border:1px solid #d9d9d9;cursor:pointer;margin-bottom:12px;height:164px;overflow:hidden}.fl-template-image:hover{border-color:red}.fl-template-image img{max-height:none;width:100%}.fl-template-preview span{display:block;text-align:center}.fl-user-template-category-name{background:#f2f2f2;border-bottom:3px solid #dfdfdf;border-top:2px solid #dfdfdf;font-weight:700;padding:8px 15px}.fl-user-templates{border-bottom:1px solid #dfdfdf;padding:10px 0 20px}.fl-builder--user-templates-section-content{border-bottom:2px solid #e6eaed;padding:10px}.fl-builder--user-templates-section-content:first-child{padding-top:0}.fl-builder--user-templates-section-content:last-child,.fl-user-templates:last-child{border-bottom:none}.fl-builder--user-templates-section-name{font-weight:700;font-size:16px;color:#333;z-index:9999;padding:15px 10px;margin:0 10px}@keyframes fl-list-item-entry{from{opacity:0;transform:scale(.5) translateY(100px)}to{opacity:1;transform:scale(1) translateY(0)}}.fl-builder--save-new-user-template,.fl-user-template{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:16px;font-weight:200;line-height:1.1;padding:10px 20px;color:#6d6d6d}.fl-user-template:hover{cursor:pointer;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.08);text-decoration:none;color:#111;padding-right:68px}.fl-user-template-name{overflow:hidden;text-overflow:ellipsis;-ms-flex:1;flex:1}.fl-user-template-actions{display:none;bottom:0;position:absolute;right:0;top:0}.fl-user-template:hover .fl-user-template-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.fl-user-template-actions a{display:inline-block;padding:15px 0;width:30px}.fl-user-template:hover a:hover i{color:#444!important}.fl-user-templates-message{display:none}.fl-user-template-thumbnail{-ms-flex:0;flex:0;margin-right:20px}.fl-user-template-thumbnail .fl-builder--template-thumbnail{background-size:cover;background-position:center top;width:45px}.fl-user-template-thumbnail .fl-builder--template-thumbnail:hover{box-shadow:none;transform:scale(1);transition-property:none}.fl-builder--save-new-user-template .fl-user-template-thumbnail .fl-builder--template-thumbnail{border-style:dashed;border-width:2px;border-color:#ccd4da}.fl-builder--save-new-user-template .fl-save-control{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex:1;flex:1}.fl-builder--save-new-user-template .fl-save-control input{background:0 0;border:none!important;-ms-flex:1;flex:1;font-size:16px;margin-right:10px;margin-left:-12px;color:#000}.fl-builder--save-new-user-template .fl-save-control input::-webkit-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input::-moz-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-ms-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-moz-placeholder{color:#777}@keyframes fl-slide-in-right{from{transform:translateX(50px)}to{transform:translateX(0)}}.fl-builder--save-new-user-template .fl-save-control button{display:none;animation-name:fl-slide-in-right;animation-duration:.25s;background-color:#00a0d2;border:none;padding:0 15px}.fl-save-control-mask{display:none;background:0 0;position:absolute;top:-50px;left:0;bottom:0;right:0;z-index:-1;min-height:80vh}.fl-builder-templates-cta{margin-bottom:20px}.fl-builder-templates-cta p{display:inline-block!important;width:75%!important;font-size:14px!important;line-height:1.5!important;margin-bottom:0!important}.fl-builder-templates-cta .fl-builder-upgrade-button{font-size:13px!important;line-height:13px!important;position:relative;top:8px;left:15px;padding:1px 12px}.fl-builder-settings-message,.fl-builder-settings-message *{font-size:15px!important;line-height:23px!important}.single-fl-builder-template .fl-content{width:100%!important}form.fl-builder-settings{height:100%;margin:0;padding:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.fl-builder-settings-message{padding:20px 25px!important;background:#f2f2f2!important}.fl-builder-preview-loader{position:relative;top:-2px;margin-left:3px}.fl-lightbox-header .fl-builder-preview-loader{margin:0;position:absolute;right:40px;top:15px}@keyframes fl-grab-attention{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}.fl-lightbox-width-slim .fl-form-table{margin:10px 12px 10px 10px!important;width:calc(100% - 40px)}.fl-lightbox-width-slim.fl-lightbox .fl-form-table th{display:block;position:relative;padding:10px 0 0 12px!important;width:auto!important}.fl-lightbox-width-slim .fl-form-table td{display:block}.fl-lightbox-width-slim .fl-form-table .fl-field[data-type=editor] td:first-child,.fl-lightbox-width-slim .fl-form-table td:first-child{padding-left:0!important}.fl-field-label .fl-field-responsive-toggle,.fl-lightbox-width-slim .fl-field-control-wrapper .fl-field-responsive-toggle{display:none}.fl-lightbox-width-slim .fl-field-label .fl-field-responsive-toggle{display:inline-block;padding:0 5px!important}.fl-lightbox-width-slim input.text-full+.fl-field-description,.fl-lightbox-width-slim select+.fl-field-description{display:block;padding:8px 10px;margin:0}.fl-lightbox-width-slim .fl-builder-settings-fields select{width:100%}.fl-lightbox-width-slim .fl-color-picker{display:-ms-flexbox;display:flex;width:auto}.fl-lightbox-width-slim .fl-color-picker-clear{-ms-flex:0 0 40px;flex:0 0 40px}.fl-lightbox-width-slim .fl-field[data-type=dimension] .fl-field-responsive-setting{width:100%}.fl-lightbox-width-slim .fl-dimension-field-unit-select select{width:auto!important}.fl-lightbox-width-slim .fl-gradient-picker-color-row{width:50%}.fl-lightbox-width-slim .fl-color-picker.fl-gradient-picker-color,.fl-lightbox-width-slim .fl-typography-field-align .fl-button-group-field-option{width:100%}.fl-lightbox-width-slim .fl-typography-field-align .fl-button-group-field-options{float:none}.fl-lightbox-width-slim .mce-menubtn.mce-fixed-width button{width:72px!important}.fl-lightbox-width-slim .fl-builder-settings-tab-description{margin:20px 10px}.fl-lightbox-width-micro .mce-menubtn.mce-fixed-width button{width:38px!important}.fl-lightbox-width-micro .mce-btn[aria-label=Fullscreen],.fl-lightbox-width-micro .mce-btn[aria-label=Blockquote]{display:none}.fl-lightbox-width-micro .mce-toolbar i.mce-ico{width:18px}.fl-lightbox-width-slim .fl-field[data-type=editor] .fl-field-control-wrapper,.fl-lightbox-width-slim .fl-field[data-type=code] .fl-field-control-wrapper{margin-left:-10px;margin-right:-30px}.fl-lightbox .wp-editor-tools{padding-left:6px;padding-right:28px}.fl-lightbox .mce-top-part::before{box-shadow:none!important}.mce-container .mce-stack-layout span{color:initial}.fl-lightbox div.mce-toolbar-grp{background:0 0;border:none}.fl-lightbox div.mce-toolbar-grp>div{padding:0 3px}.fl-lightbox .fl-builder-settings .wp-switch-editor{background:#e7ebef;border:1px solid transparent}.fl-lightbox .html-active .switch-html,.fl-lightbox .quicktags-toolbar,.fl-lightbox .tmce-active .switch-tmce{background:#fff}.fl-lightbox .quicktags-toolbar,.fl-lightbox .wp-editor-container{border:none}.fl-lightbox .mce-toolbar .mce-container-body{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-lightbox-width-slim .mce-toolbar .mce-container-body{-ms-flex-pack:center;justify-content:center}.fl-lightbox textarea.wp-editor-area{line-height:1.5;padding:20px;width:calc(100% - 10px)}.fl-lightbox .wp-core-ui .button,.fl-lightbox .wp-core-ui .button-secondary{border:none;box-shadow:none;background:#e7ebef}.fl-lightbox-width-slim .fl-shadow-field .fl-dimension-field-units{width:auto}.fl-lightbox-width-slim .fl-shadow-field .fl-dimension-field-units input{max-width:none;width:100%!important}.fl-lightbox-width-slim .fl-builder-field-multiple{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-control,.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-label{width:100%!important}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-form-field-preview-text{max-width:225px}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-builder-field-actions{position:absolute!important;top:0;right:0;width:70px;z-index:1}.fl-lightbox-width-slim .fl-builder-field-actions-single .fl-builder-field-copy{float:right!important;margin-right:5px}.fl-lightbox-width-slim .fl-field[data-type=time] select{width:auto}.fl-builder-settings-tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;overflow:hidden;height:32px;background:#e7ebef}.fl-builder-content-group-select{padding:0 10px 6px;display:none}.fl-builder-content-group-select select{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;padding:8px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;border:2px solid #e4e7ea;color:#161B20}select:focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;outline:0!important}.fl-legacy-settings-tab{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings-tab:first-child .fl-legacy-settings-tab{background:0 0;height:auto}body .fl-builder-settings-tabs>*{box-sizing:border-box;color:#676F7A!important;fill:#676F7A!important;background:0 0;border:2px solid transparent;border-radius:0;margin:0;outline:0;padding:1px 16px;text-decoration:none!important;font-size:13px;font-weight:400!important;-ms-flex:0 0 auto;flex:0 0 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.fl-builder-custom-field a,.fl-builder-settings-tab-description a{text-decoration:underline!important}body .fl-lightbox-width-slim .fl-builder-settings-tabs>*{-ms-flex:1 1 auto;flex:1 1 auto}body .fl-builder-settings-tabs>.fl-builder-settings-tabs-more{-ms-flex:0 0 60px;flex:0 0 60px;display:none;margin-left:auto;-ms-flex-pack:center;justify-content:center}.fl-builder-settings-tabs-more svg{width:16px;height:auto;margin:auto}.fl-builder-settings-tabs-more g,.fl-builder-settings-tabs-more path,.fl-builder-settings-tabs-more svg{fill:inherit}body .fl-lightbox-has-tab-overflow .fl-builder-settings-tabs-more{display:-ms-flexbox;display:flex}.fl-builder-settings-tabs>:active,.fl-builder-settings-tabs>:hover{top:0;color:#333;background:0 0;border:2px solid transparent}.fl-builder-settings-tabs>:focus{top:0;outline:0;border:2px solid transparent;background:0 0;color:#0086b0;fill:#0086b0}.fl-builder-settings-tabs .fl-active,.fl-builder-settings-tabs-more.fl-contains-active,.fl-builder-settings-tabs-overflow-menu .fl-active{color:#0086b0!important;fill:#0086b0!important;position:relative;background:#fff}.fl-builder-settings-tabs .fl-active.fl-overflowed,.fl-builder-settings-tabs .fl-overflowed{display:none!important}.fl-builder-settings-tabs .error{color:#d03436;padding-right:10px}.fl-builder-settings-tabs .error .fl-error-icon,.fl-builder-settings-tabs-overflow-menu .error .fl-error-icon{background:url(../img/sprite.png) -148px -5px no-repeat;display:inline-block;height:16px;margin-left:7px;position:relative;top:3px;width:16px}.fl-builder-settings-tabs-more.fl-contains-errors{fill:#d03436!important}.fl-builder-settings-tab{display:none;width:auto!important}.fl-builder-settings-tab.fl-active{display:block}.fl-builder-settings-tab-description{background:#e4e7ea;padding:10px 15px;border-radius:4px;margin:20px}.fl-builder-settings-tab-description a:hover{color:#333}.fl-builder-settings-tabs-overflow-menu{display:none;position:absolute;left:0;right:0;border:2px solid #e6eaed;border-top:3px solid #00a0d2;border-radius:4px;background:#fff;z-index:9999;margin:0 6px;padding:10px;-ms-flex-direction:column;flex-direction:column;box-shadow:0 0 20px 2px rgba(0,0,0,.2)}.fl-builder-settings-tabs-overflow-menu:before{bottom:100%;right:20px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:10px;margin-left:-10px}.fl-builder-settings-tabs-overflow-menu>a{display:block;padding:10px 15px;font-size:14px;font-weight:600!important;border:2px solid transparent;border-radius:4px;outline:0}.fl-builder-settings-tabs-overflow-menu>a:hover{background:#e6eaed;text-decoration:none}.fl-builder-settings-tabs-overflow-click-mask{display:none;position:fixed;top:0;bottom:0;left:0;right:0;background:0 0;z-index:11}.fl-lightbox .fl-form-table{display:table;background:none;border:none;width:calc(100% - 35px)}.fl-lightbox .fl-form-table tbody{border:none}.fl-form-table tr:nth-child(even),.fl-lightbox .fl-form-table tr{background:0 0}.fl-lightbox .fl-form-table td,.fl-lightbox .fl-form-table th{background:0 0!important;border:none!important;font-weight:400!important;text-align:left!important}.fl-lightbox .fl-form-table th{padding:10px 15px 10px 30px!important;vertical-align:top!important;width:200px!important}.fl-lightbox .fl-form-table td:first-child{padding-left:30px!important}.fl-lightbox .fl-form-table th label{color:#333;width:auto;max-width:100%}.fl-lightbox .fl-form-table th label i{color:grey}.fl-lightbox .fl-form-table th label i:hover{color:#555}.fl-lightbox .fl-form-table td{padding:8px 10px}.fl-lightbox-width-slim .fl-form-table td{padding:4px 0 5px}.fl-builder-settings-fields{margin:0;overflow:hidden;position:relative;-ms-flex:1 100%;flex:1 100%;visibility:hidden}.fl-lightbox-header .fl-builder-settings-fields{height:auto;margin:0;position:absolute;right:10px;top:10px}.fl-builder-settings-fields .fl-nanoscroller-content{padding:4px 0 0}.fl-builder-settings-fields .fl-field-control-wrapper{position:relative}.fl-field{animation-duration:.25s;animation-delay:.1s}.fl-builder-settings-fields input[type=date],.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select,.fl-builder-settings-fields textarea{background:#fff!important;border-color:transparent!important;border-style:solid;border-width:2px;border-radius:4px!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);color:#333!important;display:inline;font-size:13px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px 6px;width:auto;box-sizing:border-box}i.fl-dimension-field-link,i.fl-field-responsive-toggle{line-height:18px!important;cursor:pointer;vertical-align:middle}.fl-builder-settings-fields input[type=date],.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select:not(multiple){height:36px!important}.fl-builder-settings-fields select,.fl-builder-settings-fields select[multiple]{height:auto!important}.fl-builder-settings-fields input[type=number]{width:70px}.fl-builder-lightbox .fl-builder-settings-fields input[type=date]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=email]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=file]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=number]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=password]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=search]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=text]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=url]:focus,.fl-builder-lightbox .fl-builder-settings-fields select:focus,.fl-builder-lightbox .fl-builder-settings-fields textarea:not(.wp-editor-area):focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)!important}.fl-builder-settings-fields ::-webkit-input-placeholder{color:#999!important;font-size:13px}.fl-builder-settings-fields input:-moz-placeholder{color:#999;font-size:13px}.fl-builder-settings-fields ::-moz-placeholder{color:#999!important;font-size:13px}.fl-builder-settings-fields input:-ms-input-placeholder{color:#999;font-size:13px}.fl-builder-settings-fields label{display:inline-block;font-weight:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:3px;font-size:12px}.fl-builder-settings-fields select{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;color:#000;margin:0 0 2px;padding:2px 10px;padding-right:30px!important;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important}.fl-dimension-field-unit input[type=number],.fl-unit-field-inputs input[type=number]{-moz-appearance:textfield}.fl-builder-settings-fields select[multiple]{height:60px;background-image:none!important}.fl-builder-custom-field select,.fl-photo-field select{box-shadow:none;border-color:#e6eaed!important}.fl-builder-settings-section:first-child{border-top:none!important}.fl-builder-settings-section-header{background-color:#e7ebef;border-top:4px solid #e7ebef;cursor:pointer;height:30px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-builder-settings-description{padding:0 10px 10px;margin:0;font-style:italic;opacity:.75}.fl-builder-settings-fields table{margin:20px 0}.fl-builder-settings-fields .fl-builder-settings-title{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:#F5F7F9;color:#353535;padding:2px 10px;margin:0;font-size:13px!important;font-weight:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:2px solid transparent;border-radius:0}.fl-builder-settings-fields .fl-builder-settings-title:active,.fl-builder-settings-fields .fl-builder-settings-title:hover{top:0}.fl-builder-settings-fields .fl-builder-settings-title:focus{top:0;border-color:#e0e4ea}.fl-builder-settings-fields .fl-builder-settings-title>svg{height:6px;width:9px;margin-right:7px;transition-property:transform;transition-duration:.15s}.fl-builder-settings-section-collapsed{margin-bottom:4px}.fl-builder-settings-section-collapsed .fl-builder-settings-section-content{display:none}.fl-builder-settings-section-collapsed .fl-builder-settings-title{background:0 0;-ms-flex:1 1 100%;flex:1 1 100%}.fl-builder-settings-section-collapsed .fl-builder-settings-title>svg{transform:rotate(-90deg)}.wp-core-ui h1,.wp-core-ui h2,.wp-core-ui h3,.wp-core-ui h4,.wp-core-ui h5,.wp-core-ui h6,.wp-core-ui p{color:#333;font-family:inherit}.wp-core-ui #media-attachment-date-filters{width:auto}.wp-core-ui input[type=search]::-webkit-input-placeholder{color:#333}.wp-core-ui input[type=search]:-ms-input-placeholder{color:#333}.wp-core-ui input[type=search]::-ms-input-placeholder{color:#333}.wp-core-ui input[type=search]::placeholder{color:#333}.wp-core-ui .submitbox .submitdelete{color:#a00}.wp-core-ui button{font-weight:400}.wp-core-ui input[type=date],.wp-core-ui input[type=email],.wp-core-ui input[type=file],.wp-core-ui input[type=number],.wp-core-ui input[type=password],.wp-core-ui input[type=search],.wp-core-ui input[type=tel],.wp-core-ui input[type=text],.wp-core-ui input[type=url],.wp-core-ui select,.wp-core-ui textarea{background-color:#fff;border-color:#dfdfdf;border-style:solid;border-width:1px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;color:#333;font-weight:400}.wp-core-ui input[type=date]:focus,.wp-core-ui input[type=email]:focus,.wp-core-ui input[type=file]:focus,.wp-core-ui input[type=number]:focus,.wp-core-ui input[type=password]:focus,.wp-core-ui input[type=search]:focus,.wp-core-ui input[type=tel]:focus,.wp-core-ui input[type=text]:focus,.wp-core-ui input[type=url]:focus,.wp-core-ui select:focus,.wp-core-ui textarea:focus{background:0 0;border-color:#aaa}.wp-core-ui input[type=search]{background-image:none;padding:6px}.fl-field-responsive-setting{display:inline-block;width:100%}.fl-field-responsive-setting-medium,.fl-field-responsive-setting-responsive{display:none}.fl-field-control-wrapper i.fl-field-responsive-toggle{padding:9px 0 0;position:absolute;left:-25px}i.fl-field-responsive-toggle{color:grey;display:inline-block;font-size:15px!important;height:auto;text-align:left;width:20px}.fl-builder-settings-fields input.text-full,.fl-builder-settings-fields textarea{width:100%}i.fl-field-responsive-toggle:hover{color:#000}.fl-builder-settings-fields .fl-text-field-add-value{min-width:50%;margin-top:.62em}.fl-field[data-type=shadow] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-shadow-field .fl-color-picker{margin-bottom:15px;width:100%}.fl-color-picker{cursor:pointer}.fl-color-picker .fl-color-picker-clear{box-sizing:border-box;display:inline-block}.fl-color-picker .fl-color-picker-clear:hover{background-color:#ededed}.colorpicker input{padding:0!important;font-size:11px!important;color:#fff!important;width:29px!important;height:auto!important;background:0 0!important;border:none!important}.colorpicker .colorpicker_hex input{width:45px!important}.fl-gradient-picker-type{display:-ms-flexbox;display:flex;margin-bottom:15px}.fl-gradient-picker-type input{margin:0!important}.fl-gradient-picker-type select{margin-bottom:0!important}.fl-gradient-picker-type-select{margin-right:10px!important}.fl-gradient-picker-colors{display:-ms-flexbox;display:flex}.fl-gradient-picker-color-row{display:-ms-flexbox;display:flex;margin-right:15px}.fl-color-picker.fl-gradient-picker-color,.fl-gradient-picker-color-row:last-child{margin-right:0}.fl-color-picker.fl-gradient-picker-color .fl-color-picker-color{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.fl-gradient-picker .fl-gradient-picker-stop input{border-top-left-radius:0!important;border-bottom-left-radius:0!important;margin:0!important}.fl-field[data-type=dimension] .fl-field-label label{padding-right:35px}.fl-field[data-type=dimension] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-field[data-type=dimension] .fl-field-description{padding:9px 0 0 5px}.fl-field[data-type=dimension] .fl-field-responsive-setting{width:auto}.fl-dimension-field-units{border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);display:-ms-flexbox;display:flex;height:36px;margin:1px 1px 20px;position:relative;max-width:350px}.fl-dimension-field-units>*{border-right:1px solid #e6eaed;width:100%}body .fl-dimension-field-units>:last-child{border-right:none!important}body .fl-dimension-field-units>:first-child>input[type]{border-top-left-radius:4px!important;border-bottom-left-radius:4px!important}body .fl-dimension-field-units>:last-child>*{border-top-right-radius:4px!important;border-bottom-right-radius:4px!important}.fl-dimension-field-unit input[type],.fl-dimension-field-units .fl-field-unit-select{box-shadow:none!important;margin:0!important;border-radius:0!important}.fl-dimension-field-unit input{width:100%!important}.fl-dimension-field-unit input::-webkit-inner-spin-button,.fl-dimension-field-unit input::-webkit-outer-spin-button{-webkit-appearance:none}.fl-dimension-field-unit label{padding:5px 0 0;font-size:11px;font-weight:700;color:inherit!important;display:block;text-align:center;opacity:.5}.fl-dimension-field-unit .fl-field-popup-slider{margin-top:27px}i.fl-dimension-field-link{color:grey;font-size:15px!important;height:auto;text-align:left;width:20px}i.fl-dimension-field-link:hover{color:#000}i.fl-dimension-field-link.dashicons-editor-unlink,i.fl-dimension-field-link.dashicons-editor-unlink:hover{color:#0086b0}.fl-field-label .fl-dimension-field-link,.fl-lightbox-width-slim .fl-dimension-field-link{display:none}.fl-lightbox-width-slim .fl-field-label .fl-dimension-field-link{display:inline-block}.fl-field-control-wrapper .fl-dimension-field-link{padding:9px 0 0;left:-50px;position:absolute}.fl-dimension-field-unit-select{display:-ms-flexbox;display:flex;width:auto!important}.fl-field[data-type=unit] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-field[data-type=unit] .fl-field-description{margin-left:7px!important;padding-top:9px}.fl-field[data-type=unit] .fl-field-responsive-setting{width:auto}.fl-unit-field-inputs{background:0 0;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);display:-ms-flexbox;display:flex}.fl-unit-field-inputs .fl-field-unit-select,.fl-unit-field-inputs input[type]{box-shadow:none!important;margin:0!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.fl-unit-field-inputs .fl-field-unit-select{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.fl-unit-field-inputs input::-webkit-inner-spin-button,.fl-unit-field-inputs input::-webkit-outer-spin-button{-webkit-appearance:none}.fl-unit-field-input{border-right:1px solid #e6eaed!important}body .fl-unit-field-input:last-child{border-right:none!important}body .fl-unit-field-input:last-child>*{border-top-right-radius:4px!important;border-bottom-right-radius:4px!important}.fl-unit-field-unit-select{display:-ms-flexbox;display:flex;width:auto!important}select.fl-field-unit-select{background-color:#E7EBEF!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}div.fl-field-unit-select{background-color:#E7EBEF!important;padding:9px 7px!important;-ms-flex:1 0 auto;flex:1 0 auto}.fl-field-popup-slider{background:#fff;border-radius:4px;box-shadow:0 4px 25px 0 rgba(0,0,0,.18);display:none;margin-top:10px;padding:15px;position:absolute;left:0;right:0;z-index:9999}.fl-field-popup-slider-top{margin-top:0!important;top:-100%;transform:translateY(-10px)}.fl-field-popup-slider-input{background:#E7EBEF;cursor:pointer;height:4px;text-align:left;position:relative;border-radius:3px}.fl-field-popup-slider-input .ui-slider-handle{background:#fff;border:2px solid #3AA4CC;border-radius:100%;cursor:pointer;height:12px;width:12px;position:absolute;top:-6px;margin-left:-7px}.fl-field-popup-slider-input .ui-slider-handle:focus{outline:0}.fl-field-popup-slider-arrow{position:absolute;top:-22px}.fl-field-popup-slider-arrow:after{content:' ';border-color:transparent transparent #fff;border-style:solid;border-width:0 8px 8px;width:0;height:0}.fl-field-popup-slider-top .fl-field-popup-slider-arrow{top:auto;bottom:-24px}.fl-field-popup-slider-top .fl-field-popup-slider-arrow:after{border-bottom-width:0;border-top-width:8px;border-top-color:#fff}input[type=number].fl-field-popup-slider-focus{border:2px solid #00a0d2!important}.fl-font-field{display:-ms-flexbox;display:flex}.fl-font-field label{display:block!important;margin:0!important;padding:0 0 6px 12px}.fl-font-field .fl-font-field-font-wrapper{margin-right:8px;width:70%!important}.fl-font-field .fl-font-field-weight-wrapper{width:30%!important}.fl-compound-field{max-width:350px}.fl-compound-field-section-toggle{background:#E7EAEF;border-radius:4px;border-top:2px solid transparent;border-bottom:2px solid transparent;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:32px;margin-bottom:8px;padding:0 12px}.fl-compound-field-section-toggle:hover{background:#dadfe5}.fl-compound-field-section-toggle .dashicons{font-size:15px;height:15px;margin-right:5px;width:15px}.fl-compound-field-section:last-child .fl-compound-field-section-toggle{margin-bottom:0}.fl-compound-field-section.fl-compound-field-section-visible{padding-bottom:12px}.fl-compound-field-section.fl-compound-field-section-visible:last-child{padding-bottom:0}.fl-compound-field-section-visible .fl-compound-field-section-toggle{background:0 0;border-top:2px solid #E7EBEF;border-radius:0}.fl-compound-field-section-visible .fl-compound-field-section-toggle:hover{background:0 0}.fl-compound-field-section-visible .fl-compound-field-section-toggle .dashicons:before{content:'\f347'}.fl-compound-field-row{display:none;padding-bottom:12px}.fl-compound-field-section-visible .fl-compound-field-row{display:-ms-flexbox;display:flex}.fl-compound-field-label{display:block!important;margin:0!important;padding:0 0 6px 12px}.fl-compound-field-label-bottom{padding:6px 0 0 12px}.fl-compound-field-label .fl-dimension-field-link{display:inline-block;padding:0 0 0 2px;position:relative;left:auto;top:-1px}.fl-compound-field-setting{padding-right:8px;width:100%}.fl-compound-field-setting:last-child{padding-right:0}.fl-compound-field-setting select{margin:0!important;width:100%}.fl-compound-field-setting .fl-unit-field-input input{width:100%!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.fl-compound-field-setting .fl-unit-field-input{width:50%!important}.fl-compound-field-setting .fl-unit-field-input select.fl-field-unit-select{background-position:center right 2px!important;padding:2px 5px!important;width:100%;font-size:11px}.fl-typography-field .fl-font-field-font-wrapper{margin-right:8px!important}.fl-typography-field-spacing{width:calc(33.33% - 8px)}.fl-typography-field-transform{width:66.66%}.fl-typography-field-transform .fl-button-group-field-options{float:none}.fl-typography-field-transform .fl-button-group-field-option{width:auto;padding:0 7px}.fl-typography-field .fl-shadow-field{display:-ms-flexbox;display:flex}.fl-typography-field .fl-shadow-field .fl-color-picker{margin:0 8px 0 0;width:calc(33.33% - 8px)}.fl-typography-field .fl-shadow-field .fl-dimension-field-units{margin-left:0;margin-top:0;margin-right:0;width:66.66%}.fl-button-group-field-options{background:#E7EBEF;border-radius:4px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);display:-ms-flexbox;display:flex;float:left;height:36px;overflow:hidden}.fl-button-group-field-option{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:0 5px;border-radius:0;border:2px solid transparent;background:0 0!important}.fl-button-group-field-option:hover{top:0;background-color:transparent;color:#000;border:2px solid transparent}.fl-button-group-field-option:focus{top:0;background-color:transparent;border:2px solid #00a0d2;color:#333}.fl-button-group-field-option:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}.fl-button-group-field-option:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.fl-button-group-field-option[data-selected="1"]{background-color:#fff!important;color:#000}.fl-button-group-field-option i{color:#6B6E75}.fl-button-group-field-option:hover i{color:#333}.fl-compound-field-cell{width:50%;display:block;float:left;padding-top:13px}.fl-compound-field-cell:first-child{padding-right:4px}.fl-compound-field-cell:last-child{padding-left:4px}.fl-compound-field-cell label{padding:5px 0 0;font-size:11px;font-weight:700;color:inherit!important;display:block;text-align:center;opacity:.5}.fl-shape-transform-field .fl-compound-field-row{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-shape-transform-field .fl-compound-field-row>*{width:auto;-ms-flex:1 1 auto;flex:1 1 auto}.fl-shape-transform-field .fl-compound-field-row>:first-child{-ms-flex:0 0 auto;flex:0 0 auto}.fl-shape-transform-field .fl-shape-orientation-controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-shape-transform-field .fl-shape-orientation-controls>*{-ms-flex:0 0 auto;flex:0 0 auto}.fl-shape-transform-field .fl-shape-orientation-controls .fl-button-group-field>*,.fl-shape-transform-field .fl-shape-orientation-controls .fl-button-group-field>* button{border-radius:0}.fl-shape-orientation-controls .fl-button-group-field:first-child>*,.fl-shape-orientation-controls .fl-button-group-field:first-child>* button{border-top-left-radius:4px;border-bottom-left-radius:4px}.fl-shape-orientation-controls .fl-button-group-field:last-child>*,.fl-shape-orientation-controls .fl-button-group-field:last-child>* button{border-top-right-radius:4px;border-bottom-right-radius:4px}.fl-builder-custom-field{background:#fff;border:2px solid transparent;border-radius:4px;padding:7px 10px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);min-height:36px;box-sizing:border-box}.fl-builder-field-multiple .fl-builder-custom-field{cursor:move}.fl-builder-custom-field a{color:#21759b!important}.fl-builder-custom-field a:hover{color:#d54e21!important}.fl-builder-custom-field label.error{margin-top:5px}.fl-photo-field .fl-photo-preview{display:-ms-flexbox;display:flex}.fl-photo-field .fl-photo-select,.fl-photo-field.fl-photo-empty .fl-photo-preview{display:none}.fl-photo-field.fl-photo-empty .fl-photo-select{display:block}.fl-photo-field .fl-photo-preview-img{line-height:0;margin:5px 0}.fl-photo-field .fl-photo-preview-img img{max-width:60px}.fl-photo-field .fl-photo-preview select{margin:8px 0 8px 10px;width:calc(100% - 10px)}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview select{display:none}.fl-photo-field .fl-photo-preview-filename{display:none;font-size:13px;font-weight:700;margin:5px 0 9px 11px}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview-filename{display:inline-block;word-break:break-all}.fl-multiple-photos-field .fl-multiple-photos-select,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-add,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-count,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-edit,.fl-multiple-photos-lightbox .gallery-settings,.fl-photo-field.fl-photo-no-attachment .fl-photo-edit{display:none}.fl-photo-field .fl-photo-edit{margin:0 0 0 11px}.fl-photo-field .fl-photo-remove,.fl-photo-field .fl-photo-replace{margin:0 0 0 8px}.fl-builder-edit .media-modal{z-index:9999991}.fl-builder-edit .media-modal-backdrop{z-index:999999}.fl-builder-edit .media-frame{-webkit-backface-visibility:hidden;backface-visibility:hidden}.fl-builder-edit .media-modal-content h1{font-family:inherit}.fl-builder-edit form#wp-link,.popover[class*=tour-],ul.as-list{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-builder-edit .media-modal-content .thumbnail{padding:0;border:none;border-radius:0}.fl-builder-edit .media-modal-content .attachment-preview .thumbnail{margin-bottom:0}.fl-builder-edit .media-modal-content .attachment-preview .thumbnail img{max-width:none}.fl-builder-edit button.media-modal-close{position:absolute;box-shadow:none;-webkit-box-shadow:none}.fl-builder-edit .media-frame.hide-menu{visibility:visible}.fl-builder-edit .media-modal .media-frame-content *,.fl-builder-edit .media-modal .media-frame-router .media-router *{color:grey}span.select2-container.select2-container--open{z-index:9999999}.fl-multiple-photos-field .fl-multiple-photos-add{margin:0 0 0 8px}.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-select{display:inline}.fl-multiple-photos-count{font-weight:700;margin-bottom:3px}.fl-video-field .fl-video-select,.fl-video-field.fl-video-empty .fl-video-preview{display:none}.fl-video-field.fl-video-empty .fl-video-select{display:block}.fl-video-field .fl-video-preview-img{float:left;line-height:0;margin:5px 0}.fl-video-field .fl-video-preview-img img{max-width:60px}.fl-video-field .fl-video-preview-img .dashicons.dashicons-media-video{display:block;font-size:60px;height:60px;line-height:60px;width:60px}.fl-video-field .fl-video-preview-filename{display:inline-block;font-size:14px;font-weight:700;margin:7px 0 5px 11px}.fl-video-field .fl-video-remove,.fl-video-field .fl-video-replace{margin:0 0 0 11px}.fl-multiple-audios-field .fl-multiple-audios-select,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-add,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-edit{display:none}.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-select{display:block}.fl-multiple-audios-field .fl-multiple-audios-add{margin:0 0 0 8px}.fl-icon-field .fl-icon-select,.fl-icon-field.fl-icon-empty .fl-icon-preview{display:none}.fl-icon-field.fl-icon-empty .fl-icon-select{display:block}.fl-icon-field .fl-icon-preview i{display:inline-block;font-size:28px;margin:10px 10px 9px;vertical-align:middle}.fl-icon-field .fl-icon-remove{margin:0 0 0 8px}.fl-builder-hidden-editor{display:none}.fl-builder-settings .wp-switch-editor{border-radius:0;color:#333;margin-top:2px}.fl-builder-settings .mce-toolbar .mce-btn-group .mce-btn{margin:2px 0}.fl-builder-settings .mce-menubtn.mce-fixed-width button{width:100px}.fl-builder-settings .mce-menubtn.mce-fixed-width span{width:100%}.mce-close:active,.mce-close:hover,.mce-toolbar .mce-btn button:active,.mce-toolbar .mce-btn button:hover,.mce-window .mce-btn button:active,.mce-window .mce-btn button:hover{background:0 0;border:none}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:1px!important}.wp-editor-container textarea.wp-editor-area{background:0 0;border:none;padding:10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.fl-builder-edit form#wp-link{color:#000;font-size:13px}.fl-builder-edit form#wp-link #link-options label{display:block;margin-bottom:2px}.fl-builder-edit form#wp-link #link-options label span{padding-right:10px;vertical-align:middle}.fl-builder-edit form#wp-link #link-options input[type=text]{display:inline-block;height:auto;margin:5px 0 0;padding:3px 5px;width:80%}.fl-builder-edit form#wp-link .query-results{top:225px}.fl-code-field{border:1px solid #E6E6E6;border-left:none}.ace_editor,.ace_editor *{font-family:Monaco,Menlo,"Ubuntu Mono","Droid Sans Mono",Consolas,monospace!important;font-size:12px!important;font-weight:400!important;letter-spacing:0!important}.fl-layout-field-option{border:2px solid #d9d9d9;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;cursor:pointer;float:left;line-height:0;max-width:23%;margin:0 1% 2%;padding:5px}.fl-layout-field-option-selected,.fl-layout-field-option:hover{border-color:red}.fl-layout-field-option img{max-width:100%}.fl-link-field .fl-link-field-input-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-link-field-input{width:auto!important;-ms-flex:1 1 100%;flex:1 1 100%}.fl-link-field .fl-link-field-input-wrap button{-ms-flex:0 0 0%;flex:0 0 0%;height:36px;margin:1px 1px 1px 5px}.fl-link-field-options-wrap{padding:7px 0 0 12px}.fl-link-field-options-wrap label{margin-right:7px}.fl-link-field-options-wrap span{font-size:11px;font-weight:700;color:inherit!important;text-align:center;opacity:.5}.fl-link-field-search{display:none;border:2px solid #e6eaed;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin:4px 0 0;padding:10px}.fl-link-field-search-title{display:block;margin:0 0 3px 2px}.fl-link-field-search-cancel{margin-top:6px}.fl-link-field-search input{box-shadow:none!important;width:100%!important;padding:3px 9px!important}.fl-link-field-search #as-original-link-search{width:100%}.fl-field-connections-toggle{padding:10px 0}.fl-field[data-type=editor] .fl-field-connections-toggle{-ms-flex-align:start;align-items:flex-start}.fl-field[data-type=link] .fl-field-connections-toggle{height:24px;margin-top:1px;-ms-flex-align:start;align-items:flex-start}.fl-field[data-type=link] .fl-field-connection{bottom:20px}.fl-field-connections-menu[data-field=fl-field-text]{margin-top:30px}.fl-help-tooltip{display:inline-block;position:relative}.fl-lightbox-width-slim .fl-help-tooltip{position:static}.fl-help-tooltip-icon{color:#999!important;cursor:pointer;font-size:15px!important;padding:5px;vertical-align:middle}.fl-help-tooltip-text{box-sizing:border-box;background:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ccc;-moz-box-shadow:0 0 5px #ccc;-webkit-box-shadow:0 0 5px #ccc;display:none;font-weight:400;left:23px;padding:10px 13px;position:absolute;top:-6px;width:250px;z-index:1000;border-radius:4px}.fl-lightbox-width-slim .fl-help-tooltip-text{top:30px;left:0;width:100%}.fl-field-control .fl-form-field{margin-bottom:0}.fl-form-field[data-preview-text=icon]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.fl-form-field-preview-text i{display:inline-block;font-size:18px;line-height:22px;margin-right:10px}.fl-builder-field-actions{padding-left:0!important;padding-right:0!important;text-align:center;width:85px}.fl-builder-field-actions i{color:#999!important;cursor:pointer;font-size:13px!important;line-height:29px!important;width:16px}.fl-builder-field-actions i:hover{color:#000!important}.fl-builder-field-actions i.fl-builder-field-copy,.fl-builder-field-actions i.fl-builder-field-delete{margin-left:5px}.fl-builder-field-actions i.fl-builder-field-move{cursor:move}.fl-builder-field-dd-helper{background:#ccc;height:30px!important;float:left;width:130px!important}.fl-builder-field-dd-zone{border:1px dashed #ccc;height:30px}.fl-builder-field-actions-single .fl-builder-field-delete,.fl-builder-field-actions-single .fl-builder-field-move{display:none!important}.fl-builder-field-multiple .fl-builder-field-actions,.fl-builder-field-multiple .fl-field-control,.fl-builder-field-multiple .fl-field-label{padding-top:2px!important;padding-bottom:2px!important}.fl-builder-field-multiple .fl-builder-field-actions{min-width:70px!important}.fl-builder-field-multiple[data-field=icons] .fl-builder-field-actions{width:70px!important}.fl-builder-field-multiple.ui-sortable-helper .fl-field-control{width:60%}.fl-builder-field-multiple.ui-sortable-helper .fl-builder-field-actions{display:none}.fl-builder-widget-settings input{display:inline-block!important;margin:5px 10px 8px!important}.fl-builder-lightbox-loading{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings .error,.fl-builder-settings input.error{color:#d03436!important}.fl-builder-settings label.error,.fl-builder-settings p.error{color:#d03436;display:block;margin-top:5px}.fl-builder-settings .fl-form-table .fl-field-description{color:#464646;font-style:normal;margin-left:2px}.fl-lightbox .fl-field-connection{right:-1px}.fl-lightbox .fl-field-connection-content{border:2px solid transparent!important;background:#e7ebef!important}.fl-field-connection-content .fl-field-connection-label{color:#676f7a!important}.fl-field-connections-toggle{pointer-events:none;width:20px;right:-25px}.has-scrollbar .fl-field-connections-toggle{right:-22px}.fl-lightbox-width-slim tr[data-type=code] .fl-field-connections-toggle{right:10px}.fl-lightbox-width-slim .fl-code-field{width:90%}.fl-field-connections-toggle-open{transform:none!important}.fl-field-connections-toggle i{pointer-events:auto;color:#abb1ba;font-size:13px!important;transition-property:transform;transition-duration:.15s}.fl-field-connections-toggle-open i{transform:rotate(-45deg)}ul.as-selections{background-color:#fff;border:none;border-radius:4px;box-shadow:none;color:#333;font-size:12px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px;width:auto}ul.as-selections.loading{background:url(../img/ajax-loader-small.svg) 98% center no-repeat}ul.as-selections li.as-selection-item{background:#d4eaf6;border:none;font-size:11px;line-height:14px;padding:8px 15px;border-radius:4px;margin:2px}ul.as-selections li.as-selection-item.blur{background:#f4f4f4}ul.as-selections li.as-selection-item a.as-close{line-height:12px}ul.as-selections li.as-original{margin:0}ul.as-selections li.as-original input{height:auto;font-size:12px;margin:0;padding:0;box-shadow:none}ul.as-list{margin:0;font-size:13px;color:#000;background-color:#fff;background-color:rgba(255,255,255,.95);z-index:2;box-shadow:0 0 10px rgba(0,0,0,.1);border:none;border:1px solid #dfdfdf;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}li.as-message,li.as-result-item{border:none}li.as-result-item.active{background:#e5e5e5;border-radius:0;color:#333;text-shadow:none}li.as-result-item em{background:0 0!important;color:#333!important;font-size:12px;padding:0!important;font-weight:700}.fl-custom-query-filter{display:none}.fl-custom-query .fl-field[data-type=suggest] select{margin-bottom:5px;width:100%}.fl-builder-service-settings{position:relative}.fl-builder-service-error{color:red!important;padding:15px 0 0}.fl-builder-service-account-delete{color:red!important;margin-left:10px;position:relative;top:2px}.fl-lightbox-width-slim .fl-builder-service-account-delete{display:block;padding-top:7px}#fl-field-visibility_user_capability .fl-field-description,.fl-builder-service-connect-row .fl-field-description{background:#f0f0f0;color:#333!important;display:block;float:none;margin:10px 0 0;padding:10px}#fl-field-visibility_user_capability .fl-field-description a,.fl-builder-service-connect-row .fl-field-description a{color:#21759b!important;text-decoration:underline!important}.fl-ordering-field-option{background:#fff;border:1px solid #dfdfdf;border-radius:3px;cursor:move;margin-bottom:5px;padding:5px 10px}.fl-ordering-field-option .fa{color:#ccc;float:right;line-height:16px}#tiptip_holder{z-index:1000000}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:#333}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:#333}#tiptip_holder.tip_right #tiptip_arrow_inner{border-right-color:#333}#tiptip_holder.tip_left #tiptip_arrow_inner{border-left-color:#333}#tiptip_content{background:#333;box-shadow:none}.fl-builder-row-settings .fl-field-responsive-setting input[name=bg_position_custom_right],.fl-builder-row-settings .fl-field-responsive-setting input[name=bg_position_custom_left]{display:none!important}.fl-builder-getting-started-video{line-height:0!important;padding:10px}.fl-builder-getting-started-video iframe{border:none;height:326px;width:100%}.fl-builder-tour-actions .fl-builder-actions-title{font-size:14px!important;line-height:19px}.fl-builder-tour-mask{bottom:0;left:0;position:fixed;right:0;top:0;z-index:100000000}.fl-builder-tour-dimmed{background:rgba(0,0,0,.7);bottom:0;left:0;position:absolute;right:0;top:0}body>.fl-builder-tour-dimmed{position:fixed}.tour-backdrop{z-index:110000}.popover[class*=tour-]{border:1px solid #ccc;border-radius:0;box-shadow:0 0 40px rgba(0,0,0,.3);color:#666;font-size:13px;font-weight:400;line-height:18px;max-width:none;padding:0;width:300px;z-index:100000001}.popover[class*=tour-].bottom>.arrow{border-bottom-color:#ccc}.popover[class*=tour-].bottom>.arrow:after{border-bottom-color:#f7f7f7}.popover[class*=tour-] .popover-title{border-radius:0;color:#333;letter-spacing:normal;text-transform:none}.popover[class*=tour-] .fa-times{color:#b3b3b3;cursor:pointer;font-size:16px;padding:5px;position:absolute;right:3px;top:2px}.popover[class*=tour-] .fa-times:hover{color:#666}.popover[class*=tour-] .popover-content{border-bottom:1px solid #d9d9d9;padding:13px 15px}.popover[class*=tour-] .fl-builder-tour-next{display:block;float:none;width:100%}.popover-navigation button{min-height:36px}.fl-builder-shortcode-mask-wrap{position:relative;pointer-events:none}.fl-builder-shortcode-mask{bottom:-1px;left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fl-builder--search{border:2px solid transparent;position:relative;padding:0;width:54px;transition-property:width;transition-delay:.1s;transition-duration:.15s}.fl-builder--search.is-expanded{border:2px solid #00A0D0}.fl-builder--search input[type=text],.fl-builder--search input[type=text]:focus{background-color:transparent;border:none!important;box-sizing:border-box;width:100%;font-size:16px;text-align:center}.fl-builder--search:before{display:-ms-flexbox;display:flex;top:0;left:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;content:"\f002";font:normal normal normal 14px/1 Font Awesome\ 5 Free;text-align:center;width:100%;height:100%;position:absolute;pointer-events:none;color:rgba(128,128,128,.6);font-size:17px;opacity:1;transition-property:opacity;transition-duration:.15s}.fl-builder--main-menu-panel,.fl-builder-ui-keyboard-shortcuts{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-builder--search.has-text:before,.fl-builder--search.is-expanded:before{opacity:0}.fl-builder--search input::-webkit-input-placeholder{color:rgba(128,128,128,0)!important;transition:color .25s}.fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(128,128,128,.4)!important}.fl-builder--search .search-label{cursor:text}.fl-builder--search .search-clear{display:none;padding:10px 10px 10px 30px;color:#a7a7a7;font-size:12px;position:absolute;right:0;top:0;background-color:#eff1f2;background:linear-gradient(to left,#e4e7ea,#e4e7ea 75%,rgba(228,231,234,0))}.fl-builder--search.has-text .search-clear,.fl-builder--search.is-expanded input{display:inline-block}.fl-builder--search:hover .search-clear{color:#888;background-color:#eff1f2;background:linear-gradient(to left,#dadfe5,#dadfe5 75%,rgba(218,223,229,0))}.fl-builder--search.is-expanded{width:246px}@keyframes fl-builder-show-menu-item{from{transform:translateY(10px) scale(.8);opacity:0}to{transform:translateX(0) translateY(0) scale(1);opacity:1}}.fl-builder--main-menu-panel{display:none;box-sizing:border-box;position:fixed;top:calc(45px + 10px);left:10px;width:360px;color:#222;max-height:calc(100% - 66px);border-radius:4px;background:#fff;border:none;border-top:3px solid #00a0d2;box-shadow:0 11px 45px 8px rgba(0,0,0,.1);font-size:14px!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10000009;pointer-events:auto}.fl-builder--main-menu-panel.is-showing{display:-ms-flexbox;display:flex}.fl-builder--main-menu-panel:before,.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items:before{bottom:100%;right:6px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:13px;margin-left:-13px}.fl-builder--main-menu-panel-views{-ms-flex:1 1 100%;flex:1 1 100%;overflow:auto}.fl-builder--main-menu-panel-mask{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000119}.fl-builder--main-menu-panel .fl-builder--tabs{padding-left:20px;padding-top:15px}.fl-builder--main-menu-panel-view{display:none}.fl-builder--main-menu-panel-view.is-showing{display:block}.fl-builder--main-menu-panel-view-title{font-size:24px;font-weight:600;padding:25px 22px 0;line-height:1;white-space:nowrap}.fl-builder--main-menu-panel-view-title .title-accessory{float:right;color:#b1b1b1}.fl-builder--main-menu-panel-view-title .title-accessory>i{font-size:20px!important;width:25px!important}.fl-builder--main-menu-panel-view-title .title-accessory>i:hover{color:#222}.fl-builder--main-menu-panel-view-title .pop-view{padding:10px;margin-left:-10px;opacity:.5;font-size:25px;font-weight:400;cursor:pointer;background:0 0;outline:0;border:none;color:inherit}.fl-builder--main-menu-panel-view-title .pop-view:focus{outline:0;top:0;background:#E5EAED!important}.fl-builder--menu-item:before{display:block;content:"";float:none;clear:both}.fl-builder--menu-item{color:inherit;text-align:left;box-sizing:border-box;display:block;padding:10px 15px;margin:0 10px;width:calc(100% - 20px);background:0 0;border:none;border-radius:4px;font-size:14px;line-height:1.1;cursor:pointer;opacity:1;text-transform:none}.fl-builder--menu-item .menu-view.view-revisions{opacity:.5;padding-left:5px}.fl-builder--menu-item .menu-event.event-showGlobalSettings,.fl-builder--menu-item .menu-event.event-showLayoutSettings{color:#6bc373;padding-left:5px}.fl-builder--menu-item:hover{background:#eaf1f8;border:none;text-decoration:none;color:#000}.fl-builder--selector-menu .fl-builder--menu-item:hover{background:#fff}.fl-builder--menu-item-accessory{float:right;text-align:center;display:inline-block;min-width:40px;font-size:14px}.fl-builder--menu-item-accessory.view-arrow{font-size:18px}.fl-builder--menu{padding:0;margin:20px 0}.fl-builder--menu hr{margin:8px 0;background:#e6eaed!important;height:1px;border:none}.fl-builder--menu .fl-builder-video-wrap{padding:0 10px 10px}.fl-revision-list-item{display:-ms-flexbox;display:flex}.fl-revision-list-item-text{padding-left:15px}.fl-revision-list-item-date{padding-bottom:5px}.fl-builder--revision-actions{display:none;position:fixed;top:4px;left:4px;z-index:100008;padding:4px 4px 6px;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder--revision-actions *{margin-right:5px}.fl-builder--revision-actions :last-child{margin:0}.fl-builder--menu-item[data-event=noRevisionsMessage]:hover{background:0 0;box-shadow:none;cursor:default}.fl-no-revisions-message-title{font-weight:700;margin-bottom:10px}.fl-no-revisions-message-text{line-height:22px}.fl-builder--main-menu-panel-view[data-name=history] .fl-builder--menu-item,.fl-builder--main-menu-panel-view[data-name=history] .fl-builder--menu-item:focus{border:none!important;padding:0;margin-bottom:2px}.fl-history-list-item{border:1px solid transparent;border-radius:4px;padding:10px 12px 12px}.fl-history-list-item i.fa-check-circle{display:none}.fl-history-list-item[data-current="1"]{border-color:#D3DADF;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.fl-history-list-item[data-current="1"] .fl-history-list-item-label{width:100%}.fl-history-list-item[data-current="1"] i.fa-check-circle{display:block}.fl-builder-module-placeholder-message{border:1px dashed #ccc;overflow:hidden;padding:20px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.module-import-wrap{display:-ms-flexbox;display:flex}.module-import-input{width:100%!important}.module-import-apply{height:35px;margin:1px 1px 1px 5px}.module-import-error{color:red!important;display:none;padding:5px 12px}.fl-field-connections-menu{z-index:999999}.fl-field[data-type=editor] .fl-field-connections-toggle{right:5px!important}.fl-field-connections-inline-toggle{display:inline;color:#9a9b9c;margin-left:6px}.fl-field-connections-inline-toggle i{transition-property:transform;transition-duration:.15s}.fl-field-connections-inline-toggle.fl-field-connections-toggle-open i{transform:rotate(45deg)}.fl-builder-add-ultimate-presets-button,.fl-builder-add-ultimate-rows-button,.fl-builder-pp-add-template-button,.pp-preview-button,.uabb-live-preview-button{display:none!important}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;background:0 0;transition-property:background;transition-duration:.15s}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-ne,.ui-resizable-nw,.ui-resizable-se,.ui-resizable-sw{width:12px;height:12px}.ui-resizable-se{cursor:se-resize;right:-4px;bottom:-4px}.ui-resizable-sw{cursor:sw-resize;left:-4px;bottom:-4px}.ui-resizable-nw{cursor:nw-resize;left:-4px;top:-4px}.ui-resizable-ne{cursor:ne-resize;right:-4px;top:-4px}.fl-builder-resizable-iframe-fix{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100000000}.fl-builder-panel .ui-resizable-handle:active,.fl-builder-panel .ui-resizable-handle:hover,.fl-lightbox .ui-resizable-handle:active,.fl-lightbox .ui-resizable-handle:hover{background:#00a0d2}.fl-builder-panel .ui-resizable-n,.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-n,.fl-lightbox .ui-resizable-s{height:6px}.fl-builder-panel .ui-resizable-n,.fl-lightbox .ui-resizable-n{top:-3px}.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-s{bottom:-3px}.fl-builder-panel .ui-resizable-e,.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-e,.fl-lightbox .ui-resizable-w{width:6px}.fl-builder-panel .ui-resizable-e,.fl-lightbox .ui-resizable-e{right:-3px}.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-w{left:-3px}.fl-lightbox .ui-resizable-ne,.fl-lightbox .ui-resizable-nw,.fl-lightbox .ui-resizable-se,.fl-lightbox .ui-resizable-sw{background:0 0;border:6px solid transparent}.fl-lightbox .ui-resizable-ne:active,.fl-lightbox .ui-resizable-ne:hover,.fl-lightbox .ui-resizable-nw:active,.fl-lightbox .ui-resizable-nw:hover,.fl-lightbox .ui-resizable-se:active,.fl-lightbox .ui-resizable-se:hover,.fl-lightbox .ui-resizable-sw:active,.fl-lightbox .ui-resizable-sw:hover{background:0 0;border-color:#00a0d2}.fl-lightbox .ui-resizable-ne{border-bottom:none;border-left:none;border-top-right-radius:4px}.fl-lightbox .ui-resizable-nw{border-bottom:none;border-right:none;border-top-left-radius:4px}.fl-lightbox .ui-resizable-se{border-top:none;border-left:none;border-bottom-right-radius:4px}.fl-lightbox .ui-resizable-sw{border-top:none;border-right:none;border-bottom-left-radius:4px}.fl-builder-ui-keyboard-shortcuts{display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:999999;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background:rgba(50,50,50,.88);font-size:15px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder-ui-keyboard-shortcuts.is-showing{display:-ms-flexbox;display:flex}.fl-builder-ui-keyboard-shortcuts-content{box-sizing:border-box;width:500px;background:#f5f7f9;border-radius:4px;padding:30px 0 0;box-shadow:0 10px 30px rgba(0,0,0,.15)}.fl-builder-ui-keyboard-shortcut-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:12px 40px}.fl-builder-ui-keyboard-shortcut-item:nth-child(even){background:#eef2f5}.fl-builder-ui-shortcut-keycode{margin-left:auto;text-transform:uppercase;letter-spacing:2px}.fl-builder-ui-keyboard-shortcust-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;padding:10px}.dismiss-shortcut-ui{padding:10px;border-radius:4px;background:#fff;color:#000;font-size:14px;border:2px solid #fff}.dismiss-shortcut-ui:focus,.dismiss-shortcut-ui:hover{top:0;color:#000;background:#eef2f5;border:2px solid #eef2f5}.fl-lightbox .select2-container--default .selection .select2-selection--single,.select2-dropdown{border-color:transparent!important;border-style:solid!important;border-radius:4px!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.fl-lightbox .select2-container--default .selection .select2-selection--single{border-width:2px!important;height:36px!important;font-size:13px!important;line-height:15px!important;outline:0}.fl-lightbox .select2-selection--single .select2-selection__rendered{line-height:32px!important;font-size:13px}.fl-lightbox .select2-selection--single .select2-selection__arrow{height:32px}.fl-builder-ui-skin--light .fl-lightbox .select2-selection__rendered,.fl-builder-ui-skin--light .select2-dropdown,.fl-builder-ui-skin--light .select2-search__field{color:grey!important}.fl-builder-ui-skin--light .select2-search__field::-ms-input-placeholder{color:grey!important}.fl-builder-ui-skin--light .select2-search__field::placeholder{color:grey!important}.fl-builder-ui-skin--light .select2-search__field::-webkit-input-placeholder{color:grey!important}.fl-builder-ui-skin--light .select2-search__field::-moz-placeholder{color:grey!important}.fl-builder-ui-skin--light .select2-search__field:-ms-input-placeholder{color:grey!important}.fl-builder-ui-skin--light .select2-search__field:-moz-placeholder{color:grey!important}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel,.fl-builder-ui-skin--dark .fl-builder--preview-actions,.fl-builder-ui-skin--dark .fl-builder--search-results-panel,.fl-builder-ui-skin--dark .fl-builder-panel,.fl-builder-ui-skin--dark .fl-lightbox,body.fl-builder-ui-skin--dark .fl-builder-bar .fl-builder-bar-content{background:#23282d;color:#b4b9be;border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-header{color:#b4b9be;border-bottom-color:#1d1d1d;border-top-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-top-color:#1d2227}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel:before{border-bottom-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-arrow polygon{fill:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel-search .fl-builder-panel-search-input{background:#24282e}.fl-builder-ui-skin--dark .fl-responsive-preview-content{background:#131619}.fl-builder-ui-skin--dark .fl-form-table th{background:#23282d!important;color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--preview-actions .device-icons,.fl-builder-ui-skin--dark .fl-builder-button{background:#2c333a}.fl-builder-ui-skin--dark .fl-builder-button:focus{background:#131a22}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-primary{color:#fff!important;fill:#fff!important;background:#00A0D2}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-buy-button,.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-feedback-button,.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-upgrade-button{background-color:#F7A407;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-silent:focus{border:2px solid #00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{color:#00A0D2!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:hover,.fl-builder-ui-skin--dark .fl-builder--menu>button:hover{background:#101215!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:focus,.fl-builder-ui-skin--dark .fl-builder--menu>button:focus{background:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-bar-title{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:#181b1f}.fl-builder-simple.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:transparent}.fl-builder-ui-skin--dark .fl-builder-layout-title{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-bar-title-caret i,.fl-builder-ui-skin--dark .fl-builder-layout-pretitle,.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{color:#7d8690}.fl-builder-ui-skin--dark button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#101215!important}.fl-builder-ui-skin--dark .fl-builder--search:before{color:rgba(162,173,184,.73)}.fl-builder-ui-skin--dark .fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(162,173,184,.73)!important}.fl-builder-ui-skin--dark .fl-builder--search .search-clear{color:rgba(162,173,184,.5);background-color:#e4e4e4;background:linear-gradient(to left,#383f46,#383f46 75%,rgba(56,63,70,0))}.fl-builder-ui-skin--dark .fl-builder--menu hr{background-color:#23282d!important;border:none}.fl-builder-ui-skin--dark .fl-builder--tabs{border-color:#383f46!important}.fl-builder-ui-skin--dark .fl-builder--tabs .is-showing,.fl-builder-ui-skin--dark .fl-builder-settings-tabs a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-more.fl-contains-active{color:#fff!important;fill:#fff!important;background:#181b20!important}.fl-builder-ui-skin--dark .fl-builder--tabs :focus{background-color:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder--tabs .is-showing:focus{color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder--menu-item:hover{background:#383f46;color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--menu * .fl-builder--menu-item-accessory,.fl-builder-ui-skin--dark .fl-builder-blocks-section-group-name{color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--selector-display{color:#c6cdd6;background:url(../img/svg/select-arrow-down-alt2-light.svg) center right 10px no-repeat #1a1b22!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label{color:#b5becb}.fl-builder-ui-skin--dark .fl-builder-panel-search-input input{border-color:#5b656f;color:#b8c2ce;background:#171b1f!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label:focus,.fl-builder-ui-skin--dark .fl-builder-panel-search-input input:focus{border-color:#00a0d2}.fl-builder-ui-skin--dark .fl-builder--group-label{color:#aaafb5!important;background:#24282e}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu{border-color:#101215!important;color:#7c858e;background-color:#101215}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu:before{border-bottom-color:#101215}.fl-builder-ui-skin--dark .fl-builder--menu>a,.fl-builder-ui-skin--dark .fl-builder--menu>button,.fl-builder-ui-skin--dark .fl-builder--menu>span{color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:hover{background:#23282d!important;color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:focus{background:#23282d!important;color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-panel-drag-handle{fill:#5b656f}.fl-builder-ui-skin--dark .fl-builder--template-collection-section-header,.fl-builder-ui-skin--dark .fl-builder-blocks-section .fl-builder-blocks-section-header,.fl-builder-ui-skin--dark .fl-builder-settings-section-header{background-color:#191b21;border-color:#191b21}.fl-builder-ui-skin--dark .fl-builder--template-collection-section-name,.fl-builder-ui-skin--dark .fl-builder--user-templates-section-name,.fl-builder-ui-skin--dark .fl-builder-blocks-section .fl-builder-blocks-section-title,.fl-builder-ui-skin--dark .fl-builder-settings-fields .fl-builder-settings-title{color:#7d8690!important;fill:#7d8690;background:#24282e}.fl-builder-ui-skin--dark .fl-builder-settings-fields .fl-builder-settings-title:focus{border-color:#7d8690}.fl-builder-ui-skin--dark .fl-builder-blocks-section-content .fl-builder-block,.fl-builder-ui-skin--dark .fl-user-template{color:#b8c2ce}.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-content,.fl-builder-ui-skin--dark .fl-user-template:hover{background:#171b1f;color:#fff}.fl-builder-ui-skin--dark .fl-builder-block:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover i{color:#6d7782!important}.fl-builder-ui-skin--dark .fl-builder-block:hover a:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover a:hover i{color:#9eacbb!important}.fl-builder-ui-skin--dark .fl-builder-block .fl-builder-block-icon{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col,.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#7d8690}.fl-builder-ui-skin--dark .fl-user-templates{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder--template-thumbnail{border-color:#393f44}.fl-builder-ui-skin--dark .fl-builder--menu a.fl-template-collection{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-lightbox .fl-lightbox-header h1{color:#fff!important}.fl-builder-ui-skin--dark .fl-form-table th label{color:#a8b3bf!important}.fl-builder-ui-skin--dark .fl-builder-settings-tabs{background-color:#2c333a!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields h3.fl-builder-settings-title{background:#24282e}.fl-builder-ui-skin--dark h3.fl-builder-settings-title .fl-builder-settings-title-text-wrap{color:#a8b3bf;background-color:#1b2025}.fl-builder-ui-skin--dark .fl-lightbox :not(i){color:#a7b1bb!important}.fl-builder-ui-skin--dark .fl-builder-button{color:#c6cdd6!important;fill:#c6cdd6!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{fill:#00A0D2!important}.fl-builder-ui-skin--dark .fl-lightbox .fl-builder-button.fl-builder-button-primary{color:#fff!important}.fl-builder-ui-skin--dark .fl-color-picker-color.fl-color-picker-empty{background:#1a1b22}.fl-color-picker-color.fl-color-picker-empty .fl-color-picker-icon{fill:#6f7881}.fl-builder-ui-skin--dark .fl-color-picker-clear{background-color:#121a23}.fl-builder-ui-skin--dark .fl-color-picker-clear:hover{background-color:#373f46}.fl-builder-ui-skin--dark span.fl-builder-block-no-node-templates:hover{background:#1d2025}.fl-builder-ui-skin--dark .fl-builder-settings-tab-description{background:#1d2227}.fl-builder-ui-skin--dark .fl-builder-custom-field,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url],.fl-builder-ui-skin--dark .fl-builder-settings-fields select,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea,.fl-builder-ui-skin--dark .fl-lightbox .select2-selection__rendered,.fl-builder-ui-skin--dark .select2-dropdown{background-color:#181b20!important}.fl-builder-ui-skin--dark .fl-builder-panel-search button svg .filled-shape{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields select:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea:focus{border-color:#00a0d2!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields select{background-image:url(../img/svg/select-arrow-down-alt2-light.svg)!important}.fl-builder-ui-skin--dark .fl-lightbox .select2-container--default .selection .select2-selection--single{border-color:#181b20!important}.fl-builder-ui-skin--dark .select2-search__field{background-color:#2c333a!important}.fl-builder-ui-skin--dark .fl-builder-custom-field select,.fl-builder-ui-skin--dark .fl-photo-field select{border-color:#7d8690!important}.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle{color:#6b747d}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel-view-title,.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle:hover{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--saving-indicator{color:#858f99}.fl-builder-ui-skin--dark .fl-icons-list i:hover{background-color:#16191d;color:#fff}.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:after,.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:before{background:#6f7881}.fl-builder-ui-skin--dark .fl-builder--user-templates-section-content{border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button{background:0 0;border-right-color:#101215!important}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button:hover{background:#181b1f}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu{background:#131a22;border-color:#353c43 #131a22 #131a22}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu:before{border-bottom-color:#353c43}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:focus,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover{background:#383f46}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover.fl-active{color:#fff!important;background:#383f46}.fl-builder-ui-skin--dark ul.as-selections{background-color:#121a23}.fl-builder-ui-skin--dark .fl-custom-query .fl-builder-settings-section{border-top:2px solid #1b2026!important}.fl-builder-ui-skin--dark div.fl-field-unit-select{background-color:#181b20!important}.fl-builder-ui-skin--dark .fl-dimension-field-units>*{border-right:1px solid #383f46}.fl-builder-ui-skin--dark .fl-field-popup-slider,.fl-builder-ui-skin--dark .fl-field-popup-slider-input .ui-slider-handle{background:#383f46}.fl-builder-ui-skin--dark .fl-field-popup-slider-arrow:after{border-bottom-color:#383f46}.fl-builder-ui-skin--dark .fl-field-popup-slider-input{background-color:#121a23}.fl-builder-ui-skin--dark .fl-unit-field-input{border-right:1px solid #383f46!important}.fl-builder-ui-skin--dark .fl-button-group-field-option[data-selected="1"]{background-color:#383f46!important;color:#fff}.fl-builder-ui-skin--dark .fl-button-group-field-option[data-selected="1"] i{color:#fff!important}.fl-builder-ui-skin--dark .fl-button-group-field-options{background:#181b20}.fl-builder-ui-skin--dark .fl-compound-field-section-toggle{background-color:#181b20}.fl-builder-ui-skin--dark .fl-compound-field-section-toggle:hover{background-color:#383f46}.fl-builder-ui-skin--dark .fl-compound-field-section-visible .fl-compound-field-section-toggle{border-top-color:#121a23!important;background-color:transparent}.fl-builder-ui-skin--dark .fl-field-connections-toggle i{color:#7c8590}.fl-builder-ui-skin--dark .fl-lightbox .fl-field-connection-content{background-color:#191b20!important}.fl-builder-ui-skin--dark .fl-nanoscroller>.fl-nanoscroller-pane>.fl-nanoscroller-slider{background-color:#181b20}.fl-builder-ui-skin--dark .fl-nanoscroller>.fl-nanoscroller-pane:hover>.fl-nanoscroller-slider{background-color:#5a646f}.fl-builder-ui-skin--dark .fl-nanoscroller>.fl-nanoscroller-pane.active>.fl-nanoscroller-slider{background-color:#00A0D2}.fl-builder-ui-skin--dark .fl-lightbox div.mce-panel{background:#383f46}.fl-builder-ui-skin--dark .fl-lightbox .mce-toolbar .mce-ico{color:#a7b1bb}.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button-secondary{background:#383f46;border:none;box-shadow:none}.fl-builder-ui-skin--dark .fl-lightbox .fl-builder-settings .wp-switch-editor{background:#23282d}.fl-builder-ui-skin--dark .fl-lightbox .html-active .switch-html,.fl-builder-ui-skin--dark .fl-lightbox .quicktags-toolbar,.fl-builder-ui-skin--dark .fl-lightbox .tmce-active .switch-tmce{background:#383f46}.fl-builder-ui-skin--dark .fl-lightbox textarea.wp-editor-area{background:0 0!important}.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button-secondary:focus,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button-secondary:hover,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button.focus,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button.hover,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button:focus,.fl-builder-ui-skin--dark .fl-lightbox .wp-core-ui .button:hover{background:#191b20}
|
css/fl-lightbox.css
CHANGED
@@ -179,6 +179,7 @@
|
|
179 |
flex-direction: row;
|
180 |
align-items: center;
|
181 |
line-height: 1;
|
|
|
182 |
}
|
183 |
.fl-lightbox.ui-draggable .fl-lightbox-header {
|
184 |
cursor: move;
|
179 |
flex-direction: row;
|
180 |
align-items: center;
|
181 |
line-height: 1;
|
182 |
+
letter-spacing: 0;
|
183 |
}
|
184 |
.fl-lightbox.ui-draggable .fl-lightbox-header {
|
185 |
cursor: move;
|
extensions/fl-builder-cache-helper/plugins/autooptimize.php
CHANGED
@@ -5,7 +5,7 @@ class Autooptimize {
|
|
5 |
var $name = 'AutoOptimize';
|
6 |
var $url = 'https://wordpress.org/plugins/autoptimize/';
|
7 |
|
8 |
-
var $filters = array( '
|
9 |
|
10 |
static function run() {
|
11 |
if ( class_exists( '\autoptimizeCache' ) ) {
|
@@ -14,6 +14,8 @@ class Autooptimize {
|
|
14 |
}
|
15 |
|
16 |
function filters() {
|
17 |
-
|
|
|
|
|
18 |
}
|
19 |
}
|
5 |
var $name = 'AutoOptimize';
|
6 |
var $url = 'https://wordpress.org/plugins/autoptimize/';
|
7 |
|
8 |
+
var $filters = array( 'init' );
|
9 |
|
10 |
static function run() {
|
11 |
if ( class_exists( '\autoptimizeCache' ) ) {
|
14 |
}
|
15 |
|
16 |
function filters() {
|
17 |
+
if ( isset( $_GET['fl_builder'] ) ) {
|
18 |
+
add_filter( 'autoptimize_filter_noptimize', '__return_true' );
|
19 |
+
}
|
20 |
}
|
21 |
}
|
fl-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Beaver Builder Plugin (Lite Version)
|
4 |
* Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
|
5 |
* Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
|
6 |
-
* Version: 2.3.2.
|
7 |
* Author: The Beaver Builder Team
|
8 |
* Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
|
9 |
* Copyright: (c) 2014 Beaver Builder
|
3 |
* Plugin Name: Beaver Builder Plugin (Lite Version)
|
4 |
* Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
|
5 |
* Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
|
6 |
+
* Version: 2.3.2.8
|
7 |
* Author: The Beaver Builder Team
|
8 |
* Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
|
9 |
* Copyright: (c) 2014 Beaver Builder
|
includes/column-settings.php
CHANGED
@@ -478,6 +478,7 @@ FLBuilder::register_settings_form('col', array(
|
|
478 |
'section' => '<section>',
|
479 |
'article' => '<article>',
|
480 |
'aside' => '<aside>',
|
|
|
481 |
'header' => '<header>',
|
482 |
'footer' => '<footer>',
|
483 |
) ),
|
478 |
'section' => '<section>',
|
479 |
'article' => '<article>',
|
480 |
'aside' => '<aside>',
|
481 |
+
'main' => '<main>',
|
482 |
'header' => '<header>',
|
483 |
'footer' => '<footer>',
|
484 |
) ),
|
includes/module-settings.php
CHANGED
@@ -112,6 +112,7 @@ FLBuilder::register_settings_form('module_advanced', array(
|
|
112 |
'section' => '<section>',
|
113 |
'article' => '<article>',
|
114 |
'aside' => '<aside>',
|
|
|
115 |
'header' => '<header>',
|
116 |
'footer' => '<footer>',
|
117 |
) ),
|
112 |
'section' => '<section>',
|
113 |
'article' => '<article>',
|
114 |
'aside' => '<aside>',
|
115 |
+
'main' => '<main>',
|
116 |
'header' => '<header>',
|
117 |
'footer' => '<footer>',
|
118 |
) ),
|
includes/row-settings.php
CHANGED
@@ -840,6 +840,7 @@ $row_settings = array(
|
|
840 |
'section' => '<section>',
|
841 |
'article' => '<article>',
|
842 |
'aside' => '<aside>',
|
|
|
843 |
'header' => '<header>',
|
844 |
'footer' => '<footer>',
|
845 |
)),
|
840 |
'section' => '<section>',
|
841 |
'article' => '<article>',
|
842 |
'aside' => '<aside>',
|
843 |
+
'main' => '<main>',
|
844 |
'header' => '<header>',
|
845 |
'footer' => '<footer>',
|
846 |
)),
|
includes/ui-js-config.php
CHANGED
@@ -25,7 +25,7 @@ echo 'FLBuilderConfig = ' . FLBuilderUtils::json_encode( apply_filt
|
|
25 |
'nestedColumns' => ( ! defined( 'FL_BUILDER_NESTED_COLUMNS' ) || FL_BUILDER_NESTED_COLUMNS ),
|
26 |
'newUser' => FLBuilderModel::is_new_user(),
|
27 |
'pluginUrl' => FL_BUILDER_URL,
|
28 |
-
'relativePluginUrl' =>
|
29 |
'postId' => $post_id,
|
30 |
'postStatus' => get_post_status(),
|
31 |
'postType' => get_post_type(),
|
25 |
'nestedColumns' => ( ! defined( 'FL_BUILDER_NESTED_COLUMNS' ) || FL_BUILDER_NESTED_COLUMNS ),
|
26 |
'newUser' => FLBuilderModel::is_new_user(),
|
27 |
'pluginUrl' => FL_BUILDER_URL,
|
28 |
+
'relativePluginUrl' => FLBuilderModel::get_relative_plugin_url(),
|
29 |
'postId' => $post_id,
|
30 |
'postStatus' => get_post_status(),
|
31 |
'postType' => get_post_type(),
|
includes/updater-config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
if ( class_exists( 'FLUpdater' ) ) {
|
4 |
FLUpdater::add_product(array(
|
5 |
'name' => 'Beaver Builder Plugin (Lite Version)',
|
6 |
-
'version' => '2.3.2.
|
7 |
'slug' => 'bb-plugin',
|
8 |
'type' => 'plugin',
|
9 |
));
|
3 |
if ( class_exists( 'FLUpdater' ) ) {
|
4 |
FLUpdater::add_product(array(
|
5 |
'name' => 'Beaver Builder Plugin (Lite Version)',
|
6 |
+
'version' => '2.3.2.8',
|
7 |
'slug' => 'bb-plugin',
|
8 |
'type' => 'plugin',
|
9 |
));
|
includes/updater/classes/class-fl-updater.php
CHANGED
@@ -76,15 +76,18 @@ final class FLUpdater {
|
|
76 |
return FLUpdater::$_responses[ $slug ];
|
77 |
}
|
78 |
|
79 |
-
FLUpdater::$_responses[ $slug ] = FLUpdater::api_request(
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
88 |
|
89 |
return FLUpdater::$_responses[ $slug ];
|
90 |
}
|
@@ -110,8 +113,7 @@ final class FLUpdater {
|
|
110 |
}
|
111 |
|
112 |
$response = $this->get_response();
|
113 |
-
|
114 |
-
if ( ! isset( $response->error ) ) {
|
115 |
|
116 |
$transient->last_checked = time();
|
117 |
$transient->checked[ $this->settings['slug'] ] = $this->settings['version'];
|
@@ -119,7 +121,7 @@ final class FLUpdater {
|
|
119 |
if ( 'plugin' == $this->settings['type'] ) {
|
120 |
|
121 |
$plugin = self::get_plugin_file( $this->settings['slug'] );
|
122 |
-
|
123 |
if ( version_compare( $response->new_version, $this->settings['version'], '>' ) ) {
|
124 |
|
125 |
$transient->response[ $plugin ] = new stdClass();
|
@@ -129,15 +131,39 @@ final class FLUpdater {
|
|
129 |
$transient->response[ $plugin ]->url = $response->homepage;
|
130 |
$transient->response[ $plugin ]->package = $response->package;
|
131 |
$transient->response[ $plugin ]->tested = $response->tested;
|
132 |
-
$transient->response[ $plugin ]->icons = apply_filters(
|
133 |
-
'
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
if ( empty( $response->package ) ) {
|
139 |
$transient->response[ $plugin ]->upgrade_notice = FLUpdater::get_update_error_message();
|
140 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
} elseif ( 'theme' == $this->settings['type'] ) {
|
143 |
|
@@ -150,6 +176,19 @@ final class FLUpdater {
|
|
150 |
'package' => $response->package,
|
151 |
'tested' => $response->tested,
|
152 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
}
|
155 |
}
|
@@ -325,12 +364,15 @@ final class FLUpdater {
|
|
325 |
$response->error = __( 'You submitted an invalid license. Non alphanumeric characters found.', 'fl-builder' );
|
326 |
return $response;
|
327 |
}
|
328 |
-
$response = FLUpdater::api_request(
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
|
|
|
|
|
|
334 |
update_site_option( 'fl_themes_subscription_email', $license );
|
335 |
return $response;
|
336 |
}
|
@@ -343,11 +385,14 @@ final class FLUpdater {
|
|
343 |
* @return bool
|
344 |
*/
|
345 |
static public function get_subscription_info() {
|
346 |
-
return self::api_request(
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
|
|
|
|
|
|
351 |
}
|
352 |
|
353 |
/**
|
@@ -381,17 +426,23 @@ final class FLUpdater {
|
|
381 |
$text = sprintf( __( 'Please enter a valid license key to enable automatic updates. %s', 'fl-builder' ), $link );
|
382 |
} else {
|
383 |
if ( 'bb-theme-builder/bb-theme-builder.php' === $plugin_data['plugin'] ) {
|
384 |
-
$subscribe_link = FLBuilderModel::get_store_url(
|
385 |
-
'
|
386 |
-
|
387 |
-
|
388 |
-
|
|
|
|
|
|
|
389 |
} else {
|
390 |
-
$subscribe_link = FLBuilderModel::get_store_url(
|
391 |
-
'
|
392 |
-
|
393 |
-
|
394 |
-
|
|
|
|
|
|
|
395 |
}
|
396 |
$link = sprintf( '<a href="%s" target="_blank" style="color: #fff; text-decoration: underline;">%s »</a>', $subscribe_link, __( 'Subscribe Now', 'fl-builder' ) );
|
397 |
/* translators: %s: subscribe link */
|
@@ -399,7 +450,7 @@ final class FLUpdater {
|
|
399 |
}
|
400 |
|
401 |
$message .= '<span style="display:block;padding:10px 20px;margin:10px 0; background: #d54e21; color: #fff;">';
|
402 |
-
$message .=
|
403 |
$message .= ' ';
|
404 |
$message .= $text;
|
405 |
$message .= '</span>';
|
76 |
return FLUpdater::$_responses[ $slug ];
|
77 |
}
|
78 |
|
79 |
+
FLUpdater::$_responses[ $slug ] = FLUpdater::api_request(
|
80 |
+
FLUpdater::$_updates_api_url,
|
81 |
+
array(
|
82 |
+
'fl-api-method' => 'update_info',
|
83 |
+
'license' => FLUpdater::get_subscription_license(),
|
84 |
+
'domain' => FLUpdater::validate_domain( network_home_url() ),
|
85 |
+
'product' => $this->settings['name'],
|
86 |
+
'slug' => $this->settings['slug'],
|
87 |
+
'version' => $this->settings['version'],
|
88 |
+
'php' => phpversion(),
|
89 |
+
)
|
90 |
+
);
|
91 |
|
92 |
return FLUpdater::$_responses[ $slug ];
|
93 |
}
|
113 |
}
|
114 |
|
115 |
$response = $this->get_response();
|
116 |
+
if ( ! isset( $response->error ) || ( isset( $response->error ) && 'No update available.' === $response->error ) ) {
|
|
|
117 |
|
118 |
$transient->last_checked = time();
|
119 |
$transient->checked[ $this->settings['slug'] ] = $this->settings['version'];
|
121 |
if ( 'plugin' == $this->settings['type'] ) {
|
122 |
|
123 |
$plugin = self::get_plugin_file( $this->settings['slug'] );
|
124 |
+
error_log( 'here' );
|
125 |
if ( version_compare( $response->new_version, $this->settings['version'], '>' ) ) {
|
126 |
|
127 |
$transient->response[ $plugin ] = new stdClass();
|
131 |
$transient->response[ $plugin ]->url = $response->homepage;
|
132 |
$transient->response[ $plugin ]->package = $response->package;
|
133 |
$transient->response[ $plugin ]->tested = $response->tested;
|
134 |
+
$transient->response[ $plugin ]->icons = apply_filters(
|
135 |
+
'fl_updater_icon',
|
136 |
+
array(
|
137 |
+
'1x' => FL_BUILDER_URL . 'img/beaver-128.png',
|
138 |
+
'2x' => FL_BUILDER_URL . 'img/beaver-256.png',
|
139 |
+
'default' => FL_BUILDER_URL . 'img/beaver-256.png',
|
140 |
+
),
|
141 |
+
$response,
|
142 |
+
$this->settings
|
143 |
+
);
|
144 |
|
145 |
if ( empty( $response->package ) ) {
|
146 |
$transient->response[ $plugin ]->upgrade_notice = FLUpdater::get_update_error_message();
|
147 |
}
|
148 |
+
} else {
|
149 |
+
// no update, for wp 5.5 we have to add a mock item.
|
150 |
+
$item = (object) array(
|
151 |
+
'id' => $plugin,
|
152 |
+
'slug' => $response->slug,
|
153 |
+
'plugin' => $plugin,
|
154 |
+
'new_version' => $this->settings['version'],
|
155 |
+
'url' => '',
|
156 |
+
'package' => '',
|
157 |
+
'icons' => array(),
|
158 |
+
'banners' => array(),
|
159 |
+
'banners_rtl' => array(),
|
160 |
+
'tested' => '',
|
161 |
+
'requires_php' => '',
|
162 |
+
'compatibility' => new stdClass(),
|
163 |
+
);
|
164 |
+
// Adding the "mock" item to the `no_update` property is required
|
165 |
+
// for the enable/disable auto-updates links to correctly appear in UI.
|
166 |
+
$transient->no_update[ $plugin ] = $item;
|
167 |
}
|
168 |
} elseif ( 'theme' == $this->settings['type'] ) {
|
169 |
|
176 |
'package' => $response->package,
|
177 |
'tested' => $response->tested,
|
178 |
);
|
179 |
+
} else {
|
180 |
+
// no update, for wp 5.5 we have to add a mock item.
|
181 |
+
$item = array(
|
182 |
+
'theme' => $this->settings['slug'],
|
183 |
+
'new_version' => $this->settings['version'],
|
184 |
+
'url' => '',
|
185 |
+
'package' => '',
|
186 |
+
'requires' => '',
|
187 |
+
'requires_php' => '',
|
188 |
+
);
|
189 |
+
// Adding the "mock" item to the `no_update` property is required
|
190 |
+
// for the enable/disable auto-updates links to correctly appear in UI.
|
191 |
+
$transient->no_update[ $this->settings['slug'] ] = $item;
|
192 |
}
|
193 |
}
|
194 |
}
|
364 |
$response->error = __( 'You submitted an invalid license. Non alphanumeric characters found.', 'fl-builder' );
|
365 |
return $response;
|
366 |
}
|
367 |
+
$response = FLUpdater::api_request(
|
368 |
+
self::$_updates_api_url,
|
369 |
+
array(
|
370 |
+
'fl-api-method' => 'activate_domain',
|
371 |
+
'license' => $license,
|
372 |
+
'domain' => FLUpdater::validate_domain( network_home_url() ),
|
373 |
+
'products' => json_encode( self::$_products ),
|
374 |
+
)
|
375 |
+
);
|
376 |
update_site_option( 'fl_themes_subscription_email', $license );
|
377 |
return $response;
|
378 |
}
|
385 |
* @return bool
|
386 |
*/
|
387 |
static public function get_subscription_info() {
|
388 |
+
return self::api_request(
|
389 |
+
self::$_updates_api_url,
|
390 |
+
array(
|
391 |
+
'fl-api-method' => 'subscription_info',
|
392 |
+
'domain' => FLUpdater::validate_domain( network_home_url() ),
|
393 |
+
'license' => FLUpdater::get_subscription_license(),
|
394 |
+
)
|
395 |
+
);
|
396 |
}
|
397 |
|
398 |
/**
|
426 |
$text = sprintf( __( 'Please enter a valid license key to enable automatic updates. %s', 'fl-builder' ), $link );
|
427 |
} else {
|
428 |
if ( 'bb-theme-builder/bb-theme-builder.php' === $plugin_data['plugin'] ) {
|
429 |
+
$subscribe_link = FLBuilderModel::get_store_url(
|
430 |
+
'beaver-themer',
|
431 |
+
array(
|
432 |
+
'utm_medium' => 'bb-theme-builder',
|
433 |
+
'utm_source' => 'plugins-admin-page',
|
434 |
+
'utm_campaign' => 'subscribe',
|
435 |
+
)
|
436 |
+
);
|
437 |
} else {
|
438 |
+
$subscribe_link = FLBuilderModel::get_store_url(
|
439 |
+
'',
|
440 |
+
array(
|
441 |
+
'utm_medium' => 'bb',
|
442 |
+
'utm_source' => 'plugins-admin-page',
|
443 |
+
'utm_campaign' => 'subscribe',
|
444 |
+
)
|
445 |
+
);
|
446 |
}
|
447 |
$link = sprintf( '<a href="%s" target="_blank" style="color: #fff; text-decoration: underline;">%s »</a>', $subscribe_link, __( 'Subscribe Now', 'fl-builder' ) );
|
448 |
/* translators: %s: subscribe link */
|
450 |
}
|
451 |
|
452 |
$message .= '<span style="display:block;padding:10px 20px;margin:10px 0; background: #d54e21; color: #fff;">';
|
453 |
+
$message .= sprintf( '<strong>%s<strong>', __( 'UPDATE UNAVAILABLE!', 'fl-builder' ) );
|
454 |
$message .= ' ';
|
455 |
$message .= $text;
|
456 |
$message .= '</span>';
|
includes/vendor/mailerlite/FL_ML_Rest.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once dirname(__FILE__) . '/FL_ML_Rest_Base.php';
|
4 |
-
|
5 |
-
class FL_ML_Rest extends FL_ML_Rest_Base
|
6 |
-
{
|
7 |
-
var $name = '';
|
8 |
-
var $id = null;
|
9 |
-
|
10 |
-
function __construct($api_key){
|
11 |
-
parent::__construct();
|
12 |
-
|
13 |
-
$this->apiKey = $api_key;
|
14 |
-
$this->path = $this->getPath();
|
15 |
-
|
16 |
-
}
|
17 |
-
|
18 |
-
function setPath($path){
|
19 |
-
$this->path = $this->url . $path;
|
20 |
-
}
|
21 |
-
|
22 |
-
function getPath()
|
23 |
-
{
|
24 |
-
return $this->path;
|
25 |
-
}
|
26 |
-
|
27 |
-
function setName($name)
|
28 |
-
{
|
29 |
-
$this->name = $name;
|
30 |
-
}
|
31 |
-
|
32 |
-
function setId($id){
|
33 |
-
$this->id = $id;
|
34 |
-
|
35 |
-
if ($this->id)
|
36 |
-
$this->path = $this->getPath() . '/' . $id . '/';
|
37 |
-
else
|
38 |
-
$this->path = $this->getPath() . '/';
|
39 |
-
|
40 |
-
return $this;
|
41 |
-
}
|
42 |
-
|
43 |
-
function getAll(){
|
44 |
-
return $this->execute('GET');
|
45 |
-
}
|
46 |
-
|
47 |
-
function get($data = null){
|
48 |
-
if (!$this->id)
|
49 |
-
throw new InvalidArgumentException('ID is not set.');
|
50 |
-
|
51 |
-
return $this->execute('GET');
|
52 |
-
}
|
53 |
-
|
54 |
-
function add($data = null){
|
55 |
-
return $this->execute('POST', $data);
|
56 |
-
}
|
57 |
-
|
58 |
-
function put($data = null){
|
59 |
-
return $this->execute('PUT', $data);
|
60 |
-
}
|
61 |
-
|
62 |
-
function remove($data = null){
|
63 |
-
return $this->execute('DELETE');
|
64 |
-
}
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/vendor/mailerlite/FL_ML_Rest_Base.php
DELETED
@@ -1,224 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class FL_ML_Rest_Base
|
4 |
-
{
|
5 |
-
protected $url;
|
6 |
-
protected $verb;
|
7 |
-
protected $requestBody;
|
8 |
-
protected $requestLength;
|
9 |
-
protected $username;
|
10 |
-
protected $password;
|
11 |
-
protected $acceptType;
|
12 |
-
protected $responseBody;
|
13 |
-
protected $responseInfo;
|
14 |
-
|
15 |
-
protected $apiKey = '';
|
16 |
-
protected $path = '';
|
17 |
-
|
18 |
-
public function __construct($url = 'https://app.mailerlite.com/api/v1/', $verb = 'GET')
|
19 |
-
{
|
20 |
-
$this->url = $url;
|
21 |
-
$this->verb = $verb;
|
22 |
-
$this->requestLength = 0;
|
23 |
-
$this->username = null;
|
24 |
-
$this->password = null;
|
25 |
-
$this->acceptType = 'application/json';
|
26 |
-
$this->responseBody = null;
|
27 |
-
$this->responseInfo = null;
|
28 |
-
$this->path = '';
|
29 |
-
|
30 |
-
}
|
31 |
-
|
32 |
-
public function flush()
|
33 |
-
{
|
34 |
-
$this->requestBody = null;
|
35 |
-
$this->requestLength = 0;
|
36 |
-
$this->verb = 'GET';
|
37 |
-
$this->responseBody = null;
|
38 |
-
$this->responseInfo = null;
|
39 |
-
}
|
40 |
-
|
41 |
-
public function execute($method = null, $data = null)
|
42 |
-
{
|
43 |
-
$ch = curl_init();
|
44 |
-
$this->setAuth($ch);
|
45 |
-
|
46 |
-
if ($method)
|
47 |
-
$this->verb = $method;
|
48 |
-
|
49 |
-
$this->requestBody = $data;
|
50 |
-
|
51 |
-
$this->buildPostBody();
|
52 |
-
|
53 |
-
try {
|
54 |
-
switch (strtoupper($this->verb)) {
|
55 |
-
case 'GET':
|
56 |
-
$this->executeGet($ch);
|
57 |
-
break;
|
58 |
-
case 'POST':
|
59 |
-
$this->executePost($ch);
|
60 |
-
break;
|
61 |
-
case 'PUT':
|
62 |
-
$this->executePut($ch);
|
63 |
-
break;
|
64 |
-
case 'DELETE':
|
65 |
-
$this->executeDelete($ch);
|
66 |
-
break;
|
67 |
-
default:
|
68 |
-
throw new InvalidArgumentException('Current verb (' . $this->verb . ') is an invalid REST verb.');
|
69 |
-
}
|
70 |
-
} catch (InvalidArgumentException $e) {
|
71 |
-
curl_close($ch);
|
72 |
-
throw $e;
|
73 |
-
} catch (Exception $e) {
|
74 |
-
curl_close($ch);
|
75 |
-
throw $e;
|
76 |
-
}
|
77 |
-
|
78 |
-
return $this->responseBody;
|
79 |
-
}
|
80 |
-
|
81 |
-
public function buildPostBody()
|
82 |
-
{
|
83 |
-
$data = $this->requestBody;
|
84 |
-
|
85 |
-
$data['apiKey'] = $this->apiKey;
|
86 |
-
|
87 |
-
if (!is_array($data)) {
|
88 |
-
throw new InvalidArgumentException('Invalid data input for postBody. Array expected');
|
89 |
-
}
|
90 |
-
|
91 |
-
$data = http_build_query($data, '', '&');
|
92 |
-
$this->requestBody = $data;
|
93 |
-
}
|
94 |
-
|
95 |
-
protected function executeGet($ch)
|
96 |
-
{
|
97 |
-
$this->path .= (strpos($this->path, '?') === false ? '?' : '&') . $this->requestBody;
|
98 |
-
|
99 |
-
$this->doExecute($ch);
|
100 |
-
}
|
101 |
-
|
102 |
-
protected function executePost($ch)
|
103 |
-
{
|
104 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->requestBody);
|
105 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
106 |
-
|
107 |
-
$this->doExecute($ch);
|
108 |
-
}
|
109 |
-
|
110 |
-
protected function executePut($ch)
|
111 |
-
{
|
112 |
-
$this->requestLength = strlen($this->requestBody);
|
113 |
-
|
114 |
-
$fh = fopen('php://memory', 'rw');
|
115 |
-
fwrite($fh, $this->requestBody);
|
116 |
-
rewind($fh);
|
117 |
-
|
118 |
-
curl_setopt($ch, CURLOPT_INFILE, $fh);
|
119 |
-
curl_setopt($ch, CURLOPT_INFILESIZE, $this->requestLength);
|
120 |
-
curl_setopt($ch, CURLOPT_PUT, true);
|
121 |
-
|
122 |
-
$this->doExecute($ch);
|
123 |
-
|
124 |
-
fclose($fh);
|
125 |
-
}
|
126 |
-
|
127 |
-
protected function executeDelete($ch)
|
128 |
-
{
|
129 |
-
$this->path .= (strpos($this->path, '?') === false ? '?' : '&') . $this->requestBody;
|
130 |
-
|
131 |
-
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
132 |
-
|
133 |
-
$this->doExecute($ch);
|
134 |
-
}
|
135 |
-
|
136 |
-
protected function doExecute(&$curlHandle)
|
137 |
-
{
|
138 |
-
$this->setCurlOpts($curlHandle);
|
139 |
-
$this->responseBody = curl_exec($curlHandle);
|
140 |
-
|
141 |
-
$this->responseInfo = curl_getinfo($curlHandle);
|
142 |
-
|
143 |
-
curl_close($curlHandle);
|
144 |
-
}
|
145 |
-
|
146 |
-
protected function setCurlOpts(&$curlHandle)
|
147 |
-
{
|
148 |
-
curl_setopt($curlHandle, CURLOPT_TIMEOUT, 10);
|
149 |
-
curl_setopt($curlHandle, CURLOPT_URL, $this->path);
|
150 |
-
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
|
151 |
-
curl_setopt($curlHandle, CURLOPT_HTTPHEADER, array('Accept: ' . $this->acceptType));
|
152 |
-
|
153 |
-
$curlHandle = fl_set_curl_safe_opts( $curlHandle );
|
154 |
-
curl_setopt($curlHandle, CURLOPT_FOLLOWLOCATION, true);
|
155 |
-
}
|
156 |
-
|
157 |
-
protected function setAuth(&$curlHandle)
|
158 |
-
{
|
159 |
-
if ($this->username !== null && $this->password !== null) {
|
160 |
-
curl_setopt($curlHandle, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
|
161 |
-
curl_setopt($curlHandle, CURLOPT_USERPWD, $this->username . ':' . $this->password);
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
-
public function getAcceptType()
|
166 |
-
{
|
167 |
-
return $this->acceptType;
|
168 |
-
}
|
169 |
-
|
170 |
-
public function setAcceptType($acceptType)
|
171 |
-
{
|
172 |
-
$this->acceptType = $acceptType;
|
173 |
-
}
|
174 |
-
|
175 |
-
public function getPassword()
|
176 |
-
{
|
177 |
-
return $this->password;
|
178 |
-
}
|
179 |
-
|
180 |
-
public function setPassword($password)
|
181 |
-
{
|
182 |
-
$this->password = $password;
|
183 |
-
}
|
184 |
-
|
185 |
-
public function getResponseBody()
|
186 |
-
{
|
187 |
-
return $this->responseBody;
|
188 |
-
}
|
189 |
-
|
190 |
-
public function getResponseInfo()
|
191 |
-
{
|
192 |
-
return $this->responseInfo;
|
193 |
-
}
|
194 |
-
|
195 |
-
public function getUrl()
|
196 |
-
{
|
197 |
-
return $this->url;
|
198 |
-
}
|
199 |
-
|
200 |
-
public function setUrl($url)
|
201 |
-
{
|
202 |
-
$this->url = $url;
|
203 |
-
}
|
204 |
-
|
205 |
-
public function getUsername()
|
206 |
-
{
|
207 |
-
return $this->username;
|
208 |
-
}
|
209 |
-
|
210 |
-
public function setUsername($username)
|
211 |
-
{
|
212 |
-
$this->username = $username;
|
213 |
-
}
|
214 |
-
|
215 |
-
public function getVerb()
|
216 |
-
{
|
217 |
-
return $this->verb;
|
218 |
-
}
|
219 |
-
|
220 |
-
public function setVerb($verb)
|
221 |
-
{
|
222 |
-
$this->verb = $verb;
|
223 |
-
}
|
224 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/vendor/mailerlite/autoload.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
+
|
7 |
+
return ComposerAutoloaderInit701698485a0f6168a5f6329bbda01094::getLoader();
|
includes/vendor/mailerlite/clue/stream-filter/src/CallbackFilter.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Clue\StreamFilter;
|
4 |
+
|
5 |
+
use php_user_filter;
|
6 |
+
use InvalidArgumentException;
|
7 |
+
use ReflectionFunction;
|
8 |
+
use Exception;
|
9 |
+
|
10 |
+
/**
|
11 |
+
*
|
12 |
+
* @internal
|
13 |
+
* @see append()
|
14 |
+
* @see prepend()
|
15 |
+
*/
|
16 |
+
class CallbackFilter extends php_user_filter
|
17 |
+
{
|
18 |
+
private $callback;
|
19 |
+
private $closed = true;
|
20 |
+
private $supportsClose = false;
|
21 |
+
|
22 |
+
public function onCreate()
|
23 |
+
{
|
24 |
+
$this->closed = false;
|
25 |
+
|
26 |
+
if (!is_callable($this->params)) {
|
27 |
+
throw new InvalidArgumentException('No valid callback parameter given to stream_filter_(append|prepend)');
|
28 |
+
}
|
29 |
+
$this->callback = $this->params;
|
30 |
+
|
31 |
+
// callback supports end event if it accepts invocation without arguments
|
32 |
+
$ref = new ReflectionFunction($this->callback);
|
33 |
+
$this->supportsClose = ($ref->getNumberOfRequiredParameters() === 0);
|
34 |
+
|
35 |
+
return true;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function onClose()
|
39 |
+
{
|
40 |
+
$this->closed = true;
|
41 |
+
|
42 |
+
// callback supports closing and is not already closed
|
43 |
+
if ($this->supportsClose) {
|
44 |
+
$this->supportsClose = false;
|
45 |
+
// invoke without argument to signal end and discard resulting buffer
|
46 |
+
try {
|
47 |
+
call_user_func($this->callback);
|
48 |
+
} catch (Exception $ignored) {
|
49 |
+
// this might be called during engine shutdown, so it's not safe
|
50 |
+
// to raise any errors or exceptions here
|
51 |
+
// trigger_error('Error closing filter: ' . $ignored->getMessage(), E_USER_WARNING);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
$this->callback = null;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function filter($in, $out, &$consumed, $closing)
|
59 |
+
{
|
60 |
+
// concatenate whole buffer from input brigade
|
61 |
+
$data = '';
|
62 |
+
while ($bucket = stream_bucket_make_writeable($in)) {
|
63 |
+
$consumed += $bucket->datalen;
|
64 |
+
$data .= $bucket->data;
|
65 |
+
}
|
66 |
+
|
67 |
+
// skip processing callback that already ended
|
68 |
+
if ($this->closed) {
|
69 |
+
return PSFS_FEED_ME;
|
70 |
+
}
|
71 |
+
|
72 |
+
// only invoke filter function if buffer is not empty
|
73 |
+
// this may skip flushing a closing filter
|
74 |
+
if ($data !== '') {
|
75 |
+
try {
|
76 |
+
$data = call_user_func($this->callback, $data);
|
77 |
+
} catch (Exception $e) {
|
78 |
+
// exception should mark filter as closed
|
79 |
+
$this->onClose();
|
80 |
+
trigger_error('Error invoking filter: ' . $e->getMessage(), E_USER_WARNING);
|
81 |
+
|
82 |
+
return PSFS_ERR_FATAL;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
// mark filter as closed after processing closing chunk
|
87 |
+
if ($closing) {
|
88 |
+
$this->closed = true;
|
89 |
+
|
90 |
+
// callback supports closing and is not already closed
|
91 |
+
if ($this->supportsClose) {
|
92 |
+
$this->supportsClose = false;
|
93 |
+
|
94 |
+
// invoke without argument to signal end and append resulting buffer
|
95 |
+
try {
|
96 |
+
$data .= call_user_func($this->callback);
|
97 |
+
} catch (Exception $e) {
|
98 |
+
trigger_error('Error ending filter: ' . $e->getMessage(), E_USER_WARNING);
|
99 |
+
|
100 |
+
return PSFS_ERR_FATAL;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
if ($data !== '') {
|
106 |
+
// create a new bucket for writing the resulting buffer to the output brigade
|
107 |
+
// reusing an existing bucket turned out to be bugged in some environments (ancient PHP versions and HHVM)
|
108 |
+
$bucket = @stream_bucket_new($this->stream, $data);
|
109 |
+
|
110 |
+
// legacy PHP versions (PHP < 5.4) do not support passing data from the event signal handler
|
111 |
+
// because closing the stream invalidates the stream and its stream bucket brigade before
|
112 |
+
// invoking the filter close handler.
|
113 |
+
if ($bucket !== false) {
|
114 |
+
stream_bucket_append($out, $bucket);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
return PSFS_PASS_ON;
|
119 |
+
}
|
120 |
+
}
|
includes/vendor/mailerlite/clue/stream-filter/src/functions.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Clue\StreamFilter;
|
4 |
+
|
5 |
+
use RuntimeException;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* append a callback filter to the given stream
|
9 |
+
*
|
10 |
+
* @param resource $stream
|
11 |
+
* @param callable $callback
|
12 |
+
* @param int $read_write
|
13 |
+
* @return resource filter resource which can be used for `remove()`
|
14 |
+
* @throws Exception on error
|
15 |
+
* @uses stream_filter_append()
|
16 |
+
*/
|
17 |
+
function append($stream, $callback, $read_write = STREAM_FILTER_ALL)
|
18 |
+
{
|
19 |
+
$ret = @stream_filter_append($stream, register(), $read_write, $callback);
|
20 |
+
|
21 |
+
if ($ret === false) {
|
22 |
+
$error = error_get_last() + array('message' => '');
|
23 |
+
throw new RuntimeException('Unable to append filter: ' . $error['message']);
|
24 |
+
}
|
25 |
+
|
26 |
+
return $ret;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* prepend a callback filter to the given stream
|
31 |
+
*
|
32 |
+
* @param resource $stream
|
33 |
+
* @param callable $callback
|
34 |
+
* @param int $read_write
|
35 |
+
* @return resource filter resource which can be used for `remove()`
|
36 |
+
* @throws Exception on error
|
37 |
+
* @uses stream_filter_prepend()
|
38 |
+
*/
|
39 |
+
function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL)
|
40 |
+
{
|
41 |
+
$ret = @stream_filter_prepend($stream, register(), $read_write, $callback);
|
42 |
+
|
43 |
+
if ($ret === false) {
|
44 |
+
$error = error_get_last() + array('message' => '');
|
45 |
+
throw new RuntimeException('Unable to prepend filter: ' . $error['message']);
|
46 |
+
}
|
47 |
+
|
48 |
+
return $ret;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Creates filter fun (function) which uses the given built-in $filter
|
53 |
+
*
|
54 |
+
* Some filters may accept or require additional filter parameters – most
|
55 |
+
* filters do not require filter parameters.
|
56 |
+
* If given, the optional `$parameters` argument will be passed to the
|
57 |
+
* underlying filter handler as-is.
|
58 |
+
* In particular, note how *not passing* this parameter at all differs from
|
59 |
+
* explicitly passing a `null` value (which many filters do not accept).
|
60 |
+
* Please refer to the individual filter definition for more details.
|
61 |
+
*
|
62 |
+
* @param string $filter built-in filter name. See stream_get_filters() or http://php.net/manual/en/filters.php
|
63 |
+
* @param mixed $parameters (optional) parameters to pass to the built-in filter as-is
|
64 |
+
* @return callable a filter callback which can be append()'ed or prepend()'ed
|
65 |
+
* @throws RuntimeException on error
|
66 |
+
* @link http://php.net/manual/en/filters.php
|
67 |
+
* @see stream_get_filters()
|
68 |
+
* @see append()
|
69 |
+
*/
|
70 |
+
function fun($filter, $parameters = null)
|
71 |
+
{
|
72 |
+
$fp = fopen('php://memory', 'w');
|
73 |
+
if (func_num_args() === 1) {
|
74 |
+
$filter = @stream_filter_append($fp, $filter, STREAM_FILTER_WRITE);
|
75 |
+
} else {
|
76 |
+
$filter = @stream_filter_append($fp, $filter, STREAM_FILTER_WRITE, $parameters);
|
77 |
+
}
|
78 |
+
|
79 |
+
if ($filter === false) {
|
80 |
+
fclose($fp);
|
81 |
+
$error = error_get_last() + array('message' => '');
|
82 |
+
throw new RuntimeException('Unable to access built-in filter: ' . $error['message']);
|
83 |
+
}
|
84 |
+
|
85 |
+
// append filter function which buffers internally
|
86 |
+
$buffer = '';
|
87 |
+
append($fp, function ($chunk) use (&$buffer) {
|
88 |
+
$buffer .= $chunk;
|
89 |
+
|
90 |
+
// always return empty string in order to skip actually writing to stream resource
|
91 |
+
return '';
|
92 |
+
}, STREAM_FILTER_WRITE);
|
93 |
+
|
94 |
+
$closed = false;
|
95 |
+
|
96 |
+
return function ($chunk = null) use ($fp, $filter, &$buffer, &$closed) {
|
97 |
+
if ($closed) {
|
98 |
+
throw new \RuntimeException('Unable to perform operation on closed stream');
|
99 |
+
}
|
100 |
+
if ($chunk === null) {
|
101 |
+
$closed = true;
|
102 |
+
$buffer = '';
|
103 |
+
fclose($fp);
|
104 |
+
return $buffer;
|
105 |
+
}
|
106 |
+
// initialize buffer and invoke filters by attempting to write to stream
|
107 |
+
$buffer = '';
|
108 |
+
fwrite($fp, $chunk);
|
109 |
+
|
110 |
+
// buffer now contains everything the filter function returned
|
111 |
+
return $buffer;
|
112 |
+
};
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* remove a callback filter from the given stream
|
117 |
+
*
|
118 |
+
* @param resource $filter
|
119 |
+
* @return boolean true on success or false on error
|
120 |
+
* @throws Exception on error
|
121 |
+
* @uses stream_filter_remove()
|
122 |
+
*/
|
123 |
+
function remove($filter)
|
124 |
+
{
|
125 |
+
if (@stream_filter_remove($filter) === false) {
|
126 |
+
throw new RuntimeException('Unable to remove given filter');
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* registers the callback filter and returns the resulting filter name
|
132 |
+
*
|
133 |
+
* There should be little reason to call this function manually.
|
134 |
+
*
|
135 |
+
* @return string filter name
|
136 |
+
* @uses CallbackFilter
|
137 |
+
*/
|
138 |
+
function register()
|
139 |
+
{
|
140 |
+
static $registered = null;
|
141 |
+
if ($registered === null) {
|
142 |
+
$registered = 'stream-callback';
|
143 |
+
stream_filter_register($registered, __NAMESPACE__ . '\CallbackFilter');
|
144 |
+
}
|
145 |
+
return $registered;
|
146 |
+
}
|
includes/vendor/mailerlite/clue/stream-filter/src/functions_include.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!function_exists('Clue\\StreamFilter\\append')) {
|
4 |
+
require __DIR__ . '/functions.php';
|
5 |
+
}
|
includes/vendor/mailerlite/composer/ClassLoader.php
ADDED
@@ -0,0 +1,445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer\Autoload;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
+
*
|
18 |
+
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
+
*
|
20 |
+
* // register classes with namespaces
|
21 |
+
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
+
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
+
*
|
24 |
+
* // activate the autoloader
|
25 |
+
* $loader->register();
|
26 |
+
*
|
27 |
+
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
+
* $loader->setUseIncludePath(true);
|
29 |
+
*
|
30 |
+
* In this example, if you try to use a class in the Symfony\Component
|
31 |
+
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
+
* the autoloader will first look for the class under the component/
|
33 |
+
* directory, and it will then fallback to the framework/ directory if not
|
34 |
+
* found before giving up.
|
35 |
+
*
|
36 |
+
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
+
*
|
38 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
+
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see http://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see http://www.php-fig.org/psr/psr-4/
|
42 |
+
*/
|
43 |
+
class ClassLoader
|
44 |
+
{
|
45 |
+
// PSR-4
|
46 |
+
private $prefixLengthsPsr4 = array();
|
47 |
+
private $prefixDirsPsr4 = array();
|
48 |
+
private $fallbackDirsPsr4 = array();
|
49 |
+
|
50 |
+
// PSR-0
|
51 |
+
private $prefixesPsr0 = array();
|
52 |
+
private $fallbackDirsPsr0 = array();
|
53 |
+
|
54 |
+
private $useIncludePath = false;
|
55 |
+
private $classMap = array();
|
56 |
+
private $classMapAuthoritative = false;
|
57 |
+
private $missingClasses = array();
|
58 |
+
private $apcuPrefix;
|
59 |
+
|
60 |
+
public function getPrefixes()
|
61 |
+
{
|
62 |
+
if (!empty($this->prefixesPsr0)) {
|
63 |
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
64 |
+
}
|
65 |
+
|
66 |
+
return array();
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getPrefixesPsr4()
|
70 |
+
{
|
71 |
+
return $this->prefixDirsPsr4;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function getFallbackDirs()
|
75 |
+
{
|
76 |
+
return $this->fallbackDirsPsr0;
|
77 |
+
}
|
78 |
+
|
79 |
+
public function getFallbackDirsPsr4()
|
80 |
+
{
|
81 |
+
return $this->fallbackDirsPsr4;
|
82 |
+
}
|
83 |
+
|
84 |
+
public function getClassMap()
|
85 |
+
{
|
86 |
+
return $this->classMap;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @param array $classMap Class to filename map
|
91 |
+
*/
|
92 |
+
public function addClassMap(array $classMap)
|
93 |
+
{
|
94 |
+
if ($this->classMap) {
|
95 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
96 |
+
} else {
|
97 |
+
$this->classMap = $classMap;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
+
* appending or prepending to the ones previously set for this prefix.
|
104 |
+
*
|
105 |
+
* @param string $prefix The prefix
|
106 |
+
* @param array|string $paths The PSR-0 root directories
|
107 |
+
* @param bool $prepend Whether to prepend the directories
|
108 |
+
*/
|
109 |
+
public function add($prefix, $paths, $prepend = false)
|
110 |
+
{
|
111 |
+
if (!$prefix) {
|
112 |
+
if ($prepend) {
|
113 |
+
$this->fallbackDirsPsr0 = array_merge(
|
114 |
+
(array) $paths,
|
115 |
+
$this->fallbackDirsPsr0
|
116 |
+
);
|
117 |
+
} else {
|
118 |
+
$this->fallbackDirsPsr0 = array_merge(
|
119 |
+
$this->fallbackDirsPsr0,
|
120 |
+
(array) $paths
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
+
return;
|
125 |
+
}
|
126 |
+
|
127 |
+
$first = $prefix[0];
|
128 |
+
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
129 |
+
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
130 |
+
|
131 |
+
return;
|
132 |
+
}
|
133 |
+
if ($prepend) {
|
134 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
135 |
+
(array) $paths,
|
136 |
+
$this->prefixesPsr0[$first][$prefix]
|
137 |
+
);
|
138 |
+
} else {
|
139 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
140 |
+
$this->prefixesPsr0[$first][$prefix],
|
141 |
+
(array) $paths
|
142 |
+
);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
+
* appending or prepending to the ones previously set for this namespace.
|
149 |
+
*
|
150 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
151 |
+
* @param array|string $paths The PSR-4 base directories
|
152 |
+
* @param bool $prepend Whether to prepend the directories
|
153 |
+
*
|
154 |
+
* @throws \InvalidArgumentException
|
155 |
+
*/
|
156 |
+
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
+
{
|
158 |
+
if (!$prefix) {
|
159 |
+
// Register directories for the root namespace.
|
160 |
+
if ($prepend) {
|
161 |
+
$this->fallbackDirsPsr4 = array_merge(
|
162 |
+
(array) $paths,
|
163 |
+
$this->fallbackDirsPsr4
|
164 |
+
);
|
165 |
+
} else {
|
166 |
+
$this->fallbackDirsPsr4 = array_merge(
|
167 |
+
$this->fallbackDirsPsr4,
|
168 |
+
(array) $paths
|
169 |
+
);
|
170 |
+
}
|
171 |
+
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
172 |
+
// Register directories for a new namespace.
|
173 |
+
$length = strlen($prefix);
|
174 |
+
if ('\\' !== $prefix[$length - 1]) {
|
175 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
176 |
+
}
|
177 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
178 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
179 |
+
} elseif ($prepend) {
|
180 |
+
// Prepend directories for an already registered namespace.
|
181 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
182 |
+
(array) $paths,
|
183 |
+
$this->prefixDirsPsr4[$prefix]
|
184 |
+
);
|
185 |
+
} else {
|
186 |
+
// Append directories for an already registered namespace.
|
187 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
188 |
+
$this->prefixDirsPsr4[$prefix],
|
189 |
+
(array) $paths
|
190 |
+
);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
+
* replacing any others previously set for this prefix.
|
197 |
+
*
|
198 |
+
* @param string $prefix The prefix
|
199 |
+
* @param array|string $paths The PSR-0 base directories
|
200 |
+
*/
|
201 |
+
public function set($prefix, $paths)
|
202 |
+
{
|
203 |
+
if (!$prefix) {
|
204 |
+
$this->fallbackDirsPsr0 = (array) $paths;
|
205 |
+
} else {
|
206 |
+
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
+
* replacing any others previously set for this namespace.
|
213 |
+
*
|
214 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
215 |
+
* @param array|string $paths The PSR-4 base directories
|
216 |
+
*
|
217 |
+
* @throws \InvalidArgumentException
|
218 |
+
*/
|
219 |
+
public function setPsr4($prefix, $paths)
|
220 |
+
{
|
221 |
+
if (!$prefix) {
|
222 |
+
$this->fallbackDirsPsr4 = (array) $paths;
|
223 |
+
} else {
|
224 |
+
$length = strlen($prefix);
|
225 |
+
if ('\\' !== $prefix[$length - 1]) {
|
226 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
227 |
+
}
|
228 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
229 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Turns on searching the include path for class files.
|
235 |
+
*
|
236 |
+
* @param bool $useIncludePath
|
237 |
+
*/
|
238 |
+
public function setUseIncludePath($useIncludePath)
|
239 |
+
{
|
240 |
+
$this->useIncludePath = $useIncludePath;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Can be used to check if the autoloader uses the include path to check
|
245 |
+
* for classes.
|
246 |
+
*
|
247 |
+
* @return bool
|
248 |
+
*/
|
249 |
+
public function getUseIncludePath()
|
250 |
+
{
|
251 |
+
return $this->useIncludePath;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Turns off searching the prefix and fallback directories for classes
|
256 |
+
* that have not been registered with the class map.
|
257 |
+
*
|
258 |
+
* @param bool $classMapAuthoritative
|
259 |
+
*/
|
260 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
+
{
|
262 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Should class lookup fail if not found in the current class map?
|
267 |
+
*
|
268 |
+
* @return bool
|
269 |
+
*/
|
270 |
+
public function isClassMapAuthoritative()
|
271 |
+
{
|
272 |
+
return $this->classMapAuthoritative;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
+
*
|
278 |
+
* @param string|null $apcuPrefix
|
279 |
+
*/
|
280 |
+
public function setApcuPrefix($apcuPrefix)
|
281 |
+
{
|
282 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* The APCu prefix in use, or null if APCu caching is not enabled.
|
287 |
+
*
|
288 |
+
* @return string|null
|
289 |
+
*/
|
290 |
+
public function getApcuPrefix()
|
291 |
+
{
|
292 |
+
return $this->apcuPrefix;
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Registers this instance as an autoloader.
|
297 |
+
*
|
298 |
+
* @param bool $prepend Whether to prepend the autoloader or not
|
299 |
+
*/
|
300 |
+
public function register($prepend = false)
|
301 |
+
{
|
302 |
+
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Unregisters this instance as an autoloader.
|
307 |
+
*/
|
308 |
+
public function unregister()
|
309 |
+
{
|
310 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Loads the given class or interface.
|
315 |
+
*
|
316 |
+
* @param string $class The name of the class
|
317 |
+
* @return bool|null True if loaded, null otherwise
|
318 |
+
*/
|
319 |
+
public function loadClass($class)
|
320 |
+
{
|
321 |
+
if ($file = $this->findFile($class)) {
|
322 |
+
includeFile($file);
|
323 |
+
|
324 |
+
return true;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Finds the path to the file where the class is defined.
|
330 |
+
*
|
331 |
+
* @param string $class The name of the class
|
332 |
+
*
|
333 |
+
* @return string|false The path if found, false otherwise
|
334 |
+
*/
|
335 |
+
public function findFile($class)
|
336 |
+
{
|
337 |
+
// class map lookup
|
338 |
+
if (isset($this->classMap[$class])) {
|
339 |
+
return $this->classMap[$class];
|
340 |
+
}
|
341 |
+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
342 |
+
return false;
|
343 |
+
}
|
344 |
+
if (null !== $this->apcuPrefix) {
|
345 |
+
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
346 |
+
if ($hit) {
|
347 |
+
return $file;
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
$file = $this->findFileWithExtension($class, '.php');
|
352 |
+
|
353 |
+
// Search for Hack files if we are running on HHVM
|
354 |
+
if (false === $file && defined('HHVM_VERSION')) {
|
355 |
+
$file = $this->findFileWithExtension($class, '.hh');
|
356 |
+
}
|
357 |
+
|
358 |
+
if (null !== $this->apcuPrefix) {
|
359 |
+
apcu_add($this->apcuPrefix.$class, $file);
|
360 |
+
}
|
361 |
+
|
362 |
+
if (false === $file) {
|
363 |
+
// Remember that this class does not exist.
|
364 |
+
$this->missingClasses[$class] = true;
|
365 |
+
}
|
366 |
+
|
367 |
+
return $file;
|
368 |
+
}
|
369 |
+
|
370 |
+
private function findFileWithExtension($class, $ext)
|
371 |
+
{
|
372 |
+
// PSR-4 lookup
|
373 |
+
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
374 |
+
|
375 |
+
$first = $class[0];
|
376 |
+
if (isset($this->prefixLengthsPsr4[$first])) {
|
377 |
+
$subPath = $class;
|
378 |
+
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
379 |
+
$subPath = substr($subPath, 0, $lastPos);
|
380 |
+
$search = $subPath . '\\';
|
381 |
+
if (isset($this->prefixDirsPsr4[$search])) {
|
382 |
+
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
383 |
+
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
384 |
+
if (file_exists($file = $dir . $pathEnd)) {
|
385 |
+
return $file;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
// PSR-4 fallback dirs
|
393 |
+
foreach ($this->fallbackDirsPsr4 as $dir) {
|
394 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
395 |
+
return $file;
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
// PSR-0 lookup
|
400 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
401 |
+
// namespaced class name
|
402 |
+
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
403 |
+
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
404 |
+
} else {
|
405 |
+
// PEAR-like class name
|
406 |
+
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
407 |
+
}
|
408 |
+
|
409 |
+
if (isset($this->prefixesPsr0[$first])) {
|
410 |
+
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
411 |
+
if (0 === strpos($class, $prefix)) {
|
412 |
+
foreach ($dirs as $dir) {
|
413 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
414 |
+
return $file;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
// PSR-0 fallback dirs
|
422 |
+
foreach ($this->fallbackDirsPsr0 as $dir) {
|
423 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
424 |
+
return $file;
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
// PSR-0 include paths.
|
429 |
+
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
430 |
+
return $file;
|
431 |
+
}
|
432 |
+
|
433 |
+
return false;
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Scope isolated include.
|
439 |
+
*
|
440 |
+
* Prevents access to $this/self from included files.
|
441 |
+
*/
|
442 |
+
function includeFile($file)
|
443 |
+
{
|
444 |
+
include $file;
|
445 |
+
}
|
includes/vendor/mailerlite/composer/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Copyright (c) Nils Adermann, Jordi Boggiano
|
3 |
+
|
4 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5 |
+
of this software and associated documentation files (the "Software"), to deal
|
6 |
+
in the Software without restriction, including without limitation the rights
|
7 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8 |
+
copies of the Software, and to permit persons to whom the Software is furnished
|
9 |
+
to do so, subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all
|
12 |
+
copies or substantial portions of the Software.
|
13 |
+
|
14 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20 |
+
THE SOFTWARE.
|
21 |
+
|
includes/vendor/mailerlite/composer/autoload_classmap.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_classmap.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
includes/vendor/mailerlite/composer/autoload_files.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_files.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
10 |
+
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
11 |
+
'9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php',
|
12 |
+
'8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php',
|
13 |
+
);
|
includes/vendor/mailerlite/composer/autoload_namespaces.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_namespaces.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
includes/vendor/mailerlite/composer/autoload_psr4.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_psr4.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
10 |
+
'MailerLiteApi\\' => array($vendorDir . '/mailerlite/mailerlite-api-v2-php-sdk/src'),
|
11 |
+
'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'),
|
12 |
+
'Http\\Message\\' => array($vendorDir . '/php-http/message/src', $vendorDir . '/php-http/message-factory/src'),
|
13 |
+
'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'),
|
14 |
+
'Http\\Client\\Curl\\' => array($vendorDir . '/php-http/curl-client/src'),
|
15 |
+
'Http\\Client\\' => array($vendorDir . '/php-http/httplug/src'),
|
16 |
+
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
|
17 |
+
'Clue\\StreamFilter\\' => array($vendorDir . '/clue/stream-filter/src'),
|
18 |
+
);
|
includes/vendor/mailerlite/composer/autoload_real.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real.php @generated by Composer
|
4 |
+
|
5 |
+
class ComposerAutoloaderInit701698485a0f6168a5f6329bbda01094
|
6 |
+
{
|
7 |
+
private static $loader;
|
8 |
+
|
9 |
+
public static function loadClassLoader($class)
|
10 |
+
{
|
11 |
+
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
+
require __DIR__ . '/ClassLoader.php';
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
public static function getLoader()
|
17 |
+
{
|
18 |
+
if (null !== self::$loader) {
|
19 |
+
return self::$loader;
|
20 |
+
}
|
21 |
+
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit701698485a0f6168a5f6329bbda01094', 'loadClassLoader'), true, true);
|
23 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit701698485a0f6168a5f6329bbda01094', 'loadClassLoader'));
|
25 |
+
|
26 |
+
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
+
if ($useStaticLoader) {
|
28 |
+
require_once __DIR__ . '/autoload_static.php';
|
29 |
+
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit701698485a0f6168a5f6329bbda01094::getInitializer($loader));
|
31 |
+
} else {
|
32 |
+
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
+
foreach ($map as $namespace => $path) {
|
34 |
+
$loader->set($namespace, $path);
|
35 |
+
}
|
36 |
+
|
37 |
+
$map = require __DIR__ . '/autoload_psr4.php';
|
38 |
+
foreach ($map as $namespace => $path) {
|
39 |
+
$loader->setPsr4($namespace, $path);
|
40 |
+
}
|
41 |
+
|
42 |
+
$classMap = require __DIR__ . '/autoload_classmap.php';
|
43 |
+
if ($classMap) {
|
44 |
+
$loader->addClassMap($classMap);
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
$loader->register(true);
|
49 |
+
|
50 |
+
if ($useStaticLoader) {
|
51 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit701698485a0f6168a5f6329bbda01094::$files;
|
52 |
+
} else {
|
53 |
+
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
+
}
|
55 |
+
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
+
composerRequire701698485a0f6168a5f6329bbda01094($fileIdentifier, $file);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $loader;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
function composerRequire701698485a0f6168a5f6329bbda01094($fileIdentifier, $file)
|
64 |
+
{
|
65 |
+
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
+
require $file;
|
67 |
+
|
68 |
+
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
69 |
+
}
|
70 |
+
}
|
includes/vendor/mailerlite/composer/autoload_static.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInit701698485a0f6168a5f6329bbda01094
|
8 |
+
{
|
9 |
+
public static $files = array (
|
10 |
+
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
+
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
12 |
+
'9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php',
|
13 |
+
'8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php',
|
14 |
+
);
|
15 |
+
|
16 |
+
public static $prefixLengthsPsr4 = array (
|
17 |
+
'P' =>
|
18 |
+
array (
|
19 |
+
'Psr\\Http\\Message\\' => 17,
|
20 |
+
),
|
21 |
+
'M' =>
|
22 |
+
array (
|
23 |
+
'MailerLiteApi\\' => 14,
|
24 |
+
),
|
25 |
+
'H' =>
|
26 |
+
array (
|
27 |
+
'Http\\Promise\\' => 13,
|
28 |
+
'Http\\Message\\' => 13,
|
29 |
+
'Http\\Discovery\\' => 15,
|
30 |
+
'Http\\Client\\Curl\\' => 17,
|
31 |
+
'Http\\Client\\' => 12,
|
32 |
+
),
|
33 |
+
'G' =>
|
34 |
+
array (
|
35 |
+
'GuzzleHttp\\Psr7\\' => 16,
|
36 |
+
),
|
37 |
+
'C' =>
|
38 |
+
array (
|
39 |
+
'Clue\\StreamFilter\\' => 18,
|
40 |
+
),
|
41 |
+
);
|
42 |
+
|
43 |
+
public static $prefixDirsPsr4 = array (
|
44 |
+
'Psr\\Http\\Message\\' =>
|
45 |
+
array (
|
46 |
+
0 => __DIR__ . '/..' . '/psr/http-message/src',
|
47 |
+
),
|
48 |
+
'MailerLiteApi\\' =>
|
49 |
+
array (
|
50 |
+
0 => __DIR__ . '/..' . '/mailerlite/mailerlite-api-v2-php-sdk/src',
|
51 |
+
),
|
52 |
+
'Http\\Promise\\' =>
|
53 |
+
array (
|
54 |
+
0 => __DIR__ . '/..' . '/php-http/promise/src',
|
55 |
+
),
|
56 |
+
'Http\\Message\\' =>
|
57 |
+
array (
|
58 |
+
0 => __DIR__ . '/..' . '/php-http/message/src',
|
59 |
+
1 => __DIR__ . '/..' . '/php-http/message-factory/src',
|
60 |
+
),
|
61 |
+
'Http\\Discovery\\' =>
|
62 |
+
array (
|
63 |
+
0 => __DIR__ . '/..' . '/php-http/discovery/src',
|
64 |
+
),
|
65 |
+
'Http\\Client\\Curl\\' =>
|
66 |
+
array (
|
67 |
+
0 => __DIR__ . '/..' . '/php-http/curl-client/src',
|
68 |
+
),
|
69 |
+
'Http\\Client\\' =>
|
70 |
+
array (
|
71 |
+
0 => __DIR__ . '/..' . '/php-http/httplug/src',
|
72 |
+
),
|
73 |
+
'GuzzleHttp\\Psr7\\' =>
|
74 |
+
array (
|
75 |
+
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
|
76 |
+
),
|
77 |
+
'Clue\\StreamFilter\\' =>
|
78 |
+
array (
|
79 |
+
0 => __DIR__ . '/..' . '/clue/stream-filter/src',
|
80 |
+
),
|
81 |
+
);
|
82 |
+
|
83 |
+
public static function getInitializer(ClassLoader $loader)
|
84 |
+
{
|
85 |
+
return \Closure::bind(function () use ($loader) {
|
86 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit701698485a0f6168a5f6329bbda01094::$prefixLengthsPsr4;
|
87 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit701698485a0f6168a5f6329bbda01094::$prefixDirsPsr4;
|
88 |
+
|
89 |
+
}, null, ClassLoader::class);
|
90 |
+
}
|
91 |
+
}
|
includes/vendor/mailerlite/composer/installed.json
ADDED
@@ -0,0 +1,632 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"name": "clue/stream-filter",
|
4 |
+
"version": "v1.4.1",
|
5 |
+
"version_normalized": "1.4.1.0",
|
6 |
+
"source": {
|
7 |
+
"type": "git",
|
8 |
+
"url": "https://github.com/clue/php-stream-filter.git",
|
9 |
+
"reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71"
|
10 |
+
},
|
11 |
+
"dist": {
|
12 |
+
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71",
|
14 |
+
"reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71",
|
15 |
+
"shasum": ""
|
16 |
+
},
|
17 |
+
"require": {
|
18 |
+
"php": ">=5.3"
|
19 |
+
},
|
20 |
+
"require-dev": {
|
21 |
+
"phpunit/phpunit": "^5.0 || ^4.8"
|
22 |
+
},
|
23 |
+
"time": "2019-04-09T12:31:48+00:00",
|
24 |
+
"type": "library",
|
25 |
+
"installation-source": "dist",
|
26 |
+
"autoload": {
|
27 |
+
"psr-4": {
|
28 |
+
"Clue\\StreamFilter\\": "src/"
|
29 |
+
},
|
30 |
+
"files": [
|
31 |
+
"src/functions_include.php"
|
32 |
+
]
|
33 |
+
},
|
34 |
+
"notification-url": "https://packagist.org/downloads/",
|
35 |
+
"license": [
|
36 |
+
"MIT"
|
37 |
+
],
|
38 |
+
"authors": [
|
39 |
+
{
|
40 |
+
"name": "Christian Lück",
|
41 |
+
"email": "christian@lueck.tv"
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"description": "A simple and modern approach to stream filtering in PHP",
|
45 |
+
"homepage": "https://github.com/clue/php-stream-filter",
|
46 |
+
"keywords": [
|
47 |
+
"bucket brigade",
|
48 |
+
"callback",
|
49 |
+
"filter",
|
50 |
+
"php_user_filter",
|
51 |
+
"stream",
|
52 |
+
"stream_filter_append",
|
53 |
+
"stream_filter_register"
|
54 |
+
]
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"name": "guzzlehttp/psr7",
|
58 |
+
"version": "1.6.1",
|
59 |
+
"version_normalized": "1.6.1.0",
|
60 |
+
"source": {
|
61 |
+
"type": "git",
|
62 |
+
"url": "https://github.com/guzzle/psr7.git",
|
63 |
+
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
|
64 |
+
},
|
65 |
+
"dist": {
|
66 |
+
"type": "zip",
|
67 |
+
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
|
68 |
+
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
|
69 |
+
"shasum": ""
|
70 |
+
},
|
71 |
+
"require": {
|
72 |
+
"php": ">=5.4.0",
|
73 |
+
"psr/http-message": "~1.0",
|
74 |
+
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
75 |
+
},
|
76 |
+
"provide": {
|
77 |
+
"psr/http-message-implementation": "1.0"
|
78 |
+
},
|
79 |
+
"require-dev": {
|
80 |
+
"ext-zlib": "*",
|
81 |
+
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
|
82 |
+
},
|
83 |
+
"suggest": {
|
84 |
+
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
|
85 |
+
},
|
86 |
+
"time": "2019-07-01T23:21:34+00:00",
|
87 |
+
"type": "library",
|
88 |
+
"extra": {
|
89 |
+
"branch-alias": {
|
90 |
+
"dev-master": "1.6-dev"
|
91 |
+
}
|
92 |
+
},
|
93 |
+
"installation-source": "dist",
|
94 |
+
"autoload": {
|
95 |
+
"psr-4": {
|
96 |
+
"GuzzleHttp\\Psr7\\": "src/"
|
97 |
+
},
|
98 |
+
"files": [
|
99 |
+
"src/functions_include.php"
|
100 |
+
]
|
101 |
+
},
|
102 |
+
"notification-url": "https://packagist.org/downloads/",
|
103 |
+
"license": [
|
104 |
+
"MIT"
|
105 |
+
],
|
106 |
+
"authors": [
|
107 |
+
{
|
108 |
+
"name": "Michael Dowling",
|
109 |
+
"email": "mtdowling@gmail.com",
|
110 |
+
"homepage": "https://github.com/mtdowling"
|
111 |
+
},
|
112 |
+
{
|
113 |
+
"name": "Tobias Schultze",
|
114 |
+
"homepage": "https://github.com/Tobion"
|
115 |
+
}
|
116 |
+
],
|
117 |
+
"description": "PSR-7 message implementation that also provides common utility methods",
|
118 |
+
"keywords": [
|
119 |
+
"http",
|
120 |
+
"message",
|
121 |
+
"psr-7",
|
122 |
+
"request",
|
123 |
+
"response",
|
124 |
+
"stream",
|
125 |
+
"uri",
|
126 |
+
"url"
|
127 |
+
]
|
128 |
+
},
|
129 |
+
{
|
130 |
+
"name": "mailerlite/mailerlite-api-v2-php-sdk",
|
131 |
+
"version": "0.2.3",
|
132 |
+
"version_normalized": "0.2.3.0",
|
133 |
+
"source": {
|
134 |
+
"type": "git",
|
135 |
+
"url": "https://github.com/mailerlite/mailerlite-api-v2-php-sdk.git",
|
136 |
+
"reference": "2bae0aac12c4588bc0197d2e2dde5a55429b9e44"
|
137 |
+
},
|
138 |
+
"dist": {
|
139 |
+
"type": "zip",
|
140 |
+
"url": "https://api.github.com/repos/mailerlite/mailerlite-api-v2-php-sdk/zipball/2bae0aac12c4588bc0197d2e2dde5a55429b9e44",
|
141 |
+
"reference": "2bae0aac12c4588bc0197d2e2dde5a55429b9e44",
|
142 |
+
"shasum": ""
|
143 |
+
},
|
144 |
+
"require": {
|
145 |
+
"guzzlehttp/psr7": "~1.2",
|
146 |
+
"php": "^5.5|^7.0",
|
147 |
+
"php-http/curl-client": "^1.4",
|
148 |
+
"php-http/httplug": "^1.0",
|
149 |
+
"php-http/message": "^1.2"
|
150 |
+
},
|
151 |
+
"require-dev": {
|
152 |
+
"mockery/mockery": "^0.9.4",
|
153 |
+
"php-http/guzzle6-adapter": "^1.0",
|
154 |
+
"phpunit/phpunit": "5.3.*"
|
155 |
+
},
|
156 |
+
"time": "2019-01-31T13:14:26+00:00",
|
157 |
+
"type": "library",
|
158 |
+
"installation-source": "dist",
|
159 |
+
"autoload": {
|
160 |
+
"psr-4": {
|
161 |
+
"MailerLiteApi\\": "src"
|
162 |
+
}
|
163 |
+
},
|
164 |
+
"notification-url": "https://packagist.org/downloads/",
|
165 |
+
"license": [
|
166 |
+
"MIT"
|
167 |
+
],
|
168 |
+
"description": "MailerLite API v2 PHP SDK",
|
169 |
+
"homepage": "https://github.com/mailerlite/mailerlite-api-v2-php-sdk",
|
170 |
+
"keywords": [
|
171 |
+
"email",
|
172 |
+
"mailerlite",
|
173 |
+
"marketing",
|
174 |
+
"sdk"
|
175 |
+
]
|
176 |
+
},
|
177 |
+
{
|
178 |
+
"name": "php-http/curl-client",
|
179 |
+
"version": "v1.7.1",
|
180 |
+
"version_normalized": "1.7.1.0",
|
181 |
+
"source": {
|
182 |
+
"type": "git",
|
183 |
+
"url": "https://github.com/php-http/curl-client.git",
|
184 |
+
"reference": "6341a93d00e5d953fc868a3928b5167e6513f2b6"
|
185 |
+
},
|
186 |
+
"dist": {
|
187 |
+
"type": "zip",
|
188 |
+
"url": "https://api.github.com/repos/php-http/curl-client/zipball/6341a93d00e5d953fc868a3928b5167e6513f2b6",
|
189 |
+
"reference": "6341a93d00e5d953fc868a3928b5167e6513f2b6",
|
190 |
+
"shasum": ""
|
191 |
+
},
|
192 |
+
"require": {
|
193 |
+
"ext-curl": "*",
|
194 |
+
"php": "^5.5 || ^7.0",
|
195 |
+
"php-http/discovery": "^1.0",
|
196 |
+
"php-http/httplug": "^1.0",
|
197 |
+
"php-http/message": "^1.2",
|
198 |
+
"php-http/message-factory": "^1.0.2"
|
199 |
+
},
|
200 |
+
"provide": {
|
201 |
+
"php-http/async-client-implementation": "1.0",
|
202 |
+
"php-http/client-implementation": "1.0"
|
203 |
+
},
|
204 |
+
"require-dev": {
|
205 |
+
"guzzlehttp/psr7": "^1.0",
|
206 |
+
"php-http/client-integration-tests": "^0.6",
|
207 |
+
"phpunit/phpunit": "^4.8.27",
|
208 |
+
"zendframework/zend-diactoros": "^1.0"
|
209 |
+
},
|
210 |
+
"time": "2018-03-26T19:21:48+00:00",
|
211 |
+
"type": "library",
|
212 |
+
"installation-source": "dist",
|
213 |
+
"autoload": {
|
214 |
+
"psr-4": {
|
215 |
+
"Http\\Client\\Curl\\": "src/"
|
216 |
+
}
|
217 |
+
},
|
218 |
+
"notification-url": "https://packagist.org/downloads/",
|
219 |
+
"license": [
|
220 |
+
"MIT"
|
221 |
+
],
|
222 |
+
"authors": [
|
223 |
+
{
|
224 |
+
"name": "Михаил Красильников",
|
225 |
+
"email": "m.krasilnikov@yandex.ru"
|
226 |
+
}
|
227 |
+
],
|
228 |
+
"description": "cURL client for PHP-HTTP",
|
229 |
+
"homepage": "http://php-http.org",
|
230 |
+
"keywords": [
|
231 |
+
"curl",
|
232 |
+
"http"
|
233 |
+
]
|
234 |
+
},
|
235 |
+
{
|
236 |
+
"name": "php-http/discovery",
|
237 |
+
"version": "1.8.0",
|
238 |
+
"version_normalized": "1.8.0.0",
|
239 |
+
"source": {
|
240 |
+
"type": "git",
|
241 |
+
"url": "https://github.com/php-http/discovery.git",
|
242 |
+
"reference": "10d9019f393773345aedc0dc79e7fd678da874ee"
|
243 |
+
},
|
244 |
+
"dist": {
|
245 |
+
"type": "zip",
|
246 |
+
"url": "https://api.github.com/repos/php-http/discovery/zipball/10d9019f393773345aedc0dc79e7fd678da874ee",
|
247 |
+
"reference": "10d9019f393773345aedc0dc79e7fd678da874ee",
|
248 |
+
"shasum": ""
|
249 |
+
},
|
250 |
+
"require": {
|
251 |
+
"php": "^7.1"
|
252 |
+
},
|
253 |
+
"conflict": {
|
254 |
+
"nyholm/psr7": "<1.0"
|
255 |
+
},
|
256 |
+
"require-dev": {
|
257 |
+
"akeneo/phpspec-skip-example-extension": "^4.0",
|
258 |
+
"php-http/httplug": "^1.0 || ^2.0",
|
259 |
+
"php-http/message-factory": "^1.0",
|
260 |
+
"phpspec/phpspec": "^5.1",
|
261 |
+
"puli/composer-plugin": "1.0.0-beta10"
|
262 |
+
},
|
263 |
+
"suggest": {
|
264 |
+
"php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories",
|
265 |
+
"puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details."
|
266 |
+
},
|
267 |
+
"time": "2020-06-14T10:44:12+00:00",
|
268 |
+
"type": "library",
|
269 |
+
"extra": {
|
270 |
+
"branch-alias": {
|
271 |
+
"dev-master": "1.7-dev"
|
272 |
+
}
|
273 |
+
},
|
274 |
+
"installation-source": "dist",
|
275 |
+
"autoload": {
|
276 |
+
"psr-4": {
|
277 |
+
"Http\\Discovery\\": "src/"
|
278 |
+
}
|
279 |
+
},
|
280 |
+
"notification-url": "https://packagist.org/downloads/",
|
281 |
+
"license": [
|
282 |
+
"MIT"
|
283 |
+
],
|
284 |
+
"authors": [
|
285 |
+
{
|
286 |
+
"name": "Márk Sági-Kazár",
|
287 |
+
"email": "mark.sagikazar@gmail.com"
|
288 |
+
}
|
289 |
+
],
|
290 |
+
"description": "Finds installed HTTPlug implementations and PSR-7 message factories",
|
291 |
+
"homepage": "http://php-http.org",
|
292 |
+
"keywords": [
|
293 |
+
"adapter",
|
294 |
+
"client",
|
295 |
+
"discovery",
|
296 |
+
"factory",
|
297 |
+
"http",
|
298 |
+
"message",
|
299 |
+
"psr7"
|
300 |
+
]
|
301 |
+
},
|
302 |
+
{
|
303 |
+
"name": "php-http/httplug",
|
304 |
+
"version": "v1.1.0",
|
305 |
+
"version_normalized": "1.1.0.0",
|
306 |
+
"source": {
|
307 |
+
"type": "git",
|
308 |
+
"url": "https://github.com/php-http/httplug.git",
|
309 |
+
"reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018"
|
310 |
+
},
|
311 |
+
"dist": {
|
312 |
+
"type": "zip",
|
313 |
+
"url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018",
|
314 |
+
"reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018",
|
315 |
+
"shasum": ""
|
316 |
+
},
|
317 |
+
"require": {
|
318 |
+
"php": ">=5.4",
|
319 |
+
"php-http/promise": "^1.0",
|
320 |
+
"psr/http-message": "^1.0"
|
321 |
+
},
|
322 |
+
"require-dev": {
|
323 |
+
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
324 |
+
"phpspec/phpspec": "^2.4"
|
325 |
+
},
|
326 |
+
"time": "2016-08-31T08:30:17+00:00",
|
327 |
+
"type": "library",
|
328 |
+
"extra": {
|
329 |
+
"branch-alias": {
|
330 |
+
"dev-master": "1.1-dev"
|
331 |
+
}
|
332 |
+
},
|
333 |
+
"installation-source": "dist",
|
334 |
+
"autoload": {
|
335 |
+
"psr-4": {
|
336 |
+
"Http\\Client\\": "src/"
|
337 |
+
}
|
338 |
+
},
|
339 |
+
"notification-url": "https://packagist.org/downloads/",
|
340 |
+
"license": [
|
341 |
+
"MIT"
|
342 |
+
],
|
343 |
+
"authors": [
|
344 |
+
{
|
345 |
+
"name": "Eric GELOEN",
|
346 |
+
"email": "geloen.eric@gmail.com"
|
347 |
+
},
|
348 |
+
{
|
349 |
+
"name": "Márk Sági-Kazár",
|
350 |
+
"email": "mark.sagikazar@gmail.com"
|
351 |
+
}
|
352 |
+
],
|
353 |
+
"description": "HTTPlug, the HTTP client abstraction for PHP",
|
354 |
+
"homepage": "http://httplug.io",
|
355 |
+
"keywords": [
|
356 |
+
"client",
|
357 |
+
"http"
|
358 |
+
]
|
359 |
+
},
|
360 |
+
{
|
361 |
+
"name": "php-http/message",
|
362 |
+
"version": "1.8.0",
|
363 |
+
"version_normalized": "1.8.0.0",
|
364 |
+
"source": {
|
365 |
+
"type": "git",
|
366 |
+
"url": "https://github.com/php-http/message.git",
|
367 |
+
"reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c"
|
368 |
+
},
|
369 |
+
"dist": {
|
370 |
+
"type": "zip",
|
371 |
+
"url": "https://api.github.com/repos/php-http/message/zipball/ce8f43ac1e294b54aabf5808515c3554a19c1e1c",
|
372 |
+
"reference": "ce8f43ac1e294b54aabf5808515c3554a19c1e1c",
|
373 |
+
"shasum": ""
|
374 |
+
},
|
375 |
+
"require": {
|
376 |
+
"clue/stream-filter": "^1.4",
|
377 |
+
"php": "^7.1",
|
378 |
+
"php-http/message-factory": "^1.0.2",
|
379 |
+
"psr/http-message": "^1.0"
|
380 |
+
},
|
381 |
+
"provide": {
|
382 |
+
"php-http/message-factory-implementation": "1.0"
|
383 |
+
},
|
384 |
+
"require-dev": {
|
385 |
+
"akeneo/phpspec-skip-example-extension": "^1.0",
|
386 |
+
"coduo/phpspec-data-provider-extension": "^1.0",
|
387 |
+
"ext-zlib": "*",
|
388 |
+
"guzzlehttp/psr7": "^1.0",
|
389 |
+
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
390 |
+
"phpspec/phpspec": "^2.4",
|
391 |
+
"slim/slim": "^3.0",
|
392 |
+
"zendframework/zend-diactoros": "^1.0"
|
393 |
+
},
|
394 |
+
"suggest": {
|
395 |
+
"ext-zlib": "Used with compressor/decompressor streams",
|
396 |
+
"guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories",
|
397 |
+
"slim/slim": "Used with Slim Framework PSR-7 implementation",
|
398 |
+
"zendframework/zend-diactoros": "Used with Diactoros Factories"
|
399 |
+
},
|
400 |
+
"time": "2019-08-05T06:55:08+00:00",
|
401 |
+
"type": "library",
|
402 |
+
"extra": {
|
403 |
+
"branch-alias": {
|
404 |
+
"dev-master": "1.8-dev"
|
405 |
+
}
|
406 |
+
},
|
407 |
+
"installation-source": "dist",
|
408 |
+
"autoload": {
|
409 |
+
"psr-4": {
|
410 |
+
"Http\\Message\\": "src/"
|
411 |
+
},
|
412 |
+
"files": [
|
413 |
+
"src/filters.php"
|
414 |
+
]
|
415 |
+
},
|
416 |
+
"notification-url": "https://packagist.org/downloads/",
|
417 |
+
"license": [
|
418 |
+
"MIT"
|
419 |
+
],
|
420 |
+
"authors": [
|
421 |
+
{
|
422 |
+
"name": "Márk Sági-Kazár",
|
423 |
+
"email": "mark.sagikazar@gmail.com"
|
424 |
+
}
|
425 |
+
],
|
426 |
+
"description": "HTTP Message related tools",
|
427 |
+
"homepage": "http://php-http.org",
|
428 |
+
"keywords": [
|
429 |
+
"http",
|
430 |
+
"message",
|
431 |
+
"psr-7"
|
432 |
+
]
|
433 |
+
},
|
434 |
+
{
|
435 |
+
"name": "php-http/message-factory",
|
436 |
+
"version": "v1.0.2",
|
437 |
+
"version_normalized": "1.0.2.0",
|
438 |
+
"source": {
|
439 |
+
"type": "git",
|
440 |
+
"url": "https://github.com/php-http/message-factory.git",
|
441 |
+
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1"
|
442 |
+
},
|
443 |
+
"dist": {
|
444 |
+
"type": "zip",
|
445 |
+
"url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1",
|
446 |
+
"reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1",
|
447 |
+
"shasum": ""
|
448 |
+
},
|
449 |
+
"require": {
|
450 |
+
"php": ">=5.4",
|
451 |
+
"psr/http-message": "^1.0"
|
452 |
+
},
|
453 |
+
"time": "2015-12-19T14:08:53+00:00",
|
454 |
+
"type": "library",
|
455 |
+
"extra": {
|
456 |
+
"branch-alias": {
|
457 |
+
"dev-master": "1.0-dev"
|
458 |
+
}
|
459 |
+
},
|
460 |
+
"installation-source": "dist",
|
461 |
+
"autoload": {
|
462 |
+
"psr-4": {
|
463 |
+
"Http\\Message\\": "src/"
|
464 |
+
}
|
465 |
+
},
|
466 |
+
"notification-url": "https://packagist.org/downloads/",
|
467 |
+
"license": [
|
468 |
+
"MIT"
|
469 |
+
],
|
470 |
+
"authors": [
|
471 |
+
{
|
472 |
+
"name": "Márk Sági-Kazár",
|
473 |
+
"email": "mark.sagikazar@gmail.com"
|
474 |
+
}
|
475 |
+
],
|
476 |
+
"description": "Factory interfaces for PSR-7 HTTP Message",
|
477 |
+
"homepage": "http://php-http.org",
|
478 |
+
"keywords": [
|
479 |
+
"factory",
|
480 |
+
"http",
|
481 |
+
"message",
|
482 |
+
"stream",
|
483 |
+
"uri"
|
484 |
+
]
|
485 |
+
},
|
486 |
+
{
|
487 |
+
"name": "php-http/promise",
|
488 |
+
"version": "v1.0.0",
|
489 |
+
"version_normalized": "1.0.0.0",
|
490 |
+
"source": {
|
491 |
+
"type": "git",
|
492 |
+
"url": "https://github.com/php-http/promise.git",
|
493 |
+
"reference": "dc494cdc9d7160b9a09bd5573272195242ce7980"
|
494 |
+
},
|
495 |
+
"dist": {
|
496 |
+
"type": "zip",
|
497 |
+
"url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980",
|
498 |
+
"reference": "dc494cdc9d7160b9a09bd5573272195242ce7980",
|
499 |
+
"shasum": ""
|
500 |
+
},
|
501 |
+
"require-dev": {
|
502 |
+
"henrikbjorn/phpspec-code-coverage": "^1.0",
|
503 |
+
"phpspec/phpspec": "^2.4"
|
504 |
+
},
|
505 |
+
"time": "2016-01-26T13:27:02+00:00",
|
506 |
+
"type": "library",
|
507 |
+
"extra": {
|
508 |
+
"branch-alias": {
|
509 |
+
"dev-master": "1.1-dev"
|
510 |
+
}
|
511 |
+
},
|
512 |
+
"installation-source": "dist",
|
513 |
+
"autoload": {
|
514 |
+
"psr-4": {
|
515 |
+
"Http\\Promise\\": "src/"
|
516 |
+
}
|
517 |
+
},
|
518 |
+
"notification-url": "https://packagist.org/downloads/",
|
519 |
+
"license": [
|
520 |
+
"MIT"
|
521 |
+
],
|
522 |
+
"authors": [
|
523 |
+
{
|
524 |
+
"name": "Márk Sági-Kazár",
|
525 |
+
"email": "mark.sagikazar@gmail.com"
|
526 |
+
},
|
527 |
+
{
|
528 |
+
"name": "Joel Wurtz",
|
529 |
+
"email": "joel.wurtz@gmail.com"
|
530 |
+
}
|
531 |
+
],
|
532 |
+
"description": "Promise used for asynchronous HTTP requests",
|
533 |
+
"homepage": "http://httplug.io",
|
534 |
+
"keywords": [
|
535 |
+
"promise"
|
536 |
+
]
|
537 |
+
},
|
538 |
+
{
|
539 |
+
"name": "psr/http-message",
|
540 |
+
"version": "1.0.1",
|
541 |
+
"version_normalized": "1.0.1.0",
|
542 |
+
"source": {
|
543 |
+
"type": "git",
|
544 |
+
"url": "https://github.com/php-fig/http-message.git",
|
545 |
+
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
|
546 |
+
},
|
547 |
+
"dist": {
|
548 |
+
"type": "zip",
|
549 |
+
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
|
550 |
+
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
|
551 |
+
"shasum": ""
|
552 |
+
},
|
553 |
+
"require": {
|
554 |
+
"php": ">=5.3.0"
|
555 |
+
},
|
556 |
+
"time": "2016-08-06T14:39:51+00:00",
|
557 |
+
"type": "library",
|
558 |
+
"extra": {
|
559 |
+
"branch-alias": {
|
560 |
+
"dev-master": "1.0.x-dev"
|
561 |
+
}
|
562 |
+
},
|
563 |
+
"installation-source": "dist",
|
564 |
+
"autoload": {
|
565 |
+
"psr-4": {
|
566 |
+
"Psr\\Http\\Message\\": "src/"
|
567 |
+
}
|
568 |
+
},
|
569 |
+
"notification-url": "https://packagist.org/downloads/",
|
570 |
+
"license": [
|
571 |
+
"MIT"
|
572 |
+
],
|
573 |
+
"authors": [
|
574 |
+
{
|
575 |
+
"name": "PHP-FIG",
|
576 |
+
"homepage": "http://www.php-fig.org/"
|
577 |
+
}
|
578 |
+
],
|
579 |
+
"description": "Common interface for HTTP messages",
|
580 |
+
"homepage": "https://github.com/php-fig/http-message",
|
581 |
+
"keywords": [
|
582 |
+
"http",
|
583 |
+
"http-message",
|
584 |
+
"psr",
|
585 |
+
"psr-7",
|
586 |
+
"request",
|
587 |
+
"response"
|
588 |
+
]
|
589 |
+
},
|
590 |
+
{
|
591 |
+
"name": "ralouphie/getallheaders",
|
592 |
+
"version": "3.0.3",
|
593 |
+
"version_normalized": "3.0.3.0",
|
594 |
+
"source": {
|
595 |
+
"type": "git",
|
596 |
+
"url": "https://github.com/ralouphie/getallheaders.git",
|
597 |
+
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
598 |
+
},
|
599 |
+
"dist": {
|
600 |
+
"type": "zip",
|
601 |
+
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
602 |
+
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
603 |
+
"shasum": ""
|
604 |
+
},
|
605 |
+
"require": {
|
606 |
+
"php": ">=5.6"
|
607 |
+
},
|
608 |
+
"require-dev": {
|
609 |
+
"php-coveralls/php-coveralls": "^2.1",
|
610 |
+
"phpunit/phpunit": "^5 || ^6.5"
|
611 |
+
},
|
612 |
+
"time": "2019-03-08T08:55:37+00:00",
|
613 |
+
"type": "library",
|
614 |
+
"installation-source": "dist",
|
615 |
+
"autoload": {
|
616 |
+
"files": [
|
617 |
+
"src/getallheaders.php"
|
618 |
+
]
|
619 |
+
},
|
620 |
+
"notification-url": "https://packagist.org/downloads/",
|
621 |
+
"license": [
|
622 |
+
"MIT"
|
623 |
+
],
|
624 |
+
"authors": [
|
625 |
+
{
|
626 |
+
"name": "Ralph Khattar",
|
627 |
+
"email": "ralph.khattar@gmail.com"
|
628 |
+
}
|
629 |
+
],
|
630 |
+
"description": "A polyfill for getallheaders."
|
631 |
+
}
|
632 |
+
]
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/AppendStream.php
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Reads from multiple streams, one after the other.
|
8 |
+
*
|
9 |
+
* This is a read-only stream decorator.
|
10 |
+
*/
|
11 |
+
class AppendStream implements StreamInterface
|
12 |
+
{
|
13 |
+
/** @var StreamInterface[] Streams being decorated */
|
14 |
+
private $streams = [];
|
15 |
+
|
16 |
+
private $seekable = true;
|
17 |
+
private $current = 0;
|
18 |
+
private $pos = 0;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param StreamInterface[] $streams Streams to decorate. Each stream must
|
22 |
+
* be readable.
|
23 |
+
*/
|
24 |
+
public function __construct(array $streams = [])
|
25 |
+
{
|
26 |
+
foreach ($streams as $stream) {
|
27 |
+
$this->addStream($stream);
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
public function __toString()
|
32 |
+
{
|
33 |
+
try {
|
34 |
+
$this->rewind();
|
35 |
+
return $this->getContents();
|
36 |
+
} catch (\Exception $e) {
|
37 |
+
return '';
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Add a stream to the AppendStream
|
43 |
+
*
|
44 |
+
* @param StreamInterface $stream Stream to append. Must be readable.
|
45 |
+
*
|
46 |
+
* @throws \InvalidArgumentException if the stream is not readable
|
47 |
+
*/
|
48 |
+
public function addStream(StreamInterface $stream)
|
49 |
+
{
|
50 |
+
if (!$stream->isReadable()) {
|
51 |
+
throw new \InvalidArgumentException('Each stream must be readable');
|
52 |
+
}
|
53 |
+
|
54 |
+
// The stream is only seekable if all streams are seekable
|
55 |
+
if (!$stream->isSeekable()) {
|
56 |
+
$this->seekable = false;
|
57 |
+
}
|
58 |
+
|
59 |
+
$this->streams[] = $stream;
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getContents()
|
63 |
+
{
|
64 |
+
return copy_to_string($this);
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Closes each attached stream.
|
69 |
+
*
|
70 |
+
* {@inheritdoc}
|
71 |
+
*/
|
72 |
+
public function close()
|
73 |
+
{
|
74 |
+
$this->pos = $this->current = 0;
|
75 |
+
$this->seekable = true;
|
76 |
+
|
77 |
+
foreach ($this->streams as $stream) {
|
78 |
+
$stream->close();
|
79 |
+
}
|
80 |
+
|
81 |
+
$this->streams = [];
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Detaches each attached stream.
|
86 |
+
*
|
87 |
+
* Returns null as it's not clear which underlying stream resource to return.
|
88 |
+
*
|
89 |
+
* {@inheritdoc}
|
90 |
+
*/
|
91 |
+
public function detach()
|
92 |
+
{
|
93 |
+
$this->pos = $this->current = 0;
|
94 |
+
$this->seekable = true;
|
95 |
+
|
96 |
+
foreach ($this->streams as $stream) {
|
97 |
+
$stream->detach();
|
98 |
+
}
|
99 |
+
|
100 |
+
$this->streams = [];
|
101 |
+
}
|
102 |
+
|
103 |
+
public function tell()
|
104 |
+
{
|
105 |
+
return $this->pos;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Tries to calculate the size by adding the size of each stream.
|
110 |
+
*
|
111 |
+
* If any of the streams do not return a valid number, then the size of the
|
112 |
+
* append stream cannot be determined and null is returned.
|
113 |
+
*
|
114 |
+
* {@inheritdoc}
|
115 |
+
*/
|
116 |
+
public function getSize()
|
117 |
+
{
|
118 |
+
$size = 0;
|
119 |
+
|
120 |
+
foreach ($this->streams as $stream) {
|
121 |
+
$s = $stream->getSize();
|
122 |
+
if ($s === null) {
|
123 |
+
return null;
|
124 |
+
}
|
125 |
+
$size += $s;
|
126 |
+
}
|
127 |
+
|
128 |
+
return $size;
|
129 |
+
}
|
130 |
+
|
131 |
+
public function eof()
|
132 |
+
{
|
133 |
+
return !$this->streams ||
|
134 |
+
($this->current >= count($this->streams) - 1 &&
|
135 |
+
$this->streams[$this->current]->eof());
|
136 |
+
}
|
137 |
+
|
138 |
+
public function rewind()
|
139 |
+
{
|
140 |
+
$this->seek(0);
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Attempts to seek to the given position. Only supports SEEK_SET.
|
145 |
+
*
|
146 |
+
* {@inheritdoc}
|
147 |
+
*/
|
148 |
+
public function seek($offset, $whence = SEEK_SET)
|
149 |
+
{
|
150 |
+
if (!$this->seekable) {
|
151 |
+
throw new \RuntimeException('This AppendStream is not seekable');
|
152 |
+
} elseif ($whence !== SEEK_SET) {
|
153 |
+
throw new \RuntimeException('The AppendStream can only seek with SEEK_SET');
|
154 |
+
}
|
155 |
+
|
156 |
+
$this->pos = $this->current = 0;
|
157 |
+
|
158 |
+
// Rewind each stream
|
159 |
+
foreach ($this->streams as $i => $stream) {
|
160 |
+
try {
|
161 |
+
$stream->rewind();
|
162 |
+
} catch (\Exception $e) {
|
163 |
+
throw new \RuntimeException('Unable to seek stream '
|
164 |
+
. $i . ' of the AppendStream', 0, $e);
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
// Seek to the actual position by reading from each stream
|
169 |
+
while ($this->pos < $offset && !$this->eof()) {
|
170 |
+
$result = $this->read(min(8096, $offset - $this->pos));
|
171 |
+
if ($result === '') {
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Reads from all of the appended streams until the length is met or EOF.
|
179 |
+
*
|
180 |
+
* {@inheritdoc}
|
181 |
+
*/
|
182 |
+
public function read($length)
|
183 |
+
{
|
184 |
+
$buffer = '';
|
185 |
+
$total = count($this->streams) - 1;
|
186 |
+
$remaining = $length;
|
187 |
+
$progressToNext = false;
|
188 |
+
|
189 |
+
while ($remaining > 0) {
|
190 |
+
|
191 |
+
// Progress to the next stream if needed.
|
192 |
+
if ($progressToNext || $this->streams[$this->current]->eof()) {
|
193 |
+
$progressToNext = false;
|
194 |
+
if ($this->current === $total) {
|
195 |
+
break;
|
196 |
+
}
|
197 |
+
$this->current++;
|
198 |
+
}
|
199 |
+
|
200 |
+
$result = $this->streams[$this->current]->read($remaining);
|
201 |
+
|
202 |
+
// Using a loose comparison here to match on '', false, and null
|
203 |
+
if ($result == null) {
|
204 |
+
$progressToNext = true;
|
205 |
+
continue;
|
206 |
+
}
|
207 |
+
|
208 |
+
$buffer .= $result;
|
209 |
+
$remaining = $length - strlen($buffer);
|
210 |
+
}
|
211 |
+
|
212 |
+
$this->pos += strlen($buffer);
|
213 |
+
|
214 |
+
return $buffer;
|
215 |
+
}
|
216 |
+
|
217 |
+
public function isReadable()
|
218 |
+
{
|
219 |
+
return true;
|
220 |
+
}
|
221 |
+
|
222 |
+
public function isWritable()
|
223 |
+
{
|
224 |
+
return false;
|
225 |
+
}
|
226 |
+
|
227 |
+
public function isSeekable()
|
228 |
+
{
|
229 |
+
return $this->seekable;
|
230 |
+
}
|
231 |
+
|
232 |
+
public function write($string)
|
233 |
+
{
|
234 |
+
throw new \RuntimeException('Cannot write to an AppendStream');
|
235 |
+
}
|
236 |
+
|
237 |
+
public function getMetadata($key = null)
|
238 |
+
{
|
239 |
+
return $key ? null : [];
|
240 |
+
}
|
241 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/BufferStream.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Provides a buffer stream that can be written to to fill a buffer, and read
|
8 |
+
* from to remove bytes from the buffer.
|
9 |
+
*
|
10 |
+
* This stream returns a "hwm" metadata value that tells upstream consumers
|
11 |
+
* what the configured high water mark of the stream is, or the maximum
|
12 |
+
* preferred size of the buffer.
|
13 |
+
*/
|
14 |
+
class BufferStream implements StreamInterface
|
15 |
+
{
|
16 |
+
private $hwm;
|
17 |
+
private $buffer = '';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @param int $hwm High water mark, representing the preferred maximum
|
21 |
+
* buffer size. If the size of the buffer exceeds the high
|
22 |
+
* water mark, then calls to write will continue to succeed
|
23 |
+
* but will return false to inform writers to slow down
|
24 |
+
* until the buffer has been drained by reading from it.
|
25 |
+
*/
|
26 |
+
public function __construct($hwm = 16384)
|
27 |
+
{
|
28 |
+
$this->hwm = $hwm;
|
29 |
+
}
|
30 |
+
|
31 |
+
public function __toString()
|
32 |
+
{
|
33 |
+
return $this->getContents();
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getContents()
|
37 |
+
{
|
38 |
+
$buffer = $this->buffer;
|
39 |
+
$this->buffer = '';
|
40 |
+
|
41 |
+
return $buffer;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function close()
|
45 |
+
{
|
46 |
+
$this->buffer = '';
|
47 |
+
}
|
48 |
+
|
49 |
+
public function detach()
|
50 |
+
{
|
51 |
+
$this->close();
|
52 |
+
}
|
53 |
+
|
54 |
+
public function getSize()
|
55 |
+
{
|
56 |
+
return strlen($this->buffer);
|
57 |
+
}
|
58 |
+
|
59 |
+
public function isReadable()
|
60 |
+
{
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
|
64 |
+
public function isWritable()
|
65 |
+
{
|
66 |
+
return true;
|
67 |
+
}
|
68 |
+
|
69 |
+
public function isSeekable()
|
70 |
+
{
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function rewind()
|
75 |
+
{
|
76 |
+
$this->seek(0);
|
77 |
+
}
|
78 |
+
|
79 |
+
public function seek($offset, $whence = SEEK_SET)
|
80 |
+
{
|
81 |
+
throw new \RuntimeException('Cannot seek a BufferStream');
|
82 |
+
}
|
83 |
+
|
84 |
+
public function eof()
|
85 |
+
{
|
86 |
+
return strlen($this->buffer) === 0;
|
87 |
+
}
|
88 |
+
|
89 |
+
public function tell()
|
90 |
+
{
|
91 |
+
throw new \RuntimeException('Cannot determine the position of a BufferStream');
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Reads data from the buffer.
|
96 |
+
*/
|
97 |
+
public function read($length)
|
98 |
+
{
|
99 |
+
$currentLength = strlen($this->buffer);
|
100 |
+
|
101 |
+
if ($length >= $currentLength) {
|
102 |
+
// No need to slice the buffer because we don't have enough data.
|
103 |
+
$result = $this->buffer;
|
104 |
+
$this->buffer = '';
|
105 |
+
} else {
|
106 |
+
// Slice up the result to provide a subset of the buffer.
|
107 |
+
$result = substr($this->buffer, 0, $length);
|
108 |
+
$this->buffer = substr($this->buffer, $length);
|
109 |
+
}
|
110 |
+
|
111 |
+
return $result;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Writes data to the buffer.
|
116 |
+
*/
|
117 |
+
public function write($string)
|
118 |
+
{
|
119 |
+
$this->buffer .= $string;
|
120 |
+
|
121 |
+
// TODO: What should happen here?
|
122 |
+
if (strlen($this->buffer) >= $this->hwm) {
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
return strlen($string);
|
127 |
+
}
|
128 |
+
|
129 |
+
public function getMetadata($key = null)
|
130 |
+
{
|
131 |
+
if ($key == 'hwm') {
|
132 |
+
return $this->hwm;
|
133 |
+
}
|
134 |
+
|
135 |
+
return $key ? null : [];
|
136 |
+
}
|
137 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/CachingStream.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Stream decorator that can cache previously read bytes from a sequentially
|
8 |
+
* read stream.
|
9 |
+
*/
|
10 |
+
class CachingStream implements StreamInterface
|
11 |
+
{
|
12 |
+
use StreamDecoratorTrait;
|
13 |
+
|
14 |
+
/** @var StreamInterface Stream being wrapped */
|
15 |
+
private $remoteStream;
|
16 |
+
|
17 |
+
/** @var int Number of bytes to skip reading due to a write on the buffer */
|
18 |
+
private $skipReadBytes = 0;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* We will treat the buffer object as the body of the stream
|
22 |
+
*
|
23 |
+
* @param StreamInterface $stream Stream to cache
|
24 |
+
* @param StreamInterface $target Optionally specify where data is cached
|
25 |
+
*/
|
26 |
+
public function __construct(
|
27 |
+
StreamInterface $stream,
|
28 |
+
StreamInterface $target = null
|
29 |
+
) {
|
30 |
+
$this->remoteStream = $stream;
|
31 |
+
$this->stream = $target ?: new Stream(fopen('php://temp', 'r+'));
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getSize()
|
35 |
+
{
|
36 |
+
return max($this->stream->getSize(), $this->remoteStream->getSize());
|
37 |
+
}
|
38 |
+
|
39 |
+
public function rewind()
|
40 |
+
{
|
41 |
+
$this->seek(0);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function seek($offset, $whence = SEEK_SET)
|
45 |
+
{
|
46 |
+
if ($whence == SEEK_SET) {
|
47 |
+
$byte = $offset;
|
48 |
+
} elseif ($whence == SEEK_CUR) {
|
49 |
+
$byte = $offset + $this->tell();
|
50 |
+
} elseif ($whence == SEEK_END) {
|
51 |
+
$size = $this->remoteStream->getSize();
|
52 |
+
if ($size === null) {
|
53 |
+
$size = $this->cacheEntireStream();
|
54 |
+
}
|
55 |
+
$byte = $size + $offset;
|
56 |
+
} else {
|
57 |
+
throw new \InvalidArgumentException('Invalid whence');
|
58 |
+
}
|
59 |
+
|
60 |
+
$diff = $byte - $this->stream->getSize();
|
61 |
+
|
62 |
+
if ($diff > 0) {
|
63 |
+
// Read the remoteStream until we have read in at least the amount
|
64 |
+
// of bytes requested, or we reach the end of the file.
|
65 |
+
while ($diff > 0 && !$this->remoteStream->eof()) {
|
66 |
+
$this->read($diff);
|
67 |
+
$diff = $byte - $this->stream->getSize();
|
68 |
+
}
|
69 |
+
} else {
|
70 |
+
// We can just do a normal seek since we've already seen this byte.
|
71 |
+
$this->stream->seek($byte);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
public function read($length)
|
76 |
+
{
|
77 |
+
// Perform a regular read on any previously read data from the buffer
|
78 |
+
$data = $this->stream->read($length);
|
79 |
+
$remaining = $length - strlen($data);
|
80 |
+
|
81 |
+
// More data was requested so read from the remote stream
|
82 |
+
if ($remaining) {
|
83 |
+
// If data was written to the buffer in a position that would have
|
84 |
+
// been filled from the remote stream, then we must skip bytes on
|
85 |
+
// the remote stream to emulate overwriting bytes from that
|
86 |
+
// position. This mimics the behavior of other PHP stream wrappers.
|
87 |
+
$remoteData = $this->remoteStream->read(
|
88 |
+
$remaining + $this->skipReadBytes
|
89 |
+
);
|
90 |
+
|
91 |
+
if ($this->skipReadBytes) {
|
92 |
+
$len = strlen($remoteData);
|
93 |
+
$remoteData = substr($remoteData, $this->skipReadBytes);
|
94 |
+
$this->skipReadBytes = max(0, $this->skipReadBytes - $len);
|
95 |
+
}
|
96 |
+
|
97 |
+
$data .= $remoteData;
|
98 |
+
$this->stream->write($remoteData);
|
99 |
+
}
|
100 |
+
|
101 |
+
return $data;
|
102 |
+
}
|
103 |
+
|
104 |
+
public function write($string)
|
105 |
+
{
|
106 |
+
// When appending to the end of the currently read stream, you'll want
|
107 |
+
// to skip bytes from being read from the remote stream to emulate
|
108 |
+
// other stream wrappers. Basically replacing bytes of data of a fixed
|
109 |
+
// length.
|
110 |
+
$overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell();
|
111 |
+
if ($overflow > 0) {
|
112 |
+
$this->skipReadBytes += $overflow;
|
113 |
+
}
|
114 |
+
|
115 |
+
return $this->stream->write($string);
|
116 |
+
}
|
117 |
+
|
118 |
+
public function eof()
|
119 |
+
{
|
120 |
+
return $this->stream->eof() && $this->remoteStream->eof();
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Close both the remote stream and buffer stream
|
125 |
+
*/
|
126 |
+
public function close()
|
127 |
+
{
|
128 |
+
$this->remoteStream->close() && $this->stream->close();
|
129 |
+
}
|
130 |
+
|
131 |
+
private function cacheEntireStream()
|
132 |
+
{
|
133 |
+
$target = new FnStream(['write' => 'strlen']);
|
134 |
+
copy_to_stream($this, $target);
|
135 |
+
|
136 |
+
return $this->tell();
|
137 |
+
}
|
138 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/DroppingStream.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Stream decorator that begins dropping data once the size of the underlying
|
8 |
+
* stream becomes too full.
|
9 |
+
*/
|
10 |
+
class DroppingStream implements StreamInterface
|
11 |
+
{
|
12 |
+
use StreamDecoratorTrait;
|
13 |
+
|
14 |
+
private $maxLength;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param StreamInterface $stream Underlying stream to decorate.
|
18 |
+
* @param int $maxLength Maximum size before dropping data.
|
19 |
+
*/
|
20 |
+
public function __construct(StreamInterface $stream, $maxLength)
|
21 |
+
{
|
22 |
+
$this->stream = $stream;
|
23 |
+
$this->maxLength = $maxLength;
|
24 |
+
}
|
25 |
+
|
26 |
+
public function write($string)
|
27 |
+
{
|
28 |
+
$diff = $this->maxLength - $this->stream->getSize();
|
29 |
+
|
30 |
+
// Begin returning 0 when the underlying stream is too large.
|
31 |
+
if ($diff <= 0) {
|
32 |
+
return 0;
|
33 |
+
}
|
34 |
+
|
35 |
+
// Write the stream or a subset of the stream if needed.
|
36 |
+
if (strlen($string) < $diff) {
|
37 |
+
return $this->stream->write($string);
|
38 |
+
}
|
39 |
+
|
40 |
+
return $this->stream->write(substr($string, 0, $diff));
|
41 |
+
}
|
42 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/FnStream.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Compose stream implementations based on a hash of functions.
|
8 |
+
*
|
9 |
+
* Allows for easy testing and extension of a provided stream without needing
|
10 |
+
* to create a concrete class for a simple extension point.
|
11 |
+
*/
|
12 |
+
class FnStream implements StreamInterface
|
13 |
+
{
|
14 |
+
/** @var array */
|
15 |
+
private $methods;
|
16 |
+
|
17 |
+
/** @var array Methods that must be implemented in the given array */
|
18 |
+
private static $slots = ['__toString', 'close', 'detach', 'rewind',
|
19 |
+
'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write',
|
20 |
+
'isReadable', 'read', 'getContents', 'getMetadata'];
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @param array $methods Hash of method name to a callable.
|
24 |
+
*/
|
25 |
+
public function __construct(array $methods)
|
26 |
+
{
|
27 |
+
$this->methods = $methods;
|
28 |
+
|
29 |
+
// Create the functions on the class
|
30 |
+
foreach ($methods as $name => $fn) {
|
31 |
+
$this->{'_fn_' . $name} = $fn;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Lazily determine which methods are not implemented.
|
37 |
+
* @throws \BadMethodCallException
|
38 |
+
*/
|
39 |
+
public function __get($name)
|
40 |
+
{
|
41 |
+
throw new \BadMethodCallException(str_replace('_fn_', '', $name)
|
42 |
+
. '() is not implemented in the FnStream');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* The close method is called on the underlying stream only if possible.
|
47 |
+
*/
|
48 |
+
public function __destruct()
|
49 |
+
{
|
50 |
+
if (isset($this->_fn_close)) {
|
51 |
+
call_user_func($this->_fn_close);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
|
57 |
+
* @throws \LogicException
|
58 |
+
*/
|
59 |
+
public function __wakeup()
|
60 |
+
{
|
61 |
+
throw new \LogicException('FnStream should never be unserialized');
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Adds custom functionality to an underlying stream by intercepting
|
66 |
+
* specific method calls.
|
67 |
+
*
|
68 |
+
* @param StreamInterface $stream Stream to decorate
|
69 |
+
* @param array $methods Hash of method name to a closure
|
70 |
+
*
|
71 |
+
* @return FnStream
|
72 |
+
*/
|
73 |
+
public static function decorate(StreamInterface $stream, array $methods)
|
74 |
+
{
|
75 |
+
// If any of the required methods were not provided, then simply
|
76 |
+
// proxy to the decorated stream.
|
77 |
+
foreach (array_diff(self::$slots, array_keys($methods)) as $diff) {
|
78 |
+
$methods[$diff] = [$stream, $diff];
|
79 |
+
}
|
80 |
+
|
81 |
+
return new self($methods);
|
82 |
+
}
|
83 |
+
|
84 |
+
public function __toString()
|
85 |
+
{
|
86 |
+
return call_user_func($this->_fn___toString);
|
87 |
+
}
|
88 |
+
|
89 |
+
public function close()
|
90 |
+
{
|
91 |
+
return call_user_func($this->_fn_close);
|
92 |
+
}
|
93 |
+
|
94 |
+
public function detach()
|
95 |
+
{
|
96 |
+
return call_user_func($this->_fn_detach);
|
97 |
+
}
|
98 |
+
|
99 |
+
public function getSize()
|
100 |
+
{
|
101 |
+
return call_user_func($this->_fn_getSize);
|
102 |
+
}
|
103 |
+
|
104 |
+
public function tell()
|
105 |
+
{
|
106 |
+
return call_user_func($this->_fn_tell);
|
107 |
+
}
|
108 |
+
|
109 |
+
public function eof()
|
110 |
+
{
|
111 |
+
return call_user_func($this->_fn_eof);
|
112 |
+
}
|
113 |
+
|
114 |
+
public function isSeekable()
|
115 |
+
{
|
116 |
+
return call_user_func($this->_fn_isSeekable);
|
117 |
+
}
|
118 |
+
|
119 |
+
public function rewind()
|
120 |
+
{
|
121 |
+
call_user_func($this->_fn_rewind);
|
122 |
+
}
|
123 |
+
|
124 |
+
public function seek($offset, $whence = SEEK_SET)
|
125 |
+
{
|
126 |
+
call_user_func($this->_fn_seek, $offset, $whence);
|
127 |
+
}
|
128 |
+
|
129 |
+
public function isWritable()
|
130 |
+
{
|
131 |
+
return call_user_func($this->_fn_isWritable);
|
132 |
+
}
|
133 |
+
|
134 |
+
public function write($string)
|
135 |
+
{
|
136 |
+
return call_user_func($this->_fn_write, $string);
|
137 |
+
}
|
138 |
+
|
139 |
+
public function isReadable()
|
140 |
+
{
|
141 |
+
return call_user_func($this->_fn_isReadable);
|
142 |
+
}
|
143 |
+
|
144 |
+
public function read($length)
|
145 |
+
{
|
146 |
+
return call_user_func($this->_fn_read, $length);
|
147 |
+
}
|
148 |
+
|
149 |
+
public function getContents()
|
150 |
+
{
|
151 |
+
return call_user_func($this->_fn_getContents);
|
152 |
+
}
|
153 |
+
|
154 |
+
public function getMetadata($key = null)
|
155 |
+
{
|
156 |
+
return call_user_func($this->_fn_getMetadata, $key);
|
157 |
+
}
|
158 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/InflateStream.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
|
8 |
+
*
|
9 |
+
* This stream decorator skips the first 10 bytes of the given stream to remove
|
10 |
+
* the gzip header, converts the provided stream to a PHP stream resource,
|
11 |
+
* then appends the zlib.inflate filter. The stream is then converted back
|
12 |
+
* to a Guzzle stream resource to be used as a Guzzle stream.
|
13 |
+
*
|
14 |
+
* @link http://tools.ietf.org/html/rfc1952
|
15 |
+
* @link http://php.net/manual/en/filters.compression.php
|
16 |
+
*/
|
17 |
+
class InflateStream implements StreamInterface
|
18 |
+
{
|
19 |
+
use StreamDecoratorTrait;
|
20 |
+
|
21 |
+
public function __construct(StreamInterface $stream)
|
22 |
+
{
|
23 |
+
// read the first 10 bytes, ie. gzip header
|
24 |
+
$header = $stream->read(10);
|
25 |
+
$filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header);
|
26 |
+
// Skip the header, that is 10 + length of filename + 1 (nil) bytes
|
27 |
+
$stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
|
28 |
+
$resource = StreamWrapper::getResource($stream);
|
29 |
+
stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
|
30 |
+
$this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @param StreamInterface $stream
|
35 |
+
* @param $header
|
36 |
+
* @return int
|
37 |
+
*/
|
38 |
+
private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
|
39 |
+
{
|
40 |
+
$filename_header_length = 0;
|
41 |
+
|
42 |
+
if (substr(bin2hex($header), 6, 2) === '08') {
|
43 |
+
// we have a filename, read until nil
|
44 |
+
$filename_header_length = 1;
|
45 |
+
while ($stream->read(1) !== chr(0)) {
|
46 |
+
$filename_header_length++;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
return $filename_header_length;
|
51 |
+
}
|
52 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/LazyOpenStream.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Lazily reads or writes to a file that is opened only after an IO operation
|
8 |
+
* take place on the stream.
|
9 |
+
*/
|
10 |
+
class LazyOpenStream implements StreamInterface
|
11 |
+
{
|
12 |
+
use StreamDecoratorTrait;
|
13 |
+
|
14 |
+
/** @var string File to open */
|
15 |
+
private $filename;
|
16 |
+
|
17 |
+
/** @var string $mode */
|
18 |
+
private $mode;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param string $filename File to lazily open
|
22 |
+
* @param string $mode fopen mode to use when opening the stream
|
23 |
+
*/
|
24 |
+
public function __construct($filename, $mode)
|
25 |
+
{
|
26 |
+
$this->filename = $filename;
|
27 |
+
$this->mode = $mode;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Creates the underlying stream lazily when required.
|
32 |
+
*
|
33 |
+
* @return StreamInterface
|
34 |
+
*/
|
35 |
+
protected function createStream()
|
36 |
+
{
|
37 |
+
return stream_for(try_fopen($this->filename, $this->mode));
|
38 |
+
}
|
39 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/LimitStream.php
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Decorator used to return only a subset of a stream
|
9 |
+
*/
|
10 |
+
class LimitStream implements StreamInterface
|
11 |
+
{
|
12 |
+
use StreamDecoratorTrait;
|
13 |
+
|
14 |
+
/** @var int Offset to start reading from */
|
15 |
+
private $offset;
|
16 |
+
|
17 |
+
/** @var int Limit the number of bytes that can be read */
|
18 |
+
private $limit;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param StreamInterface $stream Stream to wrap
|
22 |
+
* @param int $limit Total number of bytes to allow to be read
|
23 |
+
* from the stream. Pass -1 for no limit.
|
24 |
+
* @param int $offset Position to seek to before reading (only
|
25 |
+
* works on seekable streams).
|
26 |
+
*/
|
27 |
+
public function __construct(
|
28 |
+
StreamInterface $stream,
|
29 |
+
$limit = -1,
|
30 |
+
$offset = 0
|
31 |
+
) {
|
32 |
+
$this->stream = $stream;
|
33 |
+
$this->setLimit($limit);
|
34 |
+
$this->setOffset($offset);
|
35 |
+
}
|
36 |
+
|
37 |
+
public function eof()
|
38 |
+
{
|
39 |
+
// Always return true if the underlying stream is EOF
|
40 |
+
if ($this->stream->eof()) {
|
41 |
+
return true;
|
42 |
+
}
|
43 |
+
|
44 |
+
// No limit and the underlying stream is not at EOF
|
45 |
+
if ($this->limit == -1) {
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
return $this->stream->tell() >= $this->offset + $this->limit;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Returns the size of the limited subset of data
|
54 |
+
* {@inheritdoc}
|
55 |
+
*/
|
56 |
+
public function getSize()
|
57 |
+
{
|
58 |
+
if (null === ($length = $this->stream->getSize())) {
|
59 |
+
return null;
|
60 |
+
} elseif ($this->limit == -1) {
|
61 |
+
return $length - $this->offset;
|
62 |
+
} else {
|
63 |
+
return min($this->limit, $length - $this->offset);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Allow for a bounded seek on the read limited stream
|
69 |
+
* {@inheritdoc}
|
70 |
+
*/
|
71 |
+
public function seek($offset, $whence = SEEK_SET)
|
72 |
+
{
|
73 |
+
if ($whence !== SEEK_SET || $offset < 0) {
|
74 |
+
throw new \RuntimeException(sprintf(
|
75 |
+
'Cannot seek to offset %s with whence %s',
|
76 |
+
$offset,
|
77 |
+
$whence
|
78 |
+
));
|
79 |
+
}
|
80 |
+
|
81 |
+
$offset += $this->offset;
|
82 |
+
|
83 |
+
if ($this->limit !== -1) {
|
84 |
+
if ($offset > $this->offset + $this->limit) {
|
85 |
+
$offset = $this->offset + $this->limit;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
$this->stream->seek($offset);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Give a relative tell()
|
94 |
+
* {@inheritdoc}
|
95 |
+
*/
|
96 |
+
public function tell()
|
97 |
+
{
|
98 |
+
return $this->stream->tell() - $this->offset;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Set the offset to start limiting from
|
103 |
+
*
|
104 |
+
* @param int $offset Offset to seek to and begin byte limiting from
|
105 |
+
*
|
106 |
+
* @throws \RuntimeException if the stream cannot be seeked.
|
107 |
+
*/
|
108 |
+
public function setOffset($offset)
|
109 |
+
{
|
110 |
+
$current = $this->stream->tell();
|
111 |
+
|
112 |
+
if ($current !== $offset) {
|
113 |
+
// If the stream cannot seek to the offset position, then read to it
|
114 |
+
if ($this->stream->isSeekable()) {
|
115 |
+
$this->stream->seek($offset);
|
116 |
+
} elseif ($current > $offset) {
|
117 |
+
throw new \RuntimeException("Could not seek to stream offset $offset");
|
118 |
+
} else {
|
119 |
+
$this->stream->read($offset - $current);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
$this->offset = $offset;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Set the limit of bytes that the decorator allows to be read from the
|
128 |
+
* stream.
|
129 |
+
*
|
130 |
+
* @param int $limit Number of bytes to allow to be read from the stream.
|
131 |
+
* Use -1 for no limit.
|
132 |
+
*/
|
133 |
+
public function setLimit($limit)
|
134 |
+
{
|
135 |
+
$this->limit = $limit;
|
136 |
+
}
|
137 |
+
|
138 |
+
public function read($length)
|
139 |
+
{
|
140 |
+
if ($this->limit == -1) {
|
141 |
+
return $this->stream->read($length);
|
142 |
+
}
|
143 |
+
|
144 |
+
// Check if the current position is less than the total allowed
|
145 |
+
// bytes + original offset
|
146 |
+
$remaining = ($this->offset + $this->limit) - $this->stream->tell();
|
147 |
+
if ($remaining > 0) {
|
148 |
+
// Only return the amount of requested data, ensuring that the byte
|
149 |
+
// limit is not exceeded
|
150 |
+
return $this->stream->read(min($remaining, $length));
|
151 |
+
}
|
152 |
+
|
153 |
+
return '';
|
154 |
+
}
|
155 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/MessageTrait.php
ADDED
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Trait implementing functionality common to requests and responses.
|
8 |
+
*/
|
9 |
+
trait MessageTrait
|
10 |
+
{
|
11 |
+
/** @var array Map of all registered headers, as original name => array of values */
|
12 |
+
private $headers = [];
|
13 |
+
|
14 |
+
/** @var array Map of lowercase header name => original name at registration */
|
15 |
+
private $headerNames = [];
|
16 |
+
|
17 |
+
/** @var string */
|
18 |
+
private $protocol = '1.1';
|
19 |
+
|
20 |
+
/** @var StreamInterface */
|
21 |
+
private $stream;
|
22 |
+
|
23 |
+
public function getProtocolVersion()
|
24 |
+
{
|
25 |
+
return $this->protocol;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function withProtocolVersion($version)
|
29 |
+
{
|
30 |
+
if ($this->protocol === $version) {
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
$new = clone $this;
|
35 |
+
$new->protocol = $version;
|
36 |
+
return $new;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function getHeaders()
|
40 |
+
{
|
41 |
+
return $this->headers;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function hasHeader($header)
|
45 |
+
{
|
46 |
+
return isset($this->headerNames[strtolower($header)]);
|
47 |
+
}
|
48 |
+
|
49 |
+
public function getHeader($header)
|
50 |
+
{
|
51 |
+
$header = strtolower($header);
|
52 |
+
|
53 |
+
if (!isset($this->headerNames[$header])) {
|
54 |
+
return [];
|
55 |
+
}
|
56 |
+
|
57 |
+
$header = $this->headerNames[$header];
|
58 |
+
|
59 |
+
return $this->headers[$header];
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getHeaderLine($header)
|
63 |
+
{
|
64 |
+
return implode(', ', $this->getHeader($header));
|
65 |
+
}
|
66 |
+
|
67 |
+
public function withHeader($header, $value)
|
68 |
+
{
|
69 |
+
$this->assertHeader($header);
|
70 |
+
$value = $this->normalizeHeaderValue($value);
|
71 |
+
$normalized = strtolower($header);
|
72 |
+
|
73 |
+
$new = clone $this;
|
74 |
+
if (isset($new->headerNames[$normalized])) {
|
75 |
+
unset($new->headers[$new->headerNames[$normalized]]);
|
76 |
+
}
|
77 |
+
$new->headerNames[$normalized] = $header;
|
78 |
+
$new->headers[$header] = $value;
|
79 |
+
|
80 |
+
return $new;
|
81 |
+
}
|
82 |
+
|
83 |
+
public function withAddedHeader($header, $value)
|
84 |
+
{
|
85 |
+
$this->assertHeader($header);
|
86 |
+
$value = $this->normalizeHeaderValue($value);
|
87 |
+
$normalized = strtolower($header);
|
88 |
+
|
89 |
+
$new = clone $this;
|
90 |
+
if (isset($new->headerNames[$normalized])) {
|
91 |
+
$header = $this->headerNames[$normalized];
|
92 |
+
$new->headers[$header] = array_merge($this->headers[$header], $value);
|
93 |
+
} else {
|
94 |
+
$new->headerNames[$normalized] = $header;
|
95 |
+
$new->headers[$header] = $value;
|
96 |
+
}
|
97 |
+
|
98 |
+
return $new;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function withoutHeader($header)
|
102 |
+
{
|
103 |
+
$normalized = strtolower($header);
|
104 |
+
|
105 |
+
if (!isset($this->headerNames[$normalized])) {
|
106 |
+
return $this;
|
107 |
+
}
|
108 |
+
|
109 |
+
$header = $this->headerNames[$normalized];
|
110 |
+
|
111 |
+
$new = clone $this;
|
112 |
+
unset($new->headers[$header], $new->headerNames[$normalized]);
|
113 |
+
|
114 |
+
return $new;
|
115 |
+
}
|
116 |
+
|
117 |
+
public function getBody()
|
118 |
+
{
|
119 |
+
if (!$this->stream) {
|
120 |
+
$this->stream = stream_for('');
|
121 |
+
}
|
122 |
+
|
123 |
+
return $this->stream;
|
124 |
+
}
|
125 |
+
|
126 |
+
public function withBody(StreamInterface $body)
|
127 |
+
{
|
128 |
+
if ($body === $this->stream) {
|
129 |
+
return $this;
|
130 |
+
}
|
131 |
+
|
132 |
+
$new = clone $this;
|
133 |
+
$new->stream = $body;
|
134 |
+
return $new;
|
135 |
+
}
|
136 |
+
|
137 |
+
private function setHeaders(array $headers)
|
138 |
+
{
|
139 |
+
$this->headerNames = $this->headers = [];
|
140 |
+
foreach ($headers as $header => $value) {
|
141 |
+
if (is_int($header)) {
|
142 |
+
// Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
|
143 |
+
// and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
|
144 |
+
$header = (string) $header;
|
145 |
+
}
|
146 |
+
$this->assertHeader($header);
|
147 |
+
$value = $this->normalizeHeaderValue($value);
|
148 |
+
$normalized = strtolower($header);
|
149 |
+
if (isset($this->headerNames[$normalized])) {
|
150 |
+
$header = $this->headerNames[$normalized];
|
151 |
+
$this->headers[$header] = array_merge($this->headers[$header], $value);
|
152 |
+
} else {
|
153 |
+
$this->headerNames[$normalized] = $header;
|
154 |
+
$this->headers[$header] = $value;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
private function normalizeHeaderValue($value)
|
160 |
+
{
|
161 |
+
if (!is_array($value)) {
|
162 |
+
return $this->trimHeaderValues([$value]);
|
163 |
+
}
|
164 |
+
|
165 |
+
if (count($value) === 0) {
|
166 |
+
throw new \InvalidArgumentException('Header value can not be an empty array.');
|
167 |
+
}
|
168 |
+
|
169 |
+
return $this->trimHeaderValues($value);
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Trims whitespace from the header values.
|
174 |
+
*
|
175 |
+
* Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.
|
176 |
+
*
|
177 |
+
* header-field = field-name ":" OWS field-value OWS
|
178 |
+
* OWS = *( SP / HTAB )
|
179 |
+
*
|
180 |
+
* @param string[] $values Header values
|
181 |
+
*
|
182 |
+
* @return string[] Trimmed header values
|
183 |
+
*
|
184 |
+
* @see https://tools.ietf.org/html/rfc7230#section-3.2.4
|
185 |
+
*/
|
186 |
+
private function trimHeaderValues(array $values)
|
187 |
+
{
|
188 |
+
return array_map(function ($value) {
|
189 |
+
if (!is_scalar($value) && null !== $value) {
|
190 |
+
throw new \InvalidArgumentException(sprintf(
|
191 |
+
'Header value must be scalar or null but %s provided.',
|
192 |
+
is_object($value) ? get_class($value) : gettype($value)
|
193 |
+
));
|
194 |
+
}
|
195 |
+
|
196 |
+
return trim((string) $value, " \t");
|
197 |
+
}, $values);
|
198 |
+
}
|
199 |
+
|
200 |
+
private function assertHeader($header)
|
201 |
+
{
|
202 |
+
if (!is_string($header)) {
|
203 |
+
throw new \InvalidArgumentException(sprintf(
|
204 |
+
'Header name must be a string but %s provided.',
|
205 |
+
is_object($header) ? get_class($header) : gettype($header)
|
206 |
+
));
|
207 |
+
}
|
208 |
+
|
209 |
+
if ($header === '') {
|
210 |
+
throw new \InvalidArgumentException('Header name can not be empty.');
|
211 |
+
}
|
212 |
+
}
|
213 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/MultipartStream.php
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Stream that when read returns bytes for a streaming multipart or
|
8 |
+
* multipart/form-data stream.
|
9 |
+
*/
|
10 |
+
class MultipartStream implements StreamInterface
|
11 |
+
{
|
12 |
+
use StreamDecoratorTrait;
|
13 |
+
|
14 |
+
private $boundary;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param array $elements Array of associative arrays, each containing a
|
18 |
+
* required "name" key mapping to the form field,
|
19 |
+
* name, a required "contents" key mapping to a
|
20 |
+
* StreamInterface/resource/string, an optional
|
21 |
+
* "headers" associative array of custom headers,
|
22 |
+
* and an optional "filename" key mapping to a
|
23 |
+
* string to send as the filename in the part.
|
24 |
+
* @param string $boundary You can optionally provide a specific boundary
|
25 |
+
*
|
26 |
+
* @throws \InvalidArgumentException
|
27 |
+
*/
|
28 |
+
public function __construct(array $elements = [], $boundary = null)
|
29 |
+
{
|
30 |
+
$this->boundary = $boundary ?: sha1(uniqid('', true));
|
31 |
+
$this->stream = $this->createStream($elements);
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get the boundary
|
36 |
+
*
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getBoundary()
|
40 |
+
{
|
41 |
+
return $this->boundary;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function isWritable()
|
45 |
+
{
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get the headers needed before transferring the content of a POST file
|
51 |
+
*/
|
52 |
+
private function getHeaders(array $headers)
|
53 |
+
{
|
54 |
+
$str = '';
|
55 |
+
foreach ($headers as $key => $value) {
|
56 |
+
$str .= "{$key}: {$value}\r\n";
|
57 |
+
}
|
58 |
+
|
59 |
+
return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n";
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Create the aggregate stream that will be used to upload the POST data
|
64 |
+
*/
|
65 |
+
protected function createStream(array $elements)
|
66 |
+
{
|
67 |
+
$stream = new AppendStream();
|
68 |
+
|
69 |
+
foreach ($elements as $element) {
|
70 |
+
$this->addElement($stream, $element);
|
71 |
+
}
|
72 |
+
|
73 |
+
// Add the trailing boundary with CRLF
|
74 |
+
$stream->addStream(stream_for("--{$this->boundary}--\r\n"));
|
75 |
+
|
76 |
+
return $stream;
|
77 |
+
}
|
78 |
+
|
79 |
+
private function addElement(AppendStream $stream, array $element)
|
80 |
+
{
|
81 |
+
foreach (['contents', 'name'] as $key) {
|
82 |
+
if (!array_key_exists($key, $element)) {
|
83 |
+
throw new \InvalidArgumentException("A '{$key}' key is required");
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
$element['contents'] = stream_for($element['contents']);
|
88 |
+
|
89 |
+
if (empty($element['filename'])) {
|
90 |
+
$uri = $element['contents']->getMetadata('uri');
|
91 |
+
if (substr($uri, 0, 6) !== 'php://') {
|
92 |
+
$element['filename'] = $uri;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
list($body, $headers) = $this->createElement(
|
97 |
+
$element['name'],
|
98 |
+
$element['contents'],
|
99 |
+
isset($element['filename']) ? $element['filename'] : null,
|
100 |
+
isset($element['headers']) ? $element['headers'] : []
|
101 |
+
);
|
102 |
+
|
103 |
+
$stream->addStream(stream_for($this->getHeaders($headers)));
|
104 |
+
$stream->addStream($body);
|
105 |
+
$stream->addStream(stream_for("\r\n"));
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
private function createElement($name, StreamInterface $stream, $filename, array $headers)
|
112 |
+
{
|
113 |
+
// Set a default content-disposition header if one was no provided
|
114 |
+
$disposition = $this->getHeader($headers, 'content-disposition');
|
115 |
+
if (!$disposition) {
|
116 |
+
$headers['Content-Disposition'] = ($filename === '0' || $filename)
|
117 |
+
? sprintf('form-data; name="%s"; filename="%s"',
|
118 |
+
$name,
|
119 |
+
basename($filename))
|
120 |
+
: "form-data; name=\"{$name}\"";
|
121 |
+
}
|
122 |
+
|
123 |
+
// Set a default content-length header if one was no provided
|
124 |
+
$length = $this->getHeader($headers, 'content-length');
|
125 |
+
if (!$length) {
|
126 |
+
if ($length = $stream->getSize()) {
|
127 |
+
$headers['Content-Length'] = (string) $length;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
// Set a default Content-Type if one was not supplied
|
132 |
+
$type = $this->getHeader($headers, 'content-type');
|
133 |
+
if (!$type && ($filename === '0' || $filename)) {
|
134 |
+
if ($type = mimetype_from_filename($filename)) {
|
135 |
+
$headers['Content-Type'] = $type;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
return [$stream, $headers];
|
140 |
+
}
|
141 |
+
|
142 |
+
private function getHeader(array $headers, $key)
|
143 |
+
{
|
144 |
+
$lowercaseHeader = strtolower($key);
|
145 |
+
foreach ($headers as $k => $v) {
|
146 |
+
if (strtolower($k) === $lowercaseHeader) {
|
147 |
+
return $v;
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
return null;
|
152 |
+
}
|
153 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/NoSeekStream.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Stream decorator that prevents a stream from being seeked
|
8 |
+
*/
|
9 |
+
class NoSeekStream implements StreamInterface
|
10 |
+
{
|
11 |
+
use StreamDecoratorTrait;
|
12 |
+
|
13 |
+
public function seek($offset, $whence = SEEK_SET)
|
14 |
+
{
|
15 |
+
throw new \RuntimeException('Cannot seek a NoSeekStream');
|
16 |
+
}
|
17 |
+
|
18 |
+
public function isSeekable()
|
19 |
+
{
|
20 |
+
return false;
|
21 |
+
}
|
22 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/PumpStream.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Provides a read only stream that pumps data from a PHP callable.
|
8 |
+
*
|
9 |
+
* When invoking the provided callable, the PumpStream will pass the amount of
|
10 |
+
* data requested to read to the callable. The callable can choose to ignore
|
11 |
+
* this value and return fewer or more bytes than requested. Any extra data
|
12 |
+
* returned by the provided callable is buffered internally until drained using
|
13 |
+
* the read() function of the PumpStream. The provided callable MUST return
|
14 |
+
* false when there is no more data to read.
|
15 |
+
*/
|
16 |
+
class PumpStream implements StreamInterface
|
17 |
+
{
|
18 |
+
/** @var callable */
|
19 |
+
private $source;
|
20 |
+
|
21 |
+
/** @var int */
|
22 |
+
private $size;
|
23 |
+
|
24 |
+
/** @var int */
|
25 |
+
private $tellPos = 0;
|
26 |
+
|
27 |
+
/** @var array */
|
28 |
+
private $metadata;
|
29 |
+
|
30 |
+
/** @var BufferStream */
|
31 |
+
private $buffer;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @param callable $source Source of the stream data. The callable MAY
|
35 |
+
* accept an integer argument used to control the
|
36 |
+
* amount of data to return. The callable MUST
|
37 |
+
* return a string when called, or false on error
|
38 |
+
* or EOF.
|
39 |
+
* @param array $options Stream options:
|
40 |
+
* - metadata: Hash of metadata to use with stream.
|
41 |
+
* - size: Size of the stream, if known.
|
42 |
+
*/
|
43 |
+
public function __construct(callable $source, array $options = [])
|
44 |
+
{
|
45 |
+
$this->source = $source;
|
46 |
+
$this->size = isset($options['size']) ? $options['size'] : null;
|
47 |
+
$this->metadata = isset($options['metadata']) ? $options['metadata'] : [];
|
48 |
+
$this->buffer = new BufferStream();
|
49 |
+
}
|
50 |
+
|
51 |
+
public function __toString()
|
52 |
+
{
|
53 |
+
try {
|
54 |
+
return copy_to_string($this);
|
55 |
+
} catch (\Exception $e) {
|
56 |
+
return '';
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
public function close()
|
61 |
+
{
|
62 |
+
$this->detach();
|
63 |
+
}
|
64 |
+
|
65 |
+
public function detach()
|
66 |
+
{
|
67 |
+
$this->tellPos = false;
|
68 |
+
$this->source = null;
|
69 |
+
}
|
70 |
+
|
71 |
+
public function getSize()
|
72 |
+
{
|
73 |
+
return $this->size;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function tell()
|
77 |
+
{
|
78 |
+
return $this->tellPos;
|
79 |
+
}
|
80 |
+
|
81 |
+
public function eof()
|
82 |
+
{
|
83 |
+
return !$this->source;
|
84 |
+
}
|
85 |
+
|
86 |
+
public function isSeekable()
|
87 |
+
{
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
|
91 |
+
public function rewind()
|
92 |
+
{
|
93 |
+
$this->seek(0);
|
94 |
+
}
|
95 |
+
|
96 |
+
public function seek($offset, $whence = SEEK_SET)
|
97 |
+
{
|
98 |
+
throw new \RuntimeException('Cannot seek a PumpStream');
|
99 |
+
}
|
100 |
+
|
101 |
+
public function isWritable()
|
102 |
+
{
|
103 |
+
return false;
|
104 |
+
}
|
105 |
+
|
106 |
+
public function write($string)
|
107 |
+
{
|
108 |
+
throw new \RuntimeException('Cannot write to a PumpStream');
|
109 |
+
}
|
110 |
+
|
111 |
+
public function isReadable()
|
112 |
+
{
|
113 |
+
return true;
|
114 |
+
}
|
115 |
+
|
116 |
+
public function read($length)
|
117 |
+
{
|
118 |
+
$data = $this->buffer->read($length);
|
119 |
+
$readLen = strlen($data);
|
120 |
+
$this->tellPos += $readLen;
|
121 |
+
$remaining = $length - $readLen;
|
122 |
+
|
123 |
+
if ($remaining) {
|
124 |
+
$this->pump($remaining);
|
125 |
+
$data .= $this->buffer->read($remaining);
|
126 |
+
$this->tellPos += strlen($data) - $readLen;
|
127 |
+
}
|
128 |
+
|
129 |
+
return $data;
|
130 |
+
}
|
131 |
+
|
132 |
+
public function getContents()
|
133 |
+
{
|
134 |
+
$result = '';
|
135 |
+
while (!$this->eof()) {
|
136 |
+
$result .= $this->read(1000000);
|
137 |
+
}
|
138 |
+
|
139 |
+
return $result;
|
140 |
+
}
|
141 |
+
|
142 |
+
public function getMetadata($key = null)
|
143 |
+
{
|
144 |
+
if (!$key) {
|
145 |
+
return $this->metadata;
|
146 |
+
}
|
147 |
+
|
148 |
+
return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
|
149 |
+
}
|
150 |
+
|
151 |
+
private function pump($length)
|
152 |
+
{
|
153 |
+
if ($this->source) {
|
154 |
+
do {
|
155 |
+
$data = call_user_func($this->source, $length);
|
156 |
+
if ($data === false || $data === null) {
|
157 |
+
$this->source = null;
|
158 |
+
return;
|
159 |
+
}
|
160 |
+
$this->buffer->write($data);
|
161 |
+
$length -= strlen($data);
|
162 |
+
} while ($length > 0);
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/Request.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use InvalidArgumentException;
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
use Psr\Http\Message\UriInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* PSR-7 request implementation.
|
11 |
+
*/
|
12 |
+
class Request implements RequestInterface
|
13 |
+
{
|
14 |
+
use MessageTrait;
|
15 |
+
|
16 |
+
/** @var string */
|
17 |
+
private $method;
|
18 |
+
|
19 |
+
/** @var null|string */
|
20 |
+
private $requestTarget;
|
21 |
+
|
22 |
+
/** @var UriInterface */
|
23 |
+
private $uri;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param string $method HTTP method
|
27 |
+
* @param string|UriInterface $uri URI
|
28 |
+
* @param array $headers Request headers
|
29 |
+
* @param string|null|resource|StreamInterface $body Request body
|
30 |
+
* @param string $version Protocol version
|
31 |
+
*/
|
32 |
+
public function __construct(
|
33 |
+
$method,
|
34 |
+
$uri,
|
35 |
+
array $headers = [],
|
36 |
+
$body = null,
|
37 |
+
$version = '1.1'
|
38 |
+
) {
|
39 |
+
$this->assertMethod($method);
|
40 |
+
if (!($uri instanceof UriInterface)) {
|
41 |
+
$uri = new Uri($uri);
|
42 |
+
}
|
43 |
+
|
44 |
+
$this->method = strtoupper($method);
|
45 |
+
$this->uri = $uri;
|
46 |
+
$this->setHeaders($headers);
|
47 |
+
$this->protocol = $version;
|
48 |
+
|
49 |
+
if (!isset($this->headerNames['host'])) {
|
50 |
+
$this->updateHostFromUri();
|
51 |
+
}
|
52 |
+
|
53 |
+
if ($body !== '' && $body !== null) {
|
54 |
+
$this->stream = stream_for($body);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getRequestTarget()
|
59 |
+
{
|
60 |
+
if ($this->requestTarget !== null) {
|
61 |
+
return $this->requestTarget;
|
62 |
+
}
|
63 |
+
|
64 |
+
$target = $this->uri->getPath();
|
65 |
+
if ($target == '') {
|
66 |
+
$target = '/';
|
67 |
+
}
|
68 |
+
if ($this->uri->getQuery() != '') {
|
69 |
+
$target .= '?' . $this->uri->getQuery();
|
70 |
+
}
|
71 |
+
|
72 |
+
return $target;
|
73 |
+
}
|
74 |
+
|
75 |
+
public function withRequestTarget($requestTarget)
|
76 |
+
{
|
77 |
+
if (preg_match('#\s#', $requestTarget)) {
|
78 |
+
throw new InvalidArgumentException(
|
79 |
+
'Invalid request target provided; cannot contain whitespace'
|
80 |
+
);
|
81 |
+
}
|
82 |
+
|
83 |
+
$new = clone $this;
|
84 |
+
$new->requestTarget = $requestTarget;
|
85 |
+
return $new;
|
86 |
+
}
|
87 |
+
|
88 |
+
public function getMethod()
|
89 |
+
{
|
90 |
+
return $this->method;
|
91 |
+
}
|
92 |
+
|
93 |
+
public function withMethod($method)
|
94 |
+
{
|
95 |
+
$this->assertMethod($method);
|
96 |
+
$new = clone $this;
|
97 |
+
$new->method = strtoupper($method);
|
98 |
+
return $new;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function getUri()
|
102 |
+
{
|
103 |
+
return $this->uri;
|
104 |
+
}
|
105 |
+
|
106 |
+
public function withUri(UriInterface $uri, $preserveHost = false)
|
107 |
+
{
|
108 |
+
if ($uri === $this->uri) {
|
109 |
+
return $this;
|
110 |
+
}
|
111 |
+
|
112 |
+
$new = clone $this;
|
113 |
+
$new->uri = $uri;
|
114 |
+
|
115 |
+
if (!$preserveHost || !isset($this->headerNames['host'])) {
|
116 |
+
$new->updateHostFromUri();
|
117 |
+
}
|
118 |
+
|
119 |
+
return $new;
|
120 |
+
}
|
121 |
+
|
122 |
+
private function updateHostFromUri()
|
123 |
+
{
|
124 |
+
$host = $this->uri->getHost();
|
125 |
+
|
126 |
+
if ($host == '') {
|
127 |
+
return;
|
128 |
+
}
|
129 |
+
|
130 |
+
if (($port = $this->uri->getPort()) !== null) {
|
131 |
+
$host .= ':' . $port;
|
132 |
+
}
|
133 |
+
|
134 |
+
if (isset($this->headerNames['host'])) {
|
135 |
+
$header = $this->headerNames['host'];
|
136 |
+
} else {
|
137 |
+
$header = 'Host';
|
138 |
+
$this->headerNames['host'] = 'Host';
|
139 |
+
}
|
140 |
+
// Ensure Host is the first header.
|
141 |
+
// See: http://tools.ietf.org/html/rfc7230#section-5.4
|
142 |
+
$this->headers = [$header => [$host]] + $this->headers;
|
143 |
+
}
|
144 |
+
|
145 |
+
private function assertMethod($method)
|
146 |
+
{
|
147 |
+
if (!is_string($method) || $method === '') {
|
148 |
+
throw new \InvalidArgumentException('Method must be a non-empty string.');
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/Response.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\ResponseInterface;
|
5 |
+
use Psr\Http\Message\StreamInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* PSR-7 response implementation.
|
9 |
+
*/
|
10 |
+
class Response implements ResponseInterface
|
11 |
+
{
|
12 |
+
use MessageTrait;
|
13 |
+
|
14 |
+
/** @var array Map of standard HTTP status code/reason phrases */
|
15 |
+
private static $phrases = [
|
16 |
+
100 => 'Continue',
|
17 |
+
101 => 'Switching Protocols',
|
18 |
+
102 => 'Processing',
|
19 |
+
200 => 'OK',
|
20 |
+
201 => 'Created',
|
21 |
+
202 => 'Accepted',
|
22 |
+
203 => 'Non-Authoritative Information',
|
23 |
+
204 => 'No Content',
|
24 |
+
205 => 'Reset Content',
|
25 |
+
206 => 'Partial Content',
|
26 |
+
207 => 'Multi-status',
|
27 |
+
208 => 'Already Reported',
|
28 |
+
300 => 'Multiple Choices',
|
29 |
+
301 => 'Moved Permanently',
|
30 |
+
302 => 'Found',
|
31 |
+
303 => 'See Other',
|
32 |
+
304 => 'Not Modified',
|
33 |
+
305 => 'Use Proxy',
|
34 |
+
306 => 'Switch Proxy',
|
35 |
+
307 => 'Temporary Redirect',
|
36 |
+
400 => 'Bad Request',
|
37 |
+
401 => 'Unauthorized',
|
38 |
+
402 => 'Payment Required',
|
39 |
+
403 => 'Forbidden',
|
40 |
+
404 => 'Not Found',
|
41 |
+
405 => 'Method Not Allowed',
|
42 |
+
406 => 'Not Acceptable',
|
43 |
+
407 => 'Proxy Authentication Required',
|
44 |
+
408 => 'Request Time-out',
|
45 |
+
409 => 'Conflict',
|
46 |
+
410 => 'Gone',
|
47 |
+
411 => 'Length Required',
|
48 |
+
412 => 'Precondition Failed',
|
49 |
+
413 => 'Request Entity Too Large',
|
50 |
+
414 => 'Request-URI Too Large',
|
51 |
+
415 => 'Unsupported Media Type',
|
52 |
+
416 => 'Requested range not satisfiable',
|
53 |
+
417 => 'Expectation Failed',
|
54 |
+
418 => 'I\'m a teapot',
|
55 |
+
422 => 'Unprocessable Entity',
|
56 |
+
423 => 'Locked',
|
57 |
+
424 => 'Failed Dependency',
|
58 |
+
425 => 'Unordered Collection',
|
59 |
+
426 => 'Upgrade Required',
|
60 |
+
428 => 'Precondition Required',
|
61 |
+
429 => 'Too Many Requests',
|
62 |
+
431 => 'Request Header Fields Too Large',
|
63 |
+
451 => 'Unavailable For Legal Reasons',
|
64 |
+
500 => 'Internal Server Error',
|
65 |
+
501 => 'Not Implemented',
|
66 |
+
502 => 'Bad Gateway',
|
67 |
+
503 => 'Service Unavailable',
|
68 |
+
504 => 'Gateway Time-out',
|
69 |
+
505 => 'HTTP Version not supported',
|
70 |
+
506 => 'Variant Also Negotiates',
|
71 |
+
507 => 'Insufficient Storage',
|
72 |
+
508 => 'Loop Detected',
|
73 |
+
511 => 'Network Authentication Required',
|
74 |
+
];
|
75 |
+
|
76 |
+
/** @var string */
|
77 |
+
private $reasonPhrase = '';
|
78 |
+
|
79 |
+
/** @var int */
|
80 |
+
private $statusCode = 200;
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @param int $status Status code
|
84 |
+
* @param array $headers Response headers
|
85 |
+
* @param string|null|resource|StreamInterface $body Response body
|
86 |
+
* @param string $version Protocol version
|
87 |
+
* @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
|
88 |
+
*/
|
89 |
+
public function __construct(
|
90 |
+
$status = 200,
|
91 |
+
array $headers = [],
|
92 |
+
$body = null,
|
93 |
+
$version = '1.1',
|
94 |
+
$reason = null
|
95 |
+
) {
|
96 |
+
$this->assertStatusCodeIsInteger($status);
|
97 |
+
$status = (int) $status;
|
98 |
+
$this->assertStatusCodeRange($status);
|
99 |
+
|
100 |
+
$this->statusCode = $status;
|
101 |
+
|
102 |
+
if ($body !== '' && $body !== null) {
|
103 |
+
$this->stream = stream_for($body);
|
104 |
+
}
|
105 |
+
|
106 |
+
$this->setHeaders($headers);
|
107 |
+
if ($reason == '' && isset(self::$phrases[$this->statusCode])) {
|
108 |
+
$this->reasonPhrase = self::$phrases[$this->statusCode];
|
109 |
+
} else {
|
110 |
+
$this->reasonPhrase = (string) $reason;
|
111 |
+
}
|
112 |
+
|
113 |
+
$this->protocol = $version;
|
114 |
+
}
|
115 |
+
|
116 |
+
public function getStatusCode()
|
117 |
+
{
|
118 |
+
return $this->statusCode;
|
119 |
+
}
|
120 |
+
|
121 |
+
public function getReasonPhrase()
|
122 |
+
{
|
123 |
+
return $this->reasonPhrase;
|
124 |
+
}
|
125 |
+
|
126 |
+
public function withStatus($code, $reasonPhrase = '')
|
127 |
+
{
|
128 |
+
$this->assertStatusCodeIsInteger($code);
|
129 |
+
$code = (int) $code;
|
130 |
+
$this->assertStatusCodeRange($code);
|
131 |
+
|
132 |
+
$new = clone $this;
|
133 |
+
$new->statusCode = $code;
|
134 |
+
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
135 |
+
$reasonPhrase = self::$phrases[$new->statusCode];
|
136 |
+
}
|
137 |
+
$new->reasonPhrase = $reasonPhrase;
|
138 |
+
return $new;
|
139 |
+
}
|
140 |
+
|
141 |
+
private function assertStatusCodeIsInteger($statusCode)
|
142 |
+
{
|
143 |
+
if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
|
144 |
+
throw new \InvalidArgumentException('Status code must be an integer value.');
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
private function assertStatusCodeRange($statusCode)
|
149 |
+
{
|
150 |
+
if ($statusCode < 100 || $statusCode >= 600) {
|
151 |
+
throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/Rfc7230.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace GuzzleHttp\Psr7;
|
4 |
+
|
5 |
+
final class Rfc7230
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* Header related regular expressions (copied from amphp/http package)
|
9 |
+
* (Note: once we require PHP 7.x we could just depend on the upstream package)
|
10 |
+
*
|
11 |
+
* Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
|
12 |
+
*
|
13 |
+
* @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
|
14 |
+
* @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
|
15 |
+
*/
|
16 |
+
const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
|
17 |
+
const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
|
18 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/ServerRequest.php
ADDED
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace GuzzleHttp\Psr7;
|
4 |
+
|
5 |
+
use InvalidArgumentException;
|
6 |
+
use Psr\Http\Message\ServerRequestInterface;
|
7 |
+
use Psr\Http\Message\UriInterface;
|
8 |
+
use Psr\Http\Message\StreamInterface;
|
9 |
+
use Psr\Http\Message\UploadedFileInterface;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Server-side HTTP request
|
13 |
+
*
|
14 |
+
* Extends the Request definition to add methods for accessing incoming data,
|
15 |
+
* specifically server parameters, cookies, matched path parameters, query
|
16 |
+
* string arguments, body parameters, and upload file information.
|
17 |
+
*
|
18 |
+
* "Attributes" are discovered via decomposing the request (and usually
|
19 |
+
* specifically the URI path), and typically will be injected by the application.
|
20 |
+
*
|
21 |
+
* Requests are considered immutable; all methods that might change state are
|
22 |
+
* implemented such that they retain the internal state of the current
|
23 |
+
* message and return a new instance that contains the changed state.
|
24 |
+
*/
|
25 |
+
class ServerRequest extends Request implements ServerRequestInterface
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* @var array
|
29 |
+
*/
|
30 |
+
private $attributes = [];
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private $cookieParams = [];
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var null|array|object
|
39 |
+
*/
|
40 |
+
private $parsedBody;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @var array
|
44 |
+
*/
|
45 |
+
private $queryParams = [];
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
private $serverParams;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @var array
|
54 |
+
*/
|
55 |
+
private $uploadedFiles = [];
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @param string $method HTTP method
|
59 |
+
* @param string|UriInterface $uri URI
|
60 |
+
* @param array $headers Request headers
|
61 |
+
* @param string|null|resource|StreamInterface $body Request body
|
62 |
+
* @param string $version Protocol version
|
63 |
+
* @param array $serverParams Typically the $_SERVER superglobal
|
64 |
+
*/
|
65 |
+
public function __construct(
|
66 |
+
$method,
|
67 |
+
$uri,
|
68 |
+
array $headers = [],
|
69 |
+
$body = null,
|
70 |
+
$version = '1.1',
|
71 |
+
array $serverParams = []
|
72 |
+
) {
|
73 |
+
$this->serverParams = $serverParams;
|
74 |
+
|
75 |
+
parent::__construct($method, $uri, $headers, $body, $version);
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Return an UploadedFile instance array.
|
80 |
+
*
|
81 |
+
* @param array $files A array which respect $_FILES structure
|
82 |
+
* @throws InvalidArgumentException for unrecognized values
|
83 |
+
* @return array
|
84 |
+
*/
|
85 |
+
public static function normalizeFiles(array $files)
|
86 |
+
{
|
87 |
+
$normalized = [];
|
88 |
+
|
89 |
+
foreach ($files as $key => $value) {
|
90 |
+
if ($value instanceof UploadedFileInterface) {
|
91 |
+
$normalized[$key] = $value;
|
92 |
+
} elseif (is_array($value) && isset($value['tmp_name'])) {
|
93 |
+
$normalized[$key] = self::createUploadedFileFromSpec($value);
|
94 |
+
} elseif (is_array($value)) {
|
95 |
+
$normalized[$key] = self::normalizeFiles($value);
|
96 |
+
continue;
|
97 |
+
} else {
|
98 |
+
throw new InvalidArgumentException('Invalid value in files specification');
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return $normalized;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Create and return an UploadedFile instance from a $_FILES specification.
|
107 |
+
*
|
108 |
+
* If the specification represents an array of values, this method will
|
109 |
+
* delegate to normalizeNestedFileSpec() and return that return value.
|
110 |
+
*
|
111 |
+
* @param array $value $_FILES struct
|
112 |
+
* @return array|UploadedFileInterface
|
113 |
+
*/
|
114 |
+
private static function createUploadedFileFromSpec(array $value)
|
115 |
+
{
|
116 |
+
if (is_array($value['tmp_name'])) {
|
117 |
+
return self::normalizeNestedFileSpec($value);
|
118 |
+
}
|
119 |
+
|
120 |
+
return new UploadedFile(
|
121 |
+
$value['tmp_name'],
|
122 |
+
(int) $value['size'],
|
123 |
+
(int) $value['error'],
|
124 |
+
$value['name'],
|
125 |
+
$value['type']
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Normalize an array of file specifications.
|
131 |
+
*
|
132 |
+
* Loops through all nested files and returns a normalized array of
|
133 |
+
* UploadedFileInterface instances.
|
134 |
+
*
|
135 |
+
* @param array $files
|
136 |
+
* @return UploadedFileInterface[]
|
137 |
+
*/
|
138 |
+
private static function normalizeNestedFileSpec(array $files = [])
|
139 |
+
{
|
140 |
+
$normalizedFiles = [];
|
141 |
+
|
142 |
+
foreach (array_keys($files['tmp_name']) as $key) {
|
143 |
+
$spec = [
|
144 |
+
'tmp_name' => $files['tmp_name'][$key],
|
145 |
+
'size' => $files['size'][$key],
|
146 |
+
'error' => $files['error'][$key],
|
147 |
+
'name' => $files['name'][$key],
|
148 |
+
'type' => $files['type'][$key],
|
149 |
+
];
|
150 |
+
$normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
|
151 |
+
}
|
152 |
+
|
153 |
+
return $normalizedFiles;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Return a ServerRequest populated with superglobals:
|
158 |
+
* $_GET
|
159 |
+
* $_POST
|
160 |
+
* $_COOKIE
|
161 |
+
* $_FILES
|
162 |
+
* $_SERVER
|
163 |
+
*
|
164 |
+
* @return ServerRequestInterface
|
165 |
+
*/
|
166 |
+
public static function fromGlobals()
|
167 |
+
{
|
168 |
+
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
169 |
+
$headers = getallheaders();
|
170 |
+
$uri = self::getUriFromGlobals();
|
171 |
+
$body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
|
172 |
+
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
|
173 |
+
|
174 |
+
$serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
|
175 |
+
|
176 |
+
return $serverRequest
|
177 |
+
->withCookieParams($_COOKIE)
|
178 |
+
->withQueryParams($_GET)
|
179 |
+
->withParsedBody($_POST)
|
180 |
+
->withUploadedFiles(self::normalizeFiles($_FILES));
|
181 |
+
}
|
182 |
+
|
183 |
+
private static function extractHostAndPortFromAuthority($authority)
|
184 |
+
{
|
185 |
+
$uri = 'http://'.$authority;
|
186 |
+
$parts = parse_url($uri);
|
187 |
+
if (false === $parts) {
|
188 |
+
return [null, null];
|
189 |
+
}
|
190 |
+
|
191 |
+
$host = isset($parts['host']) ? $parts['host'] : null;
|
192 |
+
$port = isset($parts['port']) ? $parts['port'] : null;
|
193 |
+
|
194 |
+
return [$host, $port];
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Get a Uri populated with values from $_SERVER.
|
199 |
+
*
|
200 |
+
* @return UriInterface
|
201 |
+
*/
|
202 |
+
public static function getUriFromGlobals()
|
203 |
+
{
|
204 |
+
$uri = new Uri('');
|
205 |
+
|
206 |
+
$uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
|
207 |
+
|
208 |
+
$hasPort = false;
|
209 |
+
if (isset($_SERVER['HTTP_HOST'])) {
|
210 |
+
list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']);
|
211 |
+
if ($host !== null) {
|
212 |
+
$uri = $uri->withHost($host);
|
213 |
+
}
|
214 |
+
|
215 |
+
if ($port !== null) {
|
216 |
+
$hasPort = true;
|
217 |
+
$uri = $uri->withPort($port);
|
218 |
+
}
|
219 |
+
} elseif (isset($_SERVER['SERVER_NAME'])) {
|
220 |
+
$uri = $uri->withHost($_SERVER['SERVER_NAME']);
|
221 |
+
} elseif (isset($_SERVER['SERVER_ADDR'])) {
|
222 |
+
$uri = $uri->withHost($_SERVER['SERVER_ADDR']);
|
223 |
+
}
|
224 |
+
|
225 |
+
if (!$hasPort && isset($_SERVER['SERVER_PORT'])) {
|
226 |
+
$uri = $uri->withPort($_SERVER['SERVER_PORT']);
|
227 |
+
}
|
228 |
+
|
229 |
+
$hasQuery = false;
|
230 |
+
if (isset($_SERVER['REQUEST_URI'])) {
|
231 |
+
$requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2);
|
232 |
+
$uri = $uri->withPath($requestUriParts[0]);
|
233 |
+
if (isset($requestUriParts[1])) {
|
234 |
+
$hasQuery = true;
|
235 |
+
$uri = $uri->withQuery($requestUriParts[1]);
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) {
|
240 |
+
$uri = $uri->withQuery($_SERVER['QUERY_STRING']);
|
241 |
+
}
|
242 |
+
|
243 |
+
return $uri;
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
/**
|
248 |
+
* {@inheritdoc}
|
249 |
+
*/
|
250 |
+
public function getServerParams()
|
251 |
+
{
|
252 |
+
return $this->serverParams;
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* {@inheritdoc}
|
257 |
+
*/
|
258 |
+
public function getUploadedFiles()
|
259 |
+
{
|
260 |
+
return $this->uploadedFiles;
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* {@inheritdoc}
|
265 |
+
*/
|
266 |
+
public function withUploadedFiles(array $uploadedFiles)
|
267 |
+
{
|
268 |
+
$new = clone $this;
|
269 |
+
$new->uploadedFiles = $uploadedFiles;
|
270 |
+
|
271 |
+
return $new;
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* {@inheritdoc}
|
276 |
+
*/
|
277 |
+
public function getCookieParams()
|
278 |
+
{
|
279 |
+
return $this->cookieParams;
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* {@inheritdoc}
|
284 |
+
*/
|
285 |
+
public function withCookieParams(array $cookies)
|
286 |
+
{
|
287 |
+
$new = clone $this;
|
288 |
+
$new->cookieParams = $cookies;
|
289 |
+
|
290 |
+
return $new;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* {@inheritdoc}
|
295 |
+
*/
|
296 |
+
public function getQueryParams()
|
297 |
+
{
|
298 |
+
return $this->queryParams;
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* {@inheritdoc}
|
303 |
+
*/
|
304 |
+
public function withQueryParams(array $query)
|
305 |
+
{
|
306 |
+
$new = clone $this;
|
307 |
+
$new->queryParams = $query;
|
308 |
+
|
309 |
+
return $new;
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* {@inheritdoc}
|
314 |
+
*/
|
315 |
+
public function getParsedBody()
|
316 |
+
{
|
317 |
+
return $this->parsedBody;
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* {@inheritdoc}
|
322 |
+
*/
|
323 |
+
public function withParsedBody($data)
|
324 |
+
{
|
325 |
+
$new = clone $this;
|
326 |
+
$new->parsedBody = $data;
|
327 |
+
|
328 |
+
return $new;
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* {@inheritdoc}
|
333 |
+
*/
|
334 |
+
public function getAttributes()
|
335 |
+
{
|
336 |
+
return $this->attributes;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* {@inheritdoc}
|
341 |
+
*/
|
342 |
+
public function getAttribute($attribute, $default = null)
|
343 |
+
{
|
344 |
+
if (false === array_key_exists($attribute, $this->attributes)) {
|
345 |
+
return $default;
|
346 |
+
}
|
347 |
+
|
348 |
+
return $this->attributes[$attribute];
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* {@inheritdoc}
|
353 |
+
*/
|
354 |
+
public function withAttribute($attribute, $value)
|
355 |
+
{
|
356 |
+
$new = clone $this;
|
357 |
+
$new->attributes[$attribute] = $value;
|
358 |
+
|
359 |
+
return $new;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* {@inheritdoc}
|
364 |
+
*/
|
365 |
+
public function withoutAttribute($attribute)
|
366 |
+
{
|
367 |
+
if (false === array_key_exists($attribute, $this->attributes)) {
|
368 |
+
return $this;
|
369 |
+
}
|
370 |
+
|
371 |
+
$new = clone $this;
|
372 |
+
unset($new->attributes[$attribute]);
|
373 |
+
|
374 |
+
return $new;
|
375 |
+
}
|
376 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/Stream.php
ADDED
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* PHP stream implementation.
|
8 |
+
*
|
9 |
+
* @var $stream
|
10 |
+
*/
|
11 |
+
class Stream implements StreamInterface
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Resource modes.
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*
|
18 |
+
* @see http://php.net/manual/function.fopen.php
|
19 |
+
* @see http://php.net/manual/en/function.gzopen.php
|
20 |
+
*/
|
21 |
+
const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
|
22 |
+
const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
|
23 |
+
|
24 |
+
private $stream;
|
25 |
+
private $size;
|
26 |
+
private $seekable;
|
27 |
+
private $readable;
|
28 |
+
private $writable;
|
29 |
+
private $uri;
|
30 |
+
private $customMetadata;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* This constructor accepts an associative array of options.
|
34 |
+
*
|
35 |
+
* - size: (int) If a read stream would otherwise have an indeterminate
|
36 |
+
* size, but the size is known due to foreknowledge, then you can
|
37 |
+
* provide that size, in bytes.
|
38 |
+
* - metadata: (array) Any additional metadata to return when the metadata
|
39 |
+
* of the stream is accessed.
|
40 |
+
*
|
41 |
+
* @param resource $stream Stream resource to wrap.
|
42 |
+
* @param array $options Associative array of options.
|
43 |
+
*
|
44 |
+
* @throws \InvalidArgumentException if the stream is not a stream resource
|
45 |
+
*/
|
46 |
+
public function __construct($stream, $options = [])
|
47 |
+
{
|
48 |
+
if (!is_resource($stream)) {
|
49 |
+
throw new \InvalidArgumentException('Stream must be a resource');
|
50 |
+
}
|
51 |
+
|
52 |
+
if (isset($options['size'])) {
|
53 |
+
$this->size = $options['size'];
|
54 |
+
}
|
55 |
+
|
56 |
+
$this->customMetadata = isset($options['metadata'])
|
57 |
+
? $options['metadata']
|
58 |
+
: [];
|
59 |
+
|
60 |
+
$this->stream = $stream;
|
61 |
+
$meta = stream_get_meta_data($this->stream);
|
62 |
+
$this->seekable = $meta['seekable'];
|
63 |
+
$this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
|
64 |
+
$this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
|
65 |
+
$this->uri = $this->getMetadata('uri');
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Closes the stream when the destructed
|
70 |
+
*/
|
71 |
+
public function __destruct()
|
72 |
+
{
|
73 |
+
$this->close();
|
74 |
+
}
|
75 |
+
|
76 |
+
public function __toString()
|
77 |
+
{
|
78 |
+
try {
|
79 |
+
$this->seek(0);
|
80 |
+
return (string) stream_get_contents($this->stream);
|
81 |
+
} catch (\Exception $e) {
|
82 |
+
return '';
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
public function getContents()
|
87 |
+
{
|
88 |
+
if (!isset($this->stream)) {
|
89 |
+
throw new \RuntimeException('Stream is detached');
|
90 |
+
}
|
91 |
+
|
92 |
+
$contents = stream_get_contents($this->stream);
|
93 |
+
|
94 |
+
if ($contents === false) {
|
95 |
+
throw new \RuntimeException('Unable to read stream contents');
|
96 |
+
}
|
97 |
+
|
98 |
+
return $contents;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function close()
|
102 |
+
{
|
103 |
+
if (isset($this->stream)) {
|
104 |
+
if (is_resource($this->stream)) {
|
105 |
+
fclose($this->stream);
|
106 |
+
}
|
107 |
+
$this->detach();
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
public function detach()
|
112 |
+
{
|
113 |
+
if (!isset($this->stream)) {
|
114 |
+
return null;
|
115 |
+
}
|
116 |
+
|
117 |
+
$result = $this->stream;
|
118 |
+
unset($this->stream);
|
119 |
+
$this->size = $this->uri = null;
|
120 |
+
$this->readable = $this->writable = $this->seekable = false;
|
121 |
+
|
122 |
+
return $result;
|
123 |
+
}
|
124 |
+
|
125 |
+
public function getSize()
|
126 |
+
{
|
127 |
+
if ($this->size !== null) {
|
128 |
+
return $this->size;
|
129 |
+
}
|
130 |
+
|
131 |
+
if (!isset($this->stream)) {
|
132 |
+
return null;
|
133 |
+
}
|
134 |
+
|
135 |
+
// Clear the stat cache if the stream has a URI
|
136 |
+
if ($this->uri) {
|
137 |
+
clearstatcache(true, $this->uri);
|
138 |
+
}
|
139 |
+
|
140 |
+
$stats = fstat($this->stream);
|
141 |
+
if (isset($stats['size'])) {
|
142 |
+
$this->size = $stats['size'];
|
143 |
+
return $this->size;
|
144 |
+
}
|
145 |
+
|
146 |
+
return null;
|
147 |
+
}
|
148 |
+
|
149 |
+
public function isReadable()
|
150 |
+
{
|
151 |
+
return $this->readable;
|
152 |
+
}
|
153 |
+
|
154 |
+
public function isWritable()
|
155 |
+
{
|
156 |
+
return $this->writable;
|
157 |
+
}
|
158 |
+
|
159 |
+
public function isSeekable()
|
160 |
+
{
|
161 |
+
return $this->seekable;
|
162 |
+
}
|
163 |
+
|
164 |
+
public function eof()
|
165 |
+
{
|
166 |
+
if (!isset($this->stream)) {
|
167 |
+
throw new \RuntimeException('Stream is detached');
|
168 |
+
}
|
169 |
+
|
170 |
+
return feof($this->stream);
|
171 |
+
}
|
172 |
+
|
173 |
+
public function tell()
|
174 |
+
{
|
175 |
+
if (!isset($this->stream)) {
|
176 |
+
throw new \RuntimeException('Stream is detached');
|
177 |
+
}
|
178 |
+
|
179 |
+
$result = ftell($this->stream);
|
180 |
+
|
181 |
+
if ($result === false) {
|
182 |
+
throw new \RuntimeException('Unable to determine stream position');
|
183 |
+
}
|
184 |
+
|
185 |
+
return $result;
|
186 |
+
}
|
187 |
+
|
188 |
+
public function rewind()
|
189 |
+
{
|
190 |
+
$this->seek(0);
|
191 |
+
}
|
192 |
+
|
193 |
+
public function seek($offset, $whence = SEEK_SET)
|
194 |
+
{
|
195 |
+
$whence = (int) $whence;
|
196 |
+
|
197 |
+
if (!isset($this->stream)) {
|
198 |
+
throw new \RuntimeException('Stream is detached');
|
199 |
+
}
|
200 |
+
if (!$this->seekable) {
|
201 |
+
throw new \RuntimeException('Stream is not seekable');
|
202 |
+
}
|
203 |
+
if (fseek($this->stream, $offset, $whence) === -1) {
|
204 |
+
throw new \RuntimeException('Unable to seek to stream position '
|
205 |
+
. $offset . ' with whence ' . var_export($whence, true));
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
public function read($length)
|
210 |
+
{
|
211 |
+
if (!isset($this->stream)) {
|
212 |
+
throw new \RuntimeException('Stream is detached');
|
213 |
+
}
|
214 |
+
if (!$this->readable) {
|
215 |
+
throw new \RuntimeException('Cannot read from non-readable stream');
|
216 |
+
}
|
217 |
+
if ($length < 0) {
|
218 |
+
throw new \RuntimeException('Length parameter cannot be negative');
|
219 |
+
}
|
220 |
+
|
221 |
+
if (0 === $length) {
|
222 |
+
return '';
|
223 |
+
}
|
224 |
+
|
225 |
+
$string = fread($this->stream, $length);
|
226 |
+
if (false === $string) {
|
227 |
+
throw new \RuntimeException('Unable to read from stream');
|
228 |
+
}
|
229 |
+
|
230 |
+
return $string;
|
231 |
+
}
|
232 |
+
|
233 |
+
public function write($string)
|
234 |
+
{
|
235 |
+
if (!isset($this->stream)) {
|
236 |
+
throw new \RuntimeException('Stream is detached');
|
237 |
+
}
|
238 |
+
if (!$this->writable) {
|
239 |
+
throw new \RuntimeException('Cannot write to a non-writable stream');
|
240 |
+
}
|
241 |
+
|
242 |
+
// We can't know the size after writing anything
|
243 |
+
$this->size = null;
|
244 |
+
$result = fwrite($this->stream, $string);
|
245 |
+
|
246 |
+
if ($result === false) {
|
247 |
+
throw new \RuntimeException('Unable to write to stream');
|
248 |
+
}
|
249 |
+
|
250 |
+
return $result;
|
251 |
+
}
|
252 |
+
|
253 |
+
public function getMetadata($key = null)
|
254 |
+
{
|
255 |
+
if (!isset($this->stream)) {
|
256 |
+
return $key ? null : [];
|
257 |
+
} elseif (!$key) {
|
258 |
+
return $this->customMetadata + stream_get_meta_data($this->stream);
|
259 |
+
} elseif (isset($this->customMetadata[$key])) {
|
260 |
+
return $this->customMetadata[$key];
|
261 |
+
}
|
262 |
+
|
263 |
+
$meta = stream_get_meta_data($this->stream);
|
264 |
+
|
265 |
+
return isset($meta[$key]) ? $meta[$key] : null;
|
266 |
+
}
|
267 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/StreamDecoratorTrait.php
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Stream decorator trait
|
8 |
+
* @property StreamInterface stream
|
9 |
+
*/
|
10 |
+
trait StreamDecoratorTrait
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @param StreamInterface $stream Stream to decorate
|
14 |
+
*/
|
15 |
+
public function __construct(StreamInterface $stream)
|
16 |
+
{
|
17 |
+
$this->stream = $stream;
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Magic method used to create a new stream if streams are not added in
|
22 |
+
* the constructor of a decorator (e.g., LazyOpenStream).
|
23 |
+
*
|
24 |
+
* @param string $name Name of the property (allows "stream" only).
|
25 |
+
*
|
26 |
+
* @return StreamInterface
|
27 |
+
*/
|
28 |
+
public function __get($name)
|
29 |
+
{
|
30 |
+
if ($name == 'stream') {
|
31 |
+
$this->stream = $this->createStream();
|
32 |
+
return $this->stream;
|
33 |
+
}
|
34 |
+
|
35 |
+
throw new \UnexpectedValueException("$name not found on class");
|
36 |
+
}
|
37 |
+
|
38 |
+
public function __toString()
|
39 |
+
{
|
40 |
+
try {
|
41 |
+
if ($this->isSeekable()) {
|
42 |
+
$this->seek(0);
|
43 |
+
}
|
44 |
+
return $this->getContents();
|
45 |
+
} catch (\Exception $e) {
|
46 |
+
// Really, PHP? https://bugs.php.net/bug.php?id=53648
|
47 |
+
trigger_error('StreamDecorator::__toString exception: '
|
48 |
+
. (string) $e, E_USER_ERROR);
|
49 |
+
return '';
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
public function getContents()
|
54 |
+
{
|
55 |
+
return copy_to_string($this);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Allow decorators to implement custom methods
|
60 |
+
*
|
61 |
+
* @param string $method Missing method name
|
62 |
+
* @param array $args Method arguments
|
63 |
+
*
|
64 |
+
* @return mixed
|
65 |
+
*/
|
66 |
+
public function __call($method, array $args)
|
67 |
+
{
|
68 |
+
$result = call_user_func_array([$this->stream, $method], $args);
|
69 |
+
|
70 |
+
// Always return the wrapped object if the result is a return $this
|
71 |
+
return $result === $this->stream ? $this : $result;
|
72 |
+
}
|
73 |
+
|
74 |
+
public function close()
|
75 |
+
{
|
76 |
+
$this->stream->close();
|
77 |
+
}
|
78 |
+
|
79 |
+
public function getMetadata($key = null)
|
80 |
+
{
|
81 |
+
return $this->stream->getMetadata($key);
|
82 |
+
}
|
83 |
+
|
84 |
+
public function detach()
|
85 |
+
{
|
86 |
+
return $this->stream->detach();
|
87 |
+
}
|
88 |
+
|
89 |
+
public function getSize()
|
90 |
+
{
|
91 |
+
return $this->stream->getSize();
|
92 |
+
}
|
93 |
+
|
94 |
+
public function eof()
|
95 |
+
{
|
96 |
+
return $this->stream->eof();
|
97 |
+
}
|
98 |
+
|
99 |
+
public function tell()
|
100 |
+
{
|
101 |
+
return $this->stream->tell();
|
102 |
+
}
|
103 |
+
|
104 |
+
public function isReadable()
|
105 |
+
{
|
106 |
+
return $this->stream->isReadable();
|
107 |
+
}
|
108 |
+
|
109 |
+
public function isWritable()
|
110 |
+
{
|
111 |
+
return $this->stream->isWritable();
|
112 |
+
}
|
113 |
+
|
114 |
+
public function isSeekable()
|
115 |
+
{
|
116 |
+
return $this->stream->isSeekable();
|
117 |
+
}
|
118 |
+
|
119 |
+
public function rewind()
|
120 |
+
{
|
121 |
+
$this->seek(0);
|
122 |
+
}
|
123 |
+
|
124 |
+
public function seek($offset, $whence = SEEK_SET)
|
125 |
+
{
|
126 |
+
$this->stream->seek($offset, $whence);
|
127 |
+
}
|
128 |
+
|
129 |
+
public function read($length)
|
130 |
+
{
|
131 |
+
return $this->stream->read($length);
|
132 |
+
}
|
133 |
+
|
134 |
+
public function write($string)
|
135 |
+
{
|
136 |
+
return $this->stream->write($string);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Implement in subclasses to dynamically create streams when requested.
|
141 |
+
*
|
142 |
+
* @return StreamInterface
|
143 |
+
* @throws \BadMethodCallException
|
144 |
+
*/
|
145 |
+
protected function createStream()
|
146 |
+
{
|
147 |
+
throw new \BadMethodCallException('Not implemented');
|
148 |
+
}
|
149 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/StreamWrapper.php
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\StreamInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Converts Guzzle streams into PHP stream resources.
|
8 |
+
*/
|
9 |
+
class StreamWrapper
|
10 |
+
{
|
11 |
+
/** @var resource */
|
12 |
+
public $context;
|
13 |
+
|
14 |
+
/** @var StreamInterface */
|
15 |
+
private $stream;
|
16 |
+
|
17 |
+
/** @var string r, r+, or w */
|
18 |
+
private $mode;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Returns a resource representing the stream.
|
22 |
+
*
|
23 |
+
* @param StreamInterface $stream The stream to get a resource for
|
24 |
+
*
|
25 |
+
* @return resource
|
26 |
+
* @throws \InvalidArgumentException if stream is not readable or writable
|
27 |
+
*/
|
28 |
+
public static function getResource(StreamInterface $stream)
|
29 |
+
{
|
30 |
+
self::register();
|
31 |
+
|
32 |
+
if ($stream->isReadable()) {
|
33 |
+
$mode = $stream->isWritable() ? 'r+' : 'r';
|
34 |
+
} elseif ($stream->isWritable()) {
|
35 |
+
$mode = 'w';
|
36 |
+
} else {
|
37 |
+
throw new \InvalidArgumentException('The stream must be readable, '
|
38 |
+
. 'writable, or both.');
|
39 |
+
}
|
40 |
+
|
41 |
+
return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Creates a stream context that can be used to open a stream as a php stream resource.
|
46 |
+
*
|
47 |
+
* @param StreamInterface $stream
|
48 |
+
*
|
49 |
+
* @return resource
|
50 |
+
*/
|
51 |
+
public static function createStreamContext(StreamInterface $stream)
|
52 |
+
{
|
53 |
+
return stream_context_create([
|
54 |
+
'guzzle' => ['stream' => $stream]
|
55 |
+
]);
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Registers the stream wrapper if needed
|
60 |
+
*/
|
61 |
+
public static function register()
|
62 |
+
{
|
63 |
+
if (!in_array('guzzle', stream_get_wrappers())) {
|
64 |
+
stream_wrapper_register('guzzle', __CLASS__);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
public function stream_open($path, $mode, $options, &$opened_path)
|
69 |
+
{
|
70 |
+
$options = stream_context_get_options($this->context);
|
71 |
+
|
72 |
+
if (!isset($options['guzzle']['stream'])) {
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
+
$this->mode = $mode;
|
77 |
+
$this->stream = $options['guzzle']['stream'];
|
78 |
+
|
79 |
+
return true;
|
80 |
+
}
|
81 |
+
|
82 |
+
public function stream_read($count)
|
83 |
+
{
|
84 |
+
return $this->stream->read($count);
|
85 |
+
}
|
86 |
+
|
87 |
+
public function stream_write($data)
|
88 |
+
{
|
89 |
+
return (int) $this->stream->write($data);
|
90 |
+
}
|
91 |
+
|
92 |
+
public function stream_tell()
|
93 |
+
{
|
94 |
+
return $this->stream->tell();
|
95 |
+
}
|
96 |
+
|
97 |
+
public function stream_eof()
|
98 |
+
{
|
99 |
+
return $this->stream->eof();
|
100 |
+
}
|
101 |
+
|
102 |
+
public function stream_seek($offset, $whence)
|
103 |
+
{
|
104 |
+
$this->stream->seek($offset, $whence);
|
105 |
+
|
106 |
+
return true;
|
107 |
+
}
|
108 |
+
|
109 |
+
public function stream_cast($cast_as)
|
110 |
+
{
|
111 |
+
$stream = clone($this->stream);
|
112 |
+
|
113 |
+
return $stream->detach();
|
114 |
+
}
|
115 |
+
|
116 |
+
public function stream_stat()
|
117 |
+
{
|
118 |
+
static $modeMap = [
|
119 |
+
'r' => 33060,
|
120 |
+
'rb' => 33060,
|
121 |
+
'r+' => 33206,
|
122 |
+
'w' => 33188,
|
123 |
+
'wb' => 33188
|
124 |
+
];
|
125 |
+
|
126 |
+
return [
|
127 |
+
'dev' => 0,
|
128 |
+
'ino' => 0,
|
129 |
+
'mode' => $modeMap[$this->mode],
|
130 |
+
'nlink' => 0,
|
131 |
+
'uid' => 0,
|
132 |
+
'gid' => 0,
|
133 |
+
'rdev' => 0,
|
134 |
+
'size' => $this->stream->getSize() ?: 0,
|
135 |
+
'atime' => 0,
|
136 |
+
'mtime' => 0,
|
137 |
+
'ctime' => 0,
|
138 |
+
'blksize' => 0,
|
139 |
+
'blocks' => 0
|
140 |
+
];
|
141 |
+
}
|
142 |
+
|
143 |
+
public function url_stat($path, $flags)
|
144 |
+
{
|
145 |
+
return [
|
146 |
+
'dev' => 0,
|
147 |
+
'ino' => 0,
|
148 |
+
'mode' => 0,
|
149 |
+
'nlink' => 0,
|
150 |
+
'uid' => 0,
|
151 |
+
'gid' => 0,
|
152 |
+
'rdev' => 0,
|
153 |
+
'size' => 0,
|
154 |
+
'atime' => 0,
|
155 |
+
'mtime' => 0,
|
156 |
+
'ctime' => 0,
|
157 |
+
'blksize' => 0,
|
158 |
+
'blocks' => 0
|
159 |
+
];
|
160 |
+
}
|
161 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/UploadedFile.php
ADDED
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use InvalidArgumentException;
|
5 |
+
use Psr\Http\Message\StreamInterface;
|
6 |
+
use Psr\Http\Message\UploadedFileInterface;
|
7 |
+
use RuntimeException;
|
8 |
+
|
9 |
+
class UploadedFile implements UploadedFileInterface
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var int[]
|
13 |
+
*/
|
14 |
+
private static $errors = [
|
15 |
+
UPLOAD_ERR_OK,
|
16 |
+
UPLOAD_ERR_INI_SIZE,
|
17 |
+
UPLOAD_ERR_FORM_SIZE,
|
18 |
+
UPLOAD_ERR_PARTIAL,
|
19 |
+
UPLOAD_ERR_NO_FILE,
|
20 |
+
UPLOAD_ERR_NO_TMP_DIR,
|
21 |
+
UPLOAD_ERR_CANT_WRITE,
|
22 |
+
UPLOAD_ERR_EXTENSION,
|
23 |
+
];
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
private $clientFilename;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $clientMediaType;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var int
|
37 |
+
*/
|
38 |
+
private $error;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var null|string
|
42 |
+
*/
|
43 |
+
private $file;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @var bool
|
47 |
+
*/
|
48 |
+
private $moved = false;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @var int
|
52 |
+
*/
|
53 |
+
private $size;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @var StreamInterface|null
|
57 |
+
*/
|
58 |
+
private $stream;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param StreamInterface|string|resource $streamOrFile
|
62 |
+
* @param int $size
|
63 |
+
* @param int $errorStatus
|
64 |
+
* @param string|null $clientFilename
|
65 |
+
* @param string|null $clientMediaType
|
66 |
+
*/
|
67 |
+
public function __construct(
|
68 |
+
$streamOrFile,
|
69 |
+
$size,
|
70 |
+
$errorStatus,
|
71 |
+
$clientFilename = null,
|
72 |
+
$clientMediaType = null
|
73 |
+
) {
|
74 |
+
$this->setError($errorStatus);
|
75 |
+
$this->setSize($size);
|
76 |
+
$this->setClientFilename($clientFilename);
|
77 |
+
$this->setClientMediaType($clientMediaType);
|
78 |
+
|
79 |
+
if ($this->isOk()) {
|
80 |
+
$this->setStreamOrFile($streamOrFile);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Depending on the value set file or stream variable
|
86 |
+
*
|
87 |
+
* @param mixed $streamOrFile
|
88 |
+
* @throws InvalidArgumentException
|
89 |
+
*/
|
90 |
+
private function setStreamOrFile($streamOrFile)
|
91 |
+
{
|
92 |
+
if (is_string($streamOrFile)) {
|
93 |
+
$this->file = $streamOrFile;
|
94 |
+
} elseif (is_resource($streamOrFile)) {
|
95 |
+
$this->stream = new Stream($streamOrFile);
|
96 |
+
} elseif ($streamOrFile instanceof StreamInterface) {
|
97 |
+
$this->stream = $streamOrFile;
|
98 |
+
} else {
|
99 |
+
throw new InvalidArgumentException(
|
100 |
+
'Invalid stream or file provided for UploadedFile'
|
101 |
+
);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @param int $error
|
107 |
+
* @throws InvalidArgumentException
|
108 |
+
*/
|
109 |
+
private function setError($error)
|
110 |
+
{
|
111 |
+
if (false === is_int($error)) {
|
112 |
+
throw new InvalidArgumentException(
|
113 |
+
'Upload file error status must be an integer'
|
114 |
+
);
|
115 |
+
}
|
116 |
+
|
117 |
+
if (false === in_array($error, UploadedFile::$errors)) {
|
118 |
+
throw new InvalidArgumentException(
|
119 |
+
'Invalid error status for UploadedFile'
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
$this->error = $error;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* @param int $size
|
128 |
+
* @throws InvalidArgumentException
|
129 |
+
*/
|
130 |
+
private function setSize($size)
|
131 |
+
{
|
132 |
+
if (false === is_int($size)) {
|
133 |
+
throw new InvalidArgumentException(
|
134 |
+
'Upload file size must be an integer'
|
135 |
+
);
|
136 |
+
}
|
137 |
+
|
138 |
+
$this->size = $size;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* @param mixed $param
|
143 |
+
* @return boolean
|
144 |
+
*/
|
145 |
+
private function isStringOrNull($param)
|
146 |
+
{
|
147 |
+
return in_array(gettype($param), ['string', 'NULL']);
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @param mixed $param
|
152 |
+
* @return boolean
|
153 |
+
*/
|
154 |
+
private function isStringNotEmpty($param)
|
155 |
+
{
|
156 |
+
return is_string($param) && false === empty($param);
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* @param string|null $clientFilename
|
161 |
+
* @throws InvalidArgumentException
|
162 |
+
*/
|
163 |
+
private function setClientFilename($clientFilename)
|
164 |
+
{
|
165 |
+
if (false === $this->isStringOrNull($clientFilename)) {
|
166 |
+
throw new InvalidArgumentException(
|
167 |
+
'Upload file client filename must be a string or null'
|
168 |
+
);
|
169 |
+
}
|
170 |
+
|
171 |
+
$this->clientFilename = $clientFilename;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* @param string|null $clientMediaType
|
176 |
+
* @throws InvalidArgumentException
|
177 |
+
*/
|
178 |
+
private function setClientMediaType($clientMediaType)
|
179 |
+
{
|
180 |
+
if (false === $this->isStringOrNull($clientMediaType)) {
|
181 |
+
throw new InvalidArgumentException(
|
182 |
+
'Upload file client media type must be a string or null'
|
183 |
+
);
|
184 |
+
}
|
185 |
+
|
186 |
+
$this->clientMediaType = $clientMediaType;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Return true if there is no upload error
|
191 |
+
*
|
192 |
+
* @return boolean
|
193 |
+
*/
|
194 |
+
private function isOk()
|
195 |
+
{
|
196 |
+
return $this->error === UPLOAD_ERR_OK;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* @return boolean
|
201 |
+
*/
|
202 |
+
public function isMoved()
|
203 |
+
{
|
204 |
+
return $this->moved;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* @throws RuntimeException if is moved or not ok
|
209 |
+
*/
|
210 |
+
private function validateActive()
|
211 |
+
{
|
212 |
+
if (false === $this->isOk()) {
|
213 |
+
throw new RuntimeException('Cannot retrieve stream due to upload error');
|
214 |
+
}
|
215 |
+
|
216 |
+
if ($this->isMoved()) {
|
217 |
+
throw new RuntimeException('Cannot retrieve stream after it has already been moved');
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* {@inheritdoc}
|
223 |
+
* @throws RuntimeException if the upload was not successful.
|
224 |
+
*/
|
225 |
+
public function getStream()
|
226 |
+
{
|
227 |
+
$this->validateActive();
|
228 |
+
|
229 |
+
if ($this->stream instanceof StreamInterface) {
|
230 |
+
return $this->stream;
|
231 |
+
}
|
232 |
+
|
233 |
+
return new LazyOpenStream($this->file, 'r+');
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* {@inheritdoc}
|
238 |
+
*
|
239 |
+
* @see http://php.net/is_uploaded_file
|
240 |
+
* @see http://php.net/move_uploaded_file
|
241 |
+
* @param string $targetPath Path to which to move the uploaded file.
|
242 |
+
* @throws RuntimeException if the upload was not successful.
|
243 |
+
* @throws InvalidArgumentException if the $path specified is invalid.
|
244 |
+
* @throws RuntimeException on any error during the move operation, or on
|
245 |
+
* the second or subsequent call to the method.
|
246 |
+
*/
|
247 |
+
public function moveTo($targetPath)
|
248 |
+
{
|
249 |
+
$this->validateActive();
|
250 |
+
|
251 |
+
if (false === $this->isStringNotEmpty($targetPath)) {
|
252 |
+
throw new InvalidArgumentException(
|
253 |
+
'Invalid path provided for move operation; must be a non-empty string'
|
254 |
+
);
|
255 |
+
}
|
256 |
+
|
257 |
+
if ($this->file) {
|
258 |
+
$this->moved = php_sapi_name() == 'cli'
|
259 |
+
? rename($this->file, $targetPath)
|
260 |
+
: move_uploaded_file($this->file, $targetPath);
|
261 |
+
} else {
|
262 |
+
copy_to_stream(
|
263 |
+
$this->getStream(),
|
264 |
+
new LazyOpenStream($targetPath, 'w')
|
265 |
+
);
|
266 |
+
|
267 |
+
$this->moved = true;
|
268 |
+
}
|
269 |
+
|
270 |
+
if (false === $this->moved) {
|
271 |
+
throw new RuntimeException(
|
272 |
+
sprintf('Uploaded file could not be moved to %s', $targetPath)
|
273 |
+
);
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* {@inheritdoc}
|
279 |
+
*
|
280 |
+
* @return int|null The file size in bytes or null if unknown.
|
281 |
+
*/
|
282 |
+
public function getSize()
|
283 |
+
{
|
284 |
+
return $this->size;
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* {@inheritdoc}
|
289 |
+
*
|
290 |
+
* @see http://php.net/manual/en/features.file-upload.errors.php
|
291 |
+
* @return int One of PHP's UPLOAD_ERR_XXX constants.
|
292 |
+
*/
|
293 |
+
public function getError()
|
294 |
+
{
|
295 |
+
return $this->error;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* {@inheritdoc}
|
300 |
+
*
|
301 |
+
* @return string|null The filename sent by the client or null if none
|
302 |
+
* was provided.
|
303 |
+
*/
|
304 |
+
public function getClientFilename()
|
305 |
+
{
|
306 |
+
return $this->clientFilename;
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* {@inheritdoc}
|
311 |
+
*/
|
312 |
+
public function getClientMediaType()
|
313 |
+
{
|
314 |
+
return $this->clientMediaType;
|
315 |
+
}
|
316 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/Uri.php
ADDED
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\UriInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* PSR-7 URI implementation.
|
8 |
+
*
|
9 |
+
* @author Michael Dowling
|
10 |
+
* @author Tobias Schultze
|
11 |
+
* @author Matthew Weier O'Phinney
|
12 |
+
*/
|
13 |
+
class Uri implements UriInterface
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Absolute http and https URIs require a host per RFC 7230 Section 2.7
|
17 |
+
* but in generic URIs the host can be empty. So for http(s) URIs
|
18 |
+
* we apply this default host when no host is given yet to form a
|
19 |
+
* valid URI.
|
20 |
+
*/
|
21 |
+
const HTTP_DEFAULT_HOST = 'localhost';
|
22 |
+
|
23 |
+
private static $defaultPorts = [
|
24 |
+
'http' => 80,
|
25 |
+
'https' => 443,
|
26 |
+
'ftp' => 21,
|
27 |
+
'gopher' => 70,
|
28 |
+
'nntp' => 119,
|
29 |
+
'news' => 119,
|
30 |
+
'telnet' => 23,
|
31 |
+
'tn3270' => 23,
|
32 |
+
'imap' => 143,
|
33 |
+
'pop' => 110,
|
34 |
+
'ldap' => 389,
|
35 |
+
];
|
36 |
+
|
37 |
+
private static $charUnreserved = 'a-zA-Z0-9_\-\.~';
|
38 |
+
private static $charSubDelims = '!\$&\'\(\)\*\+,;=';
|
39 |
+
private static $replaceQuery = ['=' => '%3D', '&' => '%26'];
|
40 |
+
|
41 |
+
/** @var string Uri scheme. */
|
42 |
+
private $scheme = '';
|
43 |
+
|
44 |
+
/** @var string Uri user info. */
|
45 |
+
private $userInfo = '';
|
46 |
+
|
47 |
+
/** @var string Uri host. */
|
48 |
+
private $host = '';
|
49 |
+
|
50 |
+
/** @var int|null Uri port. */
|
51 |
+
private $port;
|
52 |
+
|
53 |
+
/** @var string Uri path. */
|
54 |
+
private $path = '';
|
55 |
+
|
56 |
+
/** @var string Uri query string. */
|
57 |
+
private $query = '';
|
58 |
+
|
59 |
+
/** @var string Uri fragment. */
|
60 |
+
private $fragment = '';
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @param string $uri URI to parse
|
64 |
+
*/
|
65 |
+
public function __construct($uri = '')
|
66 |
+
{
|
67 |
+
// weak type check to also accept null until we can add scalar type hints
|
68 |
+
if ($uri != '') {
|
69 |
+
$parts = parse_url($uri);
|
70 |
+
if ($parts === false) {
|
71 |
+
throw new \InvalidArgumentException("Unable to parse URI: $uri");
|
72 |
+
}
|
73 |
+
$this->applyParts($parts);
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
public function __toString()
|
78 |
+
{
|
79 |
+
return self::composeComponents(
|
80 |
+
$this->scheme,
|
81 |
+
$this->getAuthority(),
|
82 |
+
$this->path,
|
83 |
+
$this->query,
|
84 |
+
$this->fragment
|
85 |
+
);
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Composes a URI reference string from its various components.
|
90 |
+
*
|
91 |
+
* Usually this method does not need to be called manually but instead is used indirectly via
|
92 |
+
* `Psr\Http\Message\UriInterface::__toString`.
|
93 |
+
*
|
94 |
+
* PSR-7 UriInterface treats an empty component the same as a missing component as
|
95 |
+
* getQuery(), getFragment() etc. always return a string. This explains the slight
|
96 |
+
* difference to RFC 3986 Section 5.3.
|
97 |
+
*
|
98 |
+
* Another adjustment is that the authority separator is added even when the authority is missing/empty
|
99 |
+
* for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with
|
100 |
+
* `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But
|
101 |
+
* `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
|
102 |
+
* that format).
|
103 |
+
*
|
104 |
+
* @param string $scheme
|
105 |
+
* @param string $authority
|
106 |
+
* @param string $path
|
107 |
+
* @param string $query
|
108 |
+
* @param string $fragment
|
109 |
+
*
|
110 |
+
* @return string
|
111 |
+
*
|
112 |
+
* @link https://tools.ietf.org/html/rfc3986#section-5.3
|
113 |
+
*/
|
114 |
+
public static function composeComponents($scheme, $authority, $path, $query, $fragment)
|
115 |
+
{
|
116 |
+
$uri = '';
|
117 |
+
|
118 |
+
// weak type checks to also accept null until we can add scalar type hints
|
119 |
+
if ($scheme != '') {
|
120 |
+
$uri .= $scheme . ':';
|
121 |
+
}
|
122 |
+
|
123 |
+
if ($authority != ''|| $scheme === 'file') {
|
124 |
+
$uri .= '//' . $authority;
|
125 |
+
}
|
126 |
+
|
127 |
+
$uri .= $path;
|
128 |
+
|
129 |
+
if ($query != '') {
|
130 |
+
$uri .= '?' . $query;
|
131 |
+
}
|
132 |
+
|
133 |
+
if ($fragment != '') {
|
134 |
+
$uri .= '#' . $fragment;
|
135 |
+
}
|
136 |
+
|
137 |
+
return $uri;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Whether the URI has the default port of the current scheme.
|
142 |
+
*
|
143 |
+
* `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used
|
144 |
+
* independently of the implementation.
|
145 |
+
*
|
146 |
+
* @param UriInterface $uri
|
147 |
+
*
|
148 |
+
* @return bool
|
149 |
+
*/
|
150 |
+
public static function isDefaultPort(UriInterface $uri)
|
151 |
+
{
|
152 |
+
return $uri->getPort() === null
|
153 |
+
|| (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Whether the URI is absolute, i.e. it has a scheme.
|
158 |
+
*
|
159 |
+
* An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true
|
160 |
+
* if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative
|
161 |
+
* to another URI, the base URI. Relative references can be divided into several forms:
|
162 |
+
* - network-path references, e.g. '//example.com/path'
|
163 |
+
* - absolute-path references, e.g. '/path'
|
164 |
+
* - relative-path references, e.g. 'subpath'
|
165 |
+
*
|
166 |
+
* @param UriInterface $uri
|
167 |
+
*
|
168 |
+
* @return bool
|
169 |
+
* @see Uri::isNetworkPathReference
|
170 |
+
* @see Uri::isAbsolutePathReference
|
171 |
+
* @see Uri::isRelativePathReference
|
172 |
+
* @link https://tools.ietf.org/html/rfc3986#section-4
|
173 |
+
*/
|
174 |
+
public static function isAbsolute(UriInterface $uri)
|
175 |
+
{
|
176 |
+
return $uri->getScheme() !== '';
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Whether the URI is a network-path reference.
|
181 |
+
*
|
182 |
+
* A relative reference that begins with two slash characters is termed an network-path reference.
|
183 |
+
*
|
184 |
+
* @param UriInterface $uri
|
185 |
+
*
|
186 |
+
* @return bool
|
187 |
+
* @link https://tools.ietf.org/html/rfc3986#section-4.2
|
188 |
+
*/
|
189 |
+
public static function isNetworkPathReference(UriInterface $uri)
|
190 |
+
{
|
191 |
+
return $uri->getScheme() === '' && $uri->getAuthority() !== '';
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Whether the URI is a absolute-path reference.
|
196 |
+
*
|
197 |
+
* A relative reference that begins with a single slash character is termed an absolute-path reference.
|
198 |
+
*
|
199 |
+
* @param UriInterface $uri
|
200 |
+
*
|
201 |
+
* @return bool
|
202 |
+
* @link https://tools.ietf.org/html/rfc3986#section-4.2
|
203 |
+
*/
|
204 |
+
public static function isAbsolutePathReference(UriInterface $uri)
|
205 |
+
{
|
206 |
+
return $uri->getScheme() === ''
|
207 |
+
&& $uri->getAuthority() === ''
|
208 |
+
&& isset($uri->getPath()[0])
|
209 |
+
&& $uri->getPath()[0] === '/';
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Whether the URI is a relative-path reference.
|
214 |
+
*
|
215 |
+
* A relative reference that does not begin with a slash character is termed a relative-path reference.
|
216 |
+
*
|
217 |
+
* @param UriInterface $uri
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
* @link https://tools.ietf.org/html/rfc3986#section-4.2
|
221 |
+
*/
|
222 |
+
public static function isRelativePathReference(UriInterface $uri)
|
223 |
+
{
|
224 |
+
return $uri->getScheme() === ''
|
225 |
+
&& $uri->getAuthority() === ''
|
226 |
+
&& (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/');
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Whether the URI is a same-document reference.
|
231 |
+
*
|
232 |
+
* A same-document reference refers to a URI that is, aside from its fragment
|
233 |
+
* component, identical to the base URI. When no base URI is given, only an empty
|
234 |
+
* URI reference (apart from its fragment) is considered a same-document reference.
|
235 |
+
*
|
236 |
+
* @param UriInterface $uri The URI to check
|
237 |
+
* @param UriInterface|null $base An optional base URI to compare against
|
238 |
+
*
|
239 |
+
* @return bool
|
240 |
+
* @link https://tools.ietf.org/html/rfc3986#section-4.4
|
241 |
+
*/
|
242 |
+
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
|
243 |
+
{
|
244 |
+
if ($base !== null) {
|
245 |
+
$uri = UriResolver::resolve($base, $uri);
|
246 |
+
|
247 |
+
return ($uri->getScheme() === $base->getScheme())
|
248 |
+
&& ($uri->getAuthority() === $base->getAuthority())
|
249 |
+
&& ($uri->getPath() === $base->getPath())
|
250 |
+
&& ($uri->getQuery() === $base->getQuery());
|
251 |
+
}
|
252 |
+
|
253 |
+
return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === '';
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Removes dot segments from a path and returns the new path.
|
258 |
+
*
|
259 |
+
* @param string $path
|
260 |
+
*
|
261 |
+
* @return string
|
262 |
+
*
|
263 |
+
* @deprecated since version 1.4. Use UriResolver::removeDotSegments instead.
|
264 |
+
* @see UriResolver::removeDotSegments
|
265 |
+
*/
|
266 |
+
public static function removeDotSegments($path)
|
267 |
+
{
|
268 |
+
return UriResolver::removeDotSegments($path);
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Converts the relative URI into a new URI that is resolved against the base URI.
|
273 |
+
*
|
274 |
+
* @param UriInterface $base Base URI
|
275 |
+
* @param string|UriInterface $rel Relative URI
|
276 |
+
*
|
277 |
+
* @return UriInterface
|
278 |
+
*
|
279 |
+
* @deprecated since version 1.4. Use UriResolver::resolve instead.
|
280 |
+
* @see UriResolver::resolve
|
281 |
+
*/
|
282 |
+
public static function resolve(UriInterface $base, $rel)
|
283 |
+
{
|
284 |
+
if (!($rel instanceof UriInterface)) {
|
285 |
+
$rel = new self($rel);
|
286 |
+
}
|
287 |
+
|
288 |
+
return UriResolver::resolve($base, $rel);
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Creates a new URI with a specific query string value removed.
|
293 |
+
*
|
294 |
+
* Any existing query string values that exactly match the provided key are
|
295 |
+
* removed.
|
296 |
+
*
|
297 |
+
* @param UriInterface $uri URI to use as a base.
|
298 |
+
* @param string $key Query string key to remove.
|
299 |
+
*
|
300 |
+
* @return UriInterface
|
301 |
+
*/
|
302 |
+
public static function withoutQueryValue(UriInterface $uri, $key)
|
303 |
+
{
|
304 |
+
$result = self::getFilteredQueryString($uri, [$key]);
|
305 |
+
|
306 |
+
return $uri->withQuery(implode('&', $result));
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Creates a new URI with a specific query string value.
|
311 |
+
*
|
312 |
+
* Any existing query string values that exactly match the provided key are
|
313 |
+
* removed and replaced with the given key value pair.
|
314 |
+
*
|
315 |
+
* A value of null will set the query string key without a value, e.g. "key"
|
316 |
+
* instead of "key=value".
|
317 |
+
*
|
318 |
+
* @param UriInterface $uri URI to use as a base.
|
319 |
+
* @param string $key Key to set.
|
320 |
+
* @param string|null $value Value to set
|
321 |
+
*
|
322 |
+
* @return UriInterface
|
323 |
+
*/
|
324 |
+
public static function withQueryValue(UriInterface $uri, $key, $value)
|
325 |
+
{
|
326 |
+
$result = self::getFilteredQueryString($uri, [$key]);
|
327 |
+
|
328 |
+
$result[] = self::generateQueryString($key, $value);
|
329 |
+
|
330 |
+
return $uri->withQuery(implode('&', $result));
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Creates a new URI with multiple specific query string values.
|
335 |
+
*
|
336 |
+
* It has the same behavior as withQueryValue() but for an associative array of key => value.
|
337 |
+
*
|
338 |
+
* @param UriInterface $uri URI to use as a base.
|
339 |
+
* @param array $keyValueArray Associative array of key and values
|
340 |
+
*
|
341 |
+
* @return UriInterface
|
342 |
+
*/
|
343 |
+
public static function withQueryValues(UriInterface $uri, array $keyValueArray)
|
344 |
+
{
|
345 |
+
$result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
|
346 |
+
|
347 |
+
foreach ($keyValueArray as $key => $value) {
|
348 |
+
$result[] = self::generateQueryString($key, $value);
|
349 |
+
}
|
350 |
+
|
351 |
+
return $uri->withQuery(implode('&', $result));
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Creates a URI from a hash of `parse_url` components.
|
356 |
+
*
|
357 |
+
* @param array $parts
|
358 |
+
*
|
359 |
+
* @return UriInterface
|
360 |
+
* @link http://php.net/manual/en/function.parse-url.php
|
361 |
+
*
|
362 |
+
* @throws \InvalidArgumentException If the components do not form a valid URI.
|
363 |
+
*/
|
364 |
+
public static function fromParts(array $parts)
|
365 |
+
{
|
366 |
+
$uri = new self();
|
367 |
+
$uri->applyParts($parts);
|
368 |
+
$uri->validateState();
|
369 |
+
|
370 |
+
return $uri;
|
371 |
+
}
|
372 |
+
|
373 |
+
public function getScheme()
|
374 |
+
{
|
375 |
+
return $this->scheme;
|
376 |
+
}
|
377 |
+
|
378 |
+
public function getAuthority()
|
379 |
+
{
|
380 |
+
$authority = $this->host;
|
381 |
+
if ($this->userInfo !== '') {
|
382 |
+
$authority = $this->userInfo . '@' . $authority;
|
383 |
+
}
|
384 |
+
|
385 |
+
if ($this->port !== null) {
|
386 |
+
$authority .= ':' . $this->port;
|
387 |
+
}
|
388 |
+
|
389 |
+
return $authority;
|
390 |
+
}
|
391 |
+
|
392 |
+
public function getUserInfo()
|
393 |
+
{
|
394 |
+
return $this->userInfo;
|
395 |
+
}
|
396 |
+
|
397 |
+
public function getHost()
|
398 |
+
{
|
399 |
+
return $this->host;
|
400 |
+
}
|
401 |
+
|
402 |
+
public function getPort()
|
403 |
+
{
|
404 |
+
return $this->port;
|
405 |
+
}
|
406 |
+
|
407 |
+
public function getPath()
|
408 |
+
{
|
409 |
+
return $this->path;
|
410 |
+
}
|
411 |
+
|
412 |
+
public function getQuery()
|
413 |
+
{
|
414 |
+
return $this->query;
|
415 |
+
}
|
416 |
+
|
417 |
+
public function getFragment()
|
418 |
+
{
|
419 |
+
return $this->fragment;
|
420 |
+
}
|
421 |
+
|
422 |
+
public function withScheme($scheme)
|
423 |
+
{
|
424 |
+
$scheme = $this->filterScheme($scheme);
|
425 |
+
|
426 |
+
if ($this->scheme === $scheme) {
|
427 |
+
return $this;
|
428 |
+
}
|
429 |
+
|
430 |
+
$new = clone $this;
|
431 |
+
$new->scheme = $scheme;
|
432 |
+
$new->removeDefaultPort();
|
433 |
+
$new->validateState();
|
434 |
+
|
435 |
+
return $new;
|
436 |
+
}
|
437 |
+
|
438 |
+
public function withUserInfo($user, $password = null)
|
439 |
+
{
|
440 |
+
$info = $this->filterUserInfoComponent($user);
|
441 |
+
if ($password !== null) {
|
442 |
+
$info .= ':' . $this->filterUserInfoComponent($password);
|
443 |
+
}
|
444 |
+
|
445 |
+
if ($this->userInfo === $info) {
|
446 |
+
return $this;
|
447 |
+
}
|
448 |
+
|
449 |
+
$new = clone $this;
|
450 |
+
$new->userInfo = $info;
|
451 |
+
$new->validateState();
|
452 |
+
|
453 |
+
return $new;
|
454 |
+
}
|
455 |
+
|
456 |
+
public function withHost($host)
|
457 |
+
{
|
458 |
+
$host = $this->filterHost($host);
|
459 |
+
|
460 |
+
if ($this->host === $host) {
|
461 |
+
return $this;
|
462 |
+
}
|
463 |
+
|
464 |
+
$new = clone $this;
|
465 |
+
$new->host = $host;
|
466 |
+
$new->validateState();
|
467 |
+
|
468 |
+
return $new;
|
469 |
+
}
|
470 |
+
|
471 |
+
public function withPort($port)
|
472 |
+
{
|
473 |
+
$port = $this->filterPort($port);
|
474 |
+
|
475 |
+
if ($this->port === $port) {
|
476 |
+
return $this;
|
477 |
+
}
|
478 |
+
|
479 |
+
$new = clone $this;
|
480 |
+
$new->port = $port;
|
481 |
+
$new->removeDefaultPort();
|
482 |
+
$new->validateState();
|
483 |
+
|
484 |
+
return $new;
|
485 |
+
}
|
486 |
+
|
487 |
+
public function withPath($path)
|
488 |
+
{
|
489 |
+
$path = $this->filterPath($path);
|
490 |
+
|
491 |
+
if ($this->path === $path) {
|
492 |
+
return $this;
|
493 |
+
}
|
494 |
+
|
495 |
+
$new = clone $this;
|
496 |
+
$new->path = $path;
|
497 |
+
$new->validateState();
|
498 |
+
|
499 |
+
return $new;
|
500 |
+
}
|
501 |
+
|
502 |
+
public function withQuery($query)
|
503 |
+
{
|
504 |
+
$query = $this->filterQueryAndFragment($query);
|
505 |
+
|
506 |
+
if ($this->query === $query) {
|
507 |
+
return $this;
|
508 |
+
}
|
509 |
+
|
510 |
+
$new = clone $this;
|
511 |
+
$new->query = $query;
|
512 |
+
|
513 |
+
return $new;
|
514 |
+
}
|
515 |
+
|
516 |
+
public function withFragment($fragment)
|
517 |
+
{
|
518 |
+
$fragment = $this->filterQueryAndFragment($fragment);
|
519 |
+
|
520 |
+
if ($this->fragment === $fragment) {
|
521 |
+
return $this;
|
522 |
+
}
|
523 |
+
|
524 |
+
$new = clone $this;
|
525 |
+
$new->fragment = $fragment;
|
526 |
+
|
527 |
+
return $new;
|
528 |
+
}
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Apply parse_url parts to a URI.
|
532 |
+
*
|
533 |
+
* @param array $parts Array of parse_url parts to apply.
|
534 |
+
*/
|
535 |
+
private function applyParts(array $parts)
|
536 |
+
{
|
537 |
+
$this->scheme = isset($parts['scheme'])
|
538 |
+
? $this->filterScheme($parts['scheme'])
|
539 |
+
: '';
|
540 |
+
$this->userInfo = isset($parts['user'])
|
541 |
+
? $this->filterUserInfoComponent($parts['user'])
|
542 |
+
: '';
|
543 |
+
$this->host = isset($parts['host'])
|
544 |
+
? $this->filterHost($parts['host'])
|
545 |
+
: '';
|
546 |
+
$this->port = isset($parts['port'])
|
547 |
+
? $this->filterPort($parts['port'])
|
548 |
+
: null;
|
549 |
+
$this->path = isset($parts['path'])
|
550 |
+
? $this->filterPath($parts['path'])
|
551 |
+
: '';
|
552 |
+
$this->query = isset($parts['query'])
|
553 |
+
? $this->filterQueryAndFragment($parts['query'])
|
554 |
+
: '';
|
555 |
+
$this->fragment = isset($parts['fragment'])
|
556 |
+
? $this->filterQueryAndFragment($parts['fragment'])
|
557 |
+
: '';
|
558 |
+
if (isset($parts['pass'])) {
|
559 |
+
$this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
|
560 |
+
}
|
561 |
+
|
562 |
+
$this->removeDefaultPort();
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* @param string $scheme
|
567 |
+
*
|
568 |
+
* @return string
|
569 |
+
*
|
570 |
+
* @throws \InvalidArgumentException If the scheme is invalid.
|
571 |
+
*/
|
572 |
+
private function filterScheme($scheme)
|
573 |
+
{
|
574 |
+
if (!is_string($scheme)) {
|
575 |
+
throw new \InvalidArgumentException('Scheme must be a string');
|
576 |
+
}
|
577 |
+
|
578 |
+
return strtolower($scheme);
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* @param string $component
|
583 |
+
*
|
584 |
+
* @return string
|
585 |
+
*
|
586 |
+
* @throws \InvalidArgumentException If the user info is invalid.
|
587 |
+
*/
|
588 |
+
private function filterUserInfoComponent($component)
|
589 |
+
{
|
590 |
+
if (!is_string($component)) {
|
591 |
+
throw new \InvalidArgumentException('User info must be a string');
|
592 |
+
}
|
593 |
+
|
594 |
+
return preg_replace_callback(
|
595 |
+
'/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
|
596 |
+
[$this, 'rawurlencodeMatchZero'],
|
597 |
+
$component
|
598 |
+
);
|
599 |
+
}
|
600 |
+
|
601 |
+
/**
|
602 |
+
* @param string $host
|
603 |
+
*
|
604 |
+
* @return string
|
605 |
+
*
|
606 |
+
* @throws \InvalidArgumentException If the host is invalid.
|
607 |
+
*/
|
608 |
+
private function filterHost($host)
|
609 |
+
{
|
610 |
+
if (!is_string($host)) {
|
611 |
+
throw new \InvalidArgumentException('Host must be a string');
|
612 |
+
}
|
613 |
+
|
614 |
+
return strtolower($host);
|
615 |
+
}
|
616 |
+
|
617 |
+
/**
|
618 |
+
* @param int|null $port
|
619 |
+
*
|
620 |
+
* @return int|null
|
621 |
+
*
|
622 |
+
* @throws \InvalidArgumentException If the port is invalid.
|
623 |
+
*/
|
624 |
+
private function filterPort($port)
|
625 |
+
{
|
626 |
+
if ($port === null) {
|
627 |
+
return null;
|
628 |
+
}
|
629 |
+
|
630 |
+
$port = (int) $port;
|
631 |
+
if (0 > $port || 0xffff < $port) {
|
632 |
+
throw new \InvalidArgumentException(
|
633 |
+
sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
|
634 |
+
);
|
635 |
+
}
|
636 |
+
|
637 |
+
return $port;
|
638 |
+
}
|
639 |
+
|
640 |
+
/**
|
641 |
+
* @param UriInterface $uri
|
642 |
+
* @param array $keys
|
643 |
+
*
|
644 |
+
* @return array
|
645 |
+
*/
|
646 |
+
private static function getFilteredQueryString(UriInterface $uri, array $keys)
|
647 |
+
{
|
648 |
+
$current = $uri->getQuery();
|
649 |
+
|
650 |
+
if ($current === '') {
|
651 |
+
return [];
|
652 |
+
}
|
653 |
+
|
654 |
+
$decodedKeys = array_map('rawurldecode', $keys);
|
655 |
+
|
656 |
+
return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
|
657 |
+
return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
|
658 |
+
});
|
659 |
+
}
|
660 |
+
|
661 |
+
/**
|
662 |
+
* @param string $key
|
663 |
+
* @param string|null $value
|
664 |
+
*
|
665 |
+
* @return string
|
666 |
+
*/
|
667 |
+
private static function generateQueryString($key, $value)
|
668 |
+
{
|
669 |
+
// Query string separators ("=", "&") within the key or value need to be encoded
|
670 |
+
// (while preventing double-encoding) before setting the query string. All other
|
671 |
+
// chars that need percent-encoding will be encoded by withQuery().
|
672 |
+
$queryString = strtr($key, self::$replaceQuery);
|
673 |
+
|
674 |
+
if ($value !== null) {
|
675 |
+
$queryString .= '=' . strtr($value, self::$replaceQuery);
|
676 |
+
}
|
677 |
+
|
678 |
+
return $queryString;
|
679 |
+
}
|
680 |
+
|
681 |
+
private function removeDefaultPort()
|
682 |
+
{
|
683 |
+
if ($this->port !== null && self::isDefaultPort($this)) {
|
684 |
+
$this->port = null;
|
685 |
+
}
|
686 |
+
}
|
687 |
+
|
688 |
+
/**
|
689 |
+
* Filters the path of a URI
|
690 |
+
*
|
691 |
+
* @param string $path
|
692 |
+
*
|
693 |
+
* @return string
|
694 |
+
*
|
695 |
+
* @throws \InvalidArgumentException If the path is invalid.
|
696 |
+
*/
|
697 |
+
private function filterPath($path)
|
698 |
+
{
|
699 |
+
if (!is_string($path)) {
|
700 |
+
throw new \InvalidArgumentException('Path must be a string');
|
701 |
+
}
|
702 |
+
|
703 |
+
return preg_replace_callback(
|
704 |
+
'/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
|
705 |
+
[$this, 'rawurlencodeMatchZero'],
|
706 |
+
$path
|
707 |
+
);
|
708 |
+
}
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Filters the query string or fragment of a URI.
|
712 |
+
*
|
713 |
+
* @param string $str
|
714 |
+
*
|
715 |
+
* @return string
|
716 |
+
*
|
717 |
+
* @throws \InvalidArgumentException If the query or fragment is invalid.
|
718 |
+
*/
|
719 |
+
private function filterQueryAndFragment($str)
|
720 |
+
{
|
721 |
+
if (!is_string($str)) {
|
722 |
+
throw new \InvalidArgumentException('Query and fragment must be a string');
|
723 |
+
}
|
724 |
+
|
725 |
+
return preg_replace_callback(
|
726 |
+
'/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
|
727 |
+
[$this, 'rawurlencodeMatchZero'],
|
728 |
+
$str
|
729 |
+
);
|
730 |
+
}
|
731 |
+
|
732 |
+
private function rawurlencodeMatchZero(array $match)
|
733 |
+
{
|
734 |
+
return rawurlencode($match[0]);
|
735 |
+
}
|
736 |
+
|
737 |
+
private function validateState()
|
738 |
+
{
|
739 |
+
if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) {
|
740 |
+
$this->host = self::HTTP_DEFAULT_HOST;
|
741 |
+
}
|
742 |
+
|
743 |
+
if ($this->getAuthority() === '') {
|
744 |
+
if (0 === strpos($this->path, '//')) {
|
745 |
+
throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"');
|
746 |
+
}
|
747 |
+
if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) {
|
748 |
+
throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon');
|
749 |
+
}
|
750 |
+
} elseif (isset($this->path[0]) && $this->path[0] !== '/') {
|
751 |
+
@trigger_error(
|
752 |
+
'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' .
|
753 |
+
'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
|
754 |
+
E_USER_DEPRECATED
|
755 |
+
);
|
756 |
+
$this->path = '/'. $this->path;
|
757 |
+
//throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
|
758 |
+
}
|
759 |
+
}
|
760 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/UriNormalizer.php
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\UriInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Provides methods to normalize and compare URIs.
|
8 |
+
*
|
9 |
+
* @author Tobias Schultze
|
10 |
+
*
|
11 |
+
* @link https://tools.ietf.org/html/rfc3986#section-6
|
12 |
+
*/
|
13 |
+
final class UriNormalizer
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Default normalizations which only include the ones that preserve semantics.
|
17 |
+
*
|
18 |
+
* self::CAPITALIZE_PERCENT_ENCODING | self::DECODE_UNRESERVED_CHARACTERS | self::CONVERT_EMPTY_PATH |
|
19 |
+
* self::REMOVE_DEFAULT_HOST | self::REMOVE_DEFAULT_PORT | self::REMOVE_DOT_SEGMENTS
|
20 |
+
*/
|
21 |
+
const PRESERVING_NORMALIZATIONS = 63;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized.
|
25 |
+
*
|
26 |
+
* Example: http://example.org/a%c2%b1b → http://example.org/a%C2%B1b
|
27 |
+
*/
|
28 |
+
const CAPITALIZE_PERCENT_ENCODING = 1;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Decodes percent-encoded octets of unreserved characters.
|
32 |
+
*
|
33 |
+
* For consistency, percent-encoded octets in the ranges of ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39),
|
34 |
+
* hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers and,
|
35 |
+
* when found in a URI, should be decoded to their corresponding unreserved characters by URI normalizers.
|
36 |
+
*
|
37 |
+
* Example: http://example.org/%7Eusern%61me/ → http://example.org/~username/
|
38 |
+
*/
|
39 |
+
const DECODE_UNRESERVED_CHARACTERS = 2;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Converts the empty path to "/" for http and https URIs.
|
43 |
+
*
|
44 |
+
* Example: http://example.org → http://example.org/
|
45 |
+
*/
|
46 |
+
const CONVERT_EMPTY_PATH = 4;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Removes the default host of the given URI scheme from the URI.
|
50 |
+
*
|
51 |
+
* Only the "file" scheme defines the default host "localhost".
|
52 |
+
* All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile`
|
53 |
+
* are equivalent according to RFC 3986. The first format is not accepted
|
54 |
+
* by PHPs stream functions and thus already normalized implicitly to the
|
55 |
+
* second format in the Uri class. See `GuzzleHttp\Psr7\Uri::composeComponents`.
|
56 |
+
*
|
57 |
+
* Example: file://localhost/myfile → file:///myfile
|
58 |
+
*/
|
59 |
+
const REMOVE_DEFAULT_HOST = 8;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Removes the default port of the given URI scheme from the URI.
|
63 |
+
*
|
64 |
+
* Example: http://example.org:80/ → http://example.org/
|
65 |
+
*/
|
66 |
+
const REMOVE_DEFAULT_PORT = 16;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Removes unnecessary dot-segments.
|
70 |
+
*
|
71 |
+
* Dot-segments in relative-path references are not removed as it would
|
72 |
+
* change the semantics of the URI reference.
|
73 |
+
*
|
74 |
+
* Example: http://example.org/../a/b/../c/./d.html → http://example.org/a/c/d.html
|
75 |
+
*/
|
76 |
+
const REMOVE_DOT_SEGMENTS = 32;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Paths which include two or more adjacent slashes are converted to one.
|
80 |
+
*
|
81 |
+
* Webservers usually ignore duplicate slashes and treat those URIs equivalent.
|
82 |
+
* But in theory those URIs do not need to be equivalent. So this normalization
|
83 |
+
* may change the semantics. Encoded slashes (%2F) are not removed.
|
84 |
+
*
|
85 |
+
* Example: http://example.org//foo///bar.html → http://example.org/foo/bar.html
|
86 |
+
*/
|
87 |
+
const REMOVE_DUPLICATE_SLASHES = 64;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Sort query parameters with their values in alphabetical order.
|
91 |
+
*
|
92 |
+
* However, the order of parameters in a URI may be significant (this is not defined by the standard).
|
93 |
+
* So this normalization is not safe and may change the semantics of the URI.
|
94 |
+
*
|
95 |
+
* Example: ?lang=en&article=fred → ?article=fred&lang=en
|
96 |
+
*
|
97 |
+
* Note: The sorting is neither locale nor Unicode aware (the URI query does not get decoded at all) as the
|
98 |
+
* purpose is to be able to compare URIs in a reproducible way, not to have the params sorted perfectly.
|
99 |
+
*/
|
100 |
+
const SORT_QUERY_PARAMETERS = 128;
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Returns a normalized URI.
|
104 |
+
*
|
105 |
+
* The scheme and host component are already normalized to lowercase per PSR-7 UriInterface.
|
106 |
+
* This methods adds additional normalizations that can be configured with the $flags parameter.
|
107 |
+
*
|
108 |
+
* PSR-7 UriInterface cannot distinguish between an empty component and a missing component as
|
109 |
+
* getQuery(), getFragment() etc. always return a string. This means the URIs "/?#" and "/" are
|
110 |
+
* treated equivalent which is not necessarily true according to RFC 3986. But that difference
|
111 |
+
* is highly uncommon in reality. So this potential normalization is implied in PSR-7 as well.
|
112 |
+
*
|
113 |
+
* @param UriInterface $uri The URI to normalize
|
114 |
+
* @param int $flags A bitmask of normalizations to apply, see constants
|
115 |
+
*
|
116 |
+
* @return UriInterface The normalized URI
|
117 |
+
* @link https://tools.ietf.org/html/rfc3986#section-6.2
|
118 |
+
*/
|
119 |
+
public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS)
|
120 |
+
{
|
121 |
+
if ($flags & self::CAPITALIZE_PERCENT_ENCODING) {
|
122 |
+
$uri = self::capitalizePercentEncoding($uri);
|
123 |
+
}
|
124 |
+
|
125 |
+
if ($flags & self::DECODE_UNRESERVED_CHARACTERS) {
|
126 |
+
$uri = self::decodeUnreservedCharacters($uri);
|
127 |
+
}
|
128 |
+
|
129 |
+
if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' &&
|
130 |
+
($uri->getScheme() === 'http' || $uri->getScheme() === 'https')
|
131 |
+
) {
|
132 |
+
$uri = $uri->withPath('/');
|
133 |
+
}
|
134 |
+
|
135 |
+
if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') {
|
136 |
+
$uri = $uri->withHost('');
|
137 |
+
}
|
138 |
+
|
139 |
+
if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) {
|
140 |
+
$uri = $uri->withPort(null);
|
141 |
+
}
|
142 |
+
|
143 |
+
if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) {
|
144 |
+
$uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath()));
|
145 |
+
}
|
146 |
+
|
147 |
+
if ($flags & self::REMOVE_DUPLICATE_SLASHES) {
|
148 |
+
$uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath()));
|
149 |
+
}
|
150 |
+
|
151 |
+
if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') {
|
152 |
+
$queryKeyValues = explode('&', $uri->getQuery());
|
153 |
+
sort($queryKeyValues);
|
154 |
+
$uri = $uri->withQuery(implode('&', $queryKeyValues));
|
155 |
+
}
|
156 |
+
|
157 |
+
return $uri;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Whether two URIs can be considered equivalent.
|
162 |
+
*
|
163 |
+
* Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also
|
164 |
+
* accepts relative URI references and returns true when they are equivalent. This of course assumes they will be
|
165 |
+
* resolved against the same base URI. If this is not the case, determination of equivalence or difference of
|
166 |
+
* relative references does not mean anything.
|
167 |
+
*
|
168 |
+
* @param UriInterface $uri1 An URI to compare
|
169 |
+
* @param UriInterface $uri2 An URI to compare
|
170 |
+
* @param int $normalizations A bitmask of normalizations to apply, see constants
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
* @link https://tools.ietf.org/html/rfc3986#section-6.1
|
174 |
+
*/
|
175 |
+
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
|
176 |
+
{
|
177 |
+
return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
|
178 |
+
}
|
179 |
+
|
180 |
+
private static function capitalizePercentEncoding(UriInterface $uri)
|
181 |
+
{
|
182 |
+
$regex = '/(?:%[A-Fa-f0-9]{2})++/';
|
183 |
+
|
184 |
+
$callback = function (array $match) {
|
185 |
+
return strtoupper($match[0]);
|
186 |
+
};
|
187 |
+
|
188 |
+
return
|
189 |
+
$uri->withPath(
|
190 |
+
preg_replace_callback($regex, $callback, $uri->getPath())
|
191 |
+
)->withQuery(
|
192 |
+
preg_replace_callback($regex, $callback, $uri->getQuery())
|
193 |
+
);
|
194 |
+
}
|
195 |
+
|
196 |
+
private static function decodeUnreservedCharacters(UriInterface $uri)
|
197 |
+
{
|
198 |
+
$regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i';
|
199 |
+
|
200 |
+
$callback = function (array $match) {
|
201 |
+
return rawurldecode($match[0]);
|
202 |
+
};
|
203 |
+
|
204 |
+
return
|
205 |
+
$uri->withPath(
|
206 |
+
preg_replace_callback($regex, $callback, $uri->getPath())
|
207 |
+
)->withQuery(
|
208 |
+
preg_replace_callback($regex, $callback, $uri->getQuery())
|
209 |
+
);
|
210 |
+
}
|
211 |
+
|
212 |
+
private function __construct()
|
213 |
+
{
|
214 |
+
// cannot be instantiated
|
215 |
+
}
|
216 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/UriResolver.php
ADDED
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\UriInterface;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Resolves a URI reference in the context of a base URI and the opposite way.
|
8 |
+
*
|
9 |
+
* @author Tobias Schultze
|
10 |
+
*
|
11 |
+
* @link https://tools.ietf.org/html/rfc3986#section-5
|
12 |
+
*/
|
13 |
+
final class UriResolver
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Removes dot segments from a path and returns the new path.
|
17 |
+
*
|
18 |
+
* @param string $path
|
19 |
+
*
|
20 |
+
* @return string
|
21 |
+
* @link http://tools.ietf.org/html/rfc3986#section-5.2.4
|
22 |
+
*/
|
23 |
+
public static function removeDotSegments($path)
|
24 |
+
{
|
25 |
+
if ($path === '' || $path === '/') {
|
26 |
+
return $path;
|
27 |
+
}
|
28 |
+
|
29 |
+
$results = [];
|
30 |
+
$segments = explode('/', $path);
|
31 |
+
foreach ($segments as $segment) {
|
32 |
+
if ($segment === '..') {
|
33 |
+
array_pop($results);
|
34 |
+
} elseif ($segment !== '.') {
|
35 |
+
$results[] = $segment;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
$newPath = implode('/', $results);
|
40 |
+
|
41 |
+
if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) {
|
42 |
+
// Re-add the leading slash if necessary for cases like "/.."
|
43 |
+
$newPath = '/' . $newPath;
|
44 |
+
} elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) {
|
45 |
+
// Add the trailing slash if necessary
|
46 |
+
// If newPath is not empty, then $segment must be set and is the last segment from the foreach
|
47 |
+
$newPath .= '/';
|
48 |
+
}
|
49 |
+
|
50 |
+
return $newPath;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Converts the relative URI into a new URI that is resolved against the base URI.
|
55 |
+
*
|
56 |
+
* @param UriInterface $base Base URI
|
57 |
+
* @param UriInterface $rel Relative URI
|
58 |
+
*
|
59 |
+
* @return UriInterface
|
60 |
+
* @link http://tools.ietf.org/html/rfc3986#section-5.2
|
61 |
+
*/
|
62 |
+
public static function resolve(UriInterface $base, UriInterface $rel)
|
63 |
+
{
|
64 |
+
if ((string) $rel === '') {
|
65 |
+
// we can simply return the same base URI instance for this same-document reference
|
66 |
+
return $base;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ($rel->getScheme() != '') {
|
70 |
+
return $rel->withPath(self::removeDotSegments($rel->getPath()));
|
71 |
+
}
|
72 |
+
|
73 |
+
if ($rel->getAuthority() != '') {
|
74 |
+
$targetAuthority = $rel->getAuthority();
|
75 |
+
$targetPath = self::removeDotSegments($rel->getPath());
|
76 |
+
$targetQuery = $rel->getQuery();
|
77 |
+
} else {
|
78 |
+
$targetAuthority = $base->getAuthority();
|
79 |
+
if ($rel->getPath() === '') {
|
80 |
+
$targetPath = $base->getPath();
|
81 |
+
$targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery();
|
82 |
+
} else {
|
83 |
+
if ($rel->getPath()[0] === '/') {
|
84 |
+
$targetPath = $rel->getPath();
|
85 |
+
} else {
|
86 |
+
if ($targetAuthority != '' && $base->getPath() === '') {
|
87 |
+
$targetPath = '/' . $rel->getPath();
|
88 |
+
} else {
|
89 |
+
$lastSlashPos = strrpos($base->getPath(), '/');
|
90 |
+
if ($lastSlashPos === false) {
|
91 |
+
$targetPath = $rel->getPath();
|
92 |
+
} else {
|
93 |
+
$targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath();
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
$targetPath = self::removeDotSegments($targetPath);
|
98 |
+
$targetQuery = $rel->getQuery();
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return new Uri(Uri::composeComponents(
|
103 |
+
$base->getScheme(),
|
104 |
+
$targetAuthority,
|
105 |
+
$targetPath,
|
106 |
+
$targetQuery,
|
107 |
+
$rel->getFragment()
|
108 |
+
));
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Returns the target URI as a relative reference from the base URI.
|
113 |
+
*
|
114 |
+
* This method is the counterpart to resolve():
|
115 |
+
*
|
116 |
+
* (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target))
|
117 |
+
*
|
118 |
+
* One use-case is to use the current request URI as base URI and then generate relative links in your documents
|
119 |
+
* to reduce the document size or offer self-contained downloadable document archives.
|
120 |
+
*
|
121 |
+
* $base = new Uri('http://example.com/a/b/');
|
122 |
+
* echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'.
|
123 |
+
* echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'.
|
124 |
+
* echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'.
|
125 |
+
* echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'.
|
126 |
+
*
|
127 |
+
* This method also accepts a target that is already relative and will try to relativize it further. Only a
|
128 |
+
* relative-path reference will be returned as-is.
|
129 |
+
*
|
130 |
+
* echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well
|
131 |
+
*
|
132 |
+
* @param UriInterface $base Base URI
|
133 |
+
* @param UriInterface $target Target URI
|
134 |
+
*
|
135 |
+
* @return UriInterface The relative URI reference
|
136 |
+
*/
|
137 |
+
public static function relativize(UriInterface $base, UriInterface $target)
|
138 |
+
{
|
139 |
+
if ($target->getScheme() !== '' &&
|
140 |
+
($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
|
141 |
+
) {
|
142 |
+
return $target;
|
143 |
+
}
|
144 |
+
|
145 |
+
if (Uri::isRelativePathReference($target)) {
|
146 |
+
// As the target is already highly relative we return it as-is. It would be possible to resolve
|
147 |
+
// the target with `$target = self::resolve($base, $target);` and then try make it more relative
|
148 |
+
// by removing a duplicate query. But let's not do that automatically.
|
149 |
+
return $target;
|
150 |
+
}
|
151 |
+
|
152 |
+
if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) {
|
153 |
+
return $target->withScheme('');
|
154 |
+
}
|
155 |
+
|
156 |
+
// We must remove the path before removing the authority because if the path starts with two slashes, the URI
|
157 |
+
// would turn invalid. And we also cannot set a relative path before removing the authority, as that is also
|
158 |
+
// invalid.
|
159 |
+
$emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost('');
|
160 |
+
|
161 |
+
if ($base->getPath() !== $target->getPath()) {
|
162 |
+
return $emptyPathUri->withPath(self::getRelativePath($base, $target));
|
163 |
+
}
|
164 |
+
|
165 |
+
if ($base->getQuery() === $target->getQuery()) {
|
166 |
+
// Only the target fragment is left. And it must be returned even if base and target fragment are the same.
|
167 |
+
return $emptyPathUri->withQuery('');
|
168 |
+
}
|
169 |
+
|
170 |
+
// If the base URI has a query but the target has none, we cannot return an empty path reference as it would
|
171 |
+
// inherit the base query component when resolving.
|
172 |
+
if ($target->getQuery() === '') {
|
173 |
+
$segments = explode('/', $target->getPath());
|
174 |
+
$lastSegment = end($segments);
|
175 |
+
|
176 |
+
return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment);
|
177 |
+
}
|
178 |
+
|
179 |
+
return $emptyPathUri;
|
180 |
+
}
|
181 |
+
|
182 |
+
private static function getRelativePath(UriInterface $base, UriInterface $target)
|
183 |
+
{
|
184 |
+
$sourceSegments = explode('/', $base->getPath());
|
185 |
+
$targetSegments = explode('/', $target->getPath());
|
186 |
+
array_pop($sourceSegments);
|
187 |
+
$targetLastSegment = array_pop($targetSegments);
|
188 |
+
foreach ($sourceSegments as $i => $segment) {
|
189 |
+
if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) {
|
190 |
+
unset($sourceSegments[$i], $targetSegments[$i]);
|
191 |
+
} else {
|
192 |
+
break;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
$targetSegments[] = $targetLastSegment;
|
196 |
+
$relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments);
|
197 |
+
|
198 |
+
// A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
|
199 |
+
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
|
200 |
+
// as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
|
201 |
+
if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) {
|
202 |
+
$relativePath = "./$relativePath";
|
203 |
+
} elseif ('/' === $relativePath[0]) {
|
204 |
+
if ($base->getAuthority() != '' && $base->getPath() === '') {
|
205 |
+
// In this case an extra slash is added by resolve() automatically. So we must not add one here.
|
206 |
+
$relativePath = ".$relativePath";
|
207 |
+
} else {
|
208 |
+
$relativePath = "./$relativePath";
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
return $relativePath;
|
213 |
+
}
|
214 |
+
|
215 |
+
private function __construct()
|
216 |
+
{
|
217 |
+
// cannot be instantiated
|
218 |
+
}
|
219 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/functions.php
ADDED
@@ -0,0 +1,899 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace GuzzleHttp\Psr7;
|
3 |
+
|
4 |
+
use Psr\Http\Message\MessageInterface;
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\ResponseInterface;
|
7 |
+
use Psr\Http\Message\ServerRequestInterface;
|
8 |
+
use Psr\Http\Message\StreamInterface;
|
9 |
+
use Psr\Http\Message\UriInterface;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Returns the string representation of an HTTP message.
|
13 |
+
*
|
14 |
+
* @param MessageInterface $message Message to convert to a string.
|
15 |
+
*
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
function str(MessageInterface $message)
|
19 |
+
{
|
20 |
+
if ($message instanceof RequestInterface) {
|
21 |
+
$msg = trim($message->getMethod() . ' '
|
22 |
+
. $message->getRequestTarget())
|
23 |
+
. ' HTTP/' . $message->getProtocolVersion();
|
24 |
+
if (!$message->hasHeader('host')) {
|
25 |
+
$msg .= "\r\nHost: " . $message->getUri()->getHost();
|
26 |
+
}
|
27 |
+
} elseif ($message instanceof ResponseInterface) {
|
28 |
+
$msg = 'HTTP/' . $message->getProtocolVersion() . ' '
|
29 |
+
. $message->getStatusCode() . ' '
|
30 |
+
. $message->getReasonPhrase();
|
31 |
+
} else {
|
32 |
+
throw new \InvalidArgumentException('Unknown message type');
|
33 |
+
}
|
34 |
+
|
35 |
+
foreach ($message->getHeaders() as $name => $values) {
|
36 |
+
$msg .= "\r\n{$name}: " . implode(', ', $values);
|
37 |
+
}
|
38 |
+
|
39 |
+
return "{$msg}\r\n\r\n" . $message->getBody();
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Returns a UriInterface for the given value.
|
44 |
+
*
|
45 |
+
* This function accepts a string or {@see Psr\Http\Message\UriInterface} and
|
46 |
+
* returns a UriInterface for the given value. If the value is already a
|
47 |
+
* `UriInterface`, it is returned as-is.
|
48 |
+
*
|
49 |
+
* @param string|UriInterface $uri
|
50 |
+
*
|
51 |
+
* @return UriInterface
|
52 |
+
* @throws \InvalidArgumentException
|
53 |
+
*/
|
54 |
+
function uri_for($uri)
|
55 |
+
{
|
56 |
+
if ($uri instanceof UriInterface) {
|
57 |
+
return $uri;
|
58 |
+
} elseif (is_string($uri)) {
|
59 |
+
return new Uri($uri);
|
60 |
+
}
|
61 |
+
|
62 |
+
throw new \InvalidArgumentException('URI must be a string or UriInterface');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Create a new stream based on the input type.
|
67 |
+
*
|
68 |
+
* Options is an associative array that can contain the following keys:
|
69 |
+
* - metadata: Array of custom metadata.
|
70 |
+
* - size: Size of the stream.
|
71 |
+
*
|
72 |
+
* @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
|
73 |
+
* @param array $options Additional options
|
74 |
+
*
|
75 |
+
* @return StreamInterface
|
76 |
+
* @throws \InvalidArgumentException if the $resource arg is not valid.
|
77 |
+
*/
|
78 |
+
function stream_for($resource = '', array $options = [])
|
79 |
+
{
|
80 |
+
if (is_scalar($resource)) {
|
81 |
+
$stream = fopen('php://temp', 'r+');
|
82 |
+
if ($resource !== '') {
|
83 |
+
fwrite($stream, $resource);
|
84 |
+
fseek($stream, 0);
|
85 |
+
}
|
86 |
+
return new Stream($stream, $options);
|
87 |
+
}
|
88 |
+
|
89 |
+
switch (gettype($resource)) {
|
90 |
+
case 'resource':
|
91 |
+
return new Stream($resource, $options);
|
92 |
+
case 'object':
|
93 |
+
if ($resource instanceof StreamInterface) {
|
94 |
+
return $resource;
|
95 |
+
} elseif ($resource instanceof \Iterator) {
|
96 |
+
return new PumpStream(function () use ($resource) {
|
97 |
+
if (!$resource->valid()) {
|
98 |
+
return false;
|
99 |
+
}
|
100 |
+
$result = $resource->current();
|
101 |
+
$resource->next();
|
102 |
+
return $result;
|
103 |
+
}, $options);
|
104 |
+
} elseif (method_exists($resource, '__toString')) {
|
105 |
+
return stream_for((string) $resource, $options);
|
106 |
+
}
|
107 |
+
break;
|
108 |
+
case 'NULL':
|
109 |
+
return new Stream(fopen('php://temp', 'r+'), $options);
|
110 |
+
}
|
111 |
+
|
112 |
+
if (is_callable($resource)) {
|
113 |
+
return new PumpStream($resource, $options);
|
114 |
+
}
|
115 |
+
|
116 |
+
throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Parse an array of header values containing ";" separated data into an
|
121 |
+
* array of associative arrays representing the header key value pair
|
122 |
+
* data of the header. When a parameter does not contain a value, but just
|
123 |
+
* contains a key, this function will inject a key with a '' string value.
|
124 |
+
*
|
125 |
+
* @param string|array $header Header to parse into components.
|
126 |
+
*
|
127 |
+
* @return array Returns the parsed header values.
|
128 |
+
*/
|
129 |
+
function parse_header($header)
|
130 |
+
{
|
131 |
+
static $trimmed = "\"' \n\t\r";
|
132 |
+
$params = $matches = [];
|
133 |
+
|
134 |
+
foreach (normalize_header($header) as $val) {
|
135 |
+
$part = [];
|
136 |
+
foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
|
137 |
+
if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
|
138 |
+
$m = $matches[0];
|
139 |
+
if (isset($m[1])) {
|
140 |
+
$part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
|
141 |
+
} else {
|
142 |
+
$part[] = trim($m[0], $trimmed);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
if ($part) {
|
147 |
+
$params[] = $part;
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
return $params;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Converts an array of header values that may contain comma separated
|
156 |
+
* headers into an array of headers with no comma separated values.
|
157 |
+
*
|
158 |
+
* @param string|array $header Header to normalize.
|
159 |
+
*
|
160 |
+
* @return array Returns the normalized header field values.
|
161 |
+
*/
|
162 |
+
function normalize_header($header)
|
163 |
+
{
|
164 |
+
if (!is_array($header)) {
|
165 |
+
return array_map('trim', explode(',', $header));
|
166 |
+
}
|
167 |
+
|
168 |
+
$result = [];
|
169 |
+
foreach ($header as $value) {
|
170 |
+
foreach ((array) $value as $v) {
|
171 |
+
if (strpos($v, ',') === false) {
|
172 |
+
$result[] = $v;
|
173 |
+
continue;
|
174 |
+
}
|
175 |
+
foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
|
176 |
+
$result[] = trim($vv);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
return $result;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Clone and modify a request with the given changes.
|
186 |
+
*
|
187 |
+
* The changes can be one of:
|
188 |
+
* - method: (string) Changes the HTTP method.
|
189 |
+
* - set_headers: (array) Sets the given headers.
|
190 |
+
* - remove_headers: (array) Remove the given headers.
|
191 |
+
* - body: (mixed) Sets the given body.
|
192 |
+
* - uri: (UriInterface) Set the URI.
|
193 |
+
* - query: (string) Set the query string value of the URI.
|
194 |
+
* - version: (string) Set the protocol version.
|
195 |
+
*
|
196 |
+
* @param RequestInterface $request Request to clone and modify.
|
197 |
+
* @param array $changes Changes to apply.
|
198 |
+
*
|
199 |
+
* @return RequestInterface
|
200 |
+
*/
|
201 |
+
function modify_request(RequestInterface $request, array $changes)
|
202 |
+
{
|
203 |
+
if (!$changes) {
|
204 |
+
return $request;
|
205 |
+
}
|
206 |
+
|
207 |
+
$headers = $request->getHeaders();
|
208 |
+
|
209 |
+
if (!isset($changes['uri'])) {
|
210 |
+
$uri = $request->getUri();
|
211 |
+
} else {
|
212 |
+
// Remove the host header if one is on the URI
|
213 |
+
if ($host = $changes['uri']->getHost()) {
|
214 |
+
$changes['set_headers']['Host'] = $host;
|
215 |
+
|
216 |
+
if ($port = $changes['uri']->getPort()) {
|
217 |
+
$standardPorts = ['http' => 80, 'https' => 443];
|
218 |
+
$scheme = $changes['uri']->getScheme();
|
219 |
+
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
|
220 |
+
$changes['set_headers']['Host'] .= ':'.$port;
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
$uri = $changes['uri'];
|
225 |
+
}
|
226 |
+
|
227 |
+
if (!empty($changes['remove_headers'])) {
|
228 |
+
$headers = _caseless_remove($changes['remove_headers'], $headers);
|
229 |
+
}
|
230 |
+
|
231 |
+
if (!empty($changes['set_headers'])) {
|
232 |
+
$headers = _caseless_remove(array_keys($changes['set_headers']), $headers);
|
233 |
+
$headers = $changes['set_headers'] + $headers;
|
234 |
+
}
|
235 |
+
|
236 |
+
if (isset($changes['query'])) {
|
237 |
+
$uri = $uri->withQuery($changes['query']);
|
238 |
+
}
|
239 |
+
|
240 |
+
if ($request instanceof ServerRequestInterface) {
|
241 |
+
return (new ServerRequest(
|
242 |
+
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
243 |
+
$uri,
|
244 |
+
$headers,
|
245 |
+
isset($changes['body']) ? $changes['body'] : $request->getBody(),
|
246 |
+
isset($changes['version'])
|
247 |
+
? $changes['version']
|
248 |
+
: $request->getProtocolVersion(),
|
249 |
+
$request->getServerParams()
|
250 |
+
))
|
251 |
+
->withParsedBody($request->getParsedBody())
|
252 |
+
->withQueryParams($request->getQueryParams())
|
253 |
+
->withCookieParams($request->getCookieParams())
|
254 |
+
->withUploadedFiles($request->getUploadedFiles());
|
255 |
+
}
|
256 |
+
|
257 |
+
return new Request(
|
258 |
+
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
259 |
+
$uri,
|
260 |
+
$headers,
|
261 |
+
isset($changes['body']) ? $changes['body'] : $request->getBody(),
|
262 |
+
isset($changes['version'])
|
263 |
+
? $changes['version']
|
264 |
+
: $request->getProtocolVersion()
|
265 |
+
);
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Attempts to rewind a message body and throws an exception on failure.
|
270 |
+
*
|
271 |
+
* The body of the message will only be rewound if a call to `tell()` returns a
|
272 |
+
* value other than `0`.
|
273 |
+
*
|
274 |
+
* @param MessageInterface $message Message to rewind
|
275 |
+
*
|
276 |
+
* @throws \RuntimeException
|
277 |
+
*/
|
278 |
+
function rewind_body(MessageInterface $message)
|
279 |
+
{
|
280 |
+
$body = $message->getBody();
|
281 |
+
|
282 |
+
if ($body->tell()) {
|
283 |
+
$body->rewind();
|
284 |
+
}
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Safely opens a PHP stream resource using a filename.
|
289 |
+
*
|
290 |
+
* When fopen fails, PHP normally raises a warning. This function adds an
|
291 |
+
* error handler that checks for errors and throws an exception instead.
|
292 |
+
*
|
293 |
+
* @param string $filename File to open
|
294 |
+
* @param string $mode Mode used to open the file
|
295 |
+
*
|
296 |
+
* @return resource
|
297 |
+
* @throws \RuntimeException if the file cannot be opened
|
298 |
+
*/
|
299 |
+
function try_fopen($filename, $mode)
|
300 |
+
{
|
301 |
+
$ex = null;
|
302 |
+
set_error_handler(function () use ($filename, $mode, &$ex) {
|
303 |
+
$ex = new \RuntimeException(sprintf(
|
304 |
+
'Unable to open %s using mode %s: %s',
|
305 |
+
$filename,
|
306 |
+
$mode,
|
307 |
+
func_get_args()[1]
|
308 |
+
));
|
309 |
+
});
|
310 |
+
|
311 |
+
$handle = fopen($filename, $mode);
|
312 |
+
restore_error_handler();
|
313 |
+
|
314 |
+
if ($ex) {
|
315 |
+
/** @var $ex \RuntimeException */
|
316 |
+
throw $ex;
|
317 |
+
}
|
318 |
+
|
319 |
+
return $handle;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Copy the contents of a stream into a string until the given number of
|
324 |
+
* bytes have been read.
|
325 |
+
*
|
326 |
+
* @param StreamInterface $stream Stream to read
|
327 |
+
* @param int $maxLen Maximum number of bytes to read. Pass -1
|
328 |
+
* to read the entire stream.
|
329 |
+
* @return string
|
330 |
+
* @throws \RuntimeException on error.
|
331 |
+
*/
|
332 |
+
function copy_to_string(StreamInterface $stream, $maxLen = -1)
|
333 |
+
{
|
334 |
+
$buffer = '';
|
335 |
+
|
336 |
+
if ($maxLen === -1) {
|
337 |
+
while (!$stream->eof()) {
|
338 |
+
$buf = $stream->read(1048576);
|
339 |
+
// Using a loose equality here to match on '' and false.
|
340 |
+
if ($buf == null) {
|
341 |
+
break;
|
342 |
+
}
|
343 |
+
$buffer .= $buf;
|
344 |
+
}
|
345 |
+
return $buffer;
|
346 |
+
}
|
347 |
+
|
348 |
+
$len = 0;
|
349 |
+
while (!$stream->eof() && $len < $maxLen) {
|
350 |
+
$buf = $stream->read($maxLen - $len);
|
351 |
+
// Using a loose equality here to match on '' and false.
|
352 |
+
if ($buf == null) {
|
353 |
+
break;
|
354 |
+
}
|
355 |
+
$buffer .= $buf;
|
356 |
+
$len = strlen($buffer);
|
357 |
+
}
|
358 |
+
|
359 |
+
return $buffer;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Copy the contents of a stream into another stream until the given number
|
364 |
+
* of bytes have been read.
|
365 |
+
*
|
366 |
+
* @param StreamInterface $source Stream to read from
|
367 |
+
* @param StreamInterface $dest Stream to write to
|
368 |
+
* @param int $maxLen Maximum number of bytes to read. Pass -1
|
369 |
+
* to read the entire stream.
|
370 |
+
*
|
371 |
+
* @throws \RuntimeException on error.
|
372 |
+
*/
|
373 |
+
function copy_to_stream(
|
374 |
+
StreamInterface $source,
|
375 |
+
StreamInterface $dest,
|
376 |
+
$maxLen = -1
|
377 |
+
) {
|
378 |
+
$bufferSize = 8192;
|
379 |
+
|
380 |
+
if ($maxLen === -1) {
|
381 |
+
while (!$source->eof()) {
|
382 |
+
if (!$dest->write($source->read($bufferSize))) {
|
383 |
+
break;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
} else {
|
387 |
+
$remaining = $maxLen;
|
388 |
+
while ($remaining > 0 && !$source->eof()) {
|
389 |
+
$buf = $source->read(min($bufferSize, $remaining));
|
390 |
+
$len = strlen($buf);
|
391 |
+
if (!$len) {
|
392 |
+
break;
|
393 |
+
}
|
394 |
+
$remaining -= $len;
|
395 |
+
$dest->write($buf);
|
396 |
+
}
|
397 |
+
}
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Calculate a hash of a Stream
|
402 |
+
*
|
403 |
+
* @param StreamInterface $stream Stream to calculate the hash for
|
404 |
+
* @param string $algo Hash algorithm (e.g. md5, crc32, etc)
|
405 |
+
* @param bool $rawOutput Whether or not to use raw output
|
406 |
+
*
|
407 |
+
* @return string Returns the hash of the stream
|
408 |
+
* @throws \RuntimeException on error.
|
409 |
+
*/
|
410 |
+
function hash(
|
411 |
+
StreamInterface $stream,
|
412 |
+
$algo,
|
413 |
+
$rawOutput = false
|
414 |
+
) {
|
415 |
+
$pos = $stream->tell();
|
416 |
+
|
417 |
+
if ($pos > 0) {
|
418 |
+
$stream->rewind();
|
419 |
+
}
|
420 |
+
|
421 |
+
$ctx = hash_init($algo);
|
422 |
+
while (!$stream->eof()) {
|
423 |
+
hash_update($ctx, $stream->read(1048576));
|
424 |
+
}
|
425 |
+
|
426 |
+
$out = hash_final($ctx, (bool) $rawOutput);
|
427 |
+
$stream->seek($pos);
|
428 |
+
|
429 |
+
return $out;
|
430 |
+
}
|
431 |
+
|
432 |
+
/**
|
433 |
+
* Read a line from the stream up to the maximum allowed buffer length
|
434 |
+
*
|
435 |
+
* @param StreamInterface $stream Stream to read from
|
436 |
+
* @param int $maxLength Maximum buffer length
|
437 |
+
*
|
438 |
+
* @return string
|
439 |
+
*/
|
440 |
+
function readline(StreamInterface $stream, $maxLength = null)
|
441 |
+
{
|
442 |
+
$buffer = '';
|
443 |
+
$size = 0;
|
444 |
+
|
445 |
+
while (!$stream->eof()) {
|
446 |
+
// Using a loose equality here to match on '' and false.
|
447 |
+
if (null == ($byte = $stream->read(1))) {
|
448 |
+
return $buffer;
|
449 |
+
}
|
450 |
+
$buffer .= $byte;
|
451 |
+
// Break when a new line is found or the max length - 1 is reached
|
452 |
+
if ($byte === "\n" || ++$size === $maxLength - 1) {
|
453 |
+
break;
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
+
return $buffer;
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Parses a request message string into a request object.
|
462 |
+
*
|
463 |
+
* @param string $message Request message string.
|
464 |
+
*
|
465 |
+
* @return Request
|
466 |
+
*/
|
467 |
+
function parse_request($message)
|
468 |
+
{
|
469 |
+
$data = _parse_message($message);
|
470 |
+
$matches = [];
|
471 |
+
if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
|
472 |
+
throw new \InvalidArgumentException('Invalid request string');
|
473 |
+
}
|
474 |
+
$parts = explode(' ', $data['start-line'], 3);
|
475 |
+
$version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
|
476 |
+
|
477 |
+
$request = new Request(
|
478 |
+
$parts[0],
|
479 |
+
$matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1],
|
480 |
+
$data['headers'],
|
481 |
+
$data['body'],
|
482 |
+
$version
|
483 |
+
);
|
484 |
+
|
485 |
+
return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* Parses a response message string into a response object.
|
490 |
+
*
|
491 |
+
* @param string $message Response message string.
|
492 |
+
*
|
493 |
+
* @return Response
|
494 |
+
*/
|
495 |
+
function parse_response($message)
|
496 |
+
{
|
497 |
+
$data = _parse_message($message);
|
498 |
+
// According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
|
499 |
+
// between status-code and reason-phrase is required. But browsers accept
|
500 |
+
// responses without space and reason as well.
|
501 |
+
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
|
502 |
+
throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
|
503 |
+
}
|
504 |
+
$parts = explode(' ', $data['start-line'], 3);
|
505 |
+
|
506 |
+
return new Response(
|
507 |
+
$parts[1],
|
508 |
+
$data['headers'],
|
509 |
+
$data['body'],
|
510 |
+
explode('/', $parts[0])[1],
|
511 |
+
isset($parts[2]) ? $parts[2] : null
|
512 |
+
);
|
513 |
+
}
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Parse a query string into an associative array.
|
517 |
+
*
|
518 |
+
* If multiple values are found for the same key, the value of that key
|
519 |
+
* value pair will become an array. This function does not parse nested
|
520 |
+
* PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
|
521 |
+
* be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
|
522 |
+
*
|
523 |
+
* @param string $str Query string to parse
|
524 |
+
* @param int|bool $urlEncoding How the query string is encoded
|
525 |
+
*
|
526 |
+
* @return array
|
527 |
+
*/
|
528 |
+
function parse_query($str, $urlEncoding = true)
|
529 |
+
{
|
530 |
+
$result = [];
|
531 |
+
|
532 |
+
if ($str === '') {
|
533 |
+
return $result;
|
534 |
+
}
|
535 |
+
|
536 |
+
if ($urlEncoding === true) {
|
537 |
+
$decoder = function ($value) {
|
538 |
+
return rawurldecode(str_replace('+', ' ', $value));
|
539 |
+
};
|
540 |
+
} elseif ($urlEncoding === PHP_QUERY_RFC3986) {
|
541 |
+
$decoder = 'rawurldecode';
|
542 |
+
} elseif ($urlEncoding === PHP_QUERY_RFC1738) {
|
543 |
+
$decoder = 'urldecode';
|
544 |
+
} else {
|
545 |
+
$decoder = function ($str) { return $str; };
|
546 |
+
}
|
547 |
+
|
548 |
+
foreach (explode('&', $str) as $kvp) {
|
549 |
+
$parts = explode('=', $kvp, 2);
|
550 |
+
$key = $decoder($parts[0]);
|
551 |
+
$value = isset($parts[1]) ? $decoder($parts[1]) : null;
|
552 |
+
if (!isset($result[$key])) {
|
553 |
+
$result[$key] = $value;
|
554 |
+
} else {
|
555 |
+
if (!is_array($result[$key])) {
|
556 |
+
$result[$key] = [$result[$key]];
|
557 |
+
}
|
558 |
+
$result[$key][] = $value;
|
559 |
+
}
|
560 |
+
}
|
561 |
+
|
562 |
+
return $result;
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* Build a query string from an array of key value pairs.
|
567 |
+
*
|
568 |
+
* This function can use the return value of parse_query() to build a query
|
569 |
+
* string. This function does not modify the provided keys when an array is
|
570 |
+
* encountered (like http_build_query would).
|
571 |
+
*
|
572 |
+
* @param array $params Query string parameters.
|
573 |
+
* @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
|
574 |
+
* to encode using RFC3986, or PHP_QUERY_RFC1738
|
575 |
+
* to encode using RFC1738.
|
576 |
+
* @return string
|
577 |
+
*/
|
578 |
+
function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
|
579 |
+
{
|
580 |
+
if (!$params) {
|
581 |
+
return '';
|
582 |
+
}
|
583 |
+
|
584 |
+
if ($encoding === false) {
|
585 |
+
$encoder = function ($str) { return $str; };
|
586 |
+
} elseif ($encoding === PHP_QUERY_RFC3986) {
|
587 |
+
$encoder = 'rawurlencode';
|
588 |
+
} elseif ($encoding === PHP_QUERY_RFC1738) {
|
589 |
+
$encoder = 'urlencode';
|
590 |
+
} else {
|
591 |
+
throw new \InvalidArgumentException('Invalid type');
|
592 |
+
}
|
593 |
+
|
594 |
+
$qs = '';
|
595 |
+
foreach ($params as $k => $v) {
|
596 |
+
$k = $encoder($k);
|
597 |
+
if (!is_array($v)) {
|
598 |
+
$qs .= $k;
|
599 |
+
if ($v !== null) {
|
600 |
+
$qs .= '=' . $encoder($v);
|
601 |
+
}
|
602 |
+
$qs .= '&';
|
603 |
+
} else {
|
604 |
+
foreach ($v as $vv) {
|
605 |
+
$qs .= $k;
|
606 |
+
if ($vv !== null) {
|
607 |
+
$qs .= '=' . $encoder($vv);
|
608 |
+
}
|
609 |
+
$qs .= '&';
|
610 |
+
}
|
611 |
+
}
|
612 |
+
}
|
613 |
+
|
614 |
+
return $qs ? (string) substr($qs, 0, -1) : '';
|
615 |
+
}
|
616 |
+
|
617 |
+
/**
|
618 |
+
* Determines the mimetype of a file by looking at its extension.
|
619 |
+
*
|
620 |
+
* @param $filename
|
621 |
+
*
|
622 |
+
* @return null|string
|
623 |
+
*/
|
624 |
+
function mimetype_from_filename($filename)
|
625 |
+
{
|
626 |
+
return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
|
627 |
+
}
|
628 |
+
|
629 |
+
/**
|
630 |
+
* Maps a file extensions to a mimetype.
|
631 |
+
*
|
632 |
+
* @param $extension string The file extension.
|
633 |
+
*
|
634 |
+
* @return string|null
|
635 |
+
* @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
|
636 |
+
*/
|
637 |
+
function mimetype_from_extension($extension)
|
638 |
+
{
|
639 |
+
static $mimetypes = [
|
640 |
+
'3gp' => 'video/3gpp',
|
641 |
+
'7z' => 'application/x-7z-compressed',
|
642 |
+
'aac' => 'audio/x-aac',
|
643 |
+
'ai' => 'application/postscript',
|
644 |
+
'aif' => 'audio/x-aiff',
|
645 |
+
'asc' => 'text/plain',
|
646 |
+
'asf' => 'video/x-ms-asf',
|
647 |
+
'atom' => 'application/atom+xml',
|
648 |
+
'avi' => 'video/x-msvideo',
|
649 |
+
'bmp' => 'image/bmp',
|
650 |
+
'bz2' => 'application/x-bzip2',
|
651 |
+
'cer' => 'application/pkix-cert',
|
652 |
+
'crl' => 'application/pkix-crl',
|
653 |
+
'crt' => 'application/x-x509-ca-cert',
|
654 |
+
'css' => 'text/css',
|
655 |
+
'csv' => 'text/csv',
|
656 |
+
'cu' => 'application/cu-seeme',
|
657 |
+
'deb' => 'application/x-debian-package',
|
658 |
+
'doc' => 'application/msword',
|
659 |
+
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
660 |
+
'dvi' => 'application/x-dvi',
|
661 |
+
'eot' => 'application/vnd.ms-fontobject',
|
662 |
+
'eps' => 'application/postscript',
|
663 |
+
'epub' => 'application/epub+zip',
|
664 |
+
'etx' => 'text/x-setext',
|
665 |
+
'flac' => 'audio/flac',
|
666 |
+
'flv' => 'video/x-flv',
|
667 |
+
'gif' => 'image/gif',
|
668 |
+
'gz' => 'application/gzip',
|
669 |
+
'htm' => 'text/html',
|
670 |
+
'html' => 'text/html',
|
671 |
+
'ico' => 'image/x-icon',
|
672 |
+
'ics' => 'text/calendar',
|
673 |
+
'ini' => 'text/plain',
|
674 |
+
'iso' => 'application/x-iso9660-image',
|
675 |
+
'jar' => 'application/java-archive',
|
676 |
+
'jpe' => 'image/jpeg',
|
677 |
+
'jpeg' => 'image/jpeg',
|
678 |
+
'jpg' => 'image/jpeg',
|
679 |
+
'js' => 'text/javascript',
|
680 |
+
'json' => 'application/json',
|
681 |
+
'latex' => 'application/x-latex',
|
682 |
+
'log' => 'text/plain',
|
683 |
+
'm4a' => 'audio/mp4',
|
684 |
+
'm4v' => 'video/mp4',
|
685 |
+
'mid' => 'audio/midi',
|
686 |
+
'midi' => 'audio/midi',
|
687 |
+
'mov' => 'video/quicktime',
|
688 |
+
'mkv' => 'video/x-matroska',
|
689 |
+
'mp3' => 'audio/mpeg',
|
690 |
+
'mp4' => 'video/mp4',
|
691 |
+
'mp4a' => 'audio/mp4',
|
692 |
+
'mp4v' => 'video/mp4',
|
693 |
+
'mpe' => 'video/mpeg',
|
694 |
+
'mpeg' => 'video/mpeg',
|
695 |
+
'mpg' => 'video/mpeg',
|
696 |
+
'mpg4' => 'video/mp4',
|
697 |
+
'oga' => 'audio/ogg',
|
698 |
+
'ogg' => 'audio/ogg',
|
699 |
+
'ogv' => 'video/ogg',
|
700 |
+
'ogx' => 'application/ogg',
|
701 |
+
'pbm' => 'image/x-portable-bitmap',
|
702 |
+
'pdf' => 'application/pdf',
|
703 |
+
'pgm' => 'image/x-portable-graymap',
|
704 |
+
'png' => 'image/png',
|
705 |
+
'pnm' => 'image/x-portable-anymap',
|
706 |
+
'ppm' => 'image/x-portable-pixmap',
|
707 |
+
'ppt' => 'application/vnd.ms-powerpoint',
|
708 |
+
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
709 |
+
'ps' => 'application/postscript',
|
710 |
+
'qt' => 'video/quicktime',
|
711 |
+
'rar' => 'application/x-rar-compressed',
|
712 |
+
'ras' => 'image/x-cmu-raster',
|
713 |
+
'rss' => 'application/rss+xml',
|
714 |
+
'rtf' => 'application/rtf',
|
715 |
+
'sgm' => 'text/sgml',
|
716 |
+
'sgml' => 'text/sgml',
|
717 |
+
'svg' => 'image/svg+xml',
|
718 |
+
'swf' => 'application/x-shockwave-flash',
|
719 |
+
'tar' => 'application/x-tar',
|
720 |
+
'tif' => 'image/tiff',
|
721 |
+
'tiff' => 'image/tiff',
|
722 |
+
'torrent' => 'application/x-bittorrent',
|
723 |
+
'ttf' => 'application/x-font-ttf',
|
724 |
+
'txt' => 'text/plain',
|
725 |
+
'wav' => 'audio/x-wav',
|
726 |
+
'webm' => 'video/webm',
|
727 |
+
'webp' => 'image/webp',
|
728 |
+
'wma' => 'audio/x-ms-wma',
|
729 |
+
'wmv' => 'video/x-ms-wmv',
|
730 |
+
'woff' => 'application/x-font-woff',
|
731 |
+
'wsdl' => 'application/wsdl+xml',
|
732 |
+
'xbm' => 'image/x-xbitmap',
|
733 |
+
'xls' => 'application/vnd.ms-excel',
|
734 |
+
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
735 |
+
'xml' => 'application/xml',
|
736 |
+
'xpm' => 'image/x-xpixmap',
|
737 |
+
'xwd' => 'image/x-xwindowdump',
|
738 |
+
'yaml' => 'text/yaml',
|
739 |
+
'yml' => 'text/yaml',
|
740 |
+
'zip' => 'application/zip',
|
741 |
+
];
|
742 |
+
|
743 |
+
$extension = strtolower($extension);
|
744 |
+
|
745 |
+
return isset($mimetypes[$extension])
|
746 |
+
? $mimetypes[$extension]
|
747 |
+
: null;
|
748 |
+
}
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Parses an HTTP message into an associative array.
|
752 |
+
*
|
753 |
+
* The array contains the "start-line" key containing the start line of
|
754 |
+
* the message, "headers" key containing an associative array of header
|
755 |
+
* array values, and a "body" key containing the body of the message.
|
756 |
+
*
|
757 |
+
* @param string $message HTTP request or response to parse.
|
758 |
+
*
|
759 |
+
* @return array
|
760 |
+
* @internal
|
761 |
+
*/
|
762 |
+
function _parse_message($message)
|
763 |
+
{
|
764 |
+
if (!$message) {
|
765 |
+
throw new \InvalidArgumentException('Invalid message');
|
766 |
+
}
|
767 |
+
|
768 |
+
$message = ltrim($message, "\r\n");
|
769 |
+
|
770 |
+
$messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
|
771 |
+
|
772 |
+
if ($messageParts === false || count($messageParts) !== 2) {
|
773 |
+
throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
|
774 |
+
}
|
775 |
+
|
776 |
+
list($rawHeaders, $body) = $messageParts;
|
777 |
+
$rawHeaders .= "\r\n"; // Put back the delimiter we split previously
|
778 |
+
$headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
|
779 |
+
|
780 |
+
if ($headerParts === false || count($headerParts) !== 2) {
|
781 |
+
throw new \InvalidArgumentException('Invalid message: Missing status line');
|
782 |
+
}
|
783 |
+
|
784 |
+
list($startLine, $rawHeaders) = $headerParts;
|
785 |
+
|
786 |
+
if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
|
787 |
+
// Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
|
788 |
+
$rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
|
789 |
+
}
|
790 |
+
|
791 |
+
/** @var array[] $headerLines */
|
792 |
+
$count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
|
793 |
+
|
794 |
+
// If these aren't the same, then one line didn't match and there's an invalid header.
|
795 |
+
if ($count !== substr_count($rawHeaders, "\n")) {
|
796 |
+
// Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
|
797 |
+
if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
|
798 |
+
throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
|
799 |
+
}
|
800 |
+
|
801 |
+
throw new \InvalidArgumentException('Invalid header syntax');
|
802 |
+
}
|
803 |
+
|
804 |
+
$headers = [];
|
805 |
+
|
806 |
+
foreach ($headerLines as $headerLine) {
|
807 |
+
$headers[$headerLine[1]][] = $headerLine[2];
|
808 |
+
}
|
809 |
+
|
810 |
+
return [
|
811 |
+
'start-line' => $startLine,
|
812 |
+
'headers' => $headers,
|
813 |
+
'body' => $body,
|
814 |
+
];
|
815 |
+
}
|
816 |
+
|
817 |
+
/**
|
818 |
+
* Constructs a URI for an HTTP request message.
|
819 |
+
*
|
820 |
+
* @param string $path Path from the start-line
|
821 |
+
* @param array $headers Array of headers (each value an array).
|
822 |
+
*
|
823 |
+
* @return string
|
824 |
+
* @internal
|
825 |
+
*/
|
826 |
+
function _parse_request_uri($path, array $headers)
|
827 |
+
{
|
828 |
+
$hostKey = array_filter(array_keys($headers), function ($k) {
|
829 |
+
return strtolower($k) === 'host';
|
830 |
+
});
|
831 |
+
|
832 |
+
// If no host is found, then a full URI cannot be constructed.
|
833 |
+
if (!$hostKey) {
|
834 |
+
return $path;
|
835 |
+
}
|
836 |
+
|
837 |
+
$host = $headers[reset($hostKey)][0];
|
838 |
+
$scheme = substr($host, -4) === ':443' ? 'https' : 'http';
|
839 |
+
|
840 |
+
return $scheme . '://' . $host . '/' . ltrim($path, '/');
|
841 |
+
}
|
842 |
+
|
843 |
+
/**
|
844 |
+
* Get a short summary of the message body
|
845 |
+
*
|
846 |
+
* Will return `null` if the response is not printable.
|
847 |
+
*
|
848 |
+
* @param MessageInterface $message The message to get the body summary
|
849 |
+
* @param int $truncateAt The maximum allowed size of the summary
|
850 |
+
*
|
851 |
+
* @return null|string
|
852 |
+
*/
|
853 |
+
function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
|
854 |
+
{
|
855 |
+
$body = $message->getBody();
|
856 |
+
|
857 |
+
if (!$body->isSeekable() || !$body->isReadable()) {
|
858 |
+
return null;
|
859 |
+
}
|
860 |
+
|
861 |
+
$size = $body->getSize();
|
862 |
+
|
863 |
+
if ($size === 0) {
|
864 |
+
return null;
|
865 |
+
}
|
866 |
+
|
867 |
+
$summary = $body->read($truncateAt);
|
868 |
+
$body->rewind();
|
869 |
+
|
870 |
+
if ($size > $truncateAt) {
|
871 |
+
$summary .= ' (truncated...)';
|
872 |
+
}
|
873 |
+
|
874 |
+
// Matches any printable character, including unicode characters:
|
875 |
+
// letters, marks, numbers, punctuation, spacing, and separators.
|
876 |
+
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
|
877 |
+
return null;
|
878 |
+
}
|
879 |
+
|
880 |
+
return $summary;
|
881 |
+
}
|
882 |
+
|
883 |
+
/** @internal */
|
884 |
+
function _caseless_remove($keys, array $data)
|
885 |
+
{
|
886 |
+
$result = [];
|
887 |
+
|
888 |
+
foreach ($keys as &$key) {
|
889 |
+
$key = strtolower($key);
|
890 |
+
}
|
891 |
+
|
892 |
+
foreach ($data as $k => $v) {
|
893 |
+
if (!in_array(strtolower($k), $keys)) {
|
894 |
+
$result[$k] = $v;
|
895 |
+
}
|
896 |
+
}
|
897 |
+
|
898 |
+
return $result;
|
899 |
+
}
|
includes/vendor/mailerlite/guzzlehttp/psr7/src/functions_include.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Don't redefine the functions if included multiple times.
|
4 |
+
if (!function_exists('GuzzleHttp\Psr7\str')) {
|
5 |
+
require __DIR__ . '/functions.php';
|
6 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Campaigns.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Campaigns extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'campaigns';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Add custom html to campaign
|
13 |
+
*
|
14 |
+
* @param int $campaignId
|
15 |
+
* @param array $contentData
|
16 |
+
* @param array $params
|
17 |
+
* @return [type]
|
18 |
+
*/
|
19 |
+
public function addContent($campaignId, $contentData = [], $params = [])
|
20 |
+
{
|
21 |
+
$endpoint = $this->endpoint . '/' . $campaignId . '/content';
|
22 |
+
|
23 |
+
$response = $this->restClient->put($endpoint, $contentData);
|
24 |
+
|
25 |
+
return $response['body'];
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Trigger action: send
|
30 |
+
*
|
31 |
+
* @param int $campaignId
|
32 |
+
* @param array $settingsData
|
33 |
+
* @return [type]
|
34 |
+
*/
|
35 |
+
public function send($campaignId, $settingsData = [])
|
36 |
+
{
|
37 |
+
$endpoint = $this->endpoint . '/' . $campaignId . '/actions/send';
|
38 |
+
|
39 |
+
$response = $this->restClient->post($endpoint, $settingsData);
|
40 |
+
|
41 |
+
return $response['body'];
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Trigger action: cancel
|
46 |
+
*
|
47 |
+
* @param int $campaignId
|
48 |
+
* @return [type]
|
49 |
+
*/
|
50 |
+
public function cancel($campaignId)
|
51 |
+
{
|
52 |
+
$endpoint = $this->endpoint . '/' . $campaignId . '/actions/cancel';
|
53 |
+
|
54 |
+
$response = $this->restClient->post($endpoint);
|
55 |
+
|
56 |
+
return $response['body'];
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get collection of items
|
61 |
+
* @param array $fields
|
62 |
+
* @return [type]
|
63 |
+
*/
|
64 |
+
public function get($type = 'sent', $fields = ['*'])
|
65 |
+
{
|
66 |
+
// filter anything that is not an available type
|
67 |
+
$type = in_array($type, ['sent', 'draft', 'outbox']) ? $type : 'sent';
|
68 |
+
|
69 |
+
$params = $this->prepareParams();
|
70 |
+
|
71 |
+
if ( ! empty($fields) && is_array($fields) && $fields != ['*']) {
|
72 |
+
$params['fields'] = $fields;
|
73 |
+
}
|
74 |
+
|
75 |
+
$response = $this->restClient->get($this->endpoint . '/' . $type, $params);
|
76 |
+
|
77 |
+
$entities = $this->generateCollection($response['body']);
|
78 |
+
|
79 |
+
return $entities;
|
80 |
+
}
|
81 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Fields.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Fields extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'fields';
|
10 |
+
|
11 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Groups.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Groups extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'groups';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Get subscribers from group
|
13 |
+
* @param int $groupId
|
14 |
+
* @param string $type
|
15 |
+
* @param array $params
|
16 |
+
* @return [type]
|
17 |
+
*/
|
18 |
+
public function getSubscribers($groupId, $type = null, $params = [])
|
19 |
+
{
|
20 |
+
$endpoint = $this->endpoint . '/' . $groupId . '/subscribers';
|
21 |
+
|
22 |
+
if ($type !== null) {
|
23 |
+
$endpoint .= '/' . $type;
|
24 |
+
}
|
25 |
+
|
26 |
+
$params = array_merge($this->prepareParams(), $params);
|
27 |
+
|
28 |
+
$response = $this->restClient->get($endpoint, $params);
|
29 |
+
|
30 |
+
return $response['body'];
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get single subscriber from group
|
35 |
+
*
|
36 |
+
* @param $groupId
|
37 |
+
* @param $subscriberId
|
38 |
+
* @return mixed
|
39 |
+
*/
|
40 |
+
public function getSubscriber($groupId, $subscriberId)
|
41 |
+
{
|
42 |
+
$endpoint = $this->endpoint . '/' . $groupId . '/subscribers/' . urlencode($subscriberId);
|
43 |
+
|
44 |
+
$response = $this->restClient->get($endpoint);
|
45 |
+
|
46 |
+
return $response['body'];
|
47 |
+
}
|
48 |
+
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Add single subscriber to group
|
52 |
+
*
|
53 |
+
* @param int $groupId
|
54 |
+
* @param array $subscriberData
|
55 |
+
* @param array $params
|
56 |
+
* @return [type]
|
57 |
+
*/
|
58 |
+
public function addSubscriber($groupId, $subscriberData = [], $params = [])
|
59 |
+
{
|
60 |
+
$endpoint = $this->endpoint . '/' . $groupId . '/subscribers';
|
61 |
+
|
62 |
+
$response = $this->restClient->post($endpoint, $subscriberData);
|
63 |
+
|
64 |
+
return $response['body'];
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Remove subscriber from group
|
69 |
+
*
|
70 |
+
* @param int $groupId
|
71 |
+
* @param int $subscriberId
|
72 |
+
* @return [type]
|
73 |
+
*/
|
74 |
+
public function removeSubscriber($groupId, $subscriberId)
|
75 |
+
{
|
76 |
+
$endpoint = $this->endpoint . '/' . $groupId . '/subscribers/' . urlencode($subscriberId);
|
77 |
+
|
78 |
+
$response = $this->restClient->delete($endpoint);
|
79 |
+
|
80 |
+
return $response['body'];
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Batch add subscribers to group
|
85 |
+
*
|
86 |
+
* @param int $groupId
|
87 |
+
* @param array $subscribers
|
88 |
+
* @param array $options
|
89 |
+
* @return [type]
|
90 |
+
*/
|
91 |
+
public function importSubscribers(
|
92 |
+
$groupId,
|
93 |
+
$subscribers,
|
94 |
+
$options = [
|
95 |
+
'resubscribe' => false,
|
96 |
+
'autoresponders' => false
|
97 |
+
]
|
98 |
+
) {
|
99 |
+
$endpoint = $this->endpoint . '/' . $groupId . '/subscribers/import';
|
100 |
+
|
101 |
+
$response = $this->restClient->post($endpoint, array_merge(['subscribers' => $subscribers], $options));
|
102 |
+
|
103 |
+
return $response['body'];
|
104 |
+
}
|
105 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Segments.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Segments extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'segments';
|
10 |
+
|
11 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Settings.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Settings extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'settings';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Retrieve double opt in status
|
13 |
+
*
|
14 |
+
* @return mixed
|
15 |
+
*/
|
16 |
+
public function getDoubleOptin()
|
17 |
+
{
|
18 |
+
$endpoint = $this->endpoint . '/double_optin';
|
19 |
+
|
20 |
+
$response = $this->restClient->get( $endpoint );
|
21 |
+
|
22 |
+
return $response['body'];
|
23 |
+
}
|
24 |
+
|
25 |
+
public function setDoubleOptin( $status ) {
|
26 |
+
|
27 |
+
$endpoint = $this->endpoint . '/double_optin';
|
28 |
+
|
29 |
+
$params = array_merge($this->prepareParams(), ['enable' => $status] );
|
30 |
+
|
31 |
+
$response = $this->restClient->post( $endpoint, $params );
|
32 |
+
|
33 |
+
return $response['body'];
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Stats.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Stats extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'stats';
|
10 |
+
|
11 |
+
public function get($fields = [])
|
12 |
+
{
|
13 |
+
$response = $this->restClient->get($this->endpoint, []);
|
14 |
+
|
15 |
+
return $response['body'];
|
16 |
+
}
|
17 |
+
|
18 |
+
public function getHistorical($timestamp)
|
19 |
+
{
|
20 |
+
$response = $this->restClient->get($this->endpoint, ['timestamp' => $timestamp]);
|
21 |
+
|
22 |
+
return $response['body'];
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Api/Subscribers.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Api;
|
4 |
+
|
5 |
+
use MailerLiteApi\Common\ApiAbstract;
|
6 |
+
|
7 |
+
class Subscribers extends ApiAbstract {
|
8 |
+
|
9 |
+
protected $endpoint = 'subscribers';
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Get groups subscriber belongs to
|
13 |
+
*
|
14 |
+
* @param int $subscriberId
|
15 |
+
* @param array $params
|
16 |
+
* @return [type]
|
17 |
+
*/
|
18 |
+
public function getGroups($subscriberId, $params = [])
|
19 |
+
{
|
20 |
+
$endpoint = $this->endpoint . '/' . urlencode($subscriberId) . '/groups';
|
21 |
+
|
22 |
+
$params = array_merge($this->prepareParams(), $params);
|
23 |
+
|
24 |
+
$response = $this->restClient->get($endpoint, $params);
|
25 |
+
|
26 |
+
return $response['body'];
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Get activity of subscriber
|
31 |
+
*
|
32 |
+
* @param int $subscriberId
|
33 |
+
* @param string $type
|
34 |
+
* @param array $params
|
35 |
+
* @return [type]
|
36 |
+
*/
|
37 |
+
public function getActivity($subscriberId, $type = null, $params = [])
|
38 |
+
{
|
39 |
+
$endpoint = $this->endpoint . '/' . urlencode($subscriberId) . '/activity';
|
40 |
+
|
41 |
+
if ($type !== null) {
|
42 |
+
$endpoint .= '/' . $type;
|
43 |
+
}
|
44 |
+
|
45 |
+
$params = array_merge($this->prepareParams(), $params);
|
46 |
+
|
47 |
+
$response = $this->restClient->get($endpoint, $params);
|
48 |
+
|
49 |
+
return $response['body'];
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Seach for a subscriber by email or custom field value
|
54 |
+
*
|
55 |
+
* @param string $query
|
56 |
+
* @return [type]
|
57 |
+
*/
|
58 |
+
public function search($query)
|
59 |
+
{
|
60 |
+
$endpoint = $this->endpoint . '/search';
|
61 |
+
|
62 |
+
$params = array_merge($this->prepareParams(), ['query' => $query]);
|
63 |
+
|
64 |
+
$response = $this->restClient->get($endpoint, $params);
|
65 |
+
|
66 |
+
return $response['body'];
|
67 |
+
}
|
68 |
+
|
69 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/ApiAbstract.php
ADDED
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Common;
|
4 |
+
|
5 |
+
use ArrayAccess;
|
6 |
+
use Exception;
|
7 |
+
use GuzzleHttp\Psr7\Request;
|
8 |
+
use MailerLiteApi\Common\Collection;
|
9 |
+
use MailerLiteApi\Common\RestClient;
|
10 |
+
|
11 |
+
abstract class ApiAbstract {
|
12 |
+
|
13 |
+
protected $restClient;
|
14 |
+
|
15 |
+
protected $endpoint;
|
16 |
+
|
17 |
+
private $_limit = null;
|
18 |
+
|
19 |
+
private $_offset = null;
|
20 |
+
|
21 |
+
private $_order = null;
|
22 |
+
|
23 |
+
private $_where = null;
|
24 |
+
|
25 |
+
public function __construct(RestClient $restClient)
|
26 |
+
{
|
27 |
+
$this->restClient = $restClient;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get collection of items
|
32 |
+
* @param array $fields
|
33 |
+
* @return [type]
|
34 |
+
*/
|
35 |
+
public function get($fields = ['*'])
|
36 |
+
{
|
37 |
+
$params = $this->prepareParams();
|
38 |
+
|
39 |
+
if ( ! empty($fields) && is_array($fields) && $fields != ['*']) {
|
40 |
+
$params['fields'] = $fields;
|
41 |
+
}
|
42 |
+
|
43 |
+
$response = $this->restClient->get($this->endpoint, $params);
|
44 |
+
|
45 |
+
$entities = $this->generateCollection($response['body']);
|
46 |
+
|
47 |
+
return $entities;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get single item
|
52 |
+
*
|
53 |
+
* @param int|string $id Id can be Subscribers ID or his email address
|
54 |
+
* @return [type]
|
55 |
+
*/
|
56 |
+
public function find($id)
|
57 |
+
{
|
58 |
+
if (empty($id)) {
|
59 |
+
throw new \Exception('ID must be set');
|
60 |
+
}
|
61 |
+
|
62 |
+
$response = $this->restClient->get($this->endpoint . '/' . $id);
|
63 |
+
|
64 |
+
return $response['body'];
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Create new item
|
69 |
+
*
|
70 |
+
* @param array $data
|
71 |
+
* @return [type]
|
72 |
+
*/
|
73 |
+
public function create($data)
|
74 |
+
{
|
75 |
+
$response = $this->restClient->post($this->endpoint, $data);
|
76 |
+
return $response['body'];
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Update an item
|
81 |
+
*
|
82 |
+
* @param int $id
|
83 |
+
* @param array $data
|
84 |
+
* @return [type]
|
85 |
+
*/
|
86 |
+
public function update($id, $data)
|
87 |
+
{
|
88 |
+
$response = $this->restClient->put($this->endpoint . '/' . $id, $data);
|
89 |
+
|
90 |
+
return $response['body'];
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Delete an item
|
95 |
+
*
|
96 |
+
* @param int $id
|
97 |
+
* @return [type]
|
98 |
+
*/
|
99 |
+
public function delete($id)
|
100 |
+
{
|
101 |
+
$response = $this->restClient->delete($this->endpoint . '/' . $id);
|
102 |
+
|
103 |
+
return $response['body'];
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Return only count of items
|
108 |
+
*
|
109 |
+
* @return [type]
|
110 |
+
*/
|
111 |
+
public function count()
|
112 |
+
{
|
113 |
+
$response = $this->restClient->get($this->endpoint . '/count');
|
114 |
+
|
115 |
+
return $response['body'];
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Set size of limit in query
|
120 |
+
*
|
121 |
+
* @param [type] $limit
|
122 |
+
* @return [type]
|
123 |
+
*/
|
124 |
+
public function limit($limit)
|
125 |
+
{
|
126 |
+
$this->_limit = $limit;
|
127 |
+
|
128 |
+
return $this;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Set size of offset in query
|
133 |
+
*
|
134 |
+
* @param [type] $offset
|
135 |
+
*/
|
136 |
+
public function offset($offset)
|
137 |
+
{
|
138 |
+
$this->_offset = $offset;
|
139 |
+
|
140 |
+
return $this;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Set an order in of items in query
|
145 |
+
*
|
146 |
+
* @param [type] $field
|
147 |
+
* @param string $order
|
148 |
+
* @return [type]
|
149 |
+
*/
|
150 |
+
public function orderBy($field, $order = 'ASC')
|
151 |
+
{
|
152 |
+
$this->_orders[$field] = $order;
|
153 |
+
|
154 |
+
return $this;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Set where conditions
|
159 |
+
*
|
160 |
+
* @param [type] $column
|
161 |
+
* @param [type] $operator
|
162 |
+
* @param [type] $value
|
163 |
+
* @param string $boolean
|
164 |
+
* @return [type]
|
165 |
+
*/
|
166 |
+
public function where(
|
167 |
+
$column,
|
168 |
+
$operator = null,
|
169 |
+
$value = null,
|
170 |
+
$boolean = 'and'
|
171 |
+
) {
|
172 |
+
if (is_array($column)) {
|
173 |
+
$this->_where = $column;
|
174 |
+
}
|
175 |
+
|
176 |
+
return $this;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Return collection of objects
|
181 |
+
*
|
182 |
+
* @param [type] $items
|
183 |
+
* @return [type]
|
184 |
+
*/
|
185 |
+
public function generateCollection($items)
|
186 |
+
{
|
187 |
+
if ( ! is_array($items)) {
|
188 |
+
$items = [$items];
|
189 |
+
}
|
190 |
+
|
191 |
+
return new Collection($items);
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Prepare query parameters
|
196 |
+
*
|
197 |
+
* @return [type]
|
198 |
+
*/
|
199 |
+
protected function prepareParams()
|
200 |
+
{
|
201 |
+
$params = [];
|
202 |
+
|
203 |
+
if ( ! empty($this->_where) && is_array($this->_where)) {
|
204 |
+
$params['filters'] = $this->_where;
|
205 |
+
}
|
206 |
+
|
207 |
+
if ( ! empty($this->_offset)) {
|
208 |
+
$params['offset'] = $this->_offset;
|
209 |
+
}
|
210 |
+
|
211 |
+
if ( ! empty($this->_limit)) {
|
212 |
+
$params['limit'] = $this->_limit;
|
213 |
+
}
|
214 |
+
|
215 |
+
if ( ! empty($this->_orders) && is_array($this->_orders)) {
|
216 |
+
foreach ($this->_orders as $field => $order) {
|
217 |
+
$params['order_by'][$field] = $order;
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
return $params;
|
222 |
+
}
|
223 |
+
|
224 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/ApiConstants.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Common;
|
4 |
+
|
5 |
+
class ApiConstants {
|
6 |
+
const BASE_URL = "https://api.mailerlite.com/api/";
|
7 |
+
const VERSION = "v2";
|
8 |
+
const SDK_USER_AGENT = "MailerLite PHP SDK";
|
9 |
+
const SDK_VERSION = "2.0";
|
10 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/Collection.php
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Common;
|
4 |
+
|
5 |
+
use ArrayAccess;
|
6 |
+
use ArrayIterator;
|
7 |
+
use Countable;
|
8 |
+
use IteratorAggregate;
|
9 |
+
|
10 |
+
class Collection implements ArrayAccess, IteratorAggregate, Countable {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The items contained in the collection.
|
14 |
+
*
|
15 |
+
* @var array
|
16 |
+
*/
|
17 |
+
protected $items = [];
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Create a new collection.
|
21 |
+
*
|
22 |
+
* @param array $items
|
23 |
+
*/
|
24 |
+
public function __construct(array $items = [])
|
25 |
+
{
|
26 |
+
$this->items = $items;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Get an iterator for the items.
|
31 |
+
*
|
32 |
+
* @return \ArrayIterator
|
33 |
+
*/
|
34 |
+
public function getIterator()
|
35 |
+
{
|
36 |
+
return new ArrayIterator($this->items);
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Create a new collection instance if the value isn't one already.
|
41 |
+
*
|
42 |
+
* @param mixed $items
|
43 |
+
*
|
44 |
+
* @return static
|
45 |
+
*/
|
46 |
+
public static function make($items)
|
47 |
+
{
|
48 |
+
if (is_null($items)) {
|
49 |
+
return new static;
|
50 |
+
}
|
51 |
+
|
52 |
+
if ($items instanceof Collection) {
|
53 |
+
return $items;
|
54 |
+
}
|
55 |
+
|
56 |
+
return new static(is_array($items) ? $items : [$items]);
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get the first item from the collection.
|
61 |
+
*
|
62 |
+
* @return mixed|null
|
63 |
+
*/
|
64 |
+
public function first()
|
65 |
+
{
|
66 |
+
return count($this->items) > 0 ? reset($this->items) : null;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get the collection of items as a plain array.
|
71 |
+
*
|
72 |
+
* @return array
|
73 |
+
*/
|
74 |
+
public function toArray()
|
75 |
+
{
|
76 |
+
return array_map(
|
77 |
+
function ($value) {
|
78 |
+
return $value instanceof Entity ? $value->toArray() : $value;
|
79 |
+
|
80 |
+
}, $this->items
|
81 |
+
);
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Count the number of items in the collection.
|
86 |
+
*
|
87 |
+
* @return int
|
88 |
+
*/
|
89 |
+
public function count()
|
90 |
+
{
|
91 |
+
return count($this->items);
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Determine if an item exists at an offset.
|
96 |
+
*
|
97 |
+
* @param mixed $key
|
98 |
+
*
|
99 |
+
* @return bool
|
100 |
+
*/
|
101 |
+
public function offsetExists($key)
|
102 |
+
{
|
103 |
+
return array_key_exists($key, $this->items);
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get an item at a given offset.
|
108 |
+
*
|
109 |
+
* @param mixed $key
|
110 |
+
*
|
111 |
+
* @return mixed
|
112 |
+
*/
|
113 |
+
public function offsetGet($key)
|
114 |
+
{
|
115 |
+
return $this->items[$key];
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Set the item at a given offset.
|
120 |
+
*
|
121 |
+
* @param mixed $key
|
122 |
+
* @param mixed $value
|
123 |
+
*
|
124 |
+
* @return void
|
125 |
+
*/
|
126 |
+
public function offsetSet($key, $value)
|
127 |
+
{
|
128 |
+
if (is_null($key)) {
|
129 |
+
$this->items[] = $value;
|
130 |
+
} else {
|
131 |
+
$this->items[$key] = $value;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Unset the item at a given offset.
|
137 |
+
*
|
138 |
+
* @param string $key
|
139 |
+
*
|
140 |
+
* @return void
|
141 |
+
*/
|
142 |
+
public function offsetUnset($key)
|
143 |
+
{
|
144 |
+
unset($this->items[$key]);
|
145 |
+
}
|
146 |
+
|
147 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Common/RestClient.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Common;
|
4 |
+
|
5 |
+
use Http\Client\HttpClient;
|
6 |
+
use Http\Client\Curl\Client as CurlClient;
|
7 |
+
|
8 |
+
use GuzzleHttp\Psr7\Request;
|
9 |
+
use MailerLiteApi\Common\ApiConstants;
|
10 |
+
use Psr\Http\Message\ResponseInterface;
|
11 |
+
|
12 |
+
use Http\Message\MessageFactory\GuzzleMessageFactory;
|
13 |
+
use Http\Message\StreamFactory\GuzzleStreamFactory;
|
14 |
+
|
15 |
+
class RestClient {
|
16 |
+
|
17 |
+
public $httpClient;
|
18 |
+
|
19 |
+
public $apiKey;
|
20 |
+
|
21 |
+
public $baseUrl;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param string $baseUrl
|
25 |
+
* @param string $apiKey
|
26 |
+
* @param HttpClient $httpClient
|
27 |
+
*/
|
28 |
+
public function __construct($baseUrl, $apiKey, HttpClient $httpClient = null)
|
29 |
+
{
|
30 |
+
$this->baseUrl = $baseUrl;
|
31 |
+
$this->apiKey = $apiKey;
|
32 |
+
$this->httpClient = $httpClient;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Execute GET request
|
37 |
+
*
|
38 |
+
* @param string $endpointUri
|
39 |
+
* @param array $queryString
|
40 |
+
* @return [type]
|
41 |
+
*/
|
42 |
+
public function get($endpointUri, $queryString = [])
|
43 |
+
{
|
44 |
+
return $this->send('GET', $endpointUri . '?' . http_build_query($queryString));
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Execute POST request
|
49 |
+
*
|
50 |
+
* @param string $endpointUri
|
51 |
+
* @param array $data
|
52 |
+
* @return [type]
|
53 |
+
*/
|
54 |
+
public function post($endpointUri, $data = [])
|
55 |
+
{
|
56 |
+
return $this->send('POST', $endpointUri, $data);
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Execute PUT request
|
61 |
+
*
|
62 |
+
* @param string $endpointUri
|
63 |
+
* @param array $putData
|
64 |
+
* @return [type]
|
65 |
+
*/
|
66 |
+
public function put($endpointUri, $putData = [])
|
67 |
+
{
|
68 |
+
return $this->send('PUT', $endpointUri, $putData);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Execute DELETE request
|
73 |
+
*
|
74 |
+
* @param string $endpointUri
|
75 |
+
* @return [type]
|
76 |
+
*/
|
77 |
+
public function delete($endpointUri)
|
78 |
+
{
|
79 |
+
return $this->send('DELETE', $endpointUri);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Execute HTTP request
|
84 |
+
*
|
85 |
+
* @param string $method
|
86 |
+
* @param string $endpointUri
|
87 |
+
* @param string $body
|
88 |
+
* @param array $headers
|
89 |
+
* @return [type]
|
90 |
+
*/
|
91 |
+
protected function send($method, $endpointUri, $body = null, array $headers = [])
|
92 |
+
{
|
93 |
+
$headers = array_merge($headers, self::getDefaultHeaders());
|
94 |
+
$endpointUrl = $this->baseUrl . $endpointUri;
|
95 |
+
|
96 |
+
$request = new Request($method, $endpointUrl, $headers, json_encode($body));
|
97 |
+
$response = $this->getHttpClient()->sendRequest($request);
|
98 |
+
|
99 |
+
return $this->handleResponse($response);
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Handle HTTP response
|
104 |
+
*
|
105 |
+
* @param ResponseInterface $response
|
106 |
+
* @return [type]
|
107 |
+
*/
|
108 |
+
protected function handleResponse(ResponseInterface $response)
|
109 |
+
{
|
110 |
+
$status = $response->getStatusCode();
|
111 |
+
|
112 |
+
$data = (string) $response->getBody();
|
113 |
+
$jsonResponseData = json_decode($data, false);
|
114 |
+
$body = $data && $jsonResponseData === null ? $data : $jsonResponseData;
|
115 |
+
|
116 |
+
return ['status_code' => $status, 'body' => $body];
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* @return HttpClient
|
121 |
+
*/
|
122 |
+
protected function getHttpClient()
|
123 |
+
{
|
124 |
+
if (is_null($this->httpClient)) {
|
125 |
+
$options = [
|
126 |
+
CURLOPT_CONNECTTIMEOUT => 10,
|
127 |
+
CURLOPT_SSL_VERIFYPEER => false
|
128 |
+
];
|
129 |
+
|
130 |
+
$this->httpClient = new CurlClient(new GuzzleMessageFactory(), new GuzzleStreamFactory(), $options);
|
131 |
+
}
|
132 |
+
|
133 |
+
return $this->httpClient;
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* @return array
|
138 |
+
*/
|
139 |
+
protected function getDefaultHeaders() {
|
140 |
+
return [
|
141 |
+
'User-Agent' => ApiConstants::SDK_USER_AGENT . '/' . ApiConstants::SDK_VERSION,
|
142 |
+
'X-MailerLite-ApiKey' => $this->apiKey,
|
143 |
+
'Content-Type' => 'application/json'
|
144 |
+
];
|
145 |
+
}
|
146 |
+
}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/Exceptions/MailerLiteSdkException.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi\Exceptions;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
|
7 |
+
class MailerLiteSdkException extends Exception {}
|
includes/vendor/mailerlite/mailerlite/mailerlite-api-v2-php-sdk/src/MailerLite.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailerLiteApi;
|
4 |
+
|
5 |
+
use Http\Client\HttpClient;
|
6 |
+
|
7 |
+
use MailerLiteApi\Common\ApiConstants;
|
8 |
+
use MailerLiteApi\Common\RestClient;
|
9 |
+
use MailerLiteApi\Exceptions\MailerLiteSdkException;
|
10 |
+
|
11 |
+
class MailerLite {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* @var null | string
|
15 |
+
*/
|
16 |
+
protected $apiKey;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var RestClient
|
20 |
+
*/
|
21 |
+
protected $restClient;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param string|null $apiKey
|
25 |
+
* @param HttpClient $client
|
26 |
+
*/
|
27 |
+
public function __construct(
|
28 |
+
$apiKey = null,
|
29 |
+
HttpClient $httpClient = null
|
30 |
+
) {
|
31 |
+
if (is_null($apiKey)) {
|
32 |
+
throw new MailerLiteSdkException("API key is not provided");
|
33 |
+
}
|
34 |
+
|
35 |
+
$this->apiKey = $apiKey;
|
36 |
+
|
37 |
+
$this->restClient = new RestClient(
|
38 |
+
$this->getBaseUrl(),
|
39 |
+
$apiKey,
|
40 |
+
$httpClient
|
41 |
+
);
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @return \MailerLiteApi\Api\Groups
|
46 |
+
*/
|
47 |
+
public function groups()
|
48 |
+
{
|
49 |
+
return new \MailerLiteApi\Api\Groups($this->restClient);
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* @return \MailerLiteApi\Api\Fields
|
54 |
+
*/
|
55 |
+
public function fields()
|
56 |
+
{
|
57 |
+
return new \MailerLiteApi\Api\Fields($this->restClient);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @return \MailerLiteApi\Api\Subscribers
|
62 |
+
*/
|
63 |
+
public function subscribers()
|
64 |
+
{
|
65 |
+
return new \MailerLiteApi\Api\Subscribers($this->restClient);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @return \MailerLiteApi\Api\Campaigns
|
70 |
+
*/
|
71 |
+
public function campaigns()
|
72 |
+
{
|
73 |
+
return new \MailerLiteApi\Api\Campaigns($this->restClient);
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @return \MailerLiteApi\Api\Stats
|
78 |
+
*/
|
79 |
+
public function stats()
|
80 |
+
{
|
81 |
+
return new \MailerLiteApi\Api\Stats($this->restClient);
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @return \MailerLiteApi\Api\Settings
|
86 |
+
*/
|
87 |
+
public function settings()
|
88 |
+
{
|
89 |
+
return new \MailerLiteApi\Api\Settings($this->restClient);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @return \MailerLiteApi\Api\Segments
|
94 |
+
*/
|
95 |
+
public function segments()
|
96 |
+
{
|
97 |
+
return new \MailerLiteApi\Api\Segments($this->restClient);
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @param string $version
|
102 |
+
* @return string
|
103 |
+
*/
|
104 |
+
public function getBaseUrl($version = ApiConstants::VERSION)
|
105 |
+
{
|
106 |
+
return ApiConstants::BASE_URL . $version . '/';
|
107 |
+
}
|
108 |
+
|
109 |
+
}
|
includes/vendor/mailerlite/php-http/curl-client/.php_cs
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
return Symfony\CS\Config\Config::create()
|
4 |
+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
|
5 |
+
->fixers([])
|
6 |
+
->finder(
|
7 |
+
Symfony\CS\Finder\DefaultFinder::create()->in(__DIR__ . '/src')
|
8 |
+
)
|
9 |
+
;
|
includes/vendor/mailerlite/php-http/curl-client/.styleci.yml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
preset: psr2
|
2 |
+
finder:
|
3 |
+
path:
|
4 |
+
- "src"
|
includes/vendor/mailerlite/php-http/curl-client/src/Client.php
ADDED
@@ -0,0 +1,372 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Curl;
|
4 |
+
|
5 |
+
use Http\Client\Exception;
|
6 |
+
use Http\Client\HttpAsyncClient;
|
7 |
+
use Http\Client\HttpClient;
|
8 |
+
use Http\Discovery\MessageFactoryDiscovery;
|
9 |
+
use Http\Discovery\StreamFactoryDiscovery;
|
10 |
+
use Http\Message\MessageFactory;
|
11 |
+
use Http\Message\StreamFactory;
|
12 |
+
use Http\Promise\Promise;
|
13 |
+
use Psr\Http\Message\RequestInterface;
|
14 |
+
use Psr\Http\Message\ResponseInterface;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* PSR-7 compatible cURL based HTTP client.
|
18 |
+
*
|
19 |
+
* @license http://opensource.org/licenses/MIT MIT
|
20 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
21 |
+
* @author Blake Williams <github@shabbyrobe.org>
|
22 |
+
*
|
23 |
+
* @api
|
24 |
+
*
|
25 |
+
* @since 1.0
|
26 |
+
*/
|
27 |
+
class Client implements HttpClient, HttpAsyncClient
|
28 |
+
{
|
29 |
+
/**
|
30 |
+
* cURL options.
|
31 |
+
*
|
32 |
+
* @var array
|
33 |
+
*/
|
34 |
+
private $options;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* PSR-7 message factory.
|
38 |
+
*
|
39 |
+
* @var MessageFactory
|
40 |
+
*/
|
41 |
+
private $messageFactory;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* PSR-7 stream factory.
|
45 |
+
*
|
46 |
+
* @var StreamFactory
|
47 |
+
*/
|
48 |
+
private $streamFactory;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* cURL synchronous requests handle.
|
52 |
+
*
|
53 |
+
* @var resource|null
|
54 |
+
*/
|
55 |
+
private $handle = null;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Simultaneous requests runner.
|
59 |
+
*
|
60 |
+
* @var MultiRunner|null
|
61 |
+
*/
|
62 |
+
private $multiRunner = null;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Create new client.
|
66 |
+
*
|
67 |
+
* @param MessageFactory|null $messageFactory HTTP Message factory
|
68 |
+
* @param StreamFactory|null $streamFactory HTTP Stream factory
|
69 |
+
* @param array $options cURL options (see http://php.net/curl_setopt)
|
70 |
+
*
|
71 |
+
* @throws \Http\Discovery\Exception\NotFoundException If factory discovery failed
|
72 |
+
*
|
73 |
+
* @since 1.0
|
74 |
+
*/
|
75 |
+
public function __construct(
|
76 |
+
MessageFactory $messageFactory = null,
|
77 |
+
StreamFactory $streamFactory = null,
|
78 |
+
array $options = []
|
79 |
+
) {
|
80 |
+
$this->messageFactory = $messageFactory ?: MessageFactoryDiscovery::find();
|
81 |
+
$this->streamFactory = $streamFactory ?: StreamFactoryDiscovery::find();
|
82 |
+
$this->options = $options;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Release resources if still active.
|
87 |
+
*/
|
88 |
+
public function __destruct()
|
89 |
+
{
|
90 |
+
if (is_resource($this->handle)) {
|
91 |
+
curl_close($this->handle);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Sends a PSR-7 request.
|
97 |
+
*
|
98 |
+
* @param RequestInterface $request
|
99 |
+
*
|
100 |
+
* @return ResponseInterface
|
101 |
+
*
|
102 |
+
* @throws \Http\Client\Exception\NetworkException In case of network problems
|
103 |
+
* @throws \Http\Client\Exception\RequestException On invalid request
|
104 |
+
* @throws \InvalidArgumentException For invalid header names or values
|
105 |
+
* @throws \RuntimeException If creating the body stream fails
|
106 |
+
*
|
107 |
+
* @since 1.6 \UnexpectedValueException replaced with RequestException
|
108 |
+
* @since 1.6 Throw NetworkException on network errors
|
109 |
+
* @since 1.0
|
110 |
+
*/
|
111 |
+
public function sendRequest(RequestInterface $request)
|
112 |
+
{
|
113 |
+
$responseBuilder = $this->createResponseBuilder();
|
114 |
+
$options = $this->createCurlOptions($request, $responseBuilder);
|
115 |
+
|
116 |
+
if (is_resource($this->handle)) {
|
117 |
+
curl_reset($this->handle);
|
118 |
+
} else {
|
119 |
+
$this->handle = curl_init();
|
120 |
+
}
|
121 |
+
|
122 |
+
curl_setopt_array($this->handle, $options);
|
123 |
+
curl_exec($this->handle);
|
124 |
+
|
125 |
+
$errno = curl_errno($this->handle);
|
126 |
+
switch ($errno) {
|
127 |
+
case CURLE_OK:
|
128 |
+
// All OK, no actions needed.
|
129 |
+
break;
|
130 |
+
case CURLE_COULDNT_RESOLVE_PROXY:
|
131 |
+
case CURLE_COULDNT_RESOLVE_HOST:
|
132 |
+
case CURLE_COULDNT_CONNECT:
|
133 |
+
case CURLE_OPERATION_TIMEOUTED:
|
134 |
+
case CURLE_SSL_CONNECT_ERROR:
|
135 |
+
throw new Exception\NetworkException(curl_error($this->handle), $request);
|
136 |
+
default:
|
137 |
+
throw new Exception\RequestException(curl_error($this->handle), $request);
|
138 |
+
}
|
139 |
+
|
140 |
+
$response = $responseBuilder->getResponse();
|
141 |
+
$response->getBody()->seek(0);
|
142 |
+
|
143 |
+
return $response;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Sends a PSR-7 request in an asynchronous way.
|
148 |
+
*
|
149 |
+
* @param RequestInterface $request
|
150 |
+
*
|
151 |
+
* @return Promise
|
152 |
+
*
|
153 |
+
* @throws \Http\Client\Exception\RequestException On invalid request
|
154 |
+
* @throws \InvalidArgumentException For invalid header names or values
|
155 |
+
* @throws \RuntimeException If creating the body stream fails
|
156 |
+
*
|
157 |
+
* @since 1.6 \UnexpectedValueException replaced with RequestException
|
158 |
+
* @since 1.0
|
159 |
+
*/
|
160 |
+
public function sendAsyncRequest(RequestInterface $request)
|
161 |
+
{
|
162 |
+
if (!$this->multiRunner instanceof MultiRunner) {
|
163 |
+
$this->multiRunner = new MultiRunner();
|
164 |
+
}
|
165 |
+
|
166 |
+
$handle = curl_init();
|
167 |
+
$responseBuilder = $this->createResponseBuilder();
|
168 |
+
$options = $this->createCurlOptions($request, $responseBuilder);
|
169 |
+
curl_setopt_array($handle, $options);
|
170 |
+
|
171 |
+
$core = new PromiseCore($request, $handle, $responseBuilder);
|
172 |
+
$promise = new CurlPromise($core, $this->multiRunner);
|
173 |
+
$this->multiRunner->add($core);
|
174 |
+
|
175 |
+
return $promise;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Generates cURL options.
|
180 |
+
*
|
181 |
+
* @param RequestInterface $request
|
182 |
+
* @param ResponseBuilder $responseBuilder
|
183 |
+
*
|
184 |
+
* @throws \Http\Client\Exception\RequestException On invalid request
|
185 |
+
* @throws \InvalidArgumentException For invalid header names or values
|
186 |
+
* @throws \RuntimeException if can not read body
|
187 |
+
*
|
188 |
+
* @return array
|
189 |
+
*/
|
190 |
+
private function createCurlOptions(RequestInterface $request, ResponseBuilder $responseBuilder)
|
191 |
+
{
|
192 |
+
$options = $this->options;
|
193 |
+
|
194 |
+
$options[CURLOPT_HEADER] = false;
|
195 |
+
$options[CURLOPT_RETURNTRANSFER] = false;
|
196 |
+
$options[CURLOPT_FOLLOWLOCATION] = false;
|
197 |
+
|
198 |
+
try {
|
199 |
+
$options[CURLOPT_HTTP_VERSION]
|
200 |
+
= $this->getProtocolVersion($request->getProtocolVersion());
|
201 |
+
} catch (\UnexpectedValueException $e) {
|
202 |
+
throw new Exception\RequestException($e->getMessage(), $request);
|
203 |
+
}
|
204 |
+
$options[CURLOPT_URL] = (string) $request->getUri();
|
205 |
+
|
206 |
+
$options = $this->addRequestBodyOptions($request, $options);
|
207 |
+
|
208 |
+
$options[CURLOPT_HTTPHEADER] = $this->createHeaders($request, $options);
|
209 |
+
|
210 |
+
if ($request->getUri()->getUserInfo()) {
|
211 |
+
$options[CURLOPT_USERPWD] = $request->getUri()->getUserInfo();
|
212 |
+
}
|
213 |
+
|
214 |
+
$options[CURLOPT_HEADERFUNCTION] = function ($ch, $data) use ($responseBuilder) {
|
215 |
+
$str = trim($data);
|
216 |
+
if ('' !== $str) {
|
217 |
+
if (strpos(strtolower($str), 'http/') === 0) {
|
218 |
+
$responseBuilder->setStatus($str)->getResponse();
|
219 |
+
} else {
|
220 |
+
$responseBuilder->addHeader($str);
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
+
return strlen($data);
|
225 |
+
};
|
226 |
+
|
227 |
+
$options[CURLOPT_WRITEFUNCTION] = function ($ch, $data) use ($responseBuilder) {
|
228 |
+
return $responseBuilder->getResponse()->getBody()->write($data);
|
229 |
+
};
|
230 |
+
|
231 |
+
return $options;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Return cURL constant for specified HTTP version.
|
236 |
+
*
|
237 |
+
* @param string $requestVersion
|
238 |
+
*
|
239 |
+
* @throws \UnexpectedValueException if unsupported version requested
|
240 |
+
*
|
241 |
+
* @return int
|
242 |
+
*/
|
243 |
+
private function getProtocolVersion($requestVersion)
|
244 |
+
{
|
245 |
+
switch ($requestVersion) {
|
246 |
+
case '1.0':
|
247 |
+
return CURL_HTTP_VERSION_1_0;
|
248 |
+
case '1.1':
|
249 |
+
return CURL_HTTP_VERSION_1_1;
|
250 |
+
case '2.0':
|
251 |
+
if (defined('CURL_HTTP_VERSION_2_0')) {
|
252 |
+
return CURL_HTTP_VERSION_2_0;
|
253 |
+
}
|
254 |
+
throw new \UnexpectedValueException('libcurl 7.33 needed for HTTP 2.0 support');
|
255 |
+
}
|
256 |
+
|
257 |
+
return CURL_HTTP_VERSION_NONE;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Add request body related cURL options.
|
262 |
+
*
|
263 |
+
* @param RequestInterface $request
|
264 |
+
* @param array $options
|
265 |
+
*
|
266 |
+
* @return array
|
267 |
+
*/
|
268 |
+
private function addRequestBodyOptions(RequestInterface $request, array $options)
|
269 |
+
{
|
270 |
+
/*
|
271 |
+
* Some HTTP methods cannot have payload:
|
272 |
+
*
|
273 |
+
* - GET — cURL will automatically change method to PUT or POST if we set CURLOPT_UPLOAD or
|
274 |
+
* CURLOPT_POSTFIELDS.
|
275 |
+
* - HEAD — cURL treats HEAD as GET request with a same restrictions.
|
276 |
+
* - TRACE — According to RFC7231: a client MUST NOT send a message body in a TRACE request.
|
277 |
+
*/
|
278 |
+
if (!in_array($request->getMethod(), ['GET', 'HEAD', 'TRACE'], true)) {
|
279 |
+
$body = $request->getBody();
|
280 |
+
$bodySize = $body->getSize();
|
281 |
+
if ($bodySize !== 0) {
|
282 |
+
if ($body->isSeekable()) {
|
283 |
+
$body->rewind();
|
284 |
+
}
|
285 |
+
|
286 |
+
// Message has non empty body.
|
287 |
+
if (null === $bodySize || $bodySize > 1024 * 1024) {
|
288 |
+
// Avoid full loading large or unknown size body into memory
|
289 |
+
$options[CURLOPT_UPLOAD] = true;
|
290 |
+
if (null !== $bodySize) {
|
291 |
+
$options[CURLOPT_INFILESIZE] = $bodySize;
|
292 |
+
}
|
293 |
+
$options[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) {
|
294 |
+
return $body->read($length);
|
295 |
+
};
|
296 |
+
} else {
|
297 |
+
// Small body can be loaded into memory
|
298 |
+
$options[CURLOPT_POSTFIELDS] = (string) $body;
|
299 |
+
}
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
if ($request->getMethod() === 'HEAD') {
|
304 |
+
// This will set HTTP method to "HEAD".
|
305 |
+
$options[CURLOPT_NOBODY] = true;
|
306 |
+
} elseif ($request->getMethod() !== 'GET') {
|
307 |
+
// GET is a default method. Other methods should be specified explicitly.
|
308 |
+
$options[CURLOPT_CUSTOMREQUEST] = $request->getMethod();
|
309 |
+
}
|
310 |
+
|
311 |
+
return $options;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Create headers array for CURLOPT_HTTPHEADER.
|
316 |
+
*
|
317 |
+
* @param RequestInterface $request
|
318 |
+
* @param array $options cURL options
|
319 |
+
*
|
320 |
+
* @return string[]
|
321 |
+
*/
|
322 |
+
private function createHeaders(RequestInterface $request, array $options)
|
323 |
+
{
|
324 |
+
$curlHeaders = [];
|
325 |
+
$headers = $request->getHeaders();
|
326 |
+
foreach ($headers as $name => $values) {
|
327 |
+
$header = strtolower($name);
|
328 |
+
if ('expect' === $header) {
|
329 |
+
// curl-client does not support "Expect-Continue", so dropping "expect" headers
|
330 |
+
continue;
|
331 |
+
}
|
332 |
+
if ('content-length' === $header) {
|
333 |
+
if (array_key_exists(CURLOPT_POSTFIELDS, $options)) {
|
334 |
+
// Small body content length can be calculated here.
|
335 |
+
$values = [strlen($options[CURLOPT_POSTFIELDS])];
|
336 |
+
} elseif (!array_key_exists(CURLOPT_READFUNCTION, $options)) {
|
337 |
+
// Else if there is no body, forcing "Content-length" to 0
|
338 |
+
$values = [0];
|
339 |
+
}
|
340 |
+
}
|
341 |
+
foreach ($values as $value) {
|
342 |
+
$curlHeaders[] = $name.': '.$value;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
/*
|
346 |
+
* curl-client does not support "Expect-Continue", but cURL adds "Expect" header by default.
|
347 |
+
* We can not suppress it, but we can set it to empty.
|
348 |
+
*/
|
349 |
+
$curlHeaders[] = 'Expect:';
|
350 |
+
|
351 |
+
return $curlHeaders;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Create new ResponseBuilder instance.
|
356 |
+
*
|
357 |
+
* @return ResponseBuilder
|
358 |
+
*
|
359 |
+
* @throws \RuntimeException If creating the stream from $body fails
|
360 |
+
*/
|
361 |
+
private function createResponseBuilder()
|
362 |
+
{
|
363 |
+
try {
|
364 |
+
$body = $this->streamFactory->createStream(fopen('php://temp', 'w+b'));
|
365 |
+
} catch (\InvalidArgumentException $e) {
|
366 |
+
throw new \RuntimeException('Can not create "php://temp" stream.');
|
367 |
+
}
|
368 |
+
$response = $this->messageFactory->createResponse(200, null, [], $body);
|
369 |
+
|
370 |
+
return new ResponseBuilder($response);
|
371 |
+
}
|
372 |
+
}
|
includes/vendor/mailerlite/php-http/curl-client/src/CurlPromise.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Curl;
|
4 |
+
|
5 |
+
use Http\Promise\Promise;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Promise represents a response that may not be available yet, but will be resolved at some point
|
9 |
+
* in future. It acts like a proxy to the actual response.
|
10 |
+
*
|
11 |
+
* This interface is an extension of the promises/a+ specification https://promisesaplus.com/
|
12 |
+
* Value is replaced by an object where its class implement a Psr\Http\Message\RequestInterface.
|
13 |
+
* Reason is replaced by an object where its class implement a Http\Client\Exception.
|
14 |
+
*
|
15 |
+
* @license http://opensource.org/licenses/MIT MIT
|
16 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
17 |
+
*/
|
18 |
+
class CurlPromise implements Promise
|
19 |
+
{
|
20 |
+
/**
|
21 |
+
* Shared promise core.
|
22 |
+
*
|
23 |
+
* @var PromiseCore
|
24 |
+
*/
|
25 |
+
private $core;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Requests runner.
|
29 |
+
*
|
30 |
+
* @var MultiRunner
|
31 |
+
*/
|
32 |
+
private $runner;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Create new promise.
|
36 |
+
*
|
37 |
+
* @param PromiseCore $core Shared promise core
|
38 |
+
* @param MultiRunner $runner Simultaneous requests runner
|
39 |
+
*/
|
40 |
+
public function __construct(PromiseCore $core, MultiRunner $runner)
|
41 |
+
{
|
42 |
+
$this->core = $core;
|
43 |
+
$this->runner = $runner;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Add behavior for when the promise is resolved or rejected.
|
48 |
+
*
|
49 |
+
* If you do not care about one of the cases, you can set the corresponding callable to null
|
50 |
+
* The callback will be called when the response or exception arrived and never more than once.
|
51 |
+
*
|
52 |
+
* @param callable $onFulfilled Called when a response will be available
|
53 |
+
* @param callable $onRejected Called when an error happens.
|
54 |
+
*
|
55 |
+
* You must always return the Response in the interface or throw an Exception
|
56 |
+
*
|
57 |
+
* @return Promise Always returns a new promise which is resolved with value of the executed
|
58 |
+
* callback (onFulfilled / onRejected)
|
59 |
+
*/
|
60 |
+
public function then(callable $onFulfilled = null, callable $onRejected = null)
|
61 |
+
{
|
62 |
+
if ($onFulfilled) {
|
63 |
+
$this->core->addOnFulfilled($onFulfilled);
|
64 |
+
}
|
65 |
+
if ($onRejected) {
|
66 |
+
$this->core->addOnRejected($onRejected);
|
67 |
+
}
|
68 |
+
|
69 |
+
return new self($this->core, $this->runner);
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Get the state of the promise, one of PENDING, FULFILLED or REJECTED.
|
74 |
+
*
|
75 |
+
* @return string
|
76 |
+
*/
|
77 |
+
public function getState()
|
78 |
+
{
|
79 |
+
return $this->core->getState();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Wait for the promise to be fulfilled or rejected.
|
84 |
+
*
|
85 |
+
* When this method returns, the request has been resolved and the appropriate callable has terminated.
|
86 |
+
*
|
87 |
+
* When called with the unwrap option
|
88 |
+
*
|
89 |
+
* @param bool $unwrap Whether to return resolved value / throw reason or not
|
90 |
+
*
|
91 |
+
* @return \Psr\Http\Message\ResponseInterface|null Resolved value, null if $unwrap is set to false
|
92 |
+
*
|
93 |
+
* @throws \Http\Client\Exception The rejection reason
|
94 |
+
*/
|
95 |
+
public function wait($unwrap = true)
|
96 |
+
{
|
97 |
+
$this->runner->wait($this->core);
|
98 |
+
|
99 |
+
if ($unwrap) {
|
100 |
+
if ($this->core->getState() === self::REJECTED) {
|
101 |
+
throw $this->core->getException();
|
102 |
+
}
|
103 |
+
|
104 |
+
return $this->core->getResponse();
|
105 |
+
}
|
106 |
+
|
107 |
+
return null;
|
108 |
+
}
|
109 |
+
}
|
includes/vendor/mailerlite/php-http/curl-client/src/MultiRunner.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Curl;
|
4 |
+
|
5 |
+
use Http\Client\Exception\RequestException;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Simultaneous requests runner.
|
9 |
+
*
|
10 |
+
* @license http://opensource.org/licenses/MIT MIT
|
11 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
12 |
+
*/
|
13 |
+
class MultiRunner
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* cURL multi handle.
|
17 |
+
*
|
18 |
+
* @var resource|null
|
19 |
+
*/
|
20 |
+
private $multiHandle = null;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Awaiting cores.
|
24 |
+
*
|
25 |
+
* @var PromiseCore[]
|
26 |
+
*/
|
27 |
+
private $cores = [];
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Release resources if still active.
|
31 |
+
*/
|
32 |
+
public function __destruct()
|
33 |
+
{
|
34 |
+
if (is_resource($this->multiHandle)) {
|
35 |
+
curl_multi_close($this->multiHandle);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Add promise to runner.
|
41 |
+
*
|
42 |
+
* @param PromiseCore $core
|
43 |
+
*/
|
44 |
+
public function add(PromiseCore $core)
|
45 |
+
{
|
46 |
+
foreach ($this->cores as $existed) {
|
47 |
+
if ($existed === $core) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
$this->cores[] = $core;
|
53 |
+
|
54 |
+
if (null === $this->multiHandle) {
|
55 |
+
$this->multiHandle = curl_multi_init();
|
56 |
+
}
|
57 |
+
curl_multi_add_handle($this->multiHandle, $core->getHandle());
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Remove promise from runner.
|
62 |
+
*
|
63 |
+
* @param PromiseCore $core
|
64 |
+
*/
|
65 |
+
public function remove(PromiseCore $core)
|
66 |
+
{
|
67 |
+
foreach ($this->cores as $index => $existed) {
|
68 |
+
if ($existed === $core) {
|
69 |
+
curl_multi_remove_handle($this->multiHandle, $core->getHandle());
|
70 |
+
unset($this->cores[$index]);
|
71 |
+
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Wait for request(s) to be completed.
|
79 |
+
*
|
80 |
+
* @param PromiseCore|null $targetCore
|
81 |
+
*/
|
82 |
+
public function wait(PromiseCore $targetCore = null)
|
83 |
+
{
|
84 |
+
do {
|
85 |
+
$status = curl_multi_exec($this->multiHandle, $active);
|
86 |
+
$info = curl_multi_info_read($this->multiHandle);
|
87 |
+
if (false !== $info) {
|
88 |
+
$core = $this->findCoreByHandle($info['handle']);
|
89 |
+
|
90 |
+
if (null === $core) {
|
91 |
+
// We have no promise for this handle. Drop it.
|
92 |
+
curl_multi_remove_handle($this->multiHandle, $info['handle']);
|
93 |
+
continue;
|
94 |
+
}
|
95 |
+
|
96 |
+
if (CURLE_OK === $info['result']) {
|
97 |
+
$core->fulfill();
|
98 |
+
} else {
|
99 |
+
$error = curl_error($core->getHandle());
|
100 |
+
$core->reject(new RequestException($error, $core->getRequest()));
|
101 |
+
}
|
102 |
+
$this->remove($core);
|
103 |
+
|
104 |
+
// This is a promise we are waited for. So exiting wait().
|
105 |
+
if ($core === $targetCore) {
|
106 |
+
return;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Find core by handle.
|
114 |
+
*
|
115 |
+
* @param resource $handle
|
116 |
+
*
|
117 |
+
* @return PromiseCore|null
|
118 |
+
*/
|
119 |
+
private function findCoreByHandle($handle)
|
120 |
+
{
|
121 |
+
foreach ($this->cores as $core) {
|
122 |
+
if ($core->getHandle() === $handle) {
|
123 |
+
return $core;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
return null;
|
128 |
+
}
|
129 |
+
}
|
includes/vendor/mailerlite/php-http/curl-client/src/PromiseCore.php
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Curl;
|
4 |
+
|
5 |
+
use Http\Client\Exception;
|
6 |
+
use Http\Promise\Promise;
|
7 |
+
use Psr\Http\Message\RequestInterface;
|
8 |
+
use Psr\Http\Message\ResponseInterface;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Shared promises core.
|
12 |
+
*
|
13 |
+
* @license http://opensource.org/licenses/MIT MIT
|
14 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
15 |
+
*/
|
16 |
+
class PromiseCore
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* HTTP request.
|
20 |
+
*
|
21 |
+
* @var RequestInterface
|
22 |
+
*/
|
23 |
+
private $request;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* cURL handle.
|
27 |
+
*
|
28 |
+
* @var resource
|
29 |
+
*/
|
30 |
+
private $handle;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Response builder.
|
34 |
+
*
|
35 |
+
* @var ResponseBuilder
|
36 |
+
*/
|
37 |
+
private $responseBuilder;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Promise state.
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
private $state;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Exception.
|
48 |
+
*
|
49 |
+
* @var Exception|null
|
50 |
+
*/
|
51 |
+
private $exception = null;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Functions to call when a response will be available.
|
55 |
+
*
|
56 |
+
* @var callable[]
|
57 |
+
*/
|
58 |
+
private $onFulfilled = [];
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Functions to call when an error happens.
|
62 |
+
*
|
63 |
+
* @var callable[]
|
64 |
+
*/
|
65 |
+
private $onRejected = [];
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Create shared core.
|
69 |
+
*
|
70 |
+
* @param RequestInterface $request HTTP request.
|
71 |
+
* @param resource $handle cURL handle.
|
72 |
+
* @param ResponseBuilder $responseBuilder Response builder.
|
73 |
+
*
|
74 |
+
* @throws \InvalidArgumentException If $handle is not a cURL resource.
|
75 |
+
*/
|
76 |
+
public function __construct(
|
77 |
+
RequestInterface $request,
|
78 |
+
$handle,
|
79 |
+
ResponseBuilder $responseBuilder
|
80 |
+
) {
|
81 |
+
if (!is_resource($handle)) {
|
82 |
+
throw new \InvalidArgumentException(
|
83 |
+
sprintf(
|
84 |
+
'Parameter $handle expected to be a cURL resource, %s given',
|
85 |
+
gettype($handle)
|
86 |
+
)
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
if (get_resource_type($handle) !== 'curl') {
|
91 |
+
throw new \InvalidArgumentException(
|
92 |
+
sprintf(
|
93 |
+
'Parameter $handle expected to be a cURL resource, %s resource given',
|
94 |
+
get_resource_type($handle)
|
95 |
+
)
|
96 |
+
);
|
97 |
+
}
|
98 |
+
|
99 |
+
$this->request = $request;
|
100 |
+
$this->handle = $handle;
|
101 |
+
$this->responseBuilder = $responseBuilder;
|
102 |
+
$this->state = Promise::PENDING;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Add on fulfilled callback.
|
107 |
+
*
|
108 |
+
* @param callable $callback
|
109 |
+
*/
|
110 |
+
public function addOnFulfilled(callable $callback)
|
111 |
+
{
|
112 |
+
if ($this->getState() === Promise::PENDING) {
|
113 |
+
$this->onFulfilled[] = $callback;
|
114 |
+
} elseif ($this->getState() === Promise::FULFILLED) {
|
115 |
+
$response = call_user_func($callback, $this->responseBuilder->getResponse());
|
116 |
+
if ($response instanceof ResponseInterface) {
|
117 |
+
$this->responseBuilder->setResponse($response);
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Add on rejected callback.
|
124 |
+
*
|
125 |
+
* @param callable $callback
|
126 |
+
*/
|
127 |
+
public function addOnRejected(callable $callback)
|
128 |
+
{
|
129 |
+
if ($this->getState() === Promise::PENDING) {
|
130 |
+
$this->onRejected[] = $callback;
|
131 |
+
} elseif ($this->getState() === Promise::REJECTED) {
|
132 |
+
$this->exception = call_user_func($callback, $this->exception);
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Return cURL handle.
|
138 |
+
*
|
139 |
+
* @return resource
|
140 |
+
*/
|
141 |
+
public function getHandle()
|
142 |
+
{
|
143 |
+
return $this->handle;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Get the state of the promise, one of PENDING, FULFILLED or REJECTED.
|
148 |
+
*
|
149 |
+
* @return string
|
150 |
+
*/
|
151 |
+
public function getState()
|
152 |
+
{
|
153 |
+
return $this->state;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Return request.
|
158 |
+
*
|
159 |
+
* @return RequestInterface
|
160 |
+
*/
|
161 |
+
public function getRequest()
|
162 |
+
{
|
163 |
+
return $this->request;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Return the value of the promise (fulfilled).
|
168 |
+
*
|
169 |
+
* @return ResponseInterface Response Object only when the Promise is fulfilled
|
170 |
+
*/
|
171 |
+
public function getResponse()
|
172 |
+
{
|
173 |
+
return $this->responseBuilder->getResponse();
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Get the reason why the promise was rejected.
|
178 |
+
*
|
179 |
+
* If the exception is an instance of Http\Client\Exception\HttpException it will contain
|
180 |
+
* the response object with the status code and the http reason.
|
181 |
+
*
|
182 |
+
* @return Exception Exception Object only when the Promise is rejected
|
183 |
+
*
|
184 |
+
* @throws \LogicException When the promise is not rejected
|
185 |
+
*/
|
186 |
+
public function getException()
|
187 |
+
{
|
188 |
+
if (null === $this->exception) {
|
189 |
+
throw new \LogicException('Promise is not rejected');
|
190 |
+
}
|
191 |
+
|
192 |
+
return $this->exception;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Fulfill promise.
|
197 |
+
*/
|
198 |
+
public function fulfill()
|
199 |
+
{
|
200 |
+
$this->state = Promise::FULFILLED;
|
201 |
+
$response = $this->responseBuilder->getResponse();
|
202 |
+
try {
|
203 |
+
$response->getBody()->seek(0);
|
204 |
+
} catch (\RuntimeException $e) {
|
205 |
+
$exception = new Exception\TransferException($e->getMessage(), $e->getCode(), $e);
|
206 |
+
$this->reject($exception);
|
207 |
+
|
208 |
+
return;
|
209 |
+
}
|
210 |
+
|
211 |
+
while (count($this->onFulfilled) > 0) {
|
212 |
+
$callback = array_shift($this->onFulfilled);
|
213 |
+
$response = call_user_func($callback, $response);
|
214 |
+
}
|
215 |
+
|
216 |
+
if ($response instanceof ResponseInterface) {
|
217 |
+
$this->responseBuilder->setResponse($response);
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Reject promise.
|
223 |
+
*
|
224 |
+
* @param Exception $exception Reject reason
|
225 |
+
*/
|
226 |
+
public function reject(Exception $exception)
|
227 |
+
{
|
228 |
+
$this->exception = $exception;
|
229 |
+
$this->state = Promise::REJECTED;
|
230 |
+
|
231 |
+
while (count($this->onRejected) > 0) {
|
232 |
+
$callback = array_shift($this->onRejected);
|
233 |
+
try {
|
234 |
+
$exception = call_user_func($callback, $this->exception);
|
235 |
+
$this->exception = $exception;
|
236 |
+
} catch (Exception $exception) {
|
237 |
+
$this->exception = $exception;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
includes/vendor/mailerlite/php-http/curl-client/src/ResponseBuilder.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Curl;
|
4 |
+
|
5 |
+
use Http\Message\Builder\ResponseBuilder as OriginalResponseBuilder;
|
6 |
+
use Psr\Http\Message\ResponseInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Extended response builder.
|
10 |
+
*/
|
11 |
+
class ResponseBuilder extends OriginalResponseBuilder
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Replace response with a new instance.
|
15 |
+
*
|
16 |
+
* @param ResponseInterface $response
|
17 |
+
*/
|
18 |
+
public function setResponse(ResponseInterface $response)
|
19 |
+
{
|
20 |
+
$this->response = $response;
|
21 |
+
}
|
22 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/ClassDiscovery.php
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\ClassInstantiationFailedException;
|
6 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
7 |
+
use Http\Discovery\Exception\NoCandidateFoundException;
|
8 |
+
use Http\Discovery\Exception\StrategyUnavailableException;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Registry that based find results on class existence.
|
12 |
+
*
|
13 |
+
* @author David de Boer <david@ddeboer.nl>
|
14 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
15 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
16 |
+
*/
|
17 |
+
abstract class ClassDiscovery
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* A list of strategies to find classes.
|
21 |
+
*
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
private static $strategies = [
|
25 |
+
Strategy\PuliBetaStrategy::class,
|
26 |
+
Strategy\CommonClassesStrategy::class,
|
27 |
+
Strategy\CommonPsr17ClassesStrategy::class,
|
28 |
+
];
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Discovery cache to make the second time we use discovery faster.
|
32 |
+
*
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private static $cache = [];
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Finds a class.
|
39 |
+
*
|
40 |
+
* @param string $type
|
41 |
+
*
|
42 |
+
* @return string|\Closure
|
43 |
+
*
|
44 |
+
* @throws DiscoveryFailedException
|
45 |
+
*/
|
46 |
+
protected static function findOneByType($type)
|
47 |
+
{
|
48 |
+
// Look in the cache
|
49 |
+
if (null !== ($class = self::getFromCache($type))) {
|
50 |
+
return $class;
|
51 |
+
}
|
52 |
+
|
53 |
+
$exceptions = [];
|
54 |
+
foreach (self::$strategies as $strategy) {
|
55 |
+
try {
|
56 |
+
$candidates = call_user_func($strategy.'::getCandidates', $type);
|
57 |
+
} catch (StrategyUnavailableException $e) {
|
58 |
+
$exceptions[] = $e;
|
59 |
+
|
60 |
+
continue;
|
61 |
+
}
|
62 |
+
|
63 |
+
foreach ($candidates as $candidate) {
|
64 |
+
if (isset($candidate['condition'])) {
|
65 |
+
if (!self::evaluateCondition($candidate['condition'])) {
|
66 |
+
continue;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
// save the result for later use
|
71 |
+
self::storeInCache($type, $candidate);
|
72 |
+
|
73 |
+
return $candidate['class'];
|
74 |
+
}
|
75 |
+
|
76 |
+
$exceptions[] = new NoCandidateFoundException($strategy, $candidates);
|
77 |
+
}
|
78 |
+
|
79 |
+
throw DiscoveryFailedException::create($exceptions);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get a value from cache.
|
84 |
+
*
|
85 |
+
* @param string $type
|
86 |
+
*
|
87 |
+
* @return string|null
|
88 |
+
*/
|
89 |
+
private static function getFromCache($type)
|
90 |
+
{
|
91 |
+
if (!isset(self::$cache[$type])) {
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
|
95 |
+
$candidate = self::$cache[$type];
|
96 |
+
if (isset($candidate['condition'])) {
|
97 |
+
if (!self::evaluateCondition($candidate['condition'])) {
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
return $candidate['class'];
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Store a value in cache.
|
107 |
+
*
|
108 |
+
* @param string $type
|
109 |
+
* @param string $class
|
110 |
+
*/
|
111 |
+
private static function storeInCache($type, $class)
|
112 |
+
{
|
113 |
+
self::$cache[$type] = $class;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Set new strategies and clear the cache.
|
118 |
+
*
|
119 |
+
* @param array $strategies string array of fully qualified class name to a DiscoveryStrategy
|
120 |
+
*/
|
121 |
+
public static function setStrategies(array $strategies)
|
122 |
+
{
|
123 |
+
self::$strategies = $strategies;
|
124 |
+
self::clearCache();
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Returns the currently configured discovery strategies as fully qualified class names.
|
129 |
+
*
|
130 |
+
* @return string[]
|
131 |
+
*/
|
132 |
+
public static function getStrategies(): iterable
|
133 |
+
{
|
134 |
+
return self::$strategies;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Append a strategy at the end of the strategy queue.
|
139 |
+
*
|
140 |
+
* @param string $strategy Fully qualified class name to a DiscoveryStrategy
|
141 |
+
*/
|
142 |
+
public static function appendStrategy($strategy)
|
143 |
+
{
|
144 |
+
self::$strategies[] = $strategy;
|
145 |
+
self::clearCache();
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Prepend a strategy at the beginning of the strategy queue.
|
150 |
+
*
|
151 |
+
* @param string $strategy Fully qualified class name to a DiscoveryStrategy
|
152 |
+
*/
|
153 |
+
public static function prependStrategy($strategy)
|
154 |
+
{
|
155 |
+
array_unshift(self::$strategies, $strategy);
|
156 |
+
self::clearCache();
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Clear the cache.
|
161 |
+
*/
|
162 |
+
public static function clearCache()
|
163 |
+
{
|
164 |
+
self::$cache = [];
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Evaluates conditions to boolean.
|
169 |
+
*
|
170 |
+
* @param mixed $condition
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
*/
|
174 |
+
protected static function evaluateCondition($condition)
|
175 |
+
{
|
176 |
+
if (is_string($condition)) {
|
177 |
+
// Should be extended for functions, extensions???
|
178 |
+
return self::safeClassExists($condition);
|
179 |
+
}
|
180 |
+
if (is_callable($condition)) {
|
181 |
+
return (bool) $condition();
|
182 |
+
}
|
183 |
+
if (is_bool($condition)) {
|
184 |
+
return $condition;
|
185 |
+
}
|
186 |
+
if (is_array($condition)) {
|
187 |
+
foreach ($condition as $c) {
|
188 |
+
if (false === static::evaluateCondition($c)) {
|
189 |
+
// Immediately stop execution if the condition is false
|
190 |
+
return false;
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
return true;
|
195 |
+
}
|
196 |
+
|
197 |
+
return false;
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Get an instance of the $class.
|
202 |
+
*
|
203 |
+
* @param string|\Closure $class A FQCN of a class or a closure that instantiate the class.
|
204 |
+
*
|
205 |
+
* @return object
|
206 |
+
*
|
207 |
+
* @throws ClassInstantiationFailedException
|
208 |
+
*/
|
209 |
+
protected static function instantiateClass($class)
|
210 |
+
{
|
211 |
+
try {
|
212 |
+
if (is_string($class)) {
|
213 |
+
return new $class();
|
214 |
+
}
|
215 |
+
|
216 |
+
if (is_callable($class)) {
|
217 |
+
return $class();
|
218 |
+
}
|
219 |
+
} catch (\Exception $e) {
|
220 |
+
throw new ClassInstantiationFailedException('Unexpected exception when instantiating class.', 0, $e);
|
221 |
+
}
|
222 |
+
|
223 |
+
throw new ClassInstantiationFailedException('Could not instantiate class because parameter is neither a callable nor a string');
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* We want to do a "safe" version of PHP's "class_exists" because Magento has a bug
|
228 |
+
* (or they call it a "feature"). Magento is throwing an exception if you do class_exists()
|
229 |
+
* on a class that ends with "Factory" and if that file does not exits.
|
230 |
+
*
|
231 |
+
* This function will catch all potential exceptions and make sure it returns a boolean.
|
232 |
+
*
|
233 |
+
* @param string $class
|
234 |
+
* @param bool $autoload
|
235 |
+
*
|
236 |
+
* @return bool
|
237 |
+
*/
|
238 |
+
public static function safeClassExists($class)
|
239 |
+
{
|
240 |
+
try {
|
241 |
+
return class_exists($class) || interface_exists($class);
|
242 |
+
} catch (\Exception $e) {
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* An interface implemented by all discovery related exceptions.
|
7 |
+
*
|
8 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
9 |
+
*/
|
10 |
+
interface Exception
|
11 |
+
{
|
12 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception/ClassInstantiationFailedException.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Exception;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Thrown when a class fails to instantiate.
|
9 |
+
*
|
10 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
11 |
+
*/
|
12 |
+
final class ClassInstantiationFailedException extends \RuntimeException implements Exception
|
13 |
+
{
|
14 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception/DiscoveryFailedException.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Exception;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Thrown when all discovery strategies fails to find a resource.
|
9 |
+
*
|
10 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
11 |
+
*/
|
12 |
+
final class DiscoveryFailedException extends \Exception implements Exception
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @var \Exception[]
|
16 |
+
*/
|
17 |
+
private $exceptions;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @param string $message
|
21 |
+
* @param \Exception[] $exceptions
|
22 |
+
*/
|
23 |
+
public function __construct($message, array $exceptions = [])
|
24 |
+
{
|
25 |
+
$this->exceptions = $exceptions;
|
26 |
+
|
27 |
+
parent::__construct($message);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param \Exception[] $exceptions
|
32 |
+
*/
|
33 |
+
public static function create($exceptions)
|
34 |
+
{
|
35 |
+
$message = 'Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors';
|
36 |
+
foreach ($exceptions as $e) {
|
37 |
+
$message .= "\n - ".$e->getMessage();
|
38 |
+
}
|
39 |
+
$message .= "\n\n";
|
40 |
+
|
41 |
+
return new self($message, $exceptions);
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @return \Exception[]
|
46 |
+
*/
|
47 |
+
public function getExceptions()
|
48 |
+
{
|
49 |
+
return $this->exceptions;
|
50 |
+
}
|
51 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception/NoCandidateFoundException.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Exception;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* When we have used a strategy but no candidates provided by that strategy could be used.
|
9 |
+
*
|
10 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
11 |
+
*/
|
12 |
+
final class NoCandidateFoundException extends \Exception implements Exception
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @param string $strategy
|
16 |
+
* @param array $candidates
|
17 |
+
*/
|
18 |
+
public function __construct($strategy, array $candidates)
|
19 |
+
{
|
20 |
+
$classes = array_map(
|
21 |
+
function ($a) {
|
22 |
+
return $a['class'];
|
23 |
+
},
|
24 |
+
$candidates
|
25 |
+
);
|
26 |
+
|
27 |
+
$message = sprintf(
|
28 |
+
'No valid candidate found using strategy "%s". We tested the following candidates: %s.',
|
29 |
+
$strategy,
|
30 |
+
implode(', ', array_map([$this, 'stringify'], $classes))
|
31 |
+
);
|
32 |
+
|
33 |
+
parent::__construct($message);
|
34 |
+
}
|
35 |
+
|
36 |
+
private function stringify($mixed)
|
37 |
+
{
|
38 |
+
if (is_string($mixed)) {
|
39 |
+
return $mixed;
|
40 |
+
}
|
41 |
+
|
42 |
+
if (is_array($mixed) && 2 === count($mixed)) {
|
43 |
+
return sprintf('%s::%s', $this->stringify($mixed[0]), $mixed[1]);
|
44 |
+
}
|
45 |
+
|
46 |
+
return is_object($mixed) ? get_class($mixed) : gettype($mixed);
|
47 |
+
}
|
48 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception/NotFoundException.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Exception;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Thrown when a discovery does not find any matches.
|
9 |
+
*
|
10 |
+
* @final do NOT extend this class, not final for BC reasons
|
11 |
+
*
|
12 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
13 |
+
*/
|
14 |
+
/*final */class NotFoundException extends \RuntimeException implements Exception
|
15 |
+
{
|
16 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception/PuliUnavailableException.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Exception;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Thrown when we can't use Puli for discovery.
|
7 |
+
*
|
8 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
9 |
+
*/
|
10 |
+
final class PuliUnavailableException extends StrategyUnavailableException
|
11 |
+
{
|
12 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Exception/StrategyUnavailableException.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Exception;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* This exception is thrown when we cannot use a discovery strategy. This is *not* thrown when
|
9 |
+
* the discovery fails to find a class.
|
10 |
+
*
|
11 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
12 |
+
*/
|
13 |
+
class StrategyUnavailableException extends \RuntimeException implements Exception
|
14 |
+
{
|
15 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/HttpAsyncClientDiscovery.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Client\HttpAsyncClient;
|
6 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Finds an HTTP Asynchronous Client.
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
final class HttpAsyncClientDiscovery extends ClassDiscovery
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Finds an HTTP Async Client.
|
17 |
+
*
|
18 |
+
* @return HttpAsyncClient
|
19 |
+
*
|
20 |
+
* @throws Exception\NotFoundException
|
21 |
+
*/
|
22 |
+
public static function find()
|
23 |
+
{
|
24 |
+
try {
|
25 |
+
$asyncClient = static::findOneByType(HttpAsyncClient::class);
|
26 |
+
} catch (DiscoveryFailedException $e) {
|
27 |
+
throw new NotFoundException('No HTTPlug async clients found. Make sure to install a package providing "php-http/async-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
|
28 |
+
}
|
29 |
+
|
30 |
+
return static::instantiateClass($asyncClient);
|
31 |
+
}
|
32 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/HttpClientDiscovery.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Client\HttpClient;
|
6 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Finds an HTTP Client.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class HttpClientDiscovery extends ClassDiscovery
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Finds an HTTP Client.
|
17 |
+
*
|
18 |
+
* @return HttpClient
|
19 |
+
*
|
20 |
+
* @throws Exception\NotFoundException
|
21 |
+
*/
|
22 |
+
public static function find()
|
23 |
+
{
|
24 |
+
try {
|
25 |
+
$client = static::findOneByType(HttpClient::class);
|
26 |
+
} catch (DiscoveryFailedException $e) {
|
27 |
+
throw new NotFoundException('No HTTPlug clients found. Make sure to install a package providing "php-http/client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
|
28 |
+
}
|
29 |
+
|
30 |
+
return static::instantiateClass($client);
|
31 |
+
}
|
32 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/MessageFactoryDiscovery.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
6 |
+
use Http\Message\MessageFactory;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Finds a Message Factory.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*
|
13 |
+
* @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery.
|
14 |
+
*/
|
15 |
+
final class MessageFactoryDiscovery extends ClassDiscovery
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Finds a Message Factory.
|
19 |
+
*
|
20 |
+
* @return MessageFactory
|
21 |
+
*
|
22 |
+
* @throws Exception\NotFoundException
|
23 |
+
*/
|
24 |
+
public static function find()
|
25 |
+
{
|
26 |
+
try {
|
27 |
+
$messageFactory = static::findOneByType(MessageFactory::class);
|
28 |
+
} catch (DiscoveryFailedException $e) {
|
29 |
+
throw new NotFoundException('No message factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
|
30 |
+
}
|
31 |
+
|
32 |
+
return static::instantiateClass($messageFactory);
|
33 |
+
}
|
34 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/NotFoundException.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Thrown when a discovery does not find any matches.
|
7 |
+
*
|
8 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
9 |
+
*
|
10 |
+
* @deprecated since since version 1.0, and will be removed in 2.0. Use {@link \Http\Discovery\Exception\NotFoundException} instead.
|
11 |
+
*/
|
12 |
+
final class NotFoundException extends \Http\Discovery\Exception\NotFoundException
|
13 |
+
{
|
14 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Psr17FactoryDiscovery.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
6 |
+
use Psr\Http\Message\RequestFactoryInterface;
|
7 |
+
use Psr\Http\Message\ResponseFactoryInterface;
|
8 |
+
use Psr\Http\Message\ServerRequestFactoryInterface;
|
9 |
+
use Psr\Http\Message\StreamFactoryInterface;
|
10 |
+
use Psr\Http\Message\UploadedFileFactoryInterface;
|
11 |
+
use Psr\Http\Message\UriFactoryInterface;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Finds PSR-17 factories.
|
15 |
+
*
|
16 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
17 |
+
*/
|
18 |
+
final class Psr17FactoryDiscovery extends ClassDiscovery
|
19 |
+
{
|
20 |
+
private static function createException($type, Exception $e)
|
21 |
+
{
|
22 |
+
return new \Http\Discovery\Exception\NotFoundException(
|
23 |
+
'No PSR-17 '.$type.' found. Install a package from this list: https://packagist.org/providers/psr/http-factory-implementation',
|
24 |
+
0,
|
25 |
+
$e
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @return RequestFactoryInterface
|
31 |
+
*
|
32 |
+
* @throws Exception\NotFoundException
|
33 |
+
*/
|
34 |
+
public static function findRequestFactory()
|
35 |
+
{
|
36 |
+
try {
|
37 |
+
$messageFactory = static::findOneByType(RequestFactoryInterface::class);
|
38 |
+
} catch (DiscoveryFailedException $e) {
|
39 |
+
throw self::createException('request factory', $e);
|
40 |
+
}
|
41 |
+
|
42 |
+
return static::instantiateClass($messageFactory);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @return ResponseFactoryInterface
|
47 |
+
*
|
48 |
+
* @throws Exception\NotFoundException
|
49 |
+
*/
|
50 |
+
public static function findResponseFactory()
|
51 |
+
{
|
52 |
+
try {
|
53 |
+
$messageFactory = static::findOneByType(ResponseFactoryInterface::class);
|
54 |
+
} catch (DiscoveryFailedException $e) {
|
55 |
+
throw self::createException('response factory', $e);
|
56 |
+
}
|
57 |
+
|
58 |
+
return static::instantiateClass($messageFactory);
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @return ServerRequestFactoryInterface
|
63 |
+
*
|
64 |
+
* @throws Exception\NotFoundException
|
65 |
+
*/
|
66 |
+
public static function findServerRequestFactory()
|
67 |
+
{
|
68 |
+
try {
|
69 |
+
$messageFactory = static::findOneByType(ServerRequestFactoryInterface::class);
|
70 |
+
} catch (DiscoveryFailedException $e) {
|
71 |
+
throw self::createException('server request factory', $e);
|
72 |
+
}
|
73 |
+
|
74 |
+
return static::instantiateClass($messageFactory);
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @return StreamFactoryInterface
|
79 |
+
*
|
80 |
+
* @throws Exception\NotFoundException
|
81 |
+
*/
|
82 |
+
public static function findStreamFactory()
|
83 |
+
{
|
84 |
+
try {
|
85 |
+
$messageFactory = static::findOneByType(StreamFactoryInterface::class);
|
86 |
+
} catch (DiscoveryFailedException $e) {
|
87 |
+
throw self::createException('stream factory', $e);
|
88 |
+
}
|
89 |
+
|
90 |
+
return static::instantiateClass($messageFactory);
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @return UploadedFileFactoryInterface
|
95 |
+
*
|
96 |
+
* @throws Exception\NotFoundException
|
97 |
+
*/
|
98 |
+
public static function findUploadedFileFactory()
|
99 |
+
{
|
100 |
+
try {
|
101 |
+
$messageFactory = static::findOneByType(UploadedFileFactoryInterface::class);
|
102 |
+
} catch (DiscoveryFailedException $e) {
|
103 |
+
throw self::createException('uploaded file factory', $e);
|
104 |
+
}
|
105 |
+
|
106 |
+
return static::instantiateClass($messageFactory);
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* @return UriFactoryInterface
|
111 |
+
*
|
112 |
+
* @throws Exception\NotFoundException
|
113 |
+
*/
|
114 |
+
public static function findUrlFactory()
|
115 |
+
{
|
116 |
+
try {
|
117 |
+
$messageFactory = static::findOneByType(UriFactoryInterface::class);
|
118 |
+
} catch (DiscoveryFailedException $e) {
|
119 |
+
throw self::createException('url factory', $e);
|
120 |
+
}
|
121 |
+
|
122 |
+
return static::instantiateClass($messageFactory);
|
123 |
+
}
|
124 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Psr18ClientDiscovery.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
6 |
+
use Psr\Http\Client\ClientInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Finds a PSR-18 HTTP Client.
|
10 |
+
*
|
11 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
12 |
+
*/
|
13 |
+
final class Psr18ClientDiscovery extends ClassDiscovery
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Finds a PSR-18 HTTP Client.
|
17 |
+
*
|
18 |
+
* @return ClientInterface
|
19 |
+
*
|
20 |
+
* @throws Exception\NotFoundException
|
21 |
+
*/
|
22 |
+
public static function find()
|
23 |
+
{
|
24 |
+
try {
|
25 |
+
$client = static::findOneByType(ClientInterface::class);
|
26 |
+
} catch (DiscoveryFailedException $e) {
|
27 |
+
throw new \Http\Discovery\Exception\NotFoundException('No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', 0, $e);
|
28 |
+
}
|
29 |
+
|
30 |
+
return static::instantiateClass($client);
|
31 |
+
}
|
32 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Strategy/CommonClassesStrategy.php
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Strategy;
|
4 |
+
|
5 |
+
use GuzzleHttp\Promise\Promise;
|
6 |
+
use GuzzleHttp\Psr7\Request as GuzzleRequest;
|
7 |
+
use Http\Client\HttpAsyncClient;
|
8 |
+
use Http\Client\HttpClient;
|
9 |
+
use Http\Discovery\Exception\NotFoundException;
|
10 |
+
use Http\Discovery\MessageFactoryDiscovery;
|
11 |
+
use Http\Discovery\Psr17FactoryDiscovery;
|
12 |
+
use Http\Message\RequestFactory;
|
13 |
+
use Psr\Http\Message\RequestFactoryInterface as Psr17RequestFactory;
|
14 |
+
use Http\Message\MessageFactory;
|
15 |
+
use Http\Message\MessageFactory\GuzzleMessageFactory;
|
16 |
+
use Http\Message\StreamFactory;
|
17 |
+
use Http\Message\StreamFactory\GuzzleStreamFactory;
|
18 |
+
use Http\Message\UriFactory;
|
19 |
+
use Http\Message\UriFactory\GuzzleUriFactory;
|
20 |
+
use Http\Message\MessageFactory\DiactorosMessageFactory;
|
21 |
+
use Http\Message\StreamFactory\DiactorosStreamFactory;
|
22 |
+
use Http\Message\UriFactory\DiactorosUriFactory;
|
23 |
+
use Psr\Http\Client\ClientInterface as Psr18Client;
|
24 |
+
use Zend\Diactoros\Request as DiactorosRequest;
|
25 |
+
use Http\Message\MessageFactory\SlimMessageFactory;
|
26 |
+
use Http\Message\StreamFactory\SlimStreamFactory;
|
27 |
+
use Http\Message\UriFactory\SlimUriFactory;
|
28 |
+
use Slim\Http\Request as SlimRequest;
|
29 |
+
use Http\Adapter\Guzzle6\Client as Guzzle6;
|
30 |
+
use Http\Adapter\Guzzle5\Client as Guzzle5;
|
31 |
+
use Http\Client\Curl\Client as Curl;
|
32 |
+
use Http\Client\Socket\Client as Socket;
|
33 |
+
use Http\Adapter\React\Client as React;
|
34 |
+
use Http\Adapter\Buzz\Client as Buzz;
|
35 |
+
use Http\Adapter\Cake\Client as Cake;
|
36 |
+
use Http\Adapter\Zend\Client as Zend;
|
37 |
+
use Http\Adapter\Artax\Client as Artax;
|
38 |
+
use Symfony\Component\HttpClient\HttplugClient as SymfonyHttplug;
|
39 |
+
use Symfony\Component\HttpClient\Psr18Client as SymfonyPsr18;
|
40 |
+
use Nyholm\Psr7\Factory\HttplugFactory as NyholmHttplugFactory;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @internal
|
44 |
+
*
|
45 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
46 |
+
*/
|
47 |
+
final class CommonClassesStrategy implements DiscoveryStrategy
|
48 |
+
{
|
49 |
+
/**
|
50 |
+
* @var array
|
51 |
+
*/
|
52 |
+
private static $classes = [
|
53 |
+
MessageFactory::class => [
|
54 |
+
['class' => NyholmHttplugFactory::class, 'condition' => [NyholmHttplugFactory::class]],
|
55 |
+
['class' => GuzzleMessageFactory::class, 'condition' => [GuzzleRequest::class, GuzzleMessageFactory::class]],
|
56 |
+
['class' => DiactorosMessageFactory::class, 'condition' => [DiactorosRequest::class, DiactorosMessageFactory::class]],
|
57 |
+
['class' => SlimMessageFactory::class, 'condition' => [SlimRequest::class, SlimMessageFactory::class]],
|
58 |
+
],
|
59 |
+
StreamFactory::class => [
|
60 |
+
['class' => NyholmHttplugFactory::class, 'condition' => [NyholmHttplugFactory::class]],
|
61 |
+
['class' => GuzzleStreamFactory::class, 'condition' => [GuzzleRequest::class, GuzzleStreamFactory::class]],
|
62 |
+
['class' => DiactorosStreamFactory::class, 'condition' => [DiactorosRequest::class, DiactorosStreamFactory::class]],
|
63 |
+
['class' => SlimStreamFactory::class, 'condition' => [SlimRequest::class, SlimStreamFactory::class]],
|
64 |
+
],
|
65 |
+
UriFactory::class => [
|
66 |
+
['class' => NyholmHttplugFactory::class, 'condition' => [NyholmHttplugFactory::class]],
|
67 |
+
['class' => GuzzleUriFactory::class, 'condition' => [GuzzleRequest::class, GuzzleUriFactory::class]],
|
68 |
+
['class' => DiactorosUriFactory::class, 'condition' => [DiactorosRequest::class, DiactorosUriFactory::class]],
|
69 |
+
['class' => SlimUriFactory::class, 'condition' => [SlimRequest::class, SlimUriFactory::class]],
|
70 |
+
],
|
71 |
+
HttpAsyncClient::class => [
|
72 |
+
['class' => SymfonyHttplug::class, 'condition' => [SymfonyHttplug::class, Promise::class, RequestFactory::class, [self::class, 'isPsr17FactoryInstalled']]],
|
73 |
+
['class' => Guzzle6::class, 'condition' => Guzzle6::class],
|
74 |
+
['class' => Curl::class, 'condition' => Curl::class],
|
75 |
+
['class' => React::class, 'condition' => React::class],
|
76 |
+
],
|
77 |
+
HttpClient::class => [
|
78 |
+
['class' => SymfonyHttplug::class, 'condition' => [SymfonyHttplug::class, RequestFactory::class, [self::class, 'isPsr17FactoryInstalled']]],
|
79 |
+
['class' => Guzzle6::class, 'condition' => Guzzle6::class],
|
80 |
+
['class' => Guzzle5::class, 'condition' => Guzzle5::class],
|
81 |
+
['class' => Curl::class, 'condition' => Curl::class],
|
82 |
+
['class' => Socket::class, 'condition' => Socket::class],
|
83 |
+
['class' => Buzz::class, 'condition' => Buzz::class],
|
84 |
+
['class' => React::class, 'condition' => React::class],
|
85 |
+
['class' => Cake::class, 'condition' => Cake::class],
|
86 |
+
['class' => Zend::class, 'condition' => Zend::class],
|
87 |
+
['class' => Artax::class, 'condition' => Artax::class],
|
88 |
+
[
|
89 |
+
'class' => [self::class, 'buzzInstantiate'],
|
90 |
+
'condition' => [\Buzz\Client\FileGetContents::class, \Buzz\Message\ResponseBuilder::class],
|
91 |
+
],
|
92 |
+
],
|
93 |
+
Psr18Client::class => [
|
94 |
+
[
|
95 |
+
'class' => [self::class, 'symfonyPsr18Instantiate'],
|
96 |
+
'condition' => [SymfonyPsr18::class, Psr17RequestFactory::class],
|
97 |
+
],
|
98 |
+
[
|
99 |
+
'class' => [self::class, 'buzzInstantiate'],
|
100 |
+
'condition' => [\Buzz\Client\FileGetContents::class, \Buzz\Message\ResponseBuilder::class],
|
101 |
+
],
|
102 |
+
],
|
103 |
+
];
|
104 |
+
|
105 |
+
/**
|
106 |
+
* {@inheritdoc}
|
107 |
+
*/
|
108 |
+
public static function getCandidates($type)
|
109 |
+
{
|
110 |
+
if (Psr18Client::class === $type) {
|
111 |
+
$candidates = self::$classes[PSR18Client::class];
|
112 |
+
|
113 |
+
// HTTPlug 2.0 clients implements PSR18Client too.
|
114 |
+
foreach (self::$classes[HttpClient::class] as $c) {
|
115 |
+
try {
|
116 |
+
if (is_subclass_of($c['class'], Psr18Client::class)) {
|
117 |
+
$candidates[] = $c;
|
118 |
+
}
|
119 |
+
} catch (\Throwable $e) {
|
120 |
+
trigger_error(sprintf('Got exception "%s (%s)" while checking if a PSR-18 Client is available', get_class($e), $e->getMessage()), E_USER_WARNING);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
return $candidates;
|
125 |
+
}
|
126 |
+
|
127 |
+
if (isset(self::$classes[$type])) {
|
128 |
+
return self::$classes[$type];
|
129 |
+
}
|
130 |
+
|
131 |
+
return [];
|
132 |
+
}
|
133 |
+
|
134 |
+
public static function buzzInstantiate()
|
135 |
+
{
|
136 |
+
return new \Buzz\Client\FileGetContents(MessageFactoryDiscovery::find());
|
137 |
+
}
|
138 |
+
|
139 |
+
public static function symfonyPsr18Instantiate()
|
140 |
+
{
|
141 |
+
return new SymfonyPsr18(null, Psr17FactoryDiscovery::findResponseFactory(), Psr17FactoryDiscovery::findStreamFactory());
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Can be used as a condition.
|
146 |
+
*
|
147 |
+
* @return bool
|
148 |
+
*/
|
149 |
+
public static function isPsr17FactoryInstalled()
|
150 |
+
{
|
151 |
+
try {
|
152 |
+
Psr17FactoryDiscovery::findResponseFactory();
|
153 |
+
} catch (NotFoundException $e) {
|
154 |
+
return false;
|
155 |
+
} catch (\Throwable $e) {
|
156 |
+
trigger_error(sprintf('Got exception "%s (%s)" while checking if a PSR-17 ResponseFactory is available', get_class($e), $e->getMessage()), E_USER_WARNING);
|
157 |
+
|
158 |
+
return false;
|
159 |
+
}
|
160 |
+
|
161 |
+
return true;
|
162 |
+
}
|
163 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Strategy;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestFactoryInterface;
|
6 |
+
use Psr\Http\Message\ResponseFactoryInterface;
|
7 |
+
use Psr\Http\Message\ServerRequestFactoryInterface;
|
8 |
+
use Psr\Http\Message\StreamFactoryInterface;
|
9 |
+
use Psr\Http\Message\UploadedFileFactoryInterface;
|
10 |
+
use Psr\Http\Message\UriFactoryInterface;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @internal
|
14 |
+
*
|
15 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
16 |
+
*/
|
17 |
+
final class CommonPsr17ClassesStrategy implements DiscoveryStrategy
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
+
private static $classes = [
|
23 |
+
RequestFactoryInterface::class => [
|
24 |
+
'Nyholm\Psr7\Factory\Psr17Factory',
|
25 |
+
'Zend\Diactoros\RequestFactory',
|
26 |
+
'GuzzleHttp\Psr7\HttpFactory',
|
27 |
+
'Http\Factory\Diactoros\RequestFactory',
|
28 |
+
'Http\Factory\Guzzle\RequestFactory',
|
29 |
+
'Http\Factory\Slim\RequestFactory',
|
30 |
+
'Laminas\Diactoros\RequestFactory',
|
31 |
+
],
|
32 |
+
ResponseFactoryInterface::class => [
|
33 |
+
'Nyholm\Psr7\Factory\Psr17Factory',
|
34 |
+
'Zend\Diactoros\ResponseFactory',
|
35 |
+
'GuzzleHttp\Psr7\HttpFactory',
|
36 |
+
'Http\Factory\Diactoros\ResponseFactory',
|
37 |
+
'Http\Factory\Guzzle\ResponseFactory',
|
38 |
+
'Http\Factory\Slim\ResponseFactory',
|
39 |
+
'Laminas\Diactoros\ResponseFactory',
|
40 |
+
],
|
41 |
+
ServerRequestFactoryInterface::class => [
|
42 |
+
'Nyholm\Psr7\Factory\Psr17Factory',
|
43 |
+
'Zend\Diactoros\ServerRequestFactory',
|
44 |
+
'GuzzleHttp\Psr7\HttpFactory',
|
45 |
+
'Http\Factory\Diactoros\ServerRequestFactory',
|
46 |
+
'Http\Factory\Guzzle\ServerRequestFactory',
|
47 |
+
'Http\Factory\Slim\ServerRequestFactory',
|
48 |
+
'Laminas\Diactoros\ServerRequestFactory',
|
49 |
+
],
|
50 |
+
StreamFactoryInterface::class => [
|
51 |
+
'Nyholm\Psr7\Factory\Psr17Factory',
|
52 |
+
'Zend\Diactoros\StreamFactory',
|
53 |
+
'GuzzleHttp\Psr7\HttpFactory',
|
54 |
+
'Http\Factory\Diactoros\StreamFactory',
|
55 |
+
'Http\Factory\Guzzle\StreamFactory',
|
56 |
+
'Http\Factory\Slim\StreamFactory',
|
57 |
+
'Laminas\Diactoros\StreamFactory',
|
58 |
+
],
|
59 |
+
UploadedFileFactoryInterface::class => [
|
60 |
+
'Nyholm\Psr7\Factory\Psr17Factory',
|
61 |
+
'Zend\Diactoros\UploadedFileFactory',
|
62 |
+
'GuzzleHttp\Psr7\HttpFactory',
|
63 |
+
'Http\Factory\Diactoros\UploadedFileFactory',
|
64 |
+
'Http\Factory\Guzzle\UploadedFileFactory',
|
65 |
+
'Http\Factory\Slim\UploadedFileFactory',
|
66 |
+
'Laminas\Diactoros\UploadedFileFactory',
|
67 |
+
],
|
68 |
+
UriFactoryInterface::class => [
|
69 |
+
'Nyholm\Psr7\Factory\Psr17Factory',
|
70 |
+
'Zend\Diactoros\UriFactory',
|
71 |
+
'GuzzleHttp\Psr7\HttpFactory',
|
72 |
+
'Http\Factory\Diactoros\UriFactory',
|
73 |
+
'Http\Factory\Guzzle\UriFactory',
|
74 |
+
'Http\Factory\Slim\UriFactory',
|
75 |
+
'Laminas\Diactoros\UriFactory',
|
76 |
+
],
|
77 |
+
];
|
78 |
+
|
79 |
+
/**
|
80 |
+
* {@inheritdoc}
|
81 |
+
*/
|
82 |
+
public static function getCandidates($type)
|
83 |
+
{
|
84 |
+
$candidates = [];
|
85 |
+
if (isset(self::$classes[$type])) {
|
86 |
+
foreach (self::$classes[$type] as $class) {
|
87 |
+
$candidates[] = ['class' => $class, 'condition' => [$class]];
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
return $candidates;
|
92 |
+
}
|
93 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Strategy/DiscoveryStrategy.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Strategy;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\StrategyUnavailableException;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
9 |
+
*/
|
10 |
+
interface DiscoveryStrategy
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Find a resource of a specific type.
|
14 |
+
*
|
15 |
+
* @param string $type
|
16 |
+
*
|
17 |
+
* @return array The return value is always an array with zero or more elements. Each
|
18 |
+
* element is an array with two keys ['class' => string, 'condition' => mixed].
|
19 |
+
*
|
20 |
+
* @throws StrategyUnavailableException if we cannot use this strategy.
|
21 |
+
*/
|
22 |
+
public static function getCandidates($type);
|
23 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Strategy/MockClientStrategy.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Strategy;
|
4 |
+
|
5 |
+
use Http\Client\HttpAsyncClient;
|
6 |
+
use Http\Client\HttpClient;
|
7 |
+
use Http\Mock\Client as Mock;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Find the Mock client.
|
11 |
+
*
|
12 |
+
* @author Sam Rapaport <me@samrapdev.com>
|
13 |
+
*/
|
14 |
+
final class MockClientStrategy implements DiscoveryStrategy
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public static function getCandidates($type)
|
20 |
+
{
|
21 |
+
if (is_a(HttpClient::class, $type, true) || is_a(HttpAsyncClient::class, $type, true)) {
|
22 |
+
return [['class' => Mock::class, 'condition' => Mock::class]];
|
23 |
+
}
|
24 |
+
|
25 |
+
return [];
|
26 |
+
}
|
27 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/Strategy/PuliBetaStrategy.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery\Strategy;
|
4 |
+
|
5 |
+
use Http\Discovery\ClassDiscovery;
|
6 |
+
use Http\Discovery\Exception\PuliUnavailableException;
|
7 |
+
use Puli\Discovery\Api\Discovery;
|
8 |
+
use Puli\GeneratedPuliFactory;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Find candidates using Puli.
|
12 |
+
*
|
13 |
+
* @internal
|
14 |
+
* @final
|
15 |
+
*
|
16 |
+
* @author David de Boer <david@ddeboer.nl>
|
17 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
18 |
+
*/
|
19 |
+
class PuliBetaStrategy implements DiscoveryStrategy
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* @var GeneratedPuliFactory
|
23 |
+
*/
|
24 |
+
protected static $puliFactory;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var Discovery
|
28 |
+
*/
|
29 |
+
protected static $puliDiscovery;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @return GeneratedPuliFactory
|
33 |
+
*
|
34 |
+
* @throws PuliUnavailableException
|
35 |
+
*/
|
36 |
+
private static function getPuliFactory()
|
37 |
+
{
|
38 |
+
if (null === self::$puliFactory) {
|
39 |
+
if (!defined('PULI_FACTORY_CLASS')) {
|
40 |
+
throw new PuliUnavailableException('Puli Factory is not available');
|
41 |
+
}
|
42 |
+
|
43 |
+
$puliFactoryClass = PULI_FACTORY_CLASS;
|
44 |
+
|
45 |
+
if (!ClassDiscovery::safeClassExists($puliFactoryClass)) {
|
46 |
+
throw new PuliUnavailableException('Puli Factory class does not exist');
|
47 |
+
}
|
48 |
+
|
49 |
+
self::$puliFactory = new $puliFactoryClass();
|
50 |
+
}
|
51 |
+
|
52 |
+
return self::$puliFactory;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Returns the Puli discovery layer.
|
57 |
+
*
|
58 |
+
* @return Discovery
|
59 |
+
*
|
60 |
+
* @throws PuliUnavailableException
|
61 |
+
*/
|
62 |
+
private static function getPuliDiscovery()
|
63 |
+
{
|
64 |
+
if (!isset(self::$puliDiscovery)) {
|
65 |
+
$factory = self::getPuliFactory();
|
66 |
+
$repository = $factory->createRepository();
|
67 |
+
|
68 |
+
self::$puliDiscovery = $factory->createDiscovery($repository);
|
69 |
+
}
|
70 |
+
|
71 |
+
return self::$puliDiscovery;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* {@inheritdoc}
|
76 |
+
*/
|
77 |
+
public static function getCandidates($type)
|
78 |
+
{
|
79 |
+
$returnData = [];
|
80 |
+
$bindings = self::getPuliDiscovery()->findBindings($type);
|
81 |
+
|
82 |
+
foreach ($bindings as $binding) {
|
83 |
+
$condition = true;
|
84 |
+
if ($binding->hasParameterValue('depends')) {
|
85 |
+
$condition = $binding->getParameterValue('depends');
|
86 |
+
}
|
87 |
+
$returnData[] = ['class' => $binding->getClassName(), 'condition' => $condition];
|
88 |
+
}
|
89 |
+
|
90 |
+
return $returnData;
|
91 |
+
}
|
92 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/StreamFactoryDiscovery.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
6 |
+
use Http\Message\StreamFactory;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Finds a Stream Factory.
|
10 |
+
*
|
11 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
12 |
+
*
|
13 |
+
* @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery.
|
14 |
+
*/
|
15 |
+
final class StreamFactoryDiscovery extends ClassDiscovery
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Finds a Stream Factory.
|
19 |
+
*
|
20 |
+
* @return StreamFactory
|
21 |
+
*
|
22 |
+
* @throws Exception\NotFoundException
|
23 |
+
*/
|
24 |
+
public static function find()
|
25 |
+
{
|
26 |
+
try {
|
27 |
+
$streamFactory = static::findOneByType(StreamFactory::class);
|
28 |
+
} catch (DiscoveryFailedException $e) {
|
29 |
+
throw new NotFoundException('No stream factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
|
30 |
+
}
|
31 |
+
|
32 |
+
return static::instantiateClass($streamFactory);
|
33 |
+
}
|
34 |
+
}
|
includes/vendor/mailerlite/php-http/discovery/src/UriFactoryDiscovery.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Discovery;
|
4 |
+
|
5 |
+
use Http\Discovery\Exception\DiscoveryFailedException;
|
6 |
+
use Http\Message\UriFactory;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Finds a URI Factory.
|
10 |
+
*
|
11 |
+
* @author David de Boer <david@ddeboer.nl>
|
12 |
+
*
|
13 |
+
* @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery.
|
14 |
+
*/
|
15 |
+
final class UriFactoryDiscovery extends ClassDiscovery
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Finds a URI Factory.
|
19 |
+
*
|
20 |
+
* @return UriFactory
|
21 |
+
*
|
22 |
+
* @throws Exception\NotFoundException
|
23 |
+
*/
|
24 |
+
public static function find()
|
25 |
+
{
|
26 |
+
try {
|
27 |
+
$uriFactory = static::findOneByType(UriFactory::class);
|
28 |
+
} catch (DiscoveryFailedException $e) {
|
29 |
+
throw new NotFoundException('No uri factories found. To use Guzzle, Diactoros or Slim Framework factories install php-http/message and the chosen message implementation.', 0, $e);
|
30 |
+
}
|
31 |
+
|
32 |
+
return static::instantiateClass($uriFactory);
|
33 |
+
}
|
34 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Exception.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Every HTTP Client related Exception must implement this interface.
|
7 |
+
*
|
8 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
9 |
+
*/
|
10 |
+
interface Exception
|
11 |
+
{
|
12 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Exception/HttpException.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Exception;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\ResponseInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Thrown when a response was received but the request itself failed.
|
10 |
+
*
|
11 |
+
* In addition to the request, this exception always provides access to the response object.
|
12 |
+
*
|
13 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
14 |
+
*/
|
15 |
+
class HttpException extends RequestException
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var ResponseInterface
|
19 |
+
*/
|
20 |
+
protected $response;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @param string $message
|
24 |
+
* @param RequestInterface $request
|
25 |
+
* @param ResponseInterface $response
|
26 |
+
* @param \Exception|null $previous
|
27 |
+
*/
|
28 |
+
public function __construct(
|
29 |
+
$message,
|
30 |
+
RequestInterface $request,
|
31 |
+
ResponseInterface $response,
|
32 |
+
\Exception $previous = null
|
33 |
+
) {
|
34 |
+
parent::__construct($message, $request, $previous);
|
35 |
+
|
36 |
+
$this->response = $response;
|
37 |
+
$this->code = $response->getStatusCode();
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Returns the response.
|
42 |
+
*
|
43 |
+
* @return ResponseInterface
|
44 |
+
*/
|
45 |
+
public function getResponse()
|
46 |
+
{
|
47 |
+
return $this->response;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Factory method to create a new exception with a normalized error message.
|
52 |
+
*
|
53 |
+
* @param RequestInterface $request
|
54 |
+
* @param ResponseInterface $response
|
55 |
+
* @param \Exception|null $previous
|
56 |
+
*
|
57 |
+
* @return HttpException
|
58 |
+
*/
|
59 |
+
public static function create(
|
60 |
+
RequestInterface $request,
|
61 |
+
ResponseInterface $response,
|
62 |
+
\Exception $previous = null
|
63 |
+
) {
|
64 |
+
$message = sprintf(
|
65 |
+
'[url] %s [http method] %s [status code] %s [reason phrase] %s',
|
66 |
+
$request->getRequestTarget(),
|
67 |
+
$request->getMethod(),
|
68 |
+
$response->getStatusCode(),
|
69 |
+
$response->getReasonPhrase()
|
70 |
+
);
|
71 |
+
|
72 |
+
return new self($message, $request, $response, $previous);
|
73 |
+
}
|
74 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Exception/NetworkException.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Exception;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Thrown when the request cannot be completed because of network issues.
|
7 |
+
*
|
8 |
+
* There is no response object as this exception is thrown when no response has been received.
|
9 |
+
*
|
10 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
11 |
+
*/
|
12 |
+
class NetworkException extends RequestException
|
13 |
+
{
|
14 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Exception/RequestException.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Exception;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Exception for when a request failed, providing access to the failed request.
|
9 |
+
*
|
10 |
+
* This could be due to an invalid request, or one of the extending exceptions
|
11 |
+
* for network errors or HTTP error responses.
|
12 |
+
*
|
13 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
14 |
+
*/
|
15 |
+
class RequestException extends TransferException
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var RequestInterface
|
19 |
+
*/
|
20 |
+
private $request;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @param string $message
|
24 |
+
* @param RequestInterface $request
|
25 |
+
* @param \Exception|null $previous
|
26 |
+
*/
|
27 |
+
public function __construct($message, RequestInterface $request, \Exception $previous = null)
|
28 |
+
{
|
29 |
+
$this->request = $request;
|
30 |
+
|
31 |
+
parent::__construct($message, 0, $previous);
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Returns the request.
|
36 |
+
*
|
37 |
+
* @return RequestInterface
|
38 |
+
*/
|
39 |
+
public function getRequest()
|
40 |
+
{
|
41 |
+
return $this->request;
|
42 |
+
}
|
43 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Exception/TransferException.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Exception;
|
4 |
+
|
5 |
+
use Http\Client\Exception;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Base exception for transfer related exceptions.
|
9 |
+
*
|
10 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
11 |
+
*/
|
12 |
+
class TransferException extends \RuntimeException implements Exception
|
13 |
+
{
|
14 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/HttpAsyncClient.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client;
|
4 |
+
|
5 |
+
use Http\Promise\Promise;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Sends a PSR-7 Request in an asynchronous way by returning a Promise.
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
interface HttpAsyncClient
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Sends a PSR-7 request in an asynchronous way.
|
17 |
+
*
|
18 |
+
* Exceptions related to processing the request are available from the returned Promise.
|
19 |
+
*
|
20 |
+
* @param RequestInterface $request
|
21 |
+
*
|
22 |
+
* @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception.
|
23 |
+
*
|
24 |
+
* @throws \Exception If processing the request is impossible (eg. bad configuration).
|
25 |
+
*/
|
26 |
+
public function sendAsyncRequest(RequestInterface $request);
|
27 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/HttpClient.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\ResponseInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Sends a PSR-7 Request and returns a PSR-7 response.
|
10 |
+
*
|
11 |
+
* @author GeLo <geloen.eric@gmail.com>
|
12 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
13 |
+
* @author David Buchmann <mail@davidbu.ch>
|
14 |
+
*/
|
15 |
+
interface HttpClient
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Sends a PSR-7 request.
|
19 |
+
*
|
20 |
+
* @param RequestInterface $request
|
21 |
+
*
|
22 |
+
* @return ResponseInterface
|
23 |
+
*
|
24 |
+
* @throws \Http\Client\Exception If an error happens during processing the request.
|
25 |
+
* @throws \Exception If processing the request is impossible (eg. bad configuration).
|
26 |
+
*/
|
27 |
+
public function sendRequest(RequestInterface $request);
|
28 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Promise/HttpFulfilledPromise.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Promise;
|
4 |
+
|
5 |
+
use Http\Client\Exception;
|
6 |
+
use Http\Promise\Promise;
|
7 |
+
use Psr\Http\Message\ResponseInterface;
|
8 |
+
|
9 |
+
final class HttpFulfilledPromise implements Promise
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var ResponseInterface
|
13 |
+
*/
|
14 |
+
private $response;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @param ResponseInterface $response
|
18 |
+
*/
|
19 |
+
public function __construct(ResponseInterface $response)
|
20 |
+
{
|
21 |
+
$this->response = $response;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* {@inheritdoc}
|
26 |
+
*/
|
27 |
+
public function then(callable $onFulfilled = null, callable $onRejected = null)
|
28 |
+
{
|
29 |
+
if (null === $onFulfilled) {
|
30 |
+
return $this;
|
31 |
+
}
|
32 |
+
|
33 |
+
try {
|
34 |
+
return new self($onFulfilled($this->response));
|
35 |
+
} catch (Exception $e) {
|
36 |
+
return new HttpRejectedPromise($e);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* {@inheritdoc}
|
42 |
+
*/
|
43 |
+
public function getState()
|
44 |
+
{
|
45 |
+
return Promise::FULFILLED;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* {@inheritdoc}
|
50 |
+
*/
|
51 |
+
public function wait($unwrap = true)
|
52 |
+
{
|
53 |
+
if ($unwrap) {
|
54 |
+
return $this->response;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
includes/vendor/mailerlite/php-http/httplug/src/Promise/HttpRejectedPromise.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Client\Promise;
|
4 |
+
|
5 |
+
use Http\Client\Exception;
|
6 |
+
use Http\Promise\Promise;
|
7 |
+
|
8 |
+
final class HttpRejectedPromise implements Promise
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* @var Exception
|
12 |
+
*/
|
13 |
+
private $exception;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @param Exception $exception
|
17 |
+
*/
|
18 |
+
public function __construct(Exception $exception)
|
19 |
+
{
|
20 |
+
$this->exception = $exception;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* {@inheritdoc}
|
25 |
+
*/
|
26 |
+
public function then(callable $onFulfilled = null, callable $onRejected = null)
|
27 |
+
{
|
28 |
+
if (null === $onRejected) {
|
29 |
+
return $this;
|
30 |
+
}
|
31 |
+
|
32 |
+
try {
|
33 |
+
return new HttpFulfilledPromise($onRejected($this->exception));
|
34 |
+
} catch (Exception $e) {
|
35 |
+
return new self($e);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
public function getState()
|
43 |
+
{
|
44 |
+
return Promise::REJECTED;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* {@inheritdoc}
|
49 |
+
*/
|
50 |
+
public function wait($unwrap = true)
|
51 |
+
{
|
52 |
+
if ($unwrap) {
|
53 |
+
throw $this->exception;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
includes/vendor/mailerlite/php-http/message-factory/src/MessageFactory.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Factory for PSR-7 Request and Response.
|
7 |
+
*
|
8 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
9 |
+
*/
|
10 |
+
interface MessageFactory extends RequestFactory, ResponseFactory
|
11 |
+
{
|
12 |
+
}
|
includes/vendor/mailerlite/php-http/message-factory/src/RequestFactory.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\UriInterface;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
use Psr\Http\Message\StreamInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Factory for PSR-7 Request.
|
11 |
+
*
|
12 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
13 |
+
*/
|
14 |
+
interface RequestFactory
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* Creates a new PSR-7 request.
|
18 |
+
*
|
19 |
+
* @param string $method
|
20 |
+
* @param string|UriInterface $uri
|
21 |
+
* @param array $headers
|
22 |
+
* @param resource|string|StreamInterface|null $body
|
23 |
+
* @param string $protocolVersion
|
24 |
+
*
|
25 |
+
* @return RequestInterface
|
26 |
+
*/
|
27 |
+
public function createRequest(
|
28 |
+
$method,
|
29 |
+
$uri,
|
30 |
+
array $headers = [],
|
31 |
+
$body = null,
|
32 |
+
$protocolVersion = '1.1'
|
33 |
+
);
|
34 |
+
}
|
includes/vendor/mailerlite/php-http/message-factory/src/ResponseFactory.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\ResponseInterface;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Factory for PSR-7 Response.
|
10 |
+
*
|
11 |
+
* This factory contract can be reused in Message and Server Message factories.
|
12 |
+
*
|
13 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
14 |
+
*/
|
15 |
+
interface ResponseFactory
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Creates a new PSR-7 response.
|
19 |
+
*
|
20 |
+
* @param int $statusCode
|
21 |
+
* @param string|null $reasonPhrase
|
22 |
+
* @param array $headers
|
23 |
+
* @param resource|string|StreamInterface|null $body
|
24 |
+
* @param string $protocolVersion
|
25 |
+
*
|
26 |
+
* @return ResponseInterface
|
27 |
+
*/
|
28 |
+
public function createResponse(
|
29 |
+
$statusCode = 200,
|
30 |
+
$reasonPhrase = null,
|
31 |
+
array $headers = [],
|
32 |
+
$body = null,
|
33 |
+
$protocolVersion = '1.1'
|
34 |
+
);
|
35 |
+
}
|
includes/vendor/mailerlite/php-http/message-factory/src/StreamFactory.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\StreamInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Factory for PSR-7 Stream.
|
9 |
+
*
|
10 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
11 |
+
*/
|
12 |
+
interface StreamFactory
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Creates a new PSR-7 stream.
|
16 |
+
*
|
17 |
+
* @param string|resource|StreamInterface|null $body
|
18 |
+
*
|
19 |
+
* @return StreamInterface
|
20 |
+
*
|
21 |
+
* @throws \InvalidArgumentException If the stream body is invalid.
|
22 |
+
* @throws \RuntimeException If creating the stream from $body fails.
|
23 |
+
*/
|
24 |
+
public function createStream($body = null);
|
25 |
+
}
|
includes/vendor/mailerlite/php-http/message-factory/src/UriFactory.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\UriInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Factory for PSR-7 URI.
|
9 |
+
*
|
10 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
11 |
+
*/
|
12 |
+
interface UriFactory
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Creates an PSR-7 URI.
|
16 |
+
*
|
17 |
+
* @param string|UriInterface $uri
|
18 |
+
*
|
19 |
+
* @return UriInterface
|
20 |
+
*
|
21 |
+
* @throws \InvalidArgumentException If the $uri argument can not be converted into a valid URI.
|
22 |
+
*/
|
23 |
+
public function createUri($uri);
|
24 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Add authentication information to a PSR-7 Request.
|
9 |
+
*
|
10 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
11 |
+
*/
|
12 |
+
interface Authentication
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Alter the request to add the authentication credentials.
|
16 |
+
*
|
17 |
+
* To do that, the implementation might use pre-stored credentials or do
|
18 |
+
* separate HTTP requests to obtain a valid token.
|
19 |
+
*
|
20 |
+
* @param RequestInterface $request The request without authentication information
|
21 |
+
*
|
22 |
+
* @return RequestInterface The request with added authentication information
|
23 |
+
*/
|
24 |
+
public function authenticate(RequestInterface $request);
|
25 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/AutoBasicAuth.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Authenticate a PSR-7 Request using Basic Auth based on credentials in the URI.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class AutoBasicAuth implements Authentication
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Whether user info should be removed from the URI.
|
17 |
+
*
|
18 |
+
* @var bool
|
19 |
+
*/
|
20 |
+
private $shouldRemoveUserInfo;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* @param bool|true $shouldRremoveUserInfo
|
24 |
+
*/
|
25 |
+
public function __construct($shouldRremoveUserInfo = true)
|
26 |
+
{
|
27 |
+
$this->shouldRemoveUserInfo = (bool) $shouldRremoveUserInfo;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* {@inheritdoc}
|
32 |
+
*/
|
33 |
+
public function authenticate(RequestInterface $request)
|
34 |
+
{
|
35 |
+
$uri = $request->getUri();
|
36 |
+
$userInfo = $uri->getUserInfo();
|
37 |
+
|
38 |
+
if (!empty($userInfo)) {
|
39 |
+
if ($this->shouldRemoveUserInfo) {
|
40 |
+
$request = $request->withUri($uri->withUserInfo(''));
|
41 |
+
}
|
42 |
+
|
43 |
+
$request = $request->withHeader('Authorization', sprintf('Basic %s', base64_encode($userInfo)));
|
44 |
+
}
|
45 |
+
|
46 |
+
return $request;
|
47 |
+
}
|
48 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/BasicAuth.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Authenticate a PSR-7 Request using Basic Auth.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class BasicAuth implements Authentication
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $username;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $password;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param string $username
|
27 |
+
* @param string $password
|
28 |
+
*/
|
29 |
+
public function __construct($username, $password)
|
30 |
+
{
|
31 |
+
$this->username = $username;
|
32 |
+
$this->password = $password;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function authenticate(RequestInterface $request)
|
39 |
+
{
|
40 |
+
$header = sprintf('Basic %s', base64_encode(sprintf('%s:%s', $this->username, $this->password)));
|
41 |
+
|
42 |
+
return $request->withHeader('Authorization', $header);
|
43 |
+
}
|
44 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/Bearer.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Authenticate a PSR-7 Request using a token.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class Bearer implements Authentication
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $token;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param string $token
|
22 |
+
*/
|
23 |
+
public function __construct($token)
|
24 |
+
{
|
25 |
+
$this->token = $token;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* {@inheritdoc}
|
30 |
+
*/
|
31 |
+
public function authenticate(RequestInterface $request)
|
32 |
+
{
|
33 |
+
$header = sprintf('Bearer %s', $this->token);
|
34 |
+
|
35 |
+
return $request->withHeader('Authorization', $header);
|
36 |
+
}
|
37 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/Chain.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Authenticate a PSR-7 Request with a multiple authentication methods.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class Chain implements Authentication
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @var Authentication[]
|
17 |
+
*/
|
18 |
+
private $authenticationChain = [];
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param Authentication[] $authenticationChain
|
22 |
+
*/
|
23 |
+
public function __construct(array $authenticationChain = [])
|
24 |
+
{
|
25 |
+
foreach ($authenticationChain as $authentication) {
|
26 |
+
if (!$authentication instanceof Authentication) {
|
27 |
+
throw new \InvalidArgumentException(
|
28 |
+
'Members of the authentication chain must be of type Http\Message\Authentication'
|
29 |
+
);
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
$this->authenticationChain = $authenticationChain;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* {@inheritdoc}
|
38 |
+
*/
|
39 |
+
public function authenticate(RequestInterface $request)
|
40 |
+
{
|
41 |
+
foreach ($this->authenticationChain as $authentication) {
|
42 |
+
$request = $authentication->authenticate($request);
|
43 |
+
}
|
44 |
+
|
45 |
+
return $request;
|
46 |
+
}
|
47 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/Matching.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Http\Message\RequestMatcher\CallbackRequestMatcher;
|
7 |
+
use Psr\Http\Message\RequestInterface;
|
8 |
+
|
9 |
+
@trigger_error('The '.__NAMESPACE__.'\Matching class is deprecated since version 1.2 and will be removed in 2.0. Use Http\Message\Authentication\RequestConditional instead.', E_USER_DEPRECATED);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Authenticate a PSR-7 Request if the request is matching.
|
13 |
+
*
|
14 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
15 |
+
*
|
16 |
+
* @deprecated since since version 1.2, and will be removed in 2.0. Use {@link RequestConditional} instead.
|
17 |
+
*/
|
18 |
+
final class Matching implements Authentication
|
19 |
+
{
|
20 |
+
/**
|
21 |
+
* @var Authentication
|
22 |
+
*/
|
23 |
+
private $authentication;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var CallbackRequestMatcher
|
27 |
+
*/
|
28 |
+
private $matcher;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param Authentication $authentication
|
32 |
+
* @param callable|null $matcher
|
33 |
+
*/
|
34 |
+
public function __construct(Authentication $authentication, callable $matcher = null)
|
35 |
+
{
|
36 |
+
if (is_null($matcher)) {
|
37 |
+
$matcher = function () {
|
38 |
+
return true;
|
39 |
+
};
|
40 |
+
}
|
41 |
+
|
42 |
+
$this->authentication = $authentication;
|
43 |
+
$this->matcher = new CallbackRequestMatcher($matcher);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* {@inheritdoc}
|
48 |
+
*/
|
49 |
+
public function authenticate(RequestInterface $request)
|
50 |
+
{
|
51 |
+
if ($this->matcher->matches($request)) {
|
52 |
+
return $this->authentication->authenticate($request);
|
53 |
+
}
|
54 |
+
|
55 |
+
return $request;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Creates a matching authentication for an URL.
|
60 |
+
*
|
61 |
+
* @param Authentication $authentication
|
62 |
+
* @param string $url
|
63 |
+
*
|
64 |
+
* @return self
|
65 |
+
*/
|
66 |
+
public static function createUrlMatcher(Authentication $authentication, $url)
|
67 |
+
{
|
68 |
+
$matcher = function (RequestInterface $request) use ($url) {
|
69 |
+
return preg_match($url, $request->getRequestTarget());
|
70 |
+
};
|
71 |
+
|
72 |
+
return new static($authentication, $matcher);
|
73 |
+
}
|
74 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/QueryParam.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Authenticate a PSR-7 Request by adding parameters to its query.
|
10 |
+
*
|
11 |
+
* Note: Although in some cases it can be useful, we do not recommend using query parameters for authentication.
|
12 |
+
* Credentials in the URL is generally unsafe as they are not encrypted, anyone can see them.
|
13 |
+
*
|
14 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
15 |
+
*/
|
16 |
+
final class QueryParam implements Authentication
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* @var array
|
20 |
+
*/
|
21 |
+
private $params = [];
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @param array $params
|
25 |
+
*/
|
26 |
+
public function __construct(array $params)
|
27 |
+
{
|
28 |
+
$this->params = $params;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
public function authenticate(RequestInterface $request)
|
35 |
+
{
|
36 |
+
$uri = $request->getUri();
|
37 |
+
$query = $uri->getQuery();
|
38 |
+
$params = [];
|
39 |
+
|
40 |
+
parse_str($query, $params);
|
41 |
+
|
42 |
+
$params = array_merge($params, $this->params);
|
43 |
+
|
44 |
+
$query = http_build_query($params, null, '&');
|
45 |
+
|
46 |
+
$uri = $uri->withQuery($query);
|
47 |
+
|
48 |
+
return $request->withUri($uri);
|
49 |
+
}
|
50 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/RequestConditional.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Http\Message\RequestMatcher;
|
7 |
+
use Psr\Http\Message\RequestInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Authenticate a PSR-7 Request if the request is matching the given request matcher.
|
11 |
+
*
|
12 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
13 |
+
*/
|
14 |
+
final class RequestConditional implements Authentication
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* @var RequestMatcher
|
18 |
+
*/
|
19 |
+
private $requestMatcher;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var Authentication
|
23 |
+
*/
|
24 |
+
private $authentication;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param RequestMatcher $requestMatcher
|
28 |
+
* @param Authentication $authentication
|
29 |
+
*/
|
30 |
+
public function __construct(RequestMatcher $requestMatcher, Authentication $authentication)
|
31 |
+
{
|
32 |
+
$this->requestMatcher = $requestMatcher;
|
33 |
+
$this->authentication = $authentication;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* {@inheritdoc}
|
38 |
+
*/
|
39 |
+
public function authenticate(RequestInterface $request)
|
40 |
+
{
|
41 |
+
if ($this->requestMatcher->matches($request)) {
|
42 |
+
return $this->authentication->authenticate($request);
|
43 |
+
}
|
44 |
+
|
45 |
+
return $request;
|
46 |
+
}
|
47 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Authentication/Wsse.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Authentication;
|
4 |
+
|
5 |
+
use Http\Message\Authentication;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Authenticate a PSR-7 Request using WSSE.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class Wsse implements Authentication
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $username;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $password;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param string $username
|
27 |
+
* @param string $password
|
28 |
+
*/
|
29 |
+
public function __construct($username, $password)
|
30 |
+
{
|
31 |
+
$this->username = $username;
|
32 |
+
$this->password = $password;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function authenticate(RequestInterface $request)
|
39 |
+
{
|
40 |
+
// TODO: generate better nonce?
|
41 |
+
$nonce = substr(md5(uniqid(uniqid().'_', true)), 0, 16);
|
42 |
+
$created = date('c');
|
43 |
+
$digest = base64_encode(sha1(base64_decode($nonce).$created.$this->password, true));
|
44 |
+
|
45 |
+
$wsse = sprintf(
|
46 |
+
'UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"',
|
47 |
+
$this->username,
|
48 |
+
$digest,
|
49 |
+
$nonce,
|
50 |
+
$created
|
51 |
+
);
|
52 |
+
|
53 |
+
return $request
|
54 |
+
->withHeader('Authorization', 'WSSE profile="UsernameToken"')
|
55 |
+
->withHeader('X-WSSE', $wsse)
|
56 |
+
;
|
57 |
+
}
|
58 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Builder/ResponseBuilder.php
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Builder;
|
4 |
+
|
5 |
+
use Psr\Http\Message\ResponseInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Fills response object with values.
|
9 |
+
*/
|
10 |
+
class ResponseBuilder
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* The response to be built.
|
14 |
+
*
|
15 |
+
* @var ResponseInterface
|
16 |
+
*/
|
17 |
+
protected $response;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Create builder for the given response.
|
21 |
+
*
|
22 |
+
* @param ResponseInterface $response
|
23 |
+
*/
|
24 |
+
public function __construct(ResponseInterface $response)
|
25 |
+
{
|
26 |
+
$this->response = $response;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Return response.
|
31 |
+
*
|
32 |
+
* @return ResponseInterface
|
33 |
+
*/
|
34 |
+
public function getResponse()
|
35 |
+
{
|
36 |
+
return $this->response;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Add headers represented by an array of header lines.
|
41 |
+
*
|
42 |
+
* @param string[] $headers Response headers as array of header lines.
|
43 |
+
*
|
44 |
+
* @return $this
|
45 |
+
*
|
46 |
+
* @throws \UnexpectedValueException For invalid header values.
|
47 |
+
* @throws \InvalidArgumentException For invalid status code arguments.
|
48 |
+
*/
|
49 |
+
public function setHeadersFromArray(array $headers)
|
50 |
+
{
|
51 |
+
$status = array_shift($headers);
|
52 |
+
$this->setStatus($status);
|
53 |
+
|
54 |
+
foreach ($headers as $headerLine) {
|
55 |
+
$headerLine = trim($headerLine);
|
56 |
+
if ('' === $headerLine) {
|
57 |
+
continue;
|
58 |
+
}
|
59 |
+
|
60 |
+
$this->addHeader($headerLine);
|
61 |
+
}
|
62 |
+
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Add headers represented by a single string.
|
68 |
+
*
|
69 |
+
* @param string $headers Response headers as single string.
|
70 |
+
*
|
71 |
+
* @return $this
|
72 |
+
*
|
73 |
+
* @throws \InvalidArgumentException if $headers is not a string on object with __toString()
|
74 |
+
* @throws \UnexpectedValueException For invalid header values.
|
75 |
+
*/
|
76 |
+
public function setHeadersFromString($headers)
|
77 |
+
{
|
78 |
+
if (!(is_string($headers)
|
79 |
+
|| (is_object($headers) && method_exists($headers, '__toString')))
|
80 |
+
) {
|
81 |
+
throw new \InvalidArgumentException(
|
82 |
+
sprintf(
|
83 |
+
'%s expects parameter 1 to be a string, %s given',
|
84 |
+
__METHOD__,
|
85 |
+
is_object($headers) ? get_class($headers) : gettype($headers)
|
86 |
+
)
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
$this->setHeadersFromArray(explode("\r\n", $headers));
|
91 |
+
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Set response status from a status string.
|
97 |
+
*
|
98 |
+
* @param string $statusLine Response status as a string.
|
99 |
+
*
|
100 |
+
* @return $this
|
101 |
+
*
|
102 |
+
* @throws \InvalidArgumentException For invalid status line.
|
103 |
+
*/
|
104 |
+
public function setStatus($statusLine)
|
105 |
+
{
|
106 |
+
$parts = explode(' ', $statusLine, 3);
|
107 |
+
if (count($parts) < 2 || 0 !== strpos(strtolower($parts[0]), 'http/')) {
|
108 |
+
throw new \InvalidArgumentException(
|
109 |
+
sprintf('"%s" is not a valid HTTP status line', $statusLine)
|
110 |
+
);
|
111 |
+
}
|
112 |
+
|
113 |
+
$reasonPhrase = count($parts) > 2 ? $parts[2] : '';
|
114 |
+
$this->response = $this->response
|
115 |
+
->withStatus((int) $parts[1], $reasonPhrase)
|
116 |
+
->withProtocolVersion(substr($parts[0], 5));
|
117 |
+
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Add header represented by a string.
|
123 |
+
*
|
124 |
+
* @param string $headerLine Response header as a string.
|
125 |
+
*
|
126 |
+
* @return $this
|
127 |
+
*
|
128 |
+
* @throws \InvalidArgumentException For invalid header names or values.
|
129 |
+
*/
|
130 |
+
public function addHeader($headerLine)
|
131 |
+
{
|
132 |
+
$parts = explode(':', $headerLine, 2);
|
133 |
+
if (2 !== count($parts)) {
|
134 |
+
throw new \InvalidArgumentException(
|
135 |
+
sprintf('"%s" is not a valid HTTP header line', $headerLine)
|
136 |
+
);
|
137 |
+
}
|
138 |
+
$name = trim($parts[0]);
|
139 |
+
$value = trim($parts[1]);
|
140 |
+
if ($this->response->hasHeader($name)) {
|
141 |
+
$this->response = $this->response->withAddedHeader($name, $value);
|
142 |
+
} else {
|
143 |
+
$this->response = $this->response->withHeader($name, $value);
|
144 |
+
}
|
145 |
+
|
146 |
+
return $this;
|
147 |
+
}
|
148 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Cookie.php
ADDED
@@ -0,0 +1,526 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Cookie Value Object.
|
7 |
+
*
|
8 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
9 |
+
*
|
10 |
+
* @see http://tools.ietf.org/search/rfc6265
|
11 |
+
*/
|
12 |
+
final class Cookie
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
private $name;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var string|null
|
21 |
+
*/
|
22 |
+
private $value;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var int|null
|
26 |
+
*/
|
27 |
+
private $maxAge;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @var string|null
|
31 |
+
*/
|
32 |
+
private $domain;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
private $path;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @var bool
|
41 |
+
*/
|
42 |
+
private $secure;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @var bool
|
46 |
+
*/
|
47 |
+
private $httpOnly;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Expires attribute is HTTP 1.0 only and should be avoided.
|
51 |
+
*
|
52 |
+
* @var \DateTime|null
|
53 |
+
*/
|
54 |
+
private $expires;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @param string $name
|
58 |
+
* @param string|null $value
|
59 |
+
* @param int|null $maxAge
|
60 |
+
* @param string|null $domain
|
61 |
+
* @param string|null $path
|
62 |
+
* @param bool $secure
|
63 |
+
* @param bool $httpOnly
|
64 |
+
* @param \DateTime|null $expires Expires attribute is HTTP 1.0 only and should be avoided.
|
65 |
+
*
|
66 |
+
* @throws \InvalidArgumentException If name, value or max age is not valid.
|
67 |
+
*/
|
68 |
+
public function __construct(
|
69 |
+
$name,
|
70 |
+
$value = null,
|
71 |
+
$maxAge = null,
|
72 |
+
$domain = null,
|
73 |
+
$path = null,
|
74 |
+
$secure = false,
|
75 |
+
$httpOnly = false,
|
76 |
+
\DateTime $expires = null
|
77 |
+
) {
|
78 |
+
$this->validateName($name);
|
79 |
+
$this->validateValue($value);
|
80 |
+
$this->validateMaxAge($maxAge);
|
81 |
+
|
82 |
+
$this->name = $name;
|
83 |
+
$this->value = $value;
|
84 |
+
$this->maxAge = $maxAge;
|
85 |
+
$this->expires = $expires;
|
86 |
+
$this->domain = $this->normalizeDomain($domain);
|
87 |
+
$this->path = $this->normalizePath($path);
|
88 |
+
$this->secure = (bool) $secure;
|
89 |
+
$this->httpOnly = (bool) $httpOnly;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Creates a new cookie without any attribute validation.
|
94 |
+
*
|
95 |
+
* @param string $name
|
96 |
+
* @param string|null $value
|
97 |
+
* @param int $maxAge
|
98 |
+
* @param string|null $domain
|
99 |
+
* @param string|null $path
|
100 |
+
* @param bool $secure
|
101 |
+
* @param bool $httpOnly
|
102 |
+
* @param \DateTime|null $expires Expires attribute is HTTP 1.0 only and should be avoided.
|
103 |
+
*/
|
104 |
+
public static function createWithoutValidation(
|
105 |
+
$name,
|
106 |
+
$value = null,
|
107 |
+
$maxAge = null,
|
108 |
+
$domain = null,
|
109 |
+
$path = null,
|
110 |
+
$secure = false,
|
111 |
+
$httpOnly = false,
|
112 |
+
\DateTime $expires = null
|
113 |
+
) {
|
114 |
+
$cookie = new self('name', null, null, $domain, $path, $secure, $httpOnly, $expires);
|
115 |
+
$cookie->name = $name;
|
116 |
+
$cookie->value = $value;
|
117 |
+
$cookie->maxAge = $maxAge;
|
118 |
+
|
119 |
+
return $cookie;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Returns the name.
|
124 |
+
*
|
125 |
+
* @return string
|
126 |
+
*/
|
127 |
+
public function getName()
|
128 |
+
{
|
129 |
+
return $this->name;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Returns the value.
|
134 |
+
*
|
135 |
+
* @return string|null
|
136 |
+
*/
|
137 |
+
public function getValue()
|
138 |
+
{
|
139 |
+
return $this->value;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Checks if there is a value.
|
144 |
+
*
|
145 |
+
* @return bool
|
146 |
+
*/
|
147 |
+
public function hasValue()
|
148 |
+
{
|
149 |
+
return isset($this->value);
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Sets the value.
|
154 |
+
*
|
155 |
+
* @param string|null $value
|
156 |
+
*
|
157 |
+
* @return Cookie
|
158 |
+
*/
|
159 |
+
public function withValue($value)
|
160 |
+
{
|
161 |
+
$this->validateValue($value);
|
162 |
+
|
163 |
+
$new = clone $this;
|
164 |
+
$new->value = $value;
|
165 |
+
|
166 |
+
return $new;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Returns the max age.
|
171 |
+
*
|
172 |
+
* @return int|null
|
173 |
+
*/
|
174 |
+
public function getMaxAge()
|
175 |
+
{
|
176 |
+
return $this->maxAge;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Checks if there is a max age.
|
181 |
+
*
|
182 |
+
* @return bool
|
183 |
+
*/
|
184 |
+
public function hasMaxAge()
|
185 |
+
{
|
186 |
+
return isset($this->maxAge);
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Sets the max age.
|
191 |
+
*
|
192 |
+
* @param int|null $maxAge
|
193 |
+
*
|
194 |
+
* @return Cookie
|
195 |
+
*/
|
196 |
+
public function withMaxAge($maxAge)
|
197 |
+
{
|
198 |
+
$this->validateMaxAge($maxAge);
|
199 |
+
|
200 |
+
$new = clone $this;
|
201 |
+
$new->maxAge = $maxAge;
|
202 |
+
|
203 |
+
return $new;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Returns the expiration time.
|
208 |
+
*
|
209 |
+
* @return \DateTime|null
|
210 |
+
*/
|
211 |
+
public function getExpires()
|
212 |
+
{
|
213 |
+
return $this->expires;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Checks if there is an expiration time.
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
*/
|
221 |
+
public function hasExpires()
|
222 |
+
{
|
223 |
+
return isset($this->expires);
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Sets the expires.
|
228 |
+
*
|
229 |
+
* @param \DateTime|null $expires
|
230 |
+
*
|
231 |
+
* @return Cookie
|
232 |
+
*/
|
233 |
+
public function withExpires(\DateTime $expires = null)
|
234 |
+
{
|
235 |
+
$new = clone $this;
|
236 |
+
$new->expires = $expires;
|
237 |
+
|
238 |
+
return $new;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Checks if the cookie is expired.
|
243 |
+
*
|
244 |
+
* @return bool
|
245 |
+
*/
|
246 |
+
public function isExpired()
|
247 |
+
{
|
248 |
+
return isset($this->expires) and $this->expires < new \DateTime();
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Returns the domain.
|
253 |
+
*
|
254 |
+
* @return string|null
|
255 |
+
*/
|
256 |
+
public function getDomain()
|
257 |
+
{
|
258 |
+
return $this->domain;
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Checks if there is a domain.
|
263 |
+
*
|
264 |
+
* @return bool
|
265 |
+
*/
|
266 |
+
public function hasDomain()
|
267 |
+
{
|
268 |
+
return isset($this->domain);
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Sets the domain.
|
273 |
+
*
|
274 |
+
* @param string|null $domain
|
275 |
+
*
|
276 |
+
* @return Cookie
|
277 |
+
*/
|
278 |
+
public function withDomain($domain)
|
279 |
+
{
|
280 |
+
$new = clone $this;
|
281 |
+
$new->domain = $this->normalizeDomain($domain);
|
282 |
+
|
283 |
+
return $new;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Checks whether this cookie is meant for this domain.
|
288 |
+
*
|
289 |
+
* @see http://tools.ietf.org/html/rfc6265#section-5.1.3
|
290 |
+
*
|
291 |
+
* @param string $domain
|
292 |
+
*
|
293 |
+
* @return bool
|
294 |
+
*/
|
295 |
+
public function matchDomain($domain)
|
296 |
+
{
|
297 |
+
// Domain is not set or exact match
|
298 |
+
if (!$this->hasDomain() || 0 === strcasecmp($domain, $this->domain)) {
|
299 |
+
return true;
|
300 |
+
}
|
301 |
+
|
302 |
+
// Domain is not an IP address
|
303 |
+
if (filter_var($domain, FILTER_VALIDATE_IP)) {
|
304 |
+
return false;
|
305 |
+
}
|
306 |
+
|
307 |
+
return (bool) preg_match(sprintf('/\b%s$/i', preg_quote($this->domain)), $domain);
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Returns the path.
|
312 |
+
*
|
313 |
+
* @return string
|
314 |
+
*/
|
315 |
+
public function getPath()
|
316 |
+
{
|
317 |
+
return $this->path;
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Sets the path.
|
322 |
+
*
|
323 |
+
* @param string|null $path
|
324 |
+
*
|
325 |
+
* @return Cookie
|
326 |
+
*/
|
327 |
+
public function withPath($path)
|
328 |
+
{
|
329 |
+
$new = clone $this;
|
330 |
+
$new->path = $this->normalizePath($path);
|
331 |
+
|
332 |
+
return $new;
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Checks whether this cookie is meant for this path.
|
337 |
+
*
|
338 |
+
* @see http://tools.ietf.org/html/rfc6265#section-5.1.4
|
339 |
+
*
|
340 |
+
* @param string $path
|
341 |
+
*
|
342 |
+
* @return bool
|
343 |
+
*/
|
344 |
+
public function matchPath($path)
|
345 |
+
{
|
346 |
+
return $this->path === $path || (0 === strpos($path, rtrim($this->path, '/').'/'));
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Checks whether this cookie may only be sent over HTTPS.
|
351 |
+
*
|
352 |
+
* @return bool
|
353 |
+
*/
|
354 |
+
public function isSecure()
|
355 |
+
{
|
356 |
+
return $this->secure;
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Sets whether this cookie should only be sent over HTTPS.
|
361 |
+
*
|
362 |
+
* @param bool $secure
|
363 |
+
*
|
364 |
+
* @return Cookie
|
365 |
+
*/
|
366 |
+
public function withSecure($secure)
|
367 |
+
{
|
368 |
+
$new = clone $this;
|
369 |
+
$new->secure = (bool) $secure;
|
370 |
+
|
371 |
+
return $new;
|
372 |
+
}
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Check whether this cookie may not be accessed through Javascript.
|
376 |
+
*
|
377 |
+
* @return bool
|
378 |
+
*/
|
379 |
+
public function isHttpOnly()
|
380 |
+
{
|
381 |
+
return $this->httpOnly;
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Sets whether this cookie may not be accessed through Javascript.
|
386 |
+
*
|
387 |
+
* @param bool $httpOnly
|
388 |
+
*
|
389 |
+
* @return Cookie
|
390 |
+
*/
|
391 |
+
public function withHttpOnly($httpOnly)
|
392 |
+
{
|
393 |
+
$new = clone $this;
|
394 |
+
$new->httpOnly = (bool) $httpOnly;
|
395 |
+
|
396 |
+
return $new;
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
* Checks if this cookie represents the same cookie as $cookie.
|
401 |
+
*
|
402 |
+
* This does not compare the values, only name, domain and path.
|
403 |
+
*
|
404 |
+
* @param Cookie $cookie
|
405 |
+
*
|
406 |
+
* @return bool
|
407 |
+
*/
|
408 |
+
public function match(self $cookie)
|
409 |
+
{
|
410 |
+
return $this->name === $cookie->name && $this->domain === $cookie->domain and $this->path === $cookie->path;
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* Validates cookie attributes.
|
415 |
+
*
|
416 |
+
* @return bool
|
417 |
+
*/
|
418 |
+
public function isValid()
|
419 |
+
{
|
420 |
+
try {
|
421 |
+
$this->validateName($this->name);
|
422 |
+
$this->validateValue($this->value);
|
423 |
+
$this->validateMaxAge($this->maxAge);
|
424 |
+
} catch (\InvalidArgumentException $e) {
|
425 |
+
return false;
|
426 |
+
}
|
427 |
+
|
428 |
+
return true;
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Validates the name attribute.
|
433 |
+
*
|
434 |
+
* @see http://tools.ietf.org/search/rfc2616#section-2.2
|
435 |
+
*
|
436 |
+
* @param string $name
|
437 |
+
*
|
438 |
+
* @throws \InvalidArgumentException If the name is empty or contains invalid characters.
|
439 |
+
*/
|
440 |
+
private function validateName($name)
|
441 |
+
{
|
442 |
+
if (strlen($name) < 1) {
|
443 |
+
throw new \InvalidArgumentException('The name cannot be empty');
|
444 |
+
}
|
445 |
+
|
446 |
+
// Name attribute is a token as per spec in RFC 2616
|
447 |
+
if (preg_match('/[\x00-\x20\x22\x28-\x29\x2C\x2F\x3A-\x40\x5B-\x5D\x7B\x7D\x7F]/', $name)) {
|
448 |
+
throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name));
|
449 |
+
}
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Validates a value.
|
454 |
+
*
|
455 |
+
* @see http://tools.ietf.org/html/rfc6265#section-4.1.1
|
456 |
+
*
|
457 |
+
* @param string|null $value
|
458 |
+
*
|
459 |
+
* @throws \InvalidArgumentException If the value contains invalid characters.
|
460 |
+
*/
|
461 |
+
private function validateValue($value)
|
462 |
+
{
|
463 |
+
if (isset($value)) {
|
464 |
+
if (preg_match('/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/', $value)) {
|
465 |
+
throw new \InvalidArgumentException(sprintf('The cookie value "%s" contains invalid characters.', $value));
|
466 |
+
}
|
467 |
+
}
|
468 |
+
}
|
469 |
+
|
470 |
+
/**
|
471 |
+
* Validates a Max-Age attribute.
|
472 |
+
*
|
473 |
+
* @param int|null $maxAge
|
474 |
+
*
|
475 |
+
* @throws \InvalidArgumentException If the Max-Age is not an empty or integer value.
|
476 |
+
*/
|
477 |
+
private function validateMaxAge($maxAge)
|
478 |
+
{
|
479 |
+
if (isset($maxAge)) {
|
480 |
+
if (!is_int($maxAge)) {
|
481 |
+
throw new \InvalidArgumentException('Max-Age must be integer');
|
482 |
+
}
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Remove the leading '.' and lowercase the domain as per spec in RFC 6265.
|
488 |
+
*
|
489 |
+
* @see http://tools.ietf.org/html/rfc6265#section-4.1.2.3
|
490 |
+
* @see http://tools.ietf.org/html/rfc6265#section-5.1.3
|
491 |
+
* @see http://tools.ietf.org/html/rfc6265#section-5.2.3
|
492 |
+
*
|
493 |
+
* @param string|null $domain
|
494 |
+
*
|
495 |
+
* @return string
|
496 |
+
*/
|
497 |
+
private function normalizeDomain($domain)
|
498 |
+
{
|
499 |
+
if (isset($domain)) {
|
500 |
+
$domain = ltrim(strtolower($domain), '.');
|
501 |
+
}
|
502 |
+
|
503 |
+
return $domain;
|
504 |
+
}
|
505 |
+
|
506 |
+
/**
|
507 |
+
* Processes path as per spec in RFC 6265.
|
508 |
+
*
|
509 |
+
* @see http://tools.ietf.org/html/rfc6265#section-5.1.4
|
510 |
+
* @see http://tools.ietf.org/html/rfc6265#section-5.2.4
|
511 |
+
*
|
512 |
+
* @param string|null $path
|
513 |
+
*
|
514 |
+
* @return string
|
515 |
+
*/
|
516 |
+
private function normalizePath($path)
|
517 |
+
{
|
518 |
+
$path = rtrim($path, '/');
|
519 |
+
|
520 |
+
if (empty($path) or '/' !== substr($path, 0, 1)) {
|
521 |
+
$path = '/';
|
522 |
+
}
|
523 |
+
|
524 |
+
return $path;
|
525 |
+
}
|
526 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/CookieJar.php
ADDED
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Cookie Jar holds a set of Cookies.
|
7 |
+
*
|
8 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
9 |
+
*/
|
10 |
+
final class CookieJar implements \Countable, \IteratorAggregate
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @var \SplObjectStorage
|
14 |
+
*/
|
15 |
+
protected $cookies;
|
16 |
+
|
17 |
+
public function __construct()
|
18 |
+
{
|
19 |
+
$this->cookies = new \SplObjectStorage();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Checks if there is a cookie.
|
24 |
+
*
|
25 |
+
* @param Cookie $cookie
|
26 |
+
*
|
27 |
+
* @return bool
|
28 |
+
*/
|
29 |
+
public function hasCookie(Cookie $cookie)
|
30 |
+
{
|
31 |
+
return $this->cookies->contains($cookie);
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Adds a cookie.
|
36 |
+
*
|
37 |
+
* @param Cookie $cookie
|
38 |
+
*/
|
39 |
+
public function addCookie(Cookie $cookie)
|
40 |
+
{
|
41 |
+
if (!$this->hasCookie($cookie)) {
|
42 |
+
$cookies = $this->getMatchingCookies($cookie);
|
43 |
+
|
44 |
+
foreach ($cookies as $matchingCookie) {
|
45 |
+
if ($cookie->getValue() !== $matchingCookie->getValue() || $cookie->getMaxAge() > $matchingCookie->getMaxAge()) {
|
46 |
+
$this->removeCookie($matchingCookie);
|
47 |
+
|
48 |
+
continue;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
if ($cookie->hasValue()) {
|
53 |
+
$this->cookies->attach($cookie);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Removes a cookie.
|
60 |
+
*
|
61 |
+
* @param Cookie $cookie
|
62 |
+
*/
|
63 |
+
public function removeCookie(Cookie $cookie)
|
64 |
+
{
|
65 |
+
$this->cookies->detach($cookie);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Returns the cookies.
|
70 |
+
*
|
71 |
+
* @return Cookie[]
|
72 |
+
*/
|
73 |
+
public function getCookies()
|
74 |
+
{
|
75 |
+
$match = function ($matchCookie) {
|
76 |
+
return true;
|
77 |
+
};
|
78 |
+
|
79 |
+
return $this->findMatchingCookies($match);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Returns all matching cookies.
|
84 |
+
*
|
85 |
+
* @param Cookie $cookie
|
86 |
+
*
|
87 |
+
* @return Cookie[]
|
88 |
+
*/
|
89 |
+
public function getMatchingCookies(Cookie $cookie)
|
90 |
+
{
|
91 |
+
$match = function ($matchCookie) use ($cookie) {
|
92 |
+
return $matchCookie->match($cookie);
|
93 |
+
};
|
94 |
+
|
95 |
+
return $this->findMatchingCookies($match);
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Finds matching cookies based on a callable.
|
100 |
+
*
|
101 |
+
* @param callable $match
|
102 |
+
*
|
103 |
+
* @return Cookie[]
|
104 |
+
*/
|
105 |
+
protected function findMatchingCookies(callable $match)
|
106 |
+
{
|
107 |
+
$cookies = [];
|
108 |
+
|
109 |
+
foreach ($this->cookies as $cookie) {
|
110 |
+
if ($match($cookie)) {
|
111 |
+
$cookies[] = $cookie;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
return $cookies;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Checks if there are cookies.
|
120 |
+
*
|
121 |
+
* @return bool
|
122 |
+
*/
|
123 |
+
public function hasCookies()
|
124 |
+
{
|
125 |
+
return $this->cookies->count() > 0;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Sets the cookies and removes any previous one.
|
130 |
+
*
|
131 |
+
* @param Cookie[] $cookies
|
132 |
+
*/
|
133 |
+
public function setCookies(array $cookies)
|
134 |
+
{
|
135 |
+
$this->clear();
|
136 |
+
$this->addCookies($cookies);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Adds some cookies.
|
141 |
+
*
|
142 |
+
* @param Cookie[] $cookies
|
143 |
+
*/
|
144 |
+
public function addCookies(array $cookies)
|
145 |
+
{
|
146 |
+
foreach ($cookies as $cookie) {
|
147 |
+
$this->addCookie($cookie);
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Removes some cookies.
|
153 |
+
*
|
154 |
+
* @param Cookie[] $cookies
|
155 |
+
*/
|
156 |
+
public function removeCookies(array $cookies)
|
157 |
+
{
|
158 |
+
foreach ($cookies as $cookie) {
|
159 |
+
$this->removeCookie($cookie);
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Removes cookies which match the given parameters.
|
165 |
+
*
|
166 |
+
* Null means that parameter should not be matched
|
167 |
+
*
|
168 |
+
* @param string|null $name
|
169 |
+
* @param string|null $domain
|
170 |
+
* @param string|null $path
|
171 |
+
*/
|
172 |
+
public function removeMatchingCookies($name = null, $domain = null, $path = null)
|
173 |
+
{
|
174 |
+
$match = function ($cookie) use ($name, $domain, $path) {
|
175 |
+
$match = true;
|
176 |
+
|
177 |
+
if (isset($name)) {
|
178 |
+
$match = $match && ($cookie->getName() === $name);
|
179 |
+
}
|
180 |
+
|
181 |
+
if (isset($domain)) {
|
182 |
+
$match = $match && $cookie->matchDomain($domain);
|
183 |
+
}
|
184 |
+
|
185 |
+
if (isset($path)) {
|
186 |
+
$match = $match && $cookie->matchPath($path);
|
187 |
+
}
|
188 |
+
|
189 |
+
return $match;
|
190 |
+
};
|
191 |
+
|
192 |
+
$cookies = $this->findMatchingCookies($match);
|
193 |
+
|
194 |
+
$this->removeCookies($cookies);
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Removes all cookies.
|
199 |
+
*/
|
200 |
+
public function clear()
|
201 |
+
{
|
202 |
+
$this->cookies = new \SplObjectStorage();
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* {@inheritdoc}
|
207 |
+
*/
|
208 |
+
public function count()
|
209 |
+
{
|
210 |
+
return $this->cookies->count();
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* {@inheritdoc}
|
215 |
+
*/
|
216 |
+
public function getIterator()
|
217 |
+
{
|
218 |
+
return clone $this->cookies;
|
219 |
+
}
|
220 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/CookieUtil.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Http\Message\Exception\UnexpectedValueException;
|
6 |
+
|
7 |
+
final class CookieUtil
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Handles dates as defined by RFC 2616 section 3.3.1, and also some other
|
11 |
+
* non-standard, but common formats.
|
12 |
+
*
|
13 |
+
* @var array
|
14 |
+
*/
|
15 |
+
private static $dateFormats = [
|
16 |
+
'D, d M y H:i:s T',
|
17 |
+
'D, d M Y H:i:s T',
|
18 |
+
'D, d-M-y H:i:s T',
|
19 |
+
'D, d-M-Y H:i:s T',
|
20 |
+
'D, d-m-y H:i:s T',
|
21 |
+
'D, d-m-Y H:i:s T',
|
22 |
+
'D M j G:i:s Y',
|
23 |
+
'D M d H:i:s Y T',
|
24 |
+
];
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/BrowserKit/Cookie.php
|
28 |
+
*
|
29 |
+
* @param string $dateValue
|
30 |
+
*
|
31 |
+
* @return \DateTime
|
32 |
+
*
|
33 |
+
* @throws UnexpectedValueException if we cannot parse the cookie date string.
|
34 |
+
*/
|
35 |
+
public static function parseDate($dateValue)
|
36 |
+
{
|
37 |
+
foreach (self::$dateFormats as $dateFormat) {
|
38 |
+
if (false !== $date = \DateTime::createFromFormat($dateFormat, $dateValue, new \DateTimeZone('GMT'))) {
|
39 |
+
return $date;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
// attempt a fallback for unusual formatting
|
44 |
+
if (false !== $date = date_create($dateValue, new \DateTimeZone('GMT'))) {
|
45 |
+
return $date;
|
46 |
+
}
|
47 |
+
|
48 |
+
throw new UnexpectedValueException(sprintf(
|
49 |
+
'Unparseable cookie date string "%s"',
|
50 |
+
$dateValue
|
51 |
+
));
|
52 |
+
}
|
53 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Decorator/MessageDecorator.php
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Decorator;
|
4 |
+
|
5 |
+
use Psr\Http\Message\MessageInterface;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
10 |
+
*/
|
11 |
+
trait MessageDecorator
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* @var MessageInterface
|
15 |
+
*/
|
16 |
+
private $message;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Returns the decorated message.
|
20 |
+
*
|
21 |
+
* Since the underlying Message is immutable as well
|
22 |
+
* exposing it is not an issue, because it's state cannot be altered
|
23 |
+
*
|
24 |
+
* @return MessageInterface
|
25 |
+
*/
|
26 |
+
public function getMessage()
|
27 |
+
{
|
28 |
+
return $this->message;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
public function getProtocolVersion()
|
35 |
+
{
|
36 |
+
return $this->message->getProtocolVersion();
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
public function withProtocolVersion($version)
|
43 |
+
{
|
44 |
+
$new = clone $this;
|
45 |
+
$new->message = $this->message->withProtocolVersion($version);
|
46 |
+
|
47 |
+
return $new;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* {@inheritdoc}
|
52 |
+
*/
|
53 |
+
public function getHeaders()
|
54 |
+
{
|
55 |
+
return $this->message->getHeaders();
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* {@inheritdoc}
|
60 |
+
*/
|
61 |
+
public function hasHeader($header)
|
62 |
+
{
|
63 |
+
return $this->message->hasHeader($header);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* {@inheritdoc}
|
68 |
+
*/
|
69 |
+
public function getHeader($header)
|
70 |
+
{
|
71 |
+
return $this->message->getHeader($header);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* {@inheritdoc}
|
76 |
+
*/
|
77 |
+
public function getHeaderLine($header)
|
78 |
+
{
|
79 |
+
return $this->message->getHeaderLine($header);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* {@inheritdoc}
|
84 |
+
*/
|
85 |
+
public function withHeader($header, $value)
|
86 |
+
{
|
87 |
+
$new = clone $this;
|
88 |
+
$new->message = $this->message->withHeader($header, $value);
|
89 |
+
|
90 |
+
return $new;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* {@inheritdoc}
|
95 |
+
*/
|
96 |
+
public function withAddedHeader($header, $value)
|
97 |
+
{
|
98 |
+
$new = clone $this;
|
99 |
+
$new->message = $this->message->withAddedHeader($header, $value);
|
100 |
+
|
101 |
+
return $new;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* {@inheritdoc}
|
106 |
+
*/
|
107 |
+
public function withoutHeader($header)
|
108 |
+
{
|
109 |
+
$new = clone $this;
|
110 |
+
$new->message = $this->message->withoutHeader($header);
|
111 |
+
|
112 |
+
return $new;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* {@inheritdoc}
|
117 |
+
*/
|
118 |
+
public function getBody()
|
119 |
+
{
|
120 |
+
return $this->message->getBody();
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* {@inheritdoc}
|
125 |
+
*/
|
126 |
+
public function withBody(StreamInterface $body)
|
127 |
+
{
|
128 |
+
$new = clone $this;
|
129 |
+
$new->message = $this->message->withBody($body);
|
130 |
+
|
131 |
+
return $new;
|
132 |
+
}
|
133 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Decorator/RequestDecorator.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Decorator;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\UriInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
10 |
+
*/
|
11 |
+
trait RequestDecorator
|
12 |
+
{
|
13 |
+
use MessageDecorator {
|
14 |
+
getMessage as getRequest;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Exchanges the underlying request with another.
|
19 |
+
*
|
20 |
+
* @param RequestInterface $request
|
21 |
+
*
|
22 |
+
* @return self
|
23 |
+
*/
|
24 |
+
public function withRequest(RequestInterface $request)
|
25 |
+
{
|
26 |
+
$new = clone $this;
|
27 |
+
$new->message = $request;
|
28 |
+
|
29 |
+
return $new;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* {@inheritdoc}
|
34 |
+
*/
|
35 |
+
public function getRequestTarget()
|
36 |
+
{
|
37 |
+
return $this->message->getRequestTarget();
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* {@inheritdoc}
|
42 |
+
*/
|
43 |
+
public function withRequestTarget($requestTarget)
|
44 |
+
{
|
45 |
+
$new = clone $this;
|
46 |
+
$new->message = $this->message->withRequestTarget($requestTarget);
|
47 |
+
|
48 |
+
return $new;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* {@inheritdoc}
|
53 |
+
*/
|
54 |
+
public function getMethod()
|
55 |
+
{
|
56 |
+
return $this->message->getMethod();
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* {@inheritdoc}
|
61 |
+
*/
|
62 |
+
public function withMethod($method)
|
63 |
+
{
|
64 |
+
$new = clone $this;
|
65 |
+
$new->message = $this->message->withMethod($method);
|
66 |
+
|
67 |
+
return $new;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* {@inheritdoc}
|
72 |
+
*/
|
73 |
+
public function getUri()
|
74 |
+
{
|
75 |
+
return $this->message->getUri();
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* {@inheritdoc}
|
80 |
+
*/
|
81 |
+
public function withUri(UriInterface $uri, $preserveHost = false)
|
82 |
+
{
|
83 |
+
$new = clone $this;
|
84 |
+
$new->message = $this->message->withUri($uri, $preserveHost);
|
85 |
+
|
86 |
+
return $new;
|
87 |
+
}
|
88 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Decorator/ResponseDecorator.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Decorator;
|
4 |
+
|
5 |
+
use Psr\Http\Message\ResponseInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
9 |
+
*/
|
10 |
+
trait ResponseDecorator
|
11 |
+
{
|
12 |
+
use MessageDecorator {
|
13 |
+
getMessage as getResponse;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Exchanges the underlying response with another.
|
18 |
+
*
|
19 |
+
* @param ResponseInterface $response
|
20 |
+
*
|
21 |
+
* @return self
|
22 |
+
*/
|
23 |
+
public function withResponse(ResponseInterface $response)
|
24 |
+
{
|
25 |
+
$new = clone $this;
|
26 |
+
$new->message = $response;
|
27 |
+
|
28 |
+
return $new;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
public function getStatusCode()
|
35 |
+
{
|
36 |
+
return $this->message->getStatusCode();
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
public function withStatus($code, $reasonPhrase = '')
|
43 |
+
{
|
44 |
+
$new = clone $this;
|
45 |
+
$new->message = $this->message->withStatus($code, $reasonPhrase);
|
46 |
+
|
47 |
+
return $new;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* {@inheritdoc}
|
52 |
+
*/
|
53 |
+
public function getReasonPhrase()
|
54 |
+
{
|
55 |
+
return $this->message->getReasonPhrase();
|
56 |
+
}
|
57 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Decorator/StreamDecorator.php
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Decorator;
|
4 |
+
|
5 |
+
use Psr\Http\Message\StreamInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Decorates a stream.
|
9 |
+
*
|
10 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
11 |
+
*/
|
12 |
+
trait StreamDecorator
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @var StreamInterface
|
16 |
+
*/
|
17 |
+
protected $stream;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* {@inheritdoc}
|
21 |
+
*/
|
22 |
+
public function __toString()
|
23 |
+
{
|
24 |
+
return $this->stream->__toString();
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* {@inheritdoc}
|
29 |
+
*/
|
30 |
+
public function close()
|
31 |
+
{
|
32 |
+
$this->stream->close();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function detach()
|
39 |
+
{
|
40 |
+
return $this->stream->detach();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* {@inheritdoc}
|
45 |
+
*/
|
46 |
+
public function getSize()
|
47 |
+
{
|
48 |
+
return $this->stream->getSize();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* {@inheritdoc}
|
53 |
+
*/
|
54 |
+
public function tell()
|
55 |
+
{
|
56 |
+
return $this->stream->tell();
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* {@inheritdoc}
|
61 |
+
*/
|
62 |
+
public function eof()
|
63 |
+
{
|
64 |
+
return $this->stream->eof();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* {@inheritdoc}
|
69 |
+
*/
|
70 |
+
public function isSeekable()
|
71 |
+
{
|
72 |
+
return $this->stream->isSeekable();
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* {@inheritdoc}
|
77 |
+
*/
|
78 |
+
public function seek($offset, $whence = SEEK_SET)
|
79 |
+
{
|
80 |
+
$this->stream->seek($offset, $whence);
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* {@inheritdoc}
|
85 |
+
*/
|
86 |
+
public function rewind()
|
87 |
+
{
|
88 |
+
$this->stream->rewind();
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* {@inheritdoc}
|
93 |
+
*/
|
94 |
+
public function isWritable()
|
95 |
+
{
|
96 |
+
return $this->stream->isWritable();
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* {@inheritdoc}
|
101 |
+
*/
|
102 |
+
public function write($string)
|
103 |
+
{
|
104 |
+
return $this->stream->write($string);
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* {@inheritdoc}
|
109 |
+
*/
|
110 |
+
public function isReadable()
|
111 |
+
{
|
112 |
+
return $this->stream->isReadable();
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* {@inheritdoc}
|
117 |
+
*/
|
118 |
+
public function read($length)
|
119 |
+
{
|
120 |
+
return $this->stream->read($length);
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* {@inheritdoc}
|
125 |
+
*/
|
126 |
+
public function getContents()
|
127 |
+
{
|
128 |
+
return $this->stream->getContents();
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* {@inheritdoc}
|
133 |
+
*/
|
134 |
+
public function getMetadata($key = null)
|
135 |
+
{
|
136 |
+
return $this->stream->getMetadata($key);
|
137 |
+
}
|
138 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/ChunkStream.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Transform a regular stream into a chunked one.
|
7 |
+
*
|
8 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
9 |
+
*/
|
10 |
+
class ChunkStream extends FilteredStream
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* {@inheritdoc}
|
14 |
+
*/
|
15 |
+
protected function readFilter()
|
16 |
+
{
|
17 |
+
return 'chunk';
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* {@inheritdoc}
|
22 |
+
*/
|
23 |
+
protected function writeFilter()
|
24 |
+
{
|
25 |
+
return 'dechunk';
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* {@inheritdoc}
|
30 |
+
*/
|
31 |
+
protected function fill()
|
32 |
+
{
|
33 |
+
parent::fill();
|
34 |
+
|
35 |
+
if ($this->stream->eof()) {
|
36 |
+
$this->buffer .= "0\r\n\r\n";
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/CompressStream.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stream compress (RFC 1950).
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
class CompressStream extends FilteredStream
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @param StreamInterface $stream
|
17 |
+
* @param int $level
|
18 |
+
*/
|
19 |
+
public function __construct(StreamInterface $stream, $level = -1)
|
20 |
+
{
|
21 |
+
if (!extension_loaded('zlib')) {
|
22 |
+
throw new \RuntimeException('The zlib extension must be enabled to use this stream');
|
23 |
+
}
|
24 |
+
|
25 |
+
parent::__construct($stream, ['window' => 15, 'level' => $level]);
|
26 |
+
|
27 |
+
// @deprecated will be removed in 2.0
|
28 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15]);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
protected function readFilter()
|
35 |
+
{
|
36 |
+
return 'zlib.deflate';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
protected function writeFilter()
|
43 |
+
{
|
44 |
+
return 'zlib.inflate';
|
45 |
+
}
|
46 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/DechunkStream.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Decorate a stream which is chunked.
|
7 |
+
*
|
8 |
+
* Allow to decode a chunked stream
|
9 |
+
*
|
10 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
11 |
+
*/
|
12 |
+
class DechunkStream extends FilteredStream
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* {@inheritdoc}
|
16 |
+
*/
|
17 |
+
protected function readFilter()
|
18 |
+
{
|
19 |
+
return 'dechunk';
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* {@inheritdoc}
|
24 |
+
*/
|
25 |
+
protected function writeFilter()
|
26 |
+
{
|
27 |
+
return 'chunk';
|
28 |
+
}
|
29 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/DecompressStream.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stream decompress (RFC 1950).
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
class DecompressStream extends FilteredStream
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @param StreamInterface $stream
|
17 |
+
* @param int $level
|
18 |
+
*/
|
19 |
+
public function __construct(StreamInterface $stream, $level = -1)
|
20 |
+
{
|
21 |
+
if (!extension_loaded('zlib')) {
|
22 |
+
throw new \RuntimeException('The zlib extension must be enabled to use this stream');
|
23 |
+
}
|
24 |
+
|
25 |
+
parent::__construct($stream, ['window' => 15]);
|
26 |
+
|
27 |
+
// @deprecated will be removed in 2.0
|
28 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 15, 'level' => $level]);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
protected function readFilter()
|
35 |
+
{
|
36 |
+
return 'zlib.inflate';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
protected function writeFilter()
|
43 |
+
{
|
44 |
+
return 'zlib.deflate';
|
45 |
+
}
|
46 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/DeflateStream.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stream deflate (RFC 1951).
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
class DeflateStream extends FilteredStream
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @param StreamInterface $stream
|
17 |
+
* @param int $level
|
18 |
+
*/
|
19 |
+
public function __construct(StreamInterface $stream, $level = -1)
|
20 |
+
{
|
21 |
+
parent::__construct($stream, ['window' => -15, 'level' => $level]);
|
22 |
+
|
23 |
+
// @deprecated will be removed in 2.0
|
24 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15]);
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* {@inheritdoc}
|
29 |
+
*/
|
30 |
+
protected function readFilter()
|
31 |
+
{
|
32 |
+
return 'zlib.deflate';
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
protected function writeFilter()
|
39 |
+
{
|
40 |
+
return 'zlib.inflate';
|
41 |
+
}
|
42 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/Filter/Chunk.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding\Filter;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Userland implementation of the chunk stream filter.
|
7 |
+
*
|
8 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
9 |
+
*/
|
10 |
+
class Chunk extends \php_user_filter
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* {@inheritdoc}
|
14 |
+
*/
|
15 |
+
public function filter($in, $out, &$consumed, $closing)
|
16 |
+
{
|
17 |
+
while ($bucket = stream_bucket_make_writeable($in)) {
|
18 |
+
$lenbucket = stream_bucket_new($this->stream, dechex($bucket->datalen)."\r\n");
|
19 |
+
stream_bucket_append($out, $lenbucket);
|
20 |
+
|
21 |
+
$consumed += $bucket->datalen;
|
22 |
+
stream_bucket_append($out, $bucket);
|
23 |
+
|
24 |
+
$lenbucket = stream_bucket_new($this->stream, "\r\n");
|
25 |
+
stream_bucket_append($out, $lenbucket);
|
26 |
+
}
|
27 |
+
|
28 |
+
return PSFS_PASS_ON;
|
29 |
+
}
|
30 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/FilteredStream.php
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Http\Message\Decorator\StreamDecorator;
|
7 |
+
use Psr\Http\Message\StreamInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* A filtered stream has a filter for filtering output and a filter for filtering input made to a underlying stream.
|
11 |
+
*
|
12 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
13 |
+
*/
|
14 |
+
abstract class FilteredStream implements StreamInterface
|
15 |
+
{
|
16 |
+
const BUFFER_SIZE = 8192;
|
17 |
+
|
18 |
+
use StreamDecorator {
|
19 |
+
rewind as private doRewind;
|
20 |
+
seek as private doSeek;
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @var callable
|
25 |
+
*/
|
26 |
+
protected $readFilterCallback;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* @var resource
|
30 |
+
*
|
31 |
+
* @deprecated since version 1.5, will be removed in 2.0
|
32 |
+
*/
|
33 |
+
protected $readFilter;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var callable
|
37 |
+
*
|
38 |
+
* @deprecated since version 1.5, will be removed in 2.0
|
39 |
+
*/
|
40 |
+
protected $writeFilterCallback;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @var resource
|
44 |
+
*
|
45 |
+
* @deprecated since version 1.5, will be removed in 2.0
|
46 |
+
*/
|
47 |
+
protected $writeFilter;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Internal buffer.
|
51 |
+
*
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
protected $buffer = '';
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @param StreamInterface $stream
|
58 |
+
* @param mixed|null $readFilterOptions
|
59 |
+
* @param mixed|null $writeFilterOptions deprecated since 1.5, will be removed in 2.0
|
60 |
+
*/
|
61 |
+
public function __construct(StreamInterface $stream, $readFilterOptions = null, $writeFilterOptions = null)
|
62 |
+
{
|
63 |
+
if (null !== $readFilterOptions) {
|
64 |
+
$this->readFilterCallback = Filter\fun($this->readFilter(), $readFilterOptions);
|
65 |
+
} else {
|
66 |
+
$this->readFilterCallback = Filter\fun($this->readFilter());
|
67 |
+
}
|
68 |
+
|
69 |
+
if (null !== $writeFilterOptions) {
|
70 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), $writeFilterOptions);
|
71 |
+
|
72 |
+
@trigger_error('The $writeFilterOptions argument is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);
|
73 |
+
} else {
|
74 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter());
|
75 |
+
}
|
76 |
+
|
77 |
+
$this->stream = $stream;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* {@inheritdoc}
|
82 |
+
*/
|
83 |
+
public function read($length)
|
84 |
+
{
|
85 |
+
if (strlen($this->buffer) >= $length) {
|
86 |
+
$read = substr($this->buffer, 0, $length);
|
87 |
+
$this->buffer = substr($this->buffer, $length);
|
88 |
+
|
89 |
+
return $read;
|
90 |
+
}
|
91 |
+
|
92 |
+
if ($this->stream->eof()) {
|
93 |
+
$buffer = $this->buffer;
|
94 |
+
$this->buffer = '';
|
95 |
+
|
96 |
+
return $buffer;
|
97 |
+
}
|
98 |
+
|
99 |
+
$read = $this->buffer;
|
100 |
+
$this->buffer = '';
|
101 |
+
$this->fill();
|
102 |
+
|
103 |
+
return $read.$this->read($length - strlen($read));
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* {@inheritdoc}
|
108 |
+
*/
|
109 |
+
public function eof()
|
110 |
+
{
|
111 |
+
return $this->stream->eof() && '' === $this->buffer;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Buffer is filled by reading underlying stream.
|
116 |
+
*
|
117 |
+
* Callback is reading once more even if the stream is ended.
|
118 |
+
* This allow to get last data in the PHP buffer otherwise this
|
119 |
+
* bug is present : https://bugs.php.net/bug.php?id=48725
|
120 |
+
*/
|
121 |
+
protected function fill()
|
122 |
+
{
|
123 |
+
$readFilterCallback = $this->readFilterCallback;
|
124 |
+
$this->buffer .= $readFilterCallback($this->stream->read(self::BUFFER_SIZE));
|
125 |
+
|
126 |
+
if ($this->stream->eof()) {
|
127 |
+
$this->buffer .= $readFilterCallback();
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* {@inheritdoc}
|
133 |
+
*/
|
134 |
+
public function getContents()
|
135 |
+
{
|
136 |
+
$buffer = '';
|
137 |
+
|
138 |
+
while (!$this->eof()) {
|
139 |
+
$buf = $this->read(self::BUFFER_SIZE);
|
140 |
+
// Using a loose equality here to match on '' and false.
|
141 |
+
if (null == $buf) {
|
142 |
+
break;
|
143 |
+
}
|
144 |
+
|
145 |
+
$buffer .= $buf;
|
146 |
+
}
|
147 |
+
|
148 |
+
return $buffer;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Always returns null because we can't tell the size of a stream when we filter.
|
153 |
+
*/
|
154 |
+
public function getSize()
|
155 |
+
{
|
156 |
+
return null;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* {@inheritdoc}
|
161 |
+
*/
|
162 |
+
public function __toString()
|
163 |
+
{
|
164 |
+
return $this->getContents();
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Filtered streams are not seekable.
|
169 |
+
*
|
170 |
+
* We would need to buffer and process everything to allow seeking.
|
171 |
+
*/
|
172 |
+
public function isSeekable()
|
173 |
+
{
|
174 |
+
return false;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* {@inheritdoc}
|
179 |
+
*/
|
180 |
+
public function rewind()
|
181 |
+
{
|
182 |
+
@trigger_error('Filtered streams are not seekable. This method will start raising an exception in the next major version', E_USER_DEPRECATED);
|
183 |
+
$this->doRewind();
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* {@inheritdoc}
|
188 |
+
*/
|
189 |
+
public function seek($offset, $whence = SEEK_SET)
|
190 |
+
{
|
191 |
+
@trigger_error('Filtered streams are not seekable. This method will start raising an exception in the next major version', E_USER_DEPRECATED);
|
192 |
+
$this->doSeek($offset, $whence);
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Returns the read filter name.
|
197 |
+
*
|
198 |
+
* @return string
|
199 |
+
*
|
200 |
+
* @deprecated since version 1.5, will be removed in 2.0
|
201 |
+
*/
|
202 |
+
public function getReadFilter()
|
203 |
+
{
|
204 |
+
@trigger_error('The '.__CLASS__.'::'.__METHOD__.' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);
|
205 |
+
|
206 |
+
return $this->readFilter();
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Returns the write filter name.
|
211 |
+
*
|
212 |
+
* @return string
|
213 |
+
*/
|
214 |
+
abstract protected function readFilter();
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Returns the write filter name.
|
218 |
+
*
|
219 |
+
* @return string
|
220 |
+
*
|
221 |
+
* @deprecated since version 1.5, will be removed in 2.0
|
222 |
+
*/
|
223 |
+
public function getWriteFilter()
|
224 |
+
{
|
225 |
+
@trigger_error('The '.__CLASS__.'::'.__METHOD__.' method is deprecated since version 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);
|
226 |
+
|
227 |
+
return $this->writeFilter();
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Returns the write filter name.
|
232 |
+
*
|
233 |
+
* @return string
|
234 |
+
*/
|
235 |
+
abstract protected function writeFilter();
|
236 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/GzipDecodeStream.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stream for decoding from gzip format (RFC 1952).
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
class GzipDecodeStream extends FilteredStream
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @param StreamInterface $stream
|
17 |
+
* @param int $level
|
18 |
+
*/
|
19 |
+
public function __construct(StreamInterface $stream, $level = -1)
|
20 |
+
{
|
21 |
+
if (!extension_loaded('zlib')) {
|
22 |
+
throw new \RuntimeException('The zlib extension must be enabled to use this stream');
|
23 |
+
}
|
24 |
+
|
25 |
+
parent::__construct($stream, ['window' => 31]);
|
26 |
+
|
27 |
+
// @deprecated will be removed in 2.0
|
28 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31, 'level' => $level]);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
protected function readFilter()
|
35 |
+
{
|
36 |
+
return 'zlib.inflate';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
protected function writeFilter()
|
43 |
+
{
|
44 |
+
return 'zlib.deflate';
|
45 |
+
}
|
46 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/GzipEncodeStream.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stream for encoding to gzip format (RFC 1952).
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
class GzipEncodeStream extends FilteredStream
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @param StreamInterface $stream
|
17 |
+
* @param int $level
|
18 |
+
*/
|
19 |
+
public function __construct(StreamInterface $stream, $level = -1)
|
20 |
+
{
|
21 |
+
if (!extension_loaded('zlib')) {
|
22 |
+
throw new \RuntimeException('The zlib extension must be enabled to use this stream');
|
23 |
+
}
|
24 |
+
|
25 |
+
parent::__construct($stream, ['window' => 31, 'level' => $level]);
|
26 |
+
|
27 |
+
// @deprecated will be removed in 2.0
|
28 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => 31]);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
protected function readFilter()
|
35 |
+
{
|
36 |
+
return 'zlib.deflate';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
protected function writeFilter()
|
43 |
+
{
|
44 |
+
return 'zlib.inflate';
|
45 |
+
}
|
46 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Encoding/InflateStream.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Encoding;
|
4 |
+
|
5 |
+
use Clue\StreamFilter as Filter;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Stream inflate (RFC 1951).
|
10 |
+
*
|
11 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
12 |
+
*/
|
13 |
+
class InflateStream extends FilteredStream
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @param StreamInterface $stream
|
17 |
+
* @param int $level
|
18 |
+
*/
|
19 |
+
public function __construct(StreamInterface $stream, $level = -1)
|
20 |
+
{
|
21 |
+
if (!extension_loaded('zlib')) {
|
22 |
+
throw new \RuntimeException('The zlib extension must be enabled to use this stream');
|
23 |
+
}
|
24 |
+
|
25 |
+
parent::__construct($stream, ['window' => -15]);
|
26 |
+
|
27 |
+
// @deprecated will be removed in 2.0
|
28 |
+
$this->writeFilterCallback = Filter\fun($this->writeFilter(), ['window' => -15, 'level' => $level]);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* {@inheritdoc}
|
33 |
+
*/
|
34 |
+
protected function readFilter()
|
35 |
+
{
|
36 |
+
return 'zlib.inflate';
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* {@inheritdoc}
|
41 |
+
*/
|
42 |
+
protected function writeFilter()
|
43 |
+
{
|
44 |
+
return 'zlib.deflate';
|
45 |
+
}
|
46 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Exception.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* An interface implemented by all HTTP message related exceptions.
|
7 |
+
*/
|
8 |
+
interface Exception
|
9 |
+
{
|
10 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Exception/UnexpectedValueException.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Exception;
|
4 |
+
|
5 |
+
use Http\Message\Exception;
|
6 |
+
|
7 |
+
final class UnexpectedValueException extends \UnexpectedValueException implements Exception
|
8 |
+
{
|
9 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Formatter.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
use Psr\Http\Message\ResponseInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Formats a request and/or a response as a string.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
interface Formatter
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Formats a request.
|
17 |
+
*
|
18 |
+
* @param RequestInterface $request
|
19 |
+
*
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
public function formatRequest(RequestInterface $request);
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Formats a response.
|
26 |
+
*
|
27 |
+
* @param ResponseInterface $response
|
28 |
+
*
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
public function formatResponse(ResponseInterface $response);
|
32 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Formatter/CurlCommandFormatter.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Formatter;
|
4 |
+
|
5 |
+
use Http\Message\Formatter;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
use Psr\Http\Message\ResponseInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* A formatter that prints a cURL command for HTTP requests.
|
11 |
+
*
|
12 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
13 |
+
*/
|
14 |
+
class CurlCommandFormatter implements Formatter
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function formatRequest(RequestInterface $request)
|
20 |
+
{
|
21 |
+
$command = sprintf('curl %s', escapeshellarg((string) $request->getUri()->withFragment('')));
|
22 |
+
if ('1.0' === $request->getProtocolVersion()) {
|
23 |
+
$command .= ' --http1.0';
|
24 |
+
} elseif ('2.0' === $request->getProtocolVersion()) {
|
25 |
+
$command .= ' --http2';
|
26 |
+
}
|
27 |
+
|
28 |
+
$method = strtoupper($request->getMethod());
|
29 |
+
if ('HEAD' === $method) {
|
30 |
+
$command .= ' --head';
|
31 |
+
} elseif ('GET' !== $method) {
|
32 |
+
$command .= ' --request '.$method;
|
33 |
+
}
|
34 |
+
|
35 |
+
$command .= $this->getHeadersAsCommandOptions($request);
|
36 |
+
|
37 |
+
$body = $request->getBody();
|
38 |
+
if ($body->getSize() > 0) {
|
39 |
+
// escapeshellarg argument max length on Windows, but longer body in curl command would be impractical anyways
|
40 |
+
if ($body->getSize() > 8192) {
|
41 |
+
$data = '[too long stream omitted]';
|
42 |
+
} elseif ($body->isSeekable()) {
|
43 |
+
$data = $body->__toString();
|
44 |
+
$body->rewind();
|
45 |
+
if (preg_match('/[\x00-\x1F\x7F]/', $data)) {
|
46 |
+
$data = '[binary stream omitted]';
|
47 |
+
}
|
48 |
+
} else {
|
49 |
+
$data = '[non-seekable stream omitted]';
|
50 |
+
}
|
51 |
+
$escapedData = @escapeshellarg($data);
|
52 |
+
if (empty($escapedData)) {
|
53 |
+
$escapedData = 'We couldn\'t not escape the data properly';
|
54 |
+
}
|
55 |
+
|
56 |
+
$command .= sprintf(' --data %s', $escapedData);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $command;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* {@inheritdoc}
|
64 |
+
*/
|
65 |
+
public function formatResponse(ResponseInterface $response)
|
66 |
+
{
|
67 |
+
return '';
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* @param RequestInterface $request
|
72 |
+
*
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
private function getHeadersAsCommandOptions(RequestInterface $request)
|
76 |
+
{
|
77 |
+
$command = '';
|
78 |
+
foreach ($request->getHeaders() as $name => $values) {
|
79 |
+
if ('host' === strtolower($name) && $values[0] === $request->getUri()->getHost()) {
|
80 |
+
continue;
|
81 |
+
}
|
82 |
+
|
83 |
+
if ('user-agent' === strtolower($name)) {
|
84 |
+
$command .= sprintf(' -A %s', escapeshellarg($values[0]));
|
85 |
+
|
86 |
+
continue;
|
87 |
+
}
|
88 |
+
|
89 |
+
$command .= sprintf(' -H %s', escapeshellarg($name.': '.$request->getHeaderLine($name)));
|
90 |
+
}
|
91 |
+
|
92 |
+
return $command;
|
93 |
+
}
|
94 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Formatter/FullHttpMessageFormatter.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Formatter;
|
4 |
+
|
5 |
+
use Http\Message\Formatter;
|
6 |
+
use Psr\Http\Message\MessageInterface;
|
7 |
+
use Psr\Http\Message\RequestInterface;
|
8 |
+
use Psr\Http\Message\ResponseInterface;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* A formatter that prints the complete HTTP message.
|
12 |
+
*
|
13 |
+
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
|
14 |
+
*/
|
15 |
+
class FullHttpMessageFormatter implements Formatter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* The maximum length of the body.
|
19 |
+
*
|
20 |
+
* @var int|null
|
21 |
+
*/
|
22 |
+
private $maxBodyLength;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param int|null $maxBodyLength
|
26 |
+
*/
|
27 |
+
public function __construct($maxBodyLength = 1000)
|
28 |
+
{
|
29 |
+
$this->maxBodyLength = $maxBodyLength;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* {@inheritdoc}
|
34 |
+
*/
|
35 |
+
public function formatRequest(RequestInterface $request)
|
36 |
+
{
|
37 |
+
$message = sprintf(
|
38 |
+
"%s %s HTTP/%s\n",
|
39 |
+
$request->getMethod(),
|
40 |
+
$request->getRequestTarget(),
|
41 |
+
$request->getProtocolVersion()
|
42 |
+
);
|
43 |
+
|
44 |
+
foreach ($request->getHeaders() as $name => $values) {
|
45 |
+
$message .= $name.': '.implode(', ', $values)."\n";
|
46 |
+
}
|
47 |
+
|
48 |
+
return $this->addBody($request, $message);
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* {@inheritdoc}
|
53 |
+
*/
|
54 |
+
public function formatResponse(ResponseInterface $response)
|
55 |
+
{
|
56 |
+
$message = sprintf(
|
57 |
+
"HTTP/%s %s %s\n",
|
58 |
+
$response->getProtocolVersion(),
|
59 |
+
$response->getStatusCode(),
|
60 |
+
$response->getReasonPhrase()
|
61 |
+
);
|
62 |
+
|
63 |
+
foreach ($response->getHeaders() as $name => $values) {
|
64 |
+
$message .= $name.': '.implode(', ', $values)."\n";
|
65 |
+
}
|
66 |
+
|
67 |
+
return $this->addBody($response, $message);
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Add the message body if the stream is seekable.
|
72 |
+
*
|
73 |
+
* @param MessageInterface $request
|
74 |
+
* @param string $message
|
75 |
+
*
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
private function addBody(MessageInterface $request, $message)
|
79 |
+
{
|
80 |
+
$stream = $request->getBody();
|
81 |
+
if (!$stream->isSeekable() || 0 === $this->maxBodyLength) {
|
82 |
+
// Do not read the stream
|
83 |
+
return $message."\n";
|
84 |
+
}
|
85 |
+
|
86 |
+
if (null === $this->maxBodyLength) {
|
87 |
+
$message .= "\n".$stream->__toString();
|
88 |
+
} else {
|
89 |
+
$message .= "\n".mb_substr($stream->__toString(), 0, $this->maxBodyLength);
|
90 |
+
}
|
91 |
+
|
92 |
+
$stream->rewind();
|
93 |
+
|
94 |
+
return $message;
|
95 |
+
}
|
96 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Formatter/SimpleFormatter.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Formatter;
|
4 |
+
|
5 |
+
use Http\Message\Formatter;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
use Psr\Http\Message\ResponseInterface;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Normalize a request or a response into a string or an array.
|
11 |
+
*
|
12 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
13 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
14 |
+
*/
|
15 |
+
class SimpleFormatter implements Formatter
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* {@inheritdoc}
|
19 |
+
*/
|
20 |
+
public function formatRequest(RequestInterface $request)
|
21 |
+
{
|
22 |
+
return sprintf(
|
23 |
+
'%s %s %s',
|
24 |
+
$request->getMethod(),
|
25 |
+
$request->getUri()->__toString(),
|
26 |
+
$request->getProtocolVersion()
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* {@inheritdoc}
|
32 |
+
*/
|
33 |
+
public function formatResponse(ResponseInterface $response)
|
34 |
+
{
|
35 |
+
return sprintf(
|
36 |
+
'%s %s %s',
|
37 |
+
$response->getStatusCode(),
|
38 |
+
$response->getReasonPhrase(),
|
39 |
+
$response->getProtocolVersion()
|
40 |
+
);
|
41 |
+
}
|
42 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/MessageFactory/DiactorosMessageFactory.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\MessageFactory;
|
4 |
+
|
5 |
+
use Http\Message\StreamFactory\DiactorosStreamFactory;
|
6 |
+
use Http\Message\MessageFactory;
|
7 |
+
use Zend\Diactoros\Request;
|
8 |
+
use Zend\Diactoros\Response;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Creates Diactoros messages.
|
12 |
+
*
|
13 |
+
* @author GeLo <geloen.eric@gmail.com>
|
14 |
+
*/
|
15 |
+
final class DiactorosMessageFactory implements MessageFactory
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* @var DiactorosStreamFactory
|
19 |
+
*/
|
20 |
+
private $streamFactory;
|
21 |
+
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
$this->streamFactory = new DiactorosStreamFactory();
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* {@inheritdoc}
|
29 |
+
*/
|
30 |
+
public function createRequest(
|
31 |
+
$method,
|
32 |
+
$uri,
|
33 |
+
array $headers = [],
|
34 |
+
$body = null,
|
35 |
+
$protocolVersion = '1.1'
|
36 |
+
) {
|
37 |
+
return (new Request(
|
38 |
+
$uri,
|
39 |
+
$method,
|
40 |
+
$this->streamFactory->createStream($body),
|
41 |
+
$headers
|
42 |
+
))->withProtocolVersion($protocolVersion);
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* {@inheritdoc}
|
47 |
+
*/
|
48 |
+
public function createResponse(
|
49 |
+
$statusCode = 200,
|
50 |
+
$reasonPhrase = null,
|
51 |
+
array $headers = [],
|
52 |
+
$body = null,
|
53 |
+
$protocolVersion = '1.1'
|
54 |
+
) {
|
55 |
+
return (new Response(
|
56 |
+
$this->streamFactory->createStream($body),
|
57 |
+
$statusCode,
|
58 |
+
$headers
|
59 |
+
))->withProtocolVersion($protocolVersion);
|
60 |
+
}
|
61 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/MessageFactory/GuzzleMessageFactory.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\MessageFactory;
|
4 |
+
|
5 |
+
use GuzzleHttp\Psr7\Request;
|
6 |
+
use GuzzleHttp\Psr7\Response;
|
7 |
+
use Http\Message\MessageFactory;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Creates Guzzle messages.
|
11 |
+
*
|
12 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
13 |
+
*/
|
14 |
+
final class GuzzleMessageFactory implements MessageFactory
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function createRequest(
|
20 |
+
$method,
|
21 |
+
$uri,
|
22 |
+
array $headers = [],
|
23 |
+
$body = null,
|
24 |
+
$protocolVersion = '1.1'
|
25 |
+
) {
|
26 |
+
return new Request(
|
27 |
+
$method,
|
28 |
+
$uri,
|
29 |
+
$headers,
|
30 |
+
$body,
|
31 |
+
$protocolVersion
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function createResponse(
|
39 |
+
$statusCode = 200,
|
40 |
+
$reasonPhrase = null,
|
41 |
+
array $headers = [],
|
42 |
+
$body = null,
|
43 |
+
$protocolVersion = '1.1'
|
44 |
+
) {
|
45 |
+
return new Response(
|
46 |
+
$statusCode,
|
47 |
+
$headers,
|
48 |
+
$body,
|
49 |
+
$protocolVersion,
|
50 |
+
$reasonPhrase
|
51 |
+
);
|
52 |
+
}
|
53 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/MessageFactory/SlimMessageFactory.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\MessageFactory;
|
4 |
+
|
5 |
+
use Http\Message\StreamFactory\SlimStreamFactory;
|
6 |
+
use Http\Message\UriFactory\SlimUriFactory;
|
7 |
+
use Http\Message\MessageFactory;
|
8 |
+
use Slim\Http\Request;
|
9 |
+
use Slim\Http\Response;
|
10 |
+
use Slim\Http\Headers;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Creates Slim 3 messages.
|
14 |
+
*
|
15 |
+
* @author Mika Tuupola <tuupola@appelsiini.net>
|
16 |
+
*/
|
17 |
+
final class SlimMessageFactory implements MessageFactory
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* @var SlimStreamFactory
|
21 |
+
*/
|
22 |
+
private $streamFactory;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var SlimUriFactory
|
26 |
+
*/
|
27 |
+
private $uriFactory;
|
28 |
+
|
29 |
+
public function __construct()
|
30 |
+
{
|
31 |
+
$this->streamFactory = new SlimStreamFactory();
|
32 |
+
$this->uriFactory = new SlimUriFactory();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* {@inheritdoc}
|
37 |
+
*/
|
38 |
+
public function createRequest(
|
39 |
+
$method,
|
40 |
+
$uri,
|
41 |
+
array $headers = [],
|
42 |
+
$body = null,
|
43 |
+
$protocolVersion = '1.1'
|
44 |
+
) {
|
45 |
+
return (new Request(
|
46 |
+
$method,
|
47 |
+
$this->uriFactory->createUri($uri),
|
48 |
+
new Headers($headers),
|
49 |
+
[],
|
50 |
+
[],
|
51 |
+
$this->streamFactory->createStream($body),
|
52 |
+
[]
|
53 |
+
))->withProtocolVersion($protocolVersion);
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* {@inheritdoc}
|
58 |
+
*/
|
59 |
+
public function createResponse(
|
60 |
+
$statusCode = 200,
|
61 |
+
$reasonPhrase = null,
|
62 |
+
array $headers = [],
|
63 |
+
$body = null,
|
64 |
+
$protocolVersion = '1.1'
|
65 |
+
) {
|
66 |
+
return (new Response(
|
67 |
+
$statusCode,
|
68 |
+
new Headers($headers),
|
69 |
+
$this->streamFactory->createStream($body)
|
70 |
+
))->withProtocolVersion($protocolVersion);
|
71 |
+
}
|
72 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/RequestMatcher.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message;
|
4 |
+
|
5 |
+
use Psr\Http\Message\RequestInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Match a request.
|
9 |
+
*
|
10 |
+
* PSR-7 equivalent of Symfony's RequestMatcher
|
11 |
+
*
|
12 |
+
* @see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php
|
13 |
+
*
|
14 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
15 |
+
*/
|
16 |
+
interface RequestMatcher
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* Decides whether the rule(s) implemented by the strategy matches the supplied request.
|
20 |
+
*
|
21 |
+
* @param RequestInterface $request The PSR7 request to check for a match
|
22 |
+
*
|
23 |
+
* @return bool true if the request matches, false otherwise
|
24 |
+
*/
|
25 |
+
public function matches(RequestInterface $request);
|
26 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/RequestMatcher/CallbackRequestMatcher.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\RequestMatcher;
|
4 |
+
|
5 |
+
use Http\Message\RequestMatcher;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Match a request with a callback.
|
10 |
+
*
|
11 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
12 |
+
*/
|
13 |
+
final class CallbackRequestMatcher implements RequestMatcher
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @var callable
|
17 |
+
*/
|
18 |
+
private $callback;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @param callable $callback
|
22 |
+
*/
|
23 |
+
public function __construct(callable $callback)
|
24 |
+
{
|
25 |
+
$this->callback = $callback;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* {@inheritdoc}
|
30 |
+
*/
|
31 |
+
public function matches(RequestInterface $request)
|
32 |
+
{
|
33 |
+
return (bool) call_user_func($this->callback, $request);
|
34 |
+
}
|
35 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/RequestMatcher/RegexRequestMatcher.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\RequestMatcher;
|
4 |
+
|
5 |
+
use Http\Message\RequestMatcher;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
@trigger_error('The '.__NAMESPACE__.'\RegexRequestMatcher class is deprecated since version 1.2 and will be removed in 2.0. Use Http\Message\RequestMatcher\RequestMatcher instead.', E_USER_DEPRECATED);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Match a request with a regex on the uri.
|
12 |
+
*
|
13 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
14 |
+
*
|
15 |
+
* @deprecated since version 1.2 and will be removed in 2.0. Use {@link RequestMatcher} instead.
|
16 |
+
*/
|
17 |
+
final class RegexRequestMatcher implements RequestMatcher
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Matching regex.
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $regex;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param string $regex
|
28 |
+
*/
|
29 |
+
public function __construct($regex)
|
30 |
+
{
|
31 |
+
$this->regex = $regex;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* {@inheritdoc}
|
36 |
+
*/
|
37 |
+
public function matches(RequestInterface $request)
|
38 |
+
{
|
39 |
+
return (bool) preg_match($this->regex, (string) $request->getUri());
|
40 |
+
}
|
41 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/RequestMatcher/RequestMatcher.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\RequestMatcher;
|
4 |
+
|
5 |
+
use Http\Message\RequestMatcher as RequestMatcherInterface;
|
6 |
+
use Psr\Http\Message\RequestInterface;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* A port of the Symfony RequestMatcher for PSR-7.
|
10 |
+
*
|
11 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
12 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
13 |
+
*/
|
14 |
+
final class RequestMatcher implements RequestMatcherInterface
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
private $path;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $host;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
private $methods = [];
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var string[]
|
33 |
+
*/
|
34 |
+
private $schemes = [];
|
35 |
+
|
36 |
+
/**
|
37 |
+
* The regular expressions used for path or host must be specified without delimiter.
|
38 |
+
* You do not need to escape the forward slash / to match it.
|
39 |
+
*
|
40 |
+
* @param string|null $path Regular expression for the path
|
41 |
+
* @param string|null $host Regular expression for the hostname
|
42 |
+
* @param string|string[]|null $methods Method or list of methods to match
|
43 |
+
* @param string|string[]|null $schemes Scheme or list of schemes to match (e.g. http or https)
|
44 |
+
*/
|
45 |
+
public function __construct($path = null, $host = null, $methods = [], $schemes = [])
|
46 |
+
{
|
47 |
+
$this->path = $path;
|
48 |
+
$this->host = $host;
|
49 |
+
$this->methods = array_map('strtoupper', (array) $methods);
|
50 |
+
$this->schemes = array_map('strtolower', (array) $schemes);
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* {@inheritdoc}
|
55 |
+
*
|
56 |
+
* @api
|
57 |
+
*/
|
58 |
+
public function matches(RequestInterface $request)
|
59 |
+
{
|
60 |
+
if ($this->schemes && !in_array($request->getUri()->getScheme(), $this->schemes)) {
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
|
64 |
+
if ($this->methods && !in_array($request->getMethod(), $this->methods)) {
|
65 |
+
return false;
|
66 |
+
}
|
67 |
+
|
68 |
+
if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getUri()->getPath()))) {
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
|
72 |
+
if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getUri()->getHost())) {
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/Stream/BufferedStream.php
ADDED
@@ -0,0 +1,270 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\Stream;
|
4 |
+
|
5 |
+
use Psr\Http\Message\StreamInterface;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Decorator to make any stream seekable.
|
9 |
+
*
|
10 |
+
* Internally it buffers an existing StreamInterface into a php://temp resource (or memory). By default it will use
|
11 |
+
* 2 megabytes of memory before writing to a temporary disk file.
|
12 |
+
*
|
13 |
+
* Due to this, very large stream can suffer performance issue (i/o slowdown).
|
14 |
+
*/
|
15 |
+
class BufferedStream implements StreamInterface
|
16 |
+
{
|
17 |
+
/** @var resource The buffered resource used to seek previous data */
|
18 |
+
private $resource;
|
19 |
+
|
20 |
+
/** @var int size of the stream if available */
|
21 |
+
private $size;
|
22 |
+
|
23 |
+
/** @var StreamInterface The underlying stream decorated by this class */
|
24 |
+
private $stream;
|
25 |
+
|
26 |
+
/** @var int How many bytes were written */
|
27 |
+
private $written = 0;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @param StreamInterface $stream Decorated stream
|
31 |
+
* @param bool $useFileBuffer Whether to use a file buffer (write to a file, if data exceed a certain size)
|
32 |
+
* by default, set this to false to only use memory
|
33 |
+
* @param int $memoryBuffer In conjunction with using file buffer, limit (in bytes) from which it begins to buffer
|
34 |
+
* the data in a file
|
35 |
+
*/
|
36 |
+
public function __construct(StreamInterface $stream, $useFileBuffer = true, $memoryBuffer = 2097152)
|
37 |
+
{
|
38 |
+
$this->stream = $stream;
|
39 |
+
$this->size = $stream->getSize();
|
40 |
+
|
41 |
+
if ($useFileBuffer) {
|
42 |
+
$this->resource = fopen('php://temp/maxmemory:'.$memoryBuffer, 'rw+');
|
43 |
+
} else {
|
44 |
+
$this->resource = fopen('php://memory', 'rw+');
|
45 |
+
}
|
46 |
+
|
47 |
+
if (false === $this->resource) {
|
48 |
+
throw new \RuntimeException('Cannot create a resource over temp or memory implementation');
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* {@inheritdoc}
|
54 |
+
*/
|
55 |
+
public function __toString()
|
56 |
+
{
|
57 |
+
try {
|
58 |
+
$this->rewind();
|
59 |
+
|
60 |
+
return $this->getContents();
|
61 |
+
} catch (\Throwable $throwable) {
|
62 |
+
return '';
|
63 |
+
} catch (\Exception $exception) { // Layer to be BC with PHP 5, remove this when we only support PHP 7+
|
64 |
+
return '';
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* {@inheritdoc}
|
70 |
+
*/
|
71 |
+
public function close()
|
72 |
+
{
|
73 |
+
if (null === $this->resource) {
|
74 |
+
throw new \RuntimeException('Cannot close on a detached stream');
|
75 |
+
}
|
76 |
+
|
77 |
+
$this->stream->close();
|
78 |
+
fclose($this->resource);
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* {@inheritdoc}
|
83 |
+
*/
|
84 |
+
public function detach()
|
85 |
+
{
|
86 |
+
if (null === $this->resource) {
|
87 |
+
return;
|
88 |
+
}
|
89 |
+
|
90 |
+
// Force reading the remaining data of the stream
|
91 |
+
$this->getContents();
|
92 |
+
|
93 |
+
$resource = $this->resource;
|
94 |
+
$this->stream->close();
|
95 |
+
$this->stream = null;
|
96 |
+
$this->resource = null;
|
97 |
+
|
98 |
+
return $resource;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* {@inheritdoc}
|
103 |
+
*/
|
104 |
+
public function getSize()
|
105 |
+
{
|
106 |
+
if (null === $this->resource) {
|
107 |
+
return;
|
108 |
+
}
|
109 |
+
|
110 |
+
if (null === $this->size && $this->stream->eof()) {
|
111 |
+
return $this->written;
|
112 |
+
}
|
113 |
+
|
114 |
+
return $this->size;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* {@inheritdoc}
|
119 |
+
*/
|
120 |
+
public function tell()
|
121 |
+
{
|
122 |
+
if (null === $this->resource) {
|
123 |
+
throw new \RuntimeException('Cannot tell on a detached stream');
|
124 |
+
}
|
125 |
+
|
126 |
+
return ftell($this->resource);
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* {@inheritdoc}
|
131 |
+
*/
|
132 |
+
public function eof()
|
133 |
+
{
|
134 |
+
if (null === $this->resource) {
|
135 |
+
throw new \RuntimeException('Cannot call eof on a detached stream');
|
136 |
+
}
|
137 |
+
|
138 |
+
// We are at the end only when both our resource and underlying stream are at eof
|
139 |
+
return $this->stream->eof() && (ftell($this->resource) === $this->written);
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* {@inheritdoc}
|
144 |
+
*/
|
145 |
+
public function isSeekable()
|
146 |
+
{
|
147 |
+
return null !== $this->resource;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* {@inheritdoc}
|
152 |
+
*/
|
153 |
+
public function seek($offset, $whence = SEEK_SET)
|
154 |
+
{
|
155 |
+
if (null === $this->resource) {
|
156 |
+
throw new \RuntimeException('Cannot seek on a detached stream');
|
157 |
+
}
|
158 |
+
|
159 |
+
fseek($this->resource, $offset, $whence);
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* {@inheritdoc}
|
164 |
+
*/
|
165 |
+
public function rewind()
|
166 |
+
{
|
167 |
+
if (null === $this->resource) {
|
168 |
+
throw new \RuntimeException('Cannot rewind on a detached stream');
|
169 |
+
}
|
170 |
+
|
171 |
+
rewind($this->resource);
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* {@inheritdoc}
|
176 |
+
*/
|
177 |
+
public function isWritable()
|
178 |
+
{
|
179 |
+
return false;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* {@inheritdoc}
|
184 |
+
*/
|
185 |
+
public function write($string)
|
186 |
+
{
|
187 |
+
throw new \RuntimeException('Cannot write on this stream');
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* {@inheritdoc}
|
192 |
+
*/
|
193 |
+
public function isReadable()
|
194 |
+
{
|
195 |
+
return null !== $this->resource;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* {@inheritdoc}
|
200 |
+
*/
|
201 |
+
public function read($length)
|
202 |
+
{
|
203 |
+
if (null === $this->resource) {
|
204 |
+
throw new \RuntimeException('Cannot read on a detached stream');
|
205 |
+
}
|
206 |
+
|
207 |
+
$read = '';
|
208 |
+
|
209 |
+
// First read from the resource
|
210 |
+
if (ftell($this->resource) !== $this->written) {
|
211 |
+
$read = fread($this->resource, $length);
|
212 |
+
}
|
213 |
+
|
214 |
+
$bytesRead = strlen($read);
|
215 |
+
|
216 |
+
if ($bytesRead < $length) {
|
217 |
+
$streamRead = $this->stream->read($length - $bytesRead);
|
218 |
+
|
219 |
+
// Write on the underlying stream what we read
|
220 |
+
$this->written += fwrite($this->resource, $streamRead);
|
221 |
+
$read .= $streamRead;
|
222 |
+
}
|
223 |
+
|
224 |
+
return $read;
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* {@inheritdoc}
|
229 |
+
*/
|
230 |
+
public function getContents()
|
231 |
+
{
|
232 |
+
if (null === $this->resource) {
|
233 |
+
throw new \RuntimeException('Cannot read on a detached stream');
|
234 |
+
}
|
235 |
+
|
236 |
+
$read = '';
|
237 |
+
|
238 |
+
while (!$this->eof()) {
|
239 |
+
$read .= $this->read(8192);
|
240 |
+
}
|
241 |
+
|
242 |
+
return $read;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* {@inheritdoc}
|
247 |
+
*/
|
248 |
+
public function getMetadata($key = null)
|
249 |
+
{
|
250 |
+
if (null === $this->resource) {
|
251 |
+
if (null === $key) {
|
252 |
+
return [];
|
253 |
+
}
|
254 |
+
|
255 |
+
return;
|
256 |
+
}
|
257 |
+
|
258 |
+
$metadata = stream_get_meta_data($this->resource);
|
259 |
+
|
260 |
+
if (null === $key) {
|
261 |
+
return $metadata;
|
262 |
+
}
|
263 |
+
|
264 |
+
if (!array_key_exists($key, $metadata)) {
|
265 |
+
return;
|
266 |
+
}
|
267 |
+
|
268 |
+
return $metadata[$key];
|
269 |
+
}
|
270 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/StreamFactory/DiactorosStreamFactory.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\StreamFactory;
|
4 |
+
|
5 |
+
use Http\Message\StreamFactory;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
use Zend\Diactoros\Stream;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Creates Diactoros streams.
|
11 |
+
*
|
12 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
13 |
+
*/
|
14 |
+
final class DiactorosStreamFactory implements StreamFactory
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function createStream($body = null)
|
20 |
+
{
|
21 |
+
if ($body instanceof StreamInterface) {
|
22 |
+
return $body;
|
23 |
+
}
|
24 |
+
|
25 |
+
if (is_resource($body)) {
|
26 |
+
return new Stream($body);
|
27 |
+
}
|
28 |
+
|
29 |
+
$stream = new Stream('php://memory', 'rw');
|
30 |
+
if (null !== $body && '' !== $body) {
|
31 |
+
$stream->write((string) $body);
|
32 |
+
}
|
33 |
+
|
34 |
+
return $stream;
|
35 |
+
}
|
36 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/StreamFactory/GuzzleStreamFactory.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\StreamFactory;
|
4 |
+
|
5 |
+
use Http\Message\StreamFactory;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Creates Guzzle streams.
|
9 |
+
*
|
10 |
+
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
|
11 |
+
*/
|
12 |
+
final class GuzzleStreamFactory implements StreamFactory
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* {@inheritdoc}
|
16 |
+
*/
|
17 |
+
public function createStream($body = null)
|
18 |
+
{
|
19 |
+
return \GuzzleHttp\Psr7\stream_for($body);
|
20 |
+
}
|
21 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/StreamFactory/SlimStreamFactory.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\StreamFactory;
|
4 |
+
|
5 |
+
use Http\Message\StreamFactory;
|
6 |
+
use Psr\Http\Message\StreamInterface;
|
7 |
+
use Slim\Http\Stream;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Creates Slim 3 streams.
|
11 |
+
*
|
12 |
+
* @author Mika Tuupola <tuupola@appelsiini.net>
|
13 |
+
*/
|
14 |
+
final class SlimStreamFactory implements StreamFactory
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function createStream($body = null)
|
20 |
+
{
|
21 |
+
if ($body instanceof StreamInterface) {
|
22 |
+
return $body;
|
23 |
+
}
|
24 |
+
|
25 |
+
if (is_resource($body)) {
|
26 |
+
return new Stream($body);
|
27 |
+
}
|
28 |
+
|
29 |
+
$resource = fopen('php://memory', 'r+');
|
30 |
+
$stream = new Stream($resource);
|
31 |
+
if (null !== $body && '' !== $body) {
|
32 |
+
$stream->write((string) $body);
|
33 |
+
}
|
34 |
+
|
35 |
+
return $stream;
|
36 |
+
}
|
37 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/UriFactory/DiactorosUriFactory.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\UriFactory;
|
4 |
+
|
5 |
+
use Http\Message\UriFactory;
|
6 |
+
use Psr\Http\Message\UriInterface;
|
7 |
+
use Zend\Diactoros\Uri;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Creates Diactoros URI.
|
11 |
+
*
|
12 |
+
* @author David de Boer <david@ddeboer.nl>
|
13 |
+
*/
|
14 |
+
final class DiactorosUriFactory implements UriFactory
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function createUri($uri)
|
20 |
+
{
|
21 |
+
if ($uri instanceof UriInterface) {
|
22 |
+
return $uri;
|
23 |
+
} elseif (is_string($uri)) {
|
24 |
+
return new Uri($uri);
|
25 |
+
}
|
26 |
+
|
27 |
+
throw new \InvalidArgumentException('URI must be a string or UriInterface');
|
28 |
+
}
|
29 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/UriFactory/GuzzleUriFactory.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\UriFactory;
|
4 |
+
|
5 |
+
use GuzzleHttp\Psr7;
|
6 |
+
use Http\Message\UriFactory;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Creates Guzzle URI.
|
10 |
+
*
|
11 |
+
* @author David de Boer <david@ddeboer.nl>
|
12 |
+
*/
|
13 |
+
final class GuzzleUriFactory implements UriFactory
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* {@inheritdoc}
|
17 |
+
*/
|
18 |
+
public function createUri($uri)
|
19 |
+
{
|
20 |
+
return Psr7\uri_for($uri);
|
21 |
+
}
|
22 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/UriFactory/SlimUriFactory.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Message\UriFactory;
|
4 |
+
|
5 |
+
use Http\Message\UriFactory;
|
6 |
+
use Psr\Http\Message\UriInterface;
|
7 |
+
use Slim\Http\Uri;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Creates Slim 3 URI.
|
11 |
+
*
|
12 |
+
* @author Mika Tuupola <tuupola@appelsiini.net>
|
13 |
+
*/
|
14 |
+
final class SlimUriFactory implements UriFactory
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* {@inheritdoc}
|
18 |
+
*/
|
19 |
+
public function createUri($uri)
|
20 |
+
{
|
21 |
+
if ($uri instanceof UriInterface) {
|
22 |
+
return $uri;
|
23 |
+
}
|
24 |
+
|
25 |
+
if (is_string($uri)) {
|
26 |
+
return Uri::createFromString($uri);
|
27 |
+
}
|
28 |
+
|
29 |
+
throw new \InvalidArgumentException('URI must be a string or UriInterface');
|
30 |
+
}
|
31 |
+
}
|
includes/vendor/mailerlite/php-http/message/src/filters.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Register chunk filter if not found
|
4 |
+
if (!array_key_exists('chunk', stream_get_filters())) {
|
5 |
+
stream_filter_register('chunk', 'Http\Message\Encoding\Filter\Chunk');
|
6 |
+
}
|
includes/vendor/mailerlite/php-http/promise/src/FulfilledPromise.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Promise;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* A promise already fulfilled.
|
7 |
+
*
|
8 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
9 |
+
*/
|
10 |
+
final class FulfilledPromise implements Promise
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @var mixed
|
14 |
+
*/
|
15 |
+
private $result;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param $result
|
19 |
+
*/
|
20 |
+
public function __construct($result)
|
21 |
+
{
|
22 |
+
$this->result = $result;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* {@inheritdoc}
|
27 |
+
*/
|
28 |
+
public function then(callable $onFulfilled = null, callable $onRejected = null)
|
29 |
+
{
|
30 |
+
if (null === $onFulfilled) {
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
try {
|
35 |
+
return new self($onFulfilled($this->result));
|
36 |
+
} catch (\Exception $e) {
|
37 |
+
return new RejectedPromise($e);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* {@inheritdoc}
|
43 |
+
*/
|
44 |
+
public function getState()
|
45 |
+
{
|
46 |
+
return Promise::FULFILLED;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* {@inheritdoc}
|
51 |
+
*/
|
52 |
+
public function wait($unwrap = true)
|
53 |
+
{
|
54 |
+
if ($unwrap) {
|
55 |
+
return $this->result;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
includes/vendor/mailerlite/php-http/promise/src/Promise.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Promise;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Promise represents a value that may not be available yet, but will be resolved at some point in future.
|
7 |
+
* It acts like a proxy to the actual value.
|
8 |
+
*
|
9 |
+
* This interface is an extension of the promises/a+ specification.
|
10 |
+
*
|
11 |
+
* @see https://promisesaplus.com/
|
12 |
+
*
|
13 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
14 |
+
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
|
15 |
+
*/
|
16 |
+
interface Promise
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* Promise has not been fulfilled or rejected.
|
20 |
+
*/
|
21 |
+
const PENDING = 'pending';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Promise has been fulfilled.
|
25 |
+
*/
|
26 |
+
const FULFILLED = 'fulfilled';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Promise has been rejected.
|
30 |
+
*/
|
31 |
+
const REJECTED = 'rejected';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Adds behavior for when the promise is resolved or rejected (response will be available, or error happens).
|
35 |
+
*
|
36 |
+
* If you do not care about one of the cases, you can set the corresponding callable to null
|
37 |
+
* The callback will be called when the value arrived and never more than once.
|
38 |
+
*
|
39 |
+
* @param callable $onFulfilled Called when a response will be available.
|
40 |
+
* @param callable $onRejected Called when an exception occurs.
|
41 |
+
*
|
42 |
+
* @return Promise A new resolved promise with value of the executed callback (onFulfilled / onRejected).
|
43 |
+
*/
|
44 |
+
public function then(callable $onFulfilled = null, callable $onRejected = null);
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Returns the state of the promise, one of PENDING, FULFILLED or REJECTED.
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
public function getState();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Wait for the promise to be fulfilled or rejected.
|
55 |
+
*
|
56 |
+
* When this method returns, the request has been resolved and if callables have been
|
57 |
+
* specified, the appropriate one has terminated.
|
58 |
+
*
|
59 |
+
* When $unwrap is true (the default), the response is returned, or the exception thrown
|
60 |
+
* on failure. Otherwise, nothing is returned or thrown.
|
61 |
+
*
|
62 |
+
* @param bool $unwrap Whether to return resolved value / throw reason or not
|
63 |
+
*
|
64 |
+
* @return mixed Resolved value, null if $unwrap is set to false
|
65 |
+
*
|
66 |
+
* @throws \Exception The rejection reason if $unwrap is set to true and the request failed.
|
67 |
+
*/
|
68 |
+
public function wait($unwrap = true);
|
69 |
+
}
|
includes/vendor/mailerlite/php-http/promise/src/RejectedPromise.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Http\Promise;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* A rejected promise.
|
7 |
+
*
|
8 |
+
* @author Joel Wurtz <joel.wurtz@gmail.com>
|
9 |
+
*/
|
10 |
+
final class RejectedPromise implements Promise
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @var \Exception
|
14 |
+
*/
|
15 |
+
private $exception;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @param \Exception $exception
|
19 |
+
*/
|
20 |
+
public function __construct(\Exception $exception)
|
21 |
+
{
|
22 |
+
$this->exception = $exception;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* {@inheritdoc}
|
27 |
+
*/
|
28 |
+
public function then(callable $onFulfilled = null, callable $onRejected = null)
|
29 |
+
{
|
30 |
+
if (null === $onRejected) {
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
try {
|
35 |
+
return new FulfilledPromise($onRejected($this->exception));
|
36 |
+
} catch (\Exception $e) {
|
37 |
+
return new self($e);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* {@inheritdoc}
|
43 |
+
*/
|
44 |
+
public function getState()
|
45 |
+
{
|
46 |
+
return Promise::REJECTED;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* {@inheritdoc}
|
51 |
+
*/
|
52 |
+
public function wait($unwrap = true)
|
53 |
+
{
|
54 |
+
if ($unwrap) {
|
55 |
+
throw $this->exception;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/MessageInterface.php
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Psr\Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* HTTP messages consist of requests from a client to a server and responses
|
7 |
+
* from a server to a client. This interface defines the methods common to
|
8 |
+
* each.
|
9 |
+
*
|
10 |
+
* Messages are considered immutable; all methods that might change state MUST
|
11 |
+
* be implemented such that they retain the internal state of the current
|
12 |
+
* message and return an instance that contains the changed state.
|
13 |
+
*
|
14 |
+
* @link http://www.ietf.org/rfc/rfc7230.txt
|
15 |
+
* @link http://www.ietf.org/rfc/rfc7231.txt
|
16 |
+
*/
|
17 |
+
interface MessageInterface
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Retrieves the HTTP protocol version as a string.
|
21 |
+
*
|
22 |
+
* The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
|
23 |
+
*
|
24 |
+
* @return string HTTP protocol version.
|
25 |
+
*/
|
26 |
+
public function getProtocolVersion();
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Return an instance with the specified HTTP protocol version.
|
30 |
+
*
|
31 |
+
* The version string MUST contain only the HTTP version number (e.g.,
|
32 |
+
* "1.1", "1.0").
|
33 |
+
*
|
34 |
+
* This method MUST be implemented in such a way as to retain the
|
35 |
+
* immutability of the message, and MUST return an instance that has the
|
36 |
+
* new protocol version.
|
37 |
+
*
|
38 |
+
* @param string $version HTTP protocol version
|
39 |
+
* @return static
|
40 |
+
*/
|
41 |
+
public function withProtocolVersion($version);
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Retrieves all message header values.
|
45 |
+
*
|
46 |
+
* The keys represent the header name as it will be sent over the wire, and
|
47 |
+
* each value is an array of strings associated with the header.
|
48 |
+
*
|
49 |
+
* // Represent the headers as a string
|
50 |
+
* foreach ($message->getHeaders() as $name => $values) {
|
51 |
+
* echo $name . ": " . implode(", ", $values);
|
52 |
+
* }
|
53 |
+
*
|
54 |
+
* // Emit headers iteratively:
|
55 |
+
* foreach ($message->getHeaders() as $name => $values) {
|
56 |
+
* foreach ($values as $value) {
|
57 |
+
* header(sprintf('%s: %s', $name, $value), false);
|
58 |
+
* }
|
59 |
+
* }
|
60 |
+
*
|
61 |
+
* While header names are not case-sensitive, getHeaders() will preserve the
|
62 |
+
* exact case in which headers were originally specified.
|
63 |
+
*
|
64 |
+
* @return string[][] Returns an associative array of the message's headers. Each
|
65 |
+
* key MUST be a header name, and each value MUST be an array of strings
|
66 |
+
* for that header.
|
67 |
+
*/
|
68 |
+
public function getHeaders();
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Checks if a header exists by the given case-insensitive name.
|
72 |
+
*
|
73 |
+
* @param string $name Case-insensitive header field name.
|
74 |
+
* @return bool Returns true if any header names match the given header
|
75 |
+
* name using a case-insensitive string comparison. Returns false if
|
76 |
+
* no matching header name is found in the message.
|
77 |
+
*/
|
78 |
+
public function hasHeader($name);
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Retrieves a message header value by the given case-insensitive name.
|
82 |
+
*
|
83 |
+
* This method returns an array of all the header values of the given
|
84 |
+
* case-insensitive header name.
|
85 |
+
*
|
86 |
+
* If the header does not appear in the message, this method MUST return an
|
87 |
+
* empty array.
|
88 |
+
*
|
89 |
+
* @param string $name Case-insensitive header field name.
|
90 |
+
* @return string[] An array of string values as provided for the given
|
91 |
+
* header. If the header does not appear in the message, this method MUST
|
92 |
+
* return an empty array.
|
93 |
+
*/
|
94 |
+
public function getHeader($name);
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Retrieves a comma-separated string of the values for a single header.
|
98 |
+
*
|
99 |
+
* This method returns all of the header values of the given
|
100 |
+
* case-insensitive header name as a string concatenated together using
|
101 |
+
* a comma.
|
102 |
+
*
|
103 |
+
* NOTE: Not all header values may be appropriately represented using
|
104 |
+
* comma concatenation. For such headers, use getHeader() instead
|
105 |
+
* and supply your own delimiter when concatenating.
|
106 |
+
*
|
107 |
+
* If the header does not appear in the message, this method MUST return
|
108 |
+
* an empty string.
|
109 |
+
*
|
110 |
+
* @param string $name Case-insensitive header field name.
|
111 |
+
* @return string A string of values as provided for the given header
|
112 |
+
* concatenated together using a comma. If the header does not appear in
|
113 |
+
* the message, this method MUST return an empty string.
|
114 |
+
*/
|
115 |
+
public function getHeaderLine($name);
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Return an instance with the provided value replacing the specified header.
|
119 |
+
*
|
120 |
+
* While header names are case-insensitive, the casing of the header will
|
121 |
+
* be preserved by this function, and returned from getHeaders().
|
122 |
+
*
|
123 |
+
* This method MUST be implemented in such a way as to retain the
|
124 |
+
* immutability of the message, and MUST return an instance that has the
|
125 |
+
* new and/or updated header and value.
|
126 |
+
*
|
127 |
+
* @param string $name Case-insensitive header field name.
|
128 |
+
* @param string|string[] $value Header value(s).
|
129 |
+
* @return static
|
130 |
+
* @throws \InvalidArgumentException for invalid header names or values.
|
131 |
+
*/
|
132 |
+
public function withHeader($name, $value);
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Return an instance with the specified header appended with the given value.
|
136 |
+
*
|
137 |
+
* Existing values for the specified header will be maintained. The new
|
138 |
+
* value(s) will be appended to the existing list. If the header did not
|
139 |
+
* exist previously, it will be added.
|
140 |
+
*
|
141 |
+
* This method MUST be implemented in such a way as to retain the
|
142 |
+
* immutability of the message, and MUST return an instance that has the
|
143 |
+
* new header and/or value.
|
144 |
+
*
|
145 |
+
* @param string $name Case-insensitive header field name to add.
|
146 |
+
* @param string|string[] $value Header value(s).
|
147 |
+
* @return static
|
148 |
+
* @throws \InvalidArgumentException for invalid header names or values.
|
149 |
+
*/
|
150 |
+
public function withAddedHeader($name, $value);
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Return an instance without the specified header.
|
154 |
+
*
|
155 |
+
* Header resolution MUST be done without case-sensitivity.
|
156 |
+
*
|
157 |
+
* This method MUST be implemented in such a way as to retain the
|
158 |
+
* immutability of the message, and MUST return an instance that removes
|
159 |
+
* the named header.
|
160 |
+
*
|
161 |
+
* @param string $name Case-insensitive header field name to remove.
|
162 |
+
* @return static
|
163 |
+
*/
|
164 |
+
public function withoutHeader($name);
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Gets the body of the message.
|
168 |
+
*
|
169 |
+
* @return StreamInterface Returns the body as a stream.
|
170 |
+
*/
|
171 |
+
public function getBody();
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Return an instance with the specified message body.
|
175 |
+
*
|
176 |
+
* The body MUST be a StreamInterface object.
|
177 |
+
*
|
178 |
+
* This method MUST be implemented in such a way as to retain the
|
179 |
+
* immutability of the message, and MUST return a new instance that has the
|
180 |
+
* new body stream.
|
181 |
+
*
|
182 |
+
* @param StreamInterface $body Body.
|
183 |
+
* @return static
|
184 |
+
* @throws \InvalidArgumentException When the body is not valid.
|
185 |
+
*/
|
186 |
+
public function withBody(StreamInterface $body);
|
187 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/RequestInterface.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Psr\Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Representation of an outgoing, client-side request.
|
7 |
+
*
|
8 |
+
* Per the HTTP specification, this interface includes properties for
|
9 |
+
* each of the following:
|
10 |
+
*
|
11 |
+
* - Protocol version
|
12 |
+
* - HTTP method
|
13 |
+
* - URI
|
14 |
+
* - Headers
|
15 |
+
* - Message body
|
16 |
+
*
|
17 |
+
* During construction, implementations MUST attempt to set the Host header from
|
18 |
+
* a provided URI if no Host header is provided.
|
19 |
+
*
|
20 |
+
* Requests are considered immutable; all methods that might change state MUST
|
21 |
+
* be implemented such that they retain the internal state of the current
|
22 |
+
* message and return an instance that contains the changed state.
|
23 |
+
*/
|
24 |
+
interface RequestInterface extends MessageInterface
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Retrieves the message's request target.
|
28 |
+
*
|
29 |
+
* Retrieves the message's request-target either as it will appear (for
|
30 |
+
* clients), as it appeared at request (for servers), or as it was
|
31 |
+
* specified for the instance (see withRequestTarget()).
|
32 |
+
*
|
33 |
+
* In most cases, this will be the origin-form of the composed URI,
|
34 |
+
* unless a value was provided to the concrete implementation (see
|
35 |
+
* withRequestTarget() below).
|
36 |
+
*
|
37 |
+
* If no URI is available, and no request-target has been specifically
|
38 |
+
* provided, this method MUST return the string "/".
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
public function getRequestTarget();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Return an instance with the specific request-target.
|
46 |
+
*
|
47 |
+
* If the request needs a non-origin-form request-target — e.g., for
|
48 |
+
* specifying an absolute-form, authority-form, or asterisk-form —
|
49 |
+
* this method may be used to create an instance with the specified
|
50 |
+
* request-target, verbatim.
|
51 |
+
*
|
52 |
+
* This method MUST be implemented in such a way as to retain the
|
53 |
+
* immutability of the message, and MUST return an instance that has the
|
54 |
+
* changed request target.
|
55 |
+
*
|
56 |
+
* @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
|
57 |
+
* request-target forms allowed in request messages)
|
58 |
+
* @param mixed $requestTarget
|
59 |
+
* @return static
|
60 |
+
*/
|
61 |
+
public function withRequestTarget($requestTarget);
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Retrieves the HTTP method of the request.
|
65 |
+
*
|
66 |
+
* @return string Returns the request method.
|
67 |
+
*/
|
68 |
+
public function getMethod();
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Return an instance with the provided HTTP method.
|
72 |
+
*
|
73 |
+
* While HTTP method names are typically all uppercase characters, HTTP
|
74 |
+
* method names are case-sensitive and thus implementations SHOULD NOT
|
75 |
+
* modify the given string.
|
76 |
+
*
|
77 |
+
* This method MUST be implemented in such a way as to retain the
|
78 |
+
* immutability of the message, and MUST return an instance that has the
|
79 |
+
* changed request method.
|
80 |
+
*
|
81 |
+
* @param string $method Case-sensitive method.
|
82 |
+
* @return static
|
83 |
+
* @throws \InvalidArgumentException for invalid HTTP methods.
|
84 |
+
*/
|
85 |
+
public function withMethod($method);
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Retrieves the URI instance.
|
89 |
+
*
|
90 |
+
* This method MUST return a UriInterface instance.
|
91 |
+
*
|
92 |
+
* @link http://tools.ietf.org/html/rfc3986#section-4.3
|
93 |
+
* @return UriInterface Returns a UriInterface instance
|
94 |
+
* representing the URI of the request.
|
95 |
+
*/
|
96 |
+
public function getUri();
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Returns an instance with the provided URI.
|
100 |
+
*
|
101 |
+
* This method MUST update the Host header of the returned request by
|
102 |
+
* default if the URI contains a host component. If the URI does not
|
103 |
+
* contain a host component, any pre-existing Host header MUST be carried
|
104 |
+
* over to the returned request.
|
105 |
+
*
|
106 |
+
* You can opt-in to preserving the original state of the Host header by
|
107 |
+
* setting `$preserveHost` to `true`. When `$preserveHost` is set to
|
108 |
+
* `true`, this method interacts with the Host header in the following ways:
|
109 |
+
*
|
110 |
+
* - If the Host header is missing or empty, and the new URI contains
|
111 |
+
* a host component, this method MUST update the Host header in the returned
|
112 |
+
* request.
|
113 |
+
* - If the Host header is missing or empty, and the new URI does not contain a
|
114 |
+
* host component, this method MUST NOT update the Host header in the returned
|
115 |
+
* request.
|
116 |
+
* - If a Host header is present and non-empty, this method MUST NOT update
|
117 |
+
* the Host header in the returned request.
|
118 |
+
*
|
119 |
+
* This method MUST be implemented in such a way as to retain the
|
120 |
+
* immutability of the message, and MUST return an instance that has the
|
121 |
+
* new UriInterface instance.
|
122 |
+
*
|
123 |
+
* @link http://tools.ietf.org/html/rfc3986#section-4.3
|
124 |
+
* @param UriInterface $uri New request URI to use.
|
125 |
+
* @param bool $preserveHost Preserve the original state of the Host header.
|
126 |
+
* @return static
|
127 |
+
*/
|
128 |
+
public function withUri(UriInterface $uri, $preserveHost = false);
|
129 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/ResponseInterface.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Psr\Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Representation of an outgoing, server-side response.
|
7 |
+
*
|
8 |
+
* Per the HTTP specification, this interface includes properties for
|
9 |
+
* each of the following:
|
10 |
+
*
|
11 |
+
* - Protocol version
|
12 |
+
* - Status code and reason phrase
|
13 |
+
* - Headers
|
14 |
+
* - Message body
|
15 |
+
*
|
16 |
+
* Responses are considered immutable; all methods that might change state MUST
|
17 |
+
* be implemented such that they retain the internal state of the current
|
18 |
+
* message and return an instance that contains the changed state.
|
19 |
+
*/
|
20 |
+
interface ResponseInterface extends MessageInterface
|
21 |
+
{
|
22 |
+
/**
|
23 |
+
* Gets the response status code.
|
24 |
+
*
|
25 |
+
* The status code is a 3-digit integer result code of the server's attempt
|
26 |
+
* to understand and satisfy the request.
|
27 |
+
*
|
28 |
+
* @return int Status code.
|
29 |
+
*/
|
30 |
+
public function getStatusCode();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Return an instance with the specified status code and, optionally, reason phrase.
|
34 |
+
*
|
35 |
+
* If no reason phrase is specified, implementations MAY choose to default
|
36 |
+
* to the RFC 7231 or IANA recommended reason phrase for the response's
|
37 |
+
* status code.
|
38 |
+
*
|
39 |
+
* This method MUST be implemented in such a way as to retain the
|
40 |
+
* immutability of the message, and MUST return an instance that has the
|
41 |
+
* updated status and reason phrase.
|
42 |
+
*
|
43 |
+
* @link http://tools.ietf.org/html/rfc7231#section-6
|
44 |
+
* @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
45 |
+
* @param int $code The 3-digit integer result code to set.
|
46 |
+
* @param string $reasonPhrase The reason phrase to use with the
|
47 |
+
* provided status code; if none is provided, implementations MAY
|
48 |
+
* use the defaults as suggested in the HTTP specification.
|
49 |
+
* @return static
|
50 |
+
* @throws \InvalidArgumentException For invalid status code arguments.
|
51 |
+
*/
|
52 |
+
public function withStatus($code, $reasonPhrase = '');
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Gets the response reason phrase associated with the status code.
|
56 |
+
*
|
57 |
+
* Because a reason phrase is not a required element in a response
|
58 |
+
* status line, the reason phrase value MAY be null. Implementations MAY
|
59 |
+
* choose to return the default RFC 7231 recommended reason phrase (or those
|
60 |
+
* listed in the IANA HTTP Status Code Registry) for the response's
|
61 |
+
* status code.
|
62 |
+
*
|
63 |
+
* @link http://tools.ietf.org/html/rfc7231#section-6
|
64 |
+
* @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
|
65 |
+
* @return string Reason phrase; must return an empty string if none present.
|
66 |
+
*/
|
67 |
+
public function getReasonPhrase();
|
68 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/ServerRequestInterface.php
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Psr\Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Representation of an incoming, server-side HTTP request.
|
7 |
+
*
|
8 |
+
* Per the HTTP specification, this interface includes properties for
|
9 |
+
* each of the following:
|
10 |
+
*
|
11 |
+
* - Protocol version
|
12 |
+
* - HTTP method
|
13 |
+
* - URI
|
14 |
+
* - Headers
|
15 |
+
* - Message body
|
16 |
+
*
|
17 |
+
* Additionally, it encapsulates all data as it has arrived to the
|
18 |
+
* application from the CGI and/or PHP environment, including:
|
19 |
+
*
|
20 |
+
* - The values represented in $_SERVER.
|
21 |
+
* - Any cookies provided (generally via $_COOKIE)
|
22 |
+
* - Query string arguments (generally via $_GET, or as parsed via parse_str())
|
23 |
+
* - Upload files, if any (as represented by $_FILES)
|
24 |
+
* - Deserialized body parameters (generally from $_POST)
|
25 |
+
*
|
26 |
+
* $_SERVER values MUST be treated as immutable, as they represent application
|
27 |
+
* state at the time of request; as such, no methods are provided to allow
|
28 |
+
* modification of those values. The other values provide such methods, as they
|
29 |
+
* can be restored from $_SERVER or the request body, and may need treatment
|
30 |
+
* during the application (e.g., body parameters may be deserialized based on
|
31 |
+
* content type).
|
32 |
+
*
|
33 |
+
* Additionally, this interface recognizes the utility of introspecting a
|
34 |
+
* request to derive and match additional parameters (e.g., via URI path
|
35 |
+
* matching, decrypting cookie values, deserializing non-form-encoded body
|
36 |
+
* content, matching authorization headers to users, etc). These parameters
|
37 |
+
* are stored in an "attributes" property.
|
38 |
+
*
|
39 |
+
* Requests are considered immutable; all methods that might change state MUST
|
40 |
+
* be implemented such that they retain the internal state of the current
|
41 |
+
* message and return an instance that contains the changed state.
|
42 |
+
*/
|
43 |
+
interface ServerRequestInterface extends RequestInterface
|
44 |
+
{
|
45 |
+
/**
|
46 |
+
* Retrieve server parameters.
|
47 |
+
*
|
48 |
+
* Retrieves data related to the incoming request environment,
|
49 |
+
* typically derived from PHP's $_SERVER superglobal. The data IS NOT
|
50 |
+
* REQUIRED to originate from $_SERVER.
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public function getServerParams();
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Retrieve cookies.
|
58 |
+
*
|
59 |
+
* Retrieves cookies sent by the client to the server.
|
60 |
+
*
|
61 |
+
* The data MUST be compatible with the structure of the $_COOKIE
|
62 |
+
* superglobal.
|
63 |
+
*
|
64 |
+
* @return array
|
65 |
+
*/
|
66 |
+
public function getCookieParams();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Return an instance with the specified cookies.
|
70 |
+
*
|
71 |
+
* The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST
|
72 |
+
* be compatible with the structure of $_COOKIE. Typically, this data will
|
73 |
+
* be injected at instantiation.
|
74 |
+
*
|
75 |
+
* This method MUST NOT update the related Cookie header of the request
|
76 |
+
* instance, nor related values in the server params.
|
77 |
+
*
|
78 |
+
* This method MUST be implemented in such a way as to retain the
|
79 |
+
* immutability of the message, and MUST return an instance that has the
|
80 |
+
* updated cookie values.
|
81 |
+
*
|
82 |
+
* @param array $cookies Array of key/value pairs representing cookies.
|
83 |
+
* @return static
|
84 |
+
*/
|
85 |
+
public function withCookieParams(array $cookies);
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Retrieve query string arguments.
|
89 |
+
*
|
90 |
+
* Retrieves the deserialized query string arguments, if any.
|
91 |
+
*
|
92 |
+
* Note: the query params might not be in sync with the URI or server
|
93 |
+
* params. If you need to ensure you are only getting the original
|
94 |
+
* values, you may need to parse the query string from `getUri()->getQuery()`
|
95 |
+
* or from the `QUERY_STRING` server param.
|
96 |
+
*
|
97 |
+
* @return array
|
98 |
+
*/
|
99 |
+
public function getQueryParams();
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Return an instance with the specified query string arguments.
|
103 |
+
*
|
104 |
+
* These values SHOULD remain immutable over the course of the incoming
|
105 |
+
* request. They MAY be injected during instantiation, such as from PHP's
|
106 |
+
* $_GET superglobal, or MAY be derived from some other value such as the
|
107 |
+
* URI. In cases where the arguments are parsed from the URI, the data
|
108 |
+
* MUST be compatible with what PHP's parse_str() would return for
|
109 |
+
* purposes of how duplicate query parameters are handled, and how nested
|
110 |
+
* sets are handled.
|
111 |
+
*
|
112 |
+
* Setting query string arguments MUST NOT change the URI stored by the
|
113 |
+
* request, nor the values in the server params.
|
114 |
+
*
|
115 |
+
* This method MUST be implemented in such a way as to retain the
|
116 |
+
* immutability of the message, and MUST return an instance that has the
|
117 |
+
* updated query string arguments.
|
118 |
+
*
|
119 |
+
* @param array $query Array of query string arguments, typically from
|
120 |
+
* $_GET.
|
121 |
+
* @return static
|
122 |
+
*/
|
123 |
+
public function withQueryParams(array $query);
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Retrieve normalized file upload data.
|
127 |
+
*
|
128 |
+
* This method returns upload metadata in a normalized tree, with each leaf
|
129 |
+
* an instance of Psr\Http\Message\UploadedFileInterface.
|
130 |
+
*
|
131 |
+
* These values MAY be prepared from $_FILES or the message body during
|
132 |
+
* instantiation, or MAY be injected via withUploadedFiles().
|
133 |
+
*
|
134 |
+
* @return array An array tree of UploadedFileInterface instances; an empty
|
135 |
+
* array MUST be returned if no data is present.
|
136 |
+
*/
|
137 |
+
public function getUploadedFiles();
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Create a new instance with the specified uploaded files.
|
141 |
+
*
|
142 |
+
* This method MUST be implemented in such a way as to retain the
|
143 |
+
* immutability of the message, and MUST return an instance that has the
|
144 |
+
* updated body parameters.
|
145 |
+
*
|
146 |
+
* @param array $uploadedFiles An array tree of UploadedFileInterface instances.
|
147 |
+
* @return static
|
148 |
+
* @throws \InvalidArgumentException if an invalid structure is provided.
|
149 |
+
*/
|
150 |
+
public function withUploadedFiles(array $uploadedFiles);
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Retrieve any parameters provided in the request body.
|
154 |
+
*
|
155 |
+
* If the request Content-Type is either application/x-www-form-urlencoded
|
156 |
+
* or multipart/form-data, and the request method is POST, this method MUST
|
157 |
+
* return the contents of $_POST.
|
158 |
+
*
|
159 |
+
* Otherwise, this method may return any results of deserializing
|
160 |
+
* the request body content; as parsing returns structured content, the
|
161 |
+
* potential types MUST be arrays or objects only. A null value indicates
|
162 |
+
* the absence of body content.
|
163 |
+
*
|
164 |
+
* @return null|array|object The deserialized body parameters, if any.
|
165 |
+
* These will typically be an array or object.
|
166 |
+
*/
|
167 |
+
public function getParsedBody();
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Return an instance with the specified body parameters.
|
171 |
+
*
|
172 |
+
* These MAY be injected during instantiation.
|
173 |
+
*
|
174 |
+
* If the request Content-Type is either application/x-www-form-urlencoded
|
175 |
+
* or multipart/form-data, and the request method is POST, use this method
|
176 |
+
* ONLY to inject the contents of $_POST.
|
177 |
+
*
|
178 |
+
* The data IS NOT REQUIRED to come from $_POST, but MUST be the results of
|
179 |
+
* deserializing the request body content. Deserialization/parsing returns
|
180 |
+
* structured data, and, as such, this method ONLY accepts arrays or objects,
|
181 |
+
* or a null value if nothing was available to parse.
|
182 |
+
*
|
183 |
+
* As an example, if content negotiation determines that the request data
|
184 |
+
* is a JSON payload, this method could be used to create a request
|
185 |
+
* instance with the deserialized parameters.
|
186 |
+
*
|
187 |
+
* This method MUST be implemented in such a way as to retain the
|
188 |
+
* immutability of the message, and MUST return an instance that has the
|
189 |
+
* updated body parameters.
|
190 |
+
*
|
191 |
+
* @param null|array|object $data The deserialized body data. This will
|
192 |
+
* typically be in an array or object.
|
193 |
+
* @return static
|
194 |
+
* @throws \InvalidArgumentException if an unsupported argument type is
|
195 |
+
* provided.
|
196 |
+
*/
|
197 |
+
public function withParsedBody($data);
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Retrieve attributes derived from the request.
|
201 |
+
*
|
202 |
+
* The request "attributes" may be used to allow injection of any
|
203 |
+
* parameters derived from the request: e.g., the results of path
|
204 |
+
* match operations; the results of decrypting cookies; the results of
|
205 |
+
* deserializing non-form-encoded message bodies; etc. Attributes
|
206 |
+
* will be application and request specific, and CAN be mutable.
|
207 |
+
*
|
208 |
+
* @return array Attributes derived from the request.
|
209 |
+
*/
|
210 |
+
public function getAttributes();
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Retrieve a single derived request attribute.
|
214 |
+
*
|
215 |
+
* Retrieves a single derived request attribute as described in
|
216 |
+
* getAttributes(). If the attribute has not been previously set, returns
|
217 |
+
* the default value as provided.
|
218 |
+
*
|
219 |
+
* This method obviates the need for a hasAttribute() method, as it allows
|
220 |
+
* specifying a default value to return if the attribute is not found.
|
221 |
+
*
|
222 |
+
* @see getAttributes()
|
223 |
+
* @param string $name The attribute name.
|
224 |
+
* @param mixed $default Default value to return if the attribute does not exist.
|
225 |
+
* @return mixed
|
226 |
+
*/
|
227 |
+
public function getAttribute($name, $default = null);
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Return an instance with the specified derived request attribute.
|
231 |
+
*
|
232 |
+
* This method allows setting a single derived request attribute as
|
233 |
+
* described in getAttributes().
|
234 |
+
*
|
235 |
+
* This method MUST be implemented in such a way as to retain the
|
236 |
+
* immutability of the message, and MUST return an instance that has the
|
237 |
+
* updated attribute.
|
238 |
+
*
|
239 |
+
* @see getAttributes()
|
240 |
+
* @param string $name The attribute name.
|
241 |
+
* @param mixed $value The value of the attribute.
|
242 |
+
* @return static
|
243 |
+
*/
|
244 |
+
public function withAttribute($name, $value);
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Return an instance that removes the specified derived request attribute.
|
248 |
+
*
|
249 |
+
* This method allows removing a single derived request attribute as
|
250 |
+
* described in getAttributes().
|
251 |
+
*
|
252 |
+
* This method MUST be implemented in such a way as to retain the
|
253 |
+
* immutability of the message, and MUST return an instance that removes
|
254 |
+
* the attribute.
|
255 |
+
*
|
256 |
+
* @see getAttributes()
|
257 |
+
* @param string $name The attribute name.
|
258 |
+
* @return static
|
259 |
+
*/
|
260 |
+
public function withoutAttribute($name);
|
261 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/StreamInterface.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Psr\Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Describes a data stream.
|
7 |
+
*
|
8 |
+
* Typically, an instance will wrap a PHP stream; this interface provides
|
9 |
+
* a wrapper around the most common operations, including serialization of
|
10 |
+
* the entire stream to a string.
|
11 |
+
*/
|
12 |
+
interface StreamInterface
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Reads all data from the stream into a string, from the beginning to end.
|
16 |
+
*
|
17 |
+
* This method MUST attempt to seek to the beginning of the stream before
|
18 |
+
* reading data and read the stream until the end is reached.
|
19 |
+
*
|
20 |
+
* Warning: This could attempt to load a large amount of data into memory.
|
21 |
+
*
|
22 |
+
* This method MUST NOT raise an exception in order to conform with PHP's
|
23 |
+
* string casting operations.
|
24 |
+
*
|
25 |
+
* @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
public function __toString();
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Closes the stream and any underlying resources.
|
32 |
+
*
|
33 |
+
* @return void
|
34 |
+
*/
|
35 |
+
public function close();
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Separates any underlying resources from the stream.
|
39 |
+
*
|
40 |
+
* After the stream has been detached, the stream is in an unusable state.
|
41 |
+
*
|
42 |
+
* @return resource|null Underlying PHP stream, if any
|
43 |
+
*/
|
44 |
+
public function detach();
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get the size of the stream if known.
|
48 |
+
*
|
49 |
+
* @return int|null Returns the size in bytes if known, or null if unknown.
|
50 |
+
*/
|
51 |
+
public function getSize();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Returns the current position of the file read/write pointer
|
55 |
+
*
|
56 |
+
* @return int Position of the file pointer
|
57 |
+
* @throws \RuntimeException on error.
|
58 |
+
*/
|
59 |
+
public function tell();
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Returns true if the stream is at the end of the stream.
|
63 |
+
*
|
64 |
+
* @return bool
|
65 |
+
*/
|
66 |
+
public function eof();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Returns whether or not the stream is seekable.
|
70 |
+
*
|
71 |
+
* @return bool
|
72 |
+
*/
|
73 |
+
public function isSeekable();
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Seek to a position in the stream.
|
77 |
+
*
|
78 |
+
* @link http://www.php.net/manual/en/function.fseek.php
|
79 |
+
* @param int $offset Stream offset
|
80 |
+
* @param int $whence Specifies how the cursor position will be calculated
|
81 |
+
* based on the seek offset. Valid values are identical to the built-in
|
82 |
+
* PHP $whence values for `fseek()`. SEEK_SET: Set position equal to
|
83 |
+
* offset bytes SEEK_CUR: Set position to current location plus offset
|
84 |
+
* SEEK_END: Set position to end-of-stream plus offset.
|
85 |
+
* @throws \RuntimeException on failure.
|
86 |
+
*/
|
87 |
+
public function seek($offset, $whence = SEEK_SET);
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Seek to the beginning of the stream.
|
91 |
+
*
|
92 |
+
* If the stream is not seekable, this method will raise an exception;
|
93 |
+
* otherwise, it will perform a seek(0).
|
94 |
+
*
|
95 |
+
* @see seek()
|
96 |
+
* @link http://www.php.net/manual/en/function.fseek.php
|
97 |
+
* @throws \RuntimeException on failure.
|
98 |
+
*/
|
99 |
+
public function rewind();
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Returns whether or not the stream is writable.
|
103 |
+
*
|
104 |
+
* @return bool
|
105 |
+
*/
|
106 |
+
public function isWritable();
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Write data to the stream.
|
110 |
+
*
|
111 |
+
* @param string $string The string that is to be written.
|
112 |
+
* @return int Returns the number of bytes written to the stream.
|
113 |
+
* @throws \RuntimeException on failure.
|
114 |
+
*/
|
115 |
+
public function write($string);
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Returns whether or not the stream is readable.
|
119 |
+
*
|
120 |
+
* @return bool
|
121 |
+
*/
|
122 |
+
public function isReadable();
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Read data from the stream.
|
126 |
+
*
|
127 |
+
* @param int $length Read up to $length bytes from the object and return
|
128 |
+
* them. Fewer than $length bytes may be returned if underlying stream
|
129 |
+
* call returns fewer bytes.
|
130 |
+
* @return string Returns the data read from the stream, or an empty string
|
131 |
+
* if no bytes are available.
|
132 |
+
* @throws \RuntimeException if an error occurs.
|
133 |
+
*/
|
134 |
+
public function read($length);
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Returns the remaining contents in a string
|
138 |
+
*
|
139 |
+
* @return string
|
140 |
+
* @throws \RuntimeException if unable to read or an error occurs while
|
141 |
+
* reading.
|
142 |
+
*/
|
143 |
+
public function getContents();
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Get stream metadata as an associative array or retrieve a specific key.
|
147 |
+
*
|
148 |
+
* The keys returned are identical to the keys returned from PHP's
|
149 |
+
* stream_get_meta_data() function.
|
150 |
+
*
|
151 |
+
* @link http://php.net/manual/en/function.stream-get-meta-data.php
|
152 |
+
* @param string $key Specific metadata to retrieve.
|
153 |
+
* @return array|mixed|null Returns an associative array if no key is
|
154 |
+
* provided. Returns a specific key value if a key is provided and the
|
155 |
+
* value is found, or null if the key is not found.
|
156 |
+
*/
|
157 |
+
public function getMetadata($key = null);
|
158 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/UploadedFileInterface.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Psr\Http\Message;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Value object representing a file uploaded through an HTTP request.
|
7 |
+
*
|
8 |
+
* Instances of this interface are considered immutable; all methods that
|
9 |
+
* might change state MUST be implemented such that they retain the internal
|
10 |
+
* state of the current instance and return an instance that contains the
|
11 |
+
* changed state.
|
12 |
+
*/
|
13 |
+
interface UploadedFileInterface
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* Retrieve a stream representing the uploaded file.
|
17 |
+
*
|
18 |
+
* This method MUST return a StreamInterface instance, representing the
|
19 |
+
* uploaded file. The purpose of this method is to allow utilizing native PHP
|
20 |
+
* stream functionality to manipulate the file upload, such as
|
21 |
+
* stream_copy_to_stream() (though the result will need to be decorated in a
|
22 |
+
* native PHP stream wrapper to work with such functions).
|
23 |
+
*
|
24 |
+
* If the moveTo() method has been called previously, this method MUST raise
|
25 |
+
* an exception.
|
26 |
+
*
|
27 |
+
* @return StreamInterface Stream representation of the uploaded file.
|
28 |
+
* @throws \RuntimeException in cases when no stream is available or can be
|
29 |
+
* created.
|
30 |
+
*/
|
31 |
+
public function getStream();
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Move the uploaded file to a new location.
|
35 |
+
*
|
36 |
+
* Use this method as an alternative to move_uploaded_file(). This method is
|
37 |
+
* guaranteed to work in both SAPI and non-SAPI environments.
|
38 |
+
* Implementations must determine which environment they are in, and use the
|
39 |
+
* appropriate method (move_uploaded_file(), rename(), or a stream
|
40 |
+
* operation) to perform the operation.
|
41 |
+
*
|
42 |
+
* $targetPath may be an absolute path, or a relative path. If it is a
|
43 |
+
* relative path, resolution should be the same as used by PHP's rename()
|
44 |
+
* function.
|
45 |
+
*
|
46 |
+
* The original file or stream MUST be removed on completion.
|
47 |
+
*
|
48 |
+
* If this method is called more than once, any subsequent calls MUST raise
|
49 |
+
* an exception.
|
50 |
+
*
|
51 |
+
* When used in an SAPI environment where $_FILES is populated, when writing
|
52 |
+
* files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be
|
53 |
+
* used to ensure permissions and upload status are verified correctly.
|
54 |
+
*
|
55 |
+
* If you wish to move to a stream, use getStream(), as SAPI operations
|
56 |
+
* cannot guarantee writing to stream destinations.
|
57 |
+
*
|
58 |
+
* @see http://php.net/is_uploaded_file
|
59 |
+
* @see http://php.net/move_uploaded_file
|
60 |
+
* @param string $targetPath Path to which to move the uploaded file.
|
61 |
+
* @throws \InvalidArgumentException if the $targetPath specified is invalid.
|
62 |
+
* @throws \RuntimeException on any error during the move operation, or on
|
63 |
+
* the second or subsequent call to the method.
|
64 |
+
*/
|
65 |
+
public function moveTo($targetPath);
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Retrieve the file size.
|
69 |
+
*
|
70 |
+
* Implementations SHOULD return the value stored in the "size" key of
|
71 |
+
* the file in the $_FILES array if available, as PHP calculates this based
|
72 |
+
* on the actual size transmitted.
|
73 |
+
*
|
74 |
+
* @return int|null The file size in bytes or null if unknown.
|
75 |
+
*/
|
76 |
+
public function getSize();
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Retrieve the error associated with the uploaded file.
|
80 |
+
*
|
81 |
+
* The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.
|
82 |
+
*
|
83 |
+
* If the file was uploaded successfully, this method MUST return
|
84 |
+
* UPLOAD_ERR_OK.
|
85 |
+
*
|
86 |
+
* Implementations SHOULD return the value stored in the "error" key of
|
87 |
+
* the file in the $_FILES array.
|
88 |
+
*
|
89 |
+
* @see http://php.net/manual/en/features.file-upload.errors.php
|
90 |
+
* @return int One of PHP's UPLOAD_ERR_XXX constants.
|
91 |
+
*/
|
92 |
+
public function getError();
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Retrieve the filename sent by the client.
|
96 |
+
*
|
97 |
+
* Do not trust the value returned by this method. A client could send
|
98 |
+
* a malicious filename with the intention to corrupt or hack your
|
99 |
+
* application.
|
100 |
+
*
|
101 |
+
* Implementations SHOULD return the value stored in the "name" key of
|
102 |
+
* the file in the $_FILES array.
|
103 |
+
*
|
104 |
+
* @return string|null The filename sent by the client or null if none
|
105 |
+
* was provided.
|
106 |
+
*/
|
107 |
+
public function getClientFilename();
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Retrieve the media type sent by the client.
|
111 |
+
*
|
112 |
+
* Do not trust the value returned by this method. A client could send
|
113 |
+
* a malicious media type with the intention to corrupt or hack your
|
114 |
+
* application.
|
115 |
+
*
|
116 |
+
* Implementations SHOULD return the value stored in the "type" key of
|
117 |
+
* the file in the $_FILES array.
|
118 |
+
*
|
119 |
+
* @return string|null The media type sent by the client or null if none
|
120 |
+
* was provided.
|
121 |
+
*/
|
122 |
+
public function getClientMediaType();
|
123 |
+
}
|
includes/vendor/mailerlite/psr/http-message/src/UriInterface.php
ADDED
@@ -0,0 +1,323 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Psr\Http\Message;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Value object representing a URI.
|
6 |
+
*
|
7 |
+
* This interface is meant to represent URIs according to RFC 3986 and to
|
8 |
+
* provide methods for most common operations. Additional functionality for
|
9 |
+
* working with URIs can be provided on top of the interface or externally.
|
10 |
+
* Its primary use is for HTTP requests, but may also be used in other
|
11 |
+
* contexts.
|
12 |
+
*
|
13 |
+
* Instances of this interface are considered immutable; all methods that
|
14 |
+
* might change state MUST be implemented such that they retain the internal
|
15 |
+
* state of the current instance and return an instance that contains the
|
16 |
+
* changed state.
|
17 |
+
*
|
18 |
+
* Typically the Host header will be also be present in the request message.
|
19 |
+
* For server-side requests, the scheme will typically be discoverable in the
|
20 |
+
* server parameters.
|
21 |
+
*
|
22 |
+
* @link http://tools.ietf.org/html/rfc3986 (the URI specification)
|
23 |
+
*/
|
24 |
+
interface UriInterface
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Retrieve the scheme component of the URI.
|
28 |
+
*
|
29 |
+
* If no scheme is present, this method MUST return an empty string.
|
30 |
+
*
|
31 |
+
* The value returned MUST be normalized to lowercase, per RFC 3986
|
32 |
+
* Section 3.1.
|
33 |
+
*
|
34 |
+
* The trailing ":" character is not part of the scheme and MUST NOT be
|
35 |
+
* added.
|
36 |
+
*
|
37 |
+
* @see https://tools.ietf.org/html/rfc3986#section-3.1
|
38 |
+
* @return string The URI scheme.
|
39 |
+
*/
|
40 |
+
public function getScheme();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Retrieve the authority component of the URI.
|
44 |
+
*
|
45 |
+
* If no authority information is present, this method MUST return an empty
|
46 |
+
* string.
|
47 |
+
*
|
48 |
+
* The authority syntax of the URI is:
|
49 |
+
*
|
50 |
+
* <pre>
|
51 |
+
* [user-info@]host[:port]
|
52 |
+
* </pre>
|
53 |
+
*
|
54 |
+
* If the port component is not set or is the standard port for the current
|
55 |
+
* scheme, it SHOULD NOT be included.
|
56 |
+
*
|
57 |
+
* @see https://tools.ietf.org/html/rfc3986#section-3.2
|
58 |
+
* @return string The URI authority, in "[user-info@]host[:port]" format.
|
59 |
+
*/
|
60 |
+
public function getAuthority();
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Retrieve the user information component of the URI.
|
64 |
+
*
|
65 |
+
* If no user information is present, this method MUST return an empty
|
66 |
+
* string.
|
67 |
+
*
|
68 |
+
* If a user is present in the URI, this will return that value;
|
69 |
+
* additionally, if the password is also present, it will be appended to the
|
70 |
+
* user value, with a colon (":") separating the values.
|
71 |
+
*
|
72 |
+
* The trailing "@" character is not part of the user information and MUST
|
73 |
+
* NOT be added.
|
74 |
+
*
|
75 |
+
* @return string The URI user information, in "username[:password]" format.
|
76 |
+
*/
|
77 |
+
public function getUserInfo();
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Retrieve the host component of the URI.
|
81 |
+
*
|
82 |
+
* If no host is present, this method MUST return an empty string.
|
83 |
+
*
|
84 |
+
* The value returned MUST be normalized to lowercase, per RFC 3986
|
85 |
+
* Section 3.2.2.
|
86 |
+
*
|
87 |
+
* @see http://tools.ietf.org/html/rfc3986#section-3.2.2
|
88 |
+
* @return string The URI host.
|
89 |
+
*/
|
90 |
+
public function getHost();
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Retrieve the port component of the URI.
|
94 |
+
*
|
95 |
+
* If a port is present, and it is non-standard for the current scheme,
|
96 |
+
* this method MUST return it as an integer. If the port is the standard port
|
97 |
+
* used with the current scheme, this method SHOULD return null.
|
98 |
+
*
|
99 |
+
* If no port is present, and no scheme is present, this method MUST return
|
100 |
+
* a null value.
|
101 |
+
*
|
102 |
+
* If no port is present, but a scheme is present, this method MAY return
|
103 |
+
* the standard port for that scheme, but SHOULD return null.
|
104 |
+
*
|
105 |
+
* @return null|int The URI port.
|
106 |
+
*/
|
107 |
+
public function getPort();
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Retrieve the path component of the URI.
|
111 |
+
*
|
112 |
+
* The path can either be empty or absolute (starting with a slash) or
|
113 |
+
* rootless (not starting with a slash). Implementations MUST support all
|
114 |
+
* three syntaxes.
|
115 |
+
*
|
116 |
+
* Normally, the empty path "" and absolute path "/" are considered equal as
|
117 |
+
* defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically
|
118 |
+
* do this normalization because in contexts with a trimmed base path, e.g.
|
119 |
+
* the front controller, this difference becomes significant. It's the task
|
120 |
+
* of the user to handle both "" and "/".
|
121 |
+
*
|
122 |
+
* The value returned MUST be percent-encoded, but MUST NOT double-encode
|
123 |
+
* any characters. To determine what characters to encode, please refer to
|
124 |
+
* RFC 3986, Sections 2 and 3.3.
|
125 |
+
*
|
126 |
+
* As an example, if the value should include a slash ("/") not intended as
|
127 |
+
* delimiter between path segments, that value MUST be passed in encoded
|
128 |
+
* form (e.g., "%2F") to the instance.
|
129 |
+
*
|
130 |
+
* @see https://tools.ietf.org/html/rfc3986#section-2
|
131 |
+
* @see https://tools.ietf.org/html/rfc3986#section-3.3
|
132 |
+
* @return string The URI path.
|
133 |
+
*/
|
134 |
+
public function getPath();
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Retrieve the query string of the URI.
|
138 |
+
*
|
139 |
+
* If no query string is present, this method MUST return an empty string.
|
140 |
+
*
|
141 |
+
* The leading "?" character is not part of the query and MUST NOT be
|
142 |
+
* added.
|
143 |
+
*
|
144 |
+
* The value returned MUST be percent-encoded, but MUST NOT double-encode
|
145 |
+
* any characters. To determine what characters to encode, please refer to
|
146 |
+
* RFC 3986, Sections 2 and 3.4.
|
147 |
+
*
|
148 |
+
* As an example, if a value in a key/value pair of the query string should
|
149 |
+
* include an ampersand ("&") not intended as a delimiter between values,
|
150 |
+
* that value MUST be passed in encoded form (e.g., "%26") to the instance.
|
151 |
+
*
|
152 |
+
* @see https://tools.ietf.org/html/rfc3986#section-2
|
153 |
+
* @see https://tools.ietf.org/html/rfc3986#section-3.4
|
154 |
+
* @return string The URI query string.
|
155 |
+
*/
|
156 |
+
public function getQuery();
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Retrieve the fragment component of the URI.
|
160 |
+
*
|
161 |
+
* If no fragment is present, this method MUST return an empty string.
|
162 |
+
*
|
163 |
+
* The leading "#" character is not part of the fragment and MUST NOT be
|
164 |
+
* added.
|
165 |
+
*
|
166 |
+
* The value returned MUST be percent-encoded, but MUST NOT double-encode
|
167 |
+
* any characters. To determine what characters to encode, please refer to
|
168 |
+
* RFC 3986, Sections 2 and 3.5.
|
169 |
+
*
|
170 |
+
* @see https://tools.ietf.org/html/rfc3986#section-2
|
171 |
+
* @see https://tools.ietf.org/html/rfc3986#section-3.5
|
172 |
+
* @return string The URI fragment.
|
173 |
+
*/
|
174 |
+
public function getFragment();
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Return an instance with the specified scheme.
|
178 |
+
*
|
179 |
+
* This method MUST retain the state of the current instance, and return
|
180 |
+
* an instance that contains the specified scheme.
|
181 |
+
*
|
182 |
+
* Implementations MUST support the schemes "http" and "https" case
|
183 |
+
* insensitively, and MAY accommodate other schemes if required.
|
184 |
+
*
|
185 |
+
* An empty scheme is equivalent to removing the scheme.
|
186 |
+
*
|
187 |
+
* @param string $scheme The scheme to use with the new instance.
|
188 |
+
* @return static A new instance with the specified scheme.
|
189 |
+
* @throws \InvalidArgumentException for invalid or unsupported schemes.
|
190 |
+
*/
|
191 |
+
public function withScheme($scheme);
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Return an instance with the specified user information.
|
195 |
+
*
|
196 |
+
* This method MUST retain the state of the current instance, and return
|
197 |
+
* an instance that contains the specified user information.
|
198 |
+
*
|
199 |
+
* Password is optional, but the user information MUST include the
|
200 |
+
* user; an empty string for the user is equivalent to removing user
|
201 |
+
* information.
|
202 |
+
*
|
203 |
+
* @param string $user The user name to use for authority.
|
204 |
+
* @param null|string $password The password associated with $user.
|
205 |
+
* @return static A new instance with the specified user information.
|
206 |
+
*/
|
207 |
+
public function withUserInfo($user, $password = null);
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Return an instance with the specified host.
|
211 |
+
*
|
212 |
+
* This method MUST retain the state of the current instance, and return
|
213 |
+
* an instance that contains the specified host.
|
214 |
+
*
|
215 |
+
* An empty host value is equivalent to removing the host.
|
216 |
+
*
|
217 |
+
* @param string $host The hostname to use with the new instance.
|
218 |
+
* @return static A new instance with the specified host.
|
219 |
+
* @throws \InvalidArgumentException for invalid hostnames.
|
220 |
+
*/
|
221 |
+
public function withHost($host);
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Return an instance with the specified port.
|
225 |
+
*
|
226 |
+
* This method MUST retain the state of the current instance, and return
|
227 |
+
* an instance that contains the specified port.
|
228 |
+
*
|
229 |
+
* Implementations MUST raise an exception for ports outside the
|
230 |
+
* established TCP and UDP port ranges.
|
231 |
+
*
|
232 |
+
* A null value provided for the port is equivalent to removing the port
|
233 |
+
* information.
|
234 |
+
*
|
235 |
+
* @param null|int $port The port to use with the new instance; a null value
|
236 |
+
* removes the port information.
|
237 |
+
* @return static A new instance with the specified port.
|
238 |
+
* @throws \InvalidArgumentException for invalid ports.
|
239 |
+
*/
|
240 |
+
public function withPort($port);
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Return an instance with the specified path.
|
244 |
+
*
|
245 |
+
* This method MUST retain the state of the current instance, and return
|
246 |
+
* an instance that contains the specified path.
|
247 |
+
*
|
248 |
+
* The path can either be empty or absolute (starting with a slash) or
|
249 |
+
* rootless (not starting with a slash). Implementations MUST support all
|
250 |
+
* three syntaxes.
|
251 |
+
*
|
252 |
+
* If the path is intended to be domain-relative rather than path relative then
|
253 |
+
* it must begin with a slash ("/"). Paths not starting with a slash ("/")
|
254 |
+
* are assumed to be relative to some base path known to the application or
|
255 |
+
* consumer.
|
256 |
+
*
|
257 |
+
* Users can provide both encoded and decoded path characters.
|
258 |
+
* Implementations ensure the correct encoding as outlined in getPath().
|
259 |
+
*
|
260 |
+
* @param string $path The path to use with the new instance.
|
261 |
+
* @return static A new instance with the specified path.
|
262 |
+
* @throws \InvalidArgumentException for invalid paths.
|
263 |
+
*/
|
264 |
+
public function withPath($path);
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Return an instance with the specified query string.
|
268 |
+
*
|
269 |
+
* This method MUST retain the state of the current instance, and return
|
270 |
+
* an instance that contains the specified query string.
|
271 |
+
*
|
272 |
+
* Users can provide both encoded and decoded query characters.
|
273 |
+
* Implementations ensure the correct encoding as outlined in getQuery().
|
274 |
+
*
|
275 |
+
* An empty query string value is equivalent to removing the query string.
|
276 |
+
*
|
277 |
+
* @param string $query The query string to use with the new instance.
|
278 |
+
* @return static A new instance with the specified query string.
|
279 |
+
* @throws \InvalidArgumentException for invalid query strings.
|
280 |
+
*/
|
281 |
+
public function withQuery($query);
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Return an instance with the specified URI fragment.
|
285 |
+
*
|
286 |
+
* This method MUST retain the state of the current instance, and return
|
287 |
+
* an instance that contains the specified URI fragment.
|
288 |
+
*
|
289 |
+
* Users can provide both encoded and decoded fragment characters.
|
290 |
+
* Implementations ensure the correct encoding as outlined in getFragment().
|
291 |
+
*
|
292 |
+
* An empty fragment value is equivalent to removing the fragment.
|
293 |
+
*
|
294 |
+
* @param string $fragment The fragment to use with the new instance.
|
295 |
+
* @return static A new instance with the specified fragment.
|
296 |
+
*/
|
297 |
+
public function withFragment($fragment);
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Return the string representation as a URI reference.
|
301 |
+
*
|
302 |
+
* Depending on which components of the URI are present, the resulting
|
303 |
+
* string is either a full URI or relative reference according to RFC 3986,
|
304 |
+
* Section 4.1. The method concatenates the various components of the URI,
|
305 |
+
* using the appropriate delimiters:
|
306 |
+
*
|
307 |
+
* - If a scheme is present, it MUST be suffixed by ":".
|
308 |
+
* - If an authority is present, it MUST be prefixed by "//".
|
309 |
+
* - The path can be concatenated without delimiters. But there are two
|
310 |
+
* cases where the path has to be adjusted to make the URI reference
|
311 |
+
* valid as PHP does not allow to throw an exception in __toString():
|
312 |
+
* - If the path is rootless and an authority is present, the path MUST
|
313 |
+
* be prefixed by "/".
|
314 |
+
* - If the path is starting with more than one "/" and no authority is
|
315 |
+
* present, the starting slashes MUST be reduced to one.
|
316 |
+
* - If a query is present, it MUST be prefixed by "?".
|
317 |
+
* - If a fragment is present, it MUST be prefixed by "#".
|
318 |
+
*
|
319 |
+
* @see http://tools.ietf.org/html/rfc3986#section-4.1
|
320 |
+
* @return string
|
321 |
+
*/
|
322 |
+
public function __toString();
|
323 |
+
}
|
includes/vendor/mailerlite/ralouphie/getallheaders/src/getallheaders.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!function_exists('getallheaders')) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Get all HTTP header key/values as an associative array for the current request.
|
7 |
+
*
|
8 |
+
* @return string[string] The HTTP header key/value pairs.
|
9 |
+
*/
|
10 |
+
function getallheaders()
|
11 |
+
{
|
12 |
+
$headers = array();
|
13 |
+
|
14 |
+
$copy_server = array(
|
15 |
+
'CONTENT_TYPE' => 'Content-Type',
|
16 |
+
'CONTENT_LENGTH' => 'Content-Length',
|
17 |
+
'CONTENT_MD5' => 'Content-Md5',
|
18 |
+
);
|
19 |
+
|
20 |
+
foreach ($_SERVER as $key => $value) {
|
21 |
+
if (substr($key, 0, 5) === 'HTTP_') {
|
22 |
+
$key = substr($key, 5);
|
23 |
+
if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {
|
24 |
+
$key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));
|
25 |
+
$headers[$key] = $value;
|
26 |
+
}
|
27 |
+
} elseif (isset($copy_server[$key])) {
|
28 |
+
$headers[$copy_server[$key]] = $value;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
if (!isset($headers['Authorization'])) {
|
33 |
+
if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
|
34 |
+
$headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
|
35 |
+
} elseif (isset($_SERVER['PHP_AUTH_USER'])) {
|
36 |
+
$basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
|
37 |
+
$headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass);
|
38 |
+
} elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {
|
39 |
+
$headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $headers;
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
js/fl-builder-ui-settings-copy-paste.js
CHANGED
@@ -70,7 +70,7 @@
|
|
70 |
$( 'button.module-import-apply' ).click( function() {
|
71 |
var form = $( '.fl-builder-settings-lightbox .fl-builder-settings' ),
|
72 |
data = $( '.module-import-input' ).val(),
|
73 |
-
t = data.match( /\/\/\/\s\{type:([
|
74 |
type = false,
|
75 |
moduleType = $( '.fl-builder-module-settings' ).data( 'type' ),
|
76 |
errorDiv = $( '.fl-builder-settings-lightbox .module-import-error' );
|
70 |
$( 'button.module-import-apply' ).click( function() {
|
71 |
var form = $( '.fl-builder-settings-lightbox .fl-builder-settings' ),
|
72 |
data = $( '.module-import-input' ).val(),
|
73 |
+
t = data.match( /\/\/\/\s\{type:([_a-z0-9-]+)/ ),
|
74 |
type = false,
|
75 |
moduleType = $( '.fl-builder-module-settings' ).data( 'type' ),
|
76 |
errorDiv = $( '.fl-builder-settings-lightbox .module-import-error' );
|
js/fl-builder.min.js
CHANGED
@@ -7,5 +7,5 @@ node_id:n,settings:s},FLBuilder._saveSettingsComplete.bind(this,t,o)),FLBuilder.
|
|
7 |
this.updateCSSRule(this.classes.node+" h5 a","color",""),this.updateCSSRule(this.classes.node+" h6 a","color","")):(this.updateCSSRule(this.classes.node+" h1","color",s),this.updateCSSRule(this.classes.node+" h2","color",s),this.updateCSSRule(this.classes.node+" h3","color",s),this.updateCSSRule(this.classes.node+" h4","color",s),this.updateCSSRule(this.classes.node+" h5","color",s),this.updateCSSRule(this.classes.node+" h6","color",s),this.updateCSSRule(this.classes.node+" h1 a","color",s),this.updateCSSRule(this.classes.node+" h2 a","color",s),this.updateCSSRule(this.classes.node+" h3 a","color",s),this.updateCSSRule(this.classes.node+" h4 a","color",s),this.updateCSSRule(this.classes.node+" h5 a","color",s),this.updateCSSRule(this.classes.node+" h6 a","color",s))},this))},_initNodeBg:function(){e.extend(this.elements,{bgType:e(this.classes.settings+" select[name=bg_type]"),bgColor:e(this.classes.settings+" input[name=bg_color]"),bgColorPicker:e(this.classes.settings+" .fl-picker-bg_color"),bgGradientType:e(this.classes.settings+" select.fl-gradient-picker-type-select"),bgVideoSource:e(this.classes.settings+" select[name=bg_video_source]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:e(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:e(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:e(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:e(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:e(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:e(this.classes.settings+" input[name=ss_speed]"),bgSlideshowTrans:e(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:e(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:e(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayType:e(this.classes.settings+" select[name=bg_overlay_type]"),bgOverlayColor:e(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayGradient:e(this.classes.settings+" #fl-field-bg_overlay_gradient select")}),this.elements.bgType.on("change",e.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",e.proxy(this._bgColorChange,this)),this.elements.bgVideoServiceUrl.on("change",e.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",e.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayType.on("change",e.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayColor.on("change",e.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val(),i=FLBuilderResponsiveEditing._mode;this.elements.node.removeClass("fl-row-bg-video"),this.elements.node.removeClass("fl-row-bg-slideshow"),this.elements.node.removeClass("fl-row-bg-parallax"),this.elements.node.find(".fl-bg-video").remove(),this.elements.node.find(".fl-bg-slideshow").remove(),this.elements.content.css("background-image",""),this.updateCSSRule(this.classes.content,"background-color","transparent"),this.updateCSSRule(this.classes.content,"background-image","none"),this.updateCSSRule(this.classes.content,"background-image","none","medium"),this.updateCSSRule(this.classes.content,"background-image","none","responsive"),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"gradient"==t?(this.elements.bgGradientType.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.settings.find('[data-device="'+i+'"] select[name*="bg_"]').trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(t){var i;""===this.elements.bgColor.val()?this.updateCSSRule(this.classes.content,"background-color","transparent"):(i=this.hexOrRgb(this.elements.bgColor.val()),this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",i)},this)))},_bgVideoChange:function(t){var i=this.elements,l=i.bgVideoSource.val(),n=i.bgVideo.val(),s=i.bgVideoServiceUrl.val(),o="https://www.youtube.com/iframe_api",r="https://player.vimeo.com/api/player.js",a=e("<script>");"video_service"==l&&""!=s?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(s)&&e('script[src*="youtube.com"').length<1?a.attr("src",o):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(s)&&e('script[src*="vimeo.com"').length<1&&a.attr("src",r),a.attr("type","text/javascript").appendTo("head"),this.delay(500,e.proxy(this.preview,this))):""!=n&&this.preview()},_bgSlideshowChange:function(t){var i=this.elements,l=i.bgSlideshowSource.val(),n=i.bgSlideshowPhotos.val(),s=i.bgSlideshowFeedUrl.val(),o=i.bgSlideshowSpeed.val(),r=i.bgSlideshowTransSpeed.val();"wordpress"==l&&""===n||"smugmug"==l&&""===s||isNaN(parseInt(o))||isNaN(parseInt(r))||this.delay(500,e.proxy(this.preview,this))},_bgParallaxChange:function(e){this.elements.bgParallaxImageSrc.val()&&this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgParallaxImageSrc.val()+")","background-repeat":"no-repeat","background-position":"center center","background-attachment":"fixed","background-size":"cover"})},_bgOverlayChange:function(t){var i,l=this.elements.bgOverlayType.val(),n=this.elements.bgOverlayColor.val();"color"===l?(""===n?(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent")):(i=this.hexOrRgb(this.elements.bgOverlayColor.val()),this.delay(100,e.proxy(function(){this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color",i)},this))),this.updateCSSRule(this.classes.content+"::after","background-image","none")):"gradient"===l?(this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.elements.bgOverlayGradient.trigger("change")):(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.updateCSSRule(this.classes.content+"::after","background-image","none"))},_bgOverlayAddClasses:function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay")},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click"),this.elements.bgOverlayType.val("color").trigger("change")},_initNodeClassName:function(){e.extend(this.elements,{className:e(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",e.proxy(this._classNameChange,this)),this._lastClassName=this.elements.className.val()},_classNameChange:function(e){var t=this.elements.className.val();null!==this._lastClassName&&this.elements.node.removeClass(this._lastClassName),this.elements.node.addClass(t),this._lastClassName=t},_initNodeDimensions:function(t){var i={},l=["Top","Bottom","Left","Right"],n=["","Medium","Responsive"],s=this.classes.settings,o="",r="",a=null,d=null;for(a=0;a<l.length;a++)for(d=0;d<n.length;d++)o=t+l[a]+n[d],r=t+"_"+l[a].toLowerCase(),""!=n[d]&&(r+="_"+n[d].toLowerCase()),i[o]=e(s+" input[name="+r+"]");e.extend(this.elements,i)},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),contentWidth:e(this.classes.settings+" select[name=content_width]"),maxContentWidth:e(this.classes.settings+" input[name=max_content_width]"),maxContentWidthUnit:e(this.classes.settings+" select[name=max_content_width_unit]"),height:e(this.classes.settings+" select[name=full_height]"),minHeight:e(this.classes.settings+" input[name=min_height]"),align:e(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("input",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.maxContentWidthUnit.on("change",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.align.on("change",e.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_rowWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.width.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width")),this._rowMaxContentWidthChange()},_rowContentWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.contentWidth.val()?(i.removeClass("fl-row-fixed-width"),i.addClass("fl-row-full-width")):(i.removeClass("fl-row-full-width"),i.addClass("fl-row-fixed-width"),this._rowMaxContentWidthChange())},_rowMaxContentWidthChange:function(e){var t=FLBuilderConfig.global,i=this.elements.node,l=this.elements.content.find(".fl-row-content"),n=this.elements.maxContentWidth.val(),s=this.elements.maxContentWidthUnit.val();""==n?n=t.row_width+t.row_width_unit:n+=s,"fixed"===this.elements.width.val()&&i.css("max-width",n),l.css("max-width",n)},_rowHeightChange:function(e){var t=this.elements.node;this.elements.content;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),t.removeClass("fl-row-full-height"),t.removeClass("fl-row-custom-height"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.val("").trigger("input")):"custom"==this.elements.height.val()?(t.addClass("fl-row-custom-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.trigger("input")):this.elements.minHeight.val("").trigger("input")},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),sizeMedium:e(this.classes.settings+" input[name=size_medium]"),sizeResponsive:e(this.classes.settings+" input[name=size_responsive]"),columnHeight:e(this.classes.settings+" select[name=equal_height]"),columnAlign:e(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:e(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeMedium.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeResponsive.on("input",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",e.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",e.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_colSizeChange:function(t){var i=e(t.target),l=8,n=100-l,s=parseFloat(i.val()),o=this.elements.node.closest(".fl-col-group"),r=this.elements.node.prev(".fl-col"),a=this.elements.node.next(".fl-col"),d=0===a.length?r:a,u=this.elements.node.siblings(".fl-col"),c=0,f=FLBuilderResponsiveEditing._mode;0!==u.length&&(isNaN(s)&&("medium"===f?s=this.elements.size.val():"responsive"===f&&(s=this.elements.sizeMedium.val()?this.elements.sizeMedium.val():"auto"),"auto"!==s&&isNaN(s)&&(s=l)),"default"===f?(u.each(function(){e(this).data("node")!=d.data("node")&&(n-=parseFloat(e(this)[0].style.width),c+=parseFloat(e(this)[0].style.width))}),s<l&&(s=l),s>n&&(s=n),this.elements.node.css("width",s+"%"),d.css("width",100-c-s+"%")):(s>100&&(s=100,i.val(100)),this.updateCSSRule(this.classes.node,{"max-width":("auto"===s?100:s)+"% !important",width:("auto"===s?s:s+"%")+" !important"},void 0,!0),"responsive"===f&&(i.val()?(this.updateCSSRule(this.classes.node,"float",FLBuilderConfig.isRtl?"right":"left",!0),this.updateCSSRule(this.classes.node,"clear","none",!0)):(this.updateCSSRule(this.classes.node,"float","none",!0),this.updateCSSRule(this.classes.node,"clear","both",!0)),i.val()||this._colsHaveCustomResponsiveWidth(u)?o.addClass("fl-col-group-custom-width"):o.removeClass("fl-col-group-custom-width"))))},_colsHaveCustomResponsiveWidth:function(t){var i=FLBuilderSettingsConfig.nodes,l=!1;return t.each(function(){var t=e(this).data("node");i[t]&&i[t].size_responsive&&(l=!0)}),l},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initNodeDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var e=FLBuilder.isUndefined(e)?this.elements.settings.find(".fl-field"):e,t=null,i=null,l=null,n=0;n<e.length;n++)t=e.eq(n),i=t.data("type"),l=t.data("preview"),"refresh"==l.type&&this._initFieldRefreshPreview(t),"text"==l.type&&this._initFieldTextPreview(t),"css"==l.type&&this._initFieldCSSPreview(t),"widget"==l.type&&this._initFieldWidgetPreview(t),"font"==l.type&&this._initFieldFontPreview(t),"attribute"==l.type&&this._initFieldAttributePreview(t),"animation"==l.type&&this._initFieldAnimationPreview(l,t),"callback"==l.type&&this._initFieldCallbackPreview(l,t,i,e),this._initFieldUnitSelect(t)},_initFieldCallbackPreview:function(t,i,l,n){var s,o=t.callback,r=e(".fl-builder-settings:visible"),a=r.data("node"),d=e(".fl-builder-content .fl-node-"+a);if("undefined"!=typeof FLBuilderPreviewCallbacks[o]?s=FLBuilderPreviewCallbacks[o]:"undefined"!=typeof window[o]&&(s=window[o]),"function"==typeof s){var u={field:i,fields:n,type:l,preview:t,form:r,nodeID:a,node:d};switch(l){case"align":case"button-group":case"text":case"multiple-photos":case"video":case"icon":case"ordering":u.input=i.find("input"),u.getValue=function(){return u.input.val()};break;case"color":u.input=i.find("input.fl-color-picker-value"),u.getValues=function(){var e=u.input.val();({value:e,formattedValue:FLBuilderPreview.formatColor(e)})};break;case"textarea":case"code":u.textarea=i.find("textarea"),u.getValue=function(){return u.textarea.val()};break;case"select":case"photo-sizes":case"post-type":u.select=i.find("select"),u.getValue=function(){return u.select.val()};break;case"photo":u.input=i.find("input[type=hidden]"),u.sizeSelect=i.find("select"),u.getValues=function(){return{value:u.input.val(),size:u.sizeSelect.val()}};break;case"unit":u.input=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var e=u.input.val(),t=u.unitSelect.val(),i={value:e,unit:t,formattedValue:e+t};return i};break;case"dimension":u.inputs=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var t={inputs:[],props:{},unit:u.unitSelect.val()};return u.inputs.each(function(i,l){var l=e(l),n=l.val(),s=l.data("unit");t.inputs.push(n),t.props[s]=n}),t};break;case"animation":u.input=i.find("input"),u.select=i.find("select"),u.getValues=function(){return{delay:u.input.val(),style:u.select.val()}};break;case"link":u.input=i.find(".fl-link-field-input-wrap input"),u.targetInput=i.find("input[name$=_target]"),u.noFollowInput=i.find("input[name$=_nofollow]"),u.getValues=function(){return{url:u.input.val(),target:u.targetInput.val(),noFollow:u.noFollowInput.val()}};break;case"shadow":u.colorInput=i.find("input.fl-color-picker-value"),u.inputs=i.find("input[type=number]"),u.getValues=function(){({color:u.colorInput.val(),x:u.inputs[0].val(),y:u.inputs[1].val(),blur:u.inputs[2].val(),spread:u.inputs[3].val()})};break;case"gradient":u.inputs=i.find("input"),u.select=i.find("select"),u.gradientInputs={},u.gradientInputs.type=i.find('select[name$="[type]"]'),u.gradientInputs.angle=i.find('input[name$="[angle]"]'),u.gradientInputs.position=i.find('select[name$="[position]"]'),u.gradientInputs.stops=[],i.find(".fl-gradient-picker-colors .fl-gradient-picker-color-row").each(function(t,i){i=e(i),u.gradientInputs.stops.push({color:i.find(".fl-gradient-picker-color input"),stop:i.find(".fl-gradient-picker-stop input")})}),u.getValues=function(){var e={type:u.gradientInputs.type.val(),angle:u.gradientInputs.angle.val(),position:u.gradientInputs.position.val(),stops:[]};for(var t in u.gradientInputs.stops){var i=u.gradientInputs.stops[t];e.stops[t]={color:i.color.val(),stop:i.stop.val()}}return e};break;case"shape-transform":u.inputs=i.find("input"),u.getValues=function(){return{scaleXSign:u.inputs.eq(0).val(),scaleYSign:u.inputs.eq(1).val(),skewX:u.inputs.eq(2).val(),skewY:u.inputs.eq(3).val(),scaleX:u.inputs.eq(4).val(),rotate:u.inputs.eq(5).val(),scaleY:u.inputs.eq(6).val()}};break;default:u.input=i.find("input"),u.getValue=function(){return u.input.val()}}var c=i.find(".fl-field-responsive-toggle");u.responsiveToggle=!!c.length&&c,s=s.bind(this,u);var f={input:"change keyup input",inputs:"change keyup input",targetInput:"change keyup input",noFollowInput:"change keyup input",colorInput:"change input",textarea:"change keyup input",select:"change",sizeSelect:"change",unitSelect:"change"};for(var h in f)"undefined"!=typeof u[h]&&u[h].on(f[h],s)}},_initFieldRefreshPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this.delayPreview,this);switch(i){case"align":t.find("input").on("change",n);break;case"text":t.find("input[type=text]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"select":t.find("select").on("change",n);break;case"color":t.find(".fl-color-picker-value").on("change",n);break;case"photo":t.find("select").on("change",n);break;case"multiple-photos":t.find("input").on("change",n);break;case"photo-sizes":t.find("select").on("change",n);break;case"video":t.find("input").on("change",n);break;case"multiple-audios":t.find("input").on("change",n);break;case"icon":t.find("input").on("change",n);break;case"form":t.delegate("input","change",n);break;case"editor":this._addTextEditorCallback(t,l);break;case"code":t.find("textarea").on("change",n);break;case"post-type":t.find("select").on("change",n);break;case"suggest":t.find(".as-values").on("change",n),t.find("select").on("change",n);break;case"unit":case"dimension":t.find("input[type=number]").on("input",n);break;case"ordering":t.find("input[type=hidden]").on("change",n);break;default:t.on("change",n)}},_initFieldTextPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this._previewText,this,l);switch(i){case"text":t.find("input[type=text]").on("keyup",n);break;case"unit":t.find("input[type=number]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"code":t.find("textarea").on("change",n);break;case"editor":this._addTextEditorCallback(t,l)}},_previewText:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),n=e(l),s=e("<div>"+e(i.target).val()+"</div>");n.length>0?(s.find("script").remove(),n.html(s.html())):this.delayPreview(i)},_previewTextEditor:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(n),o="undefined"!=typeof tinyMCE?tinyMCE.get(i):null,r=e("#"+i),a="";s.length>0&&(a=e(o&&"none"==r.css("display")?"<div>"+o.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+r.val()+"</div>":"<div>"+switchEditors.wpautop(r.val())+"</div>"),a.find("script").remove(),s.html(a.html()))},_addTextEditorCallback:function(t,i){var l=t.find("textarea.wp-editor-area").attr("id"),n=null;if("refresh"==i.type)n=e.proxy(this.delayPreview,this);else{if("text"!=i.type)return;n=e.proxy(this._previewTextEditor,this,i,l)}e("#"+l).on("keyup",n),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(l),editor.on("change",n),editor.on("keyup",n))},_initFieldFontPreview:function(t){var i=t.data("type"),l=t.data("preview");l.id=t.attr("id");var n=e.proxy(this._previewFont,this,l);"font"==i&&t.find(".fl-font-field").on("change","select",n)},_previewFont:function(t,i){var l=e(i.delegateTarget),n=l.find(".fl-font-field-font"),s=e(n).find(":selected"),o=s.parent().attr("label"),r=l.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector),u=t.important?" !important":"",c="";"Google"!=o&&"Recently Used"!=o||this._buildFontStylesheet(a,n.val(),r.val()),c=n.val();var f=new RegExp("[0-9]");f.test(n.val())&&(c='"'+n.val()+'"'),this.updateCSSRule(d,"font-family","Default"===n.val()?"":c+u),this.updateCSSRule(d,"font-weight","default"===r.val()?"":r.val()+u)},_buildFontStylesheet:function(t,i,l){var n=FLBuilderConfig.googleFontsUrl,s="",o={},r={};o[i]=[l],FLBuilderPreview._fontsList[t]=o,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var i=t[e];r[e]=r[e]||[],i=i.filter(function(t){return r[e].indexOf(t)<0}),r[e]=r[e].concat(i)})}),e.each(r,function(e,t){s+=e+":"+t.join()+"|"}),s=n+s.slice(0,-1).replace(" ","+"),e("#fl-builder-google-fonts-preview").length<1?e("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",s).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",s)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if("undefined"!=typeof t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,i){switch(t.data("type")){case"align":t.find("input").on("change",e.proxy(this._previewCSS,this,i,t));break;case"border":t.find("select").on("change",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewBorderCSS,this,i,t));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColorCSS,this,i,t));break;case"dimension":t.find("input[type=number]").on("input",e.proxy(this._previewDimensionCSS,this,i,t));break;case"gradient":t.find("select").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-angle").on("input",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-stop").on("input",e.proxy(this._previewGradientCSS,this,i,t));break;case"photo":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"shadow":t.find("input").on("input",e.proxy(this._previewShadowCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewShadowCSS,this,i,t));break;case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,i,t));break;case"typography":t.find("select").on("change",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewTypographyCSS,this,i,t));break;case"unit":t.find("input[type=number]").on("input",e.proxy(this._previewCSS,this,i,t))}},_previewCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=t.property,o=this._getPreviewCSSUnit(t,i,l),r=e(l.target),a=r.val(),d=!!r.closest(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";s.indexOf("image")>-1&&a?a="url("+a+")":"%"===o&&"opacity"===s?a=parseInt(a)/100:""!==a&&(a+=o),this.updateCSSRule(n,s,a+u,d)},_previewBorderCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(l.target),i=s.closest(".fl-field"),o=s.closest(".fl-compound-field-setting"),r=o.data("property"),a=s.val(),d=(o.find(".fl-field-unit-select"),!!s.closest(".fl-field-responsive-setting").length),u=t.important&&""!==a?" !important":"";t.property=r,"border-color"===r?this._previewColorCSS(t,i,l):"border-width"===r||"border-radius"===r?this._previewDimensionCSS(t,i,l):"box-shadow"===r?this._previewShadowCSS(t,o,l):("border-style"===r&&i.find(".fl-border-field-width input:visible").trigger("input"),this.updateCSSRule(n,r,a+u,d))},_previewColorCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(l.target),o=s.val(),r=!!s.closest(".fl-field-responsive-setting").length,a=t.important&&""!==o?" !important":"";""!==o&&o.indexOf("rgb")<0&&(o="#"+o),this.updateCSSRule(n,t.property,o+a,r)},_previewDimensionCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=t.property,o=i.attr("id").replace("fl-field-",""),r=e(l.target).data("unit"),a=this._getDimensionValue(t,i,r,l),d=!!i.find(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";s="border-radius"===s?"border-"+r.replace("_","-")+"-radius":"border-width"===s?"border-"+r+"-width":s+"-"+r,this.updateCSSRule(n,s,a+u,d),"margin"!==o&&"padding"!==o&&"border"!==o||this.elements.node.find(".fl-bg-slideshow").length&&FLBuilder._resizeLayout()},_getDimensionValue:function(t,i,l,n){var s=e(n.target).val(),o="";return s=s.toLowerCase().replace(/[^a-z0-9%.\-]/g,""),null===s||""===s||isNaN(s)||(o=this._getPreviewCSSUnit(t,i,n),s=parseFloat(s)+(o?o:"px")),s},_getPreviewCSSUnit:function(t,i,l){var n=e(l.target),s=(FLBuilderResponsiveEditing._mode,!!n.closest(".fl-compound-field-setting").length),o=!!n.closest(".fl-field-responsive-setting").length,r=null;return r=s?n.closest(".fl-compound-field-setting").find(".fl-field-unit-select"):o?n.closest(".fl-field-responsive-setting").find(".fl-field-unit-select"):i.find(".fl-field-unit-select"),r&&r.length?"SELECT"===r.prop("tagName")?r.val():r.text():t.unit?t.unit:""},_initFieldUnitSelect:function(t){t.find(".fl-field-unit-select").on("change",function(){var t=e(this),i=t.closest(".fl-field-responsive-setting"),l=t.closest(".fl-field");i.length?i.find("input").trigger("input"):l.find("input").trigger("input")})},_previewGradientCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=i.find(".fl-gradient-picker-type-select").val(),o=i.find(".fl-gradient-picker-angle").val(),r=i.find(".fl-gradient-picker-position").val(),a=i.find(".fl-color-picker-value"),d=i.find(".fl-gradient-picker-stop input"),u=[],c="",f="";a.each(function(t){var i=e(this).val(),l=d.eq(t).val();""===i&&(i="rgba(255,255,255,0)"),i.indexOf("rgb")<0&&(i="#"+i),isNaN(l)&&(l=0),u.push(i+" "+l+"%")}),u=u.join(", "),"linear"===s?(isNaN(o)&&(o=0),c="linear-gradient("+o+"deg, "+u+")"):c="radial-gradient(at "+r+", "+u+")",f=t.important&&""!==c?" !important":"",this.updateCSSRule(n,t.property,c+f)},_previewShadowCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=i.find(".fl-shadow-field-color input").val(),o=i.find(".fl-shadow-field-horizontal input").val(),r=i.find(".fl-shadow-field-vertical input").val(),a=i.find(".fl-shadow-field-blur input").val(),d=i.find(".fl-shadow-field-spread input").val(),u=!!i.find(".fl-shadow-field-spread input").length,c=!!e(l.target).closest(".fl-field-responsive-setting").length,f="",h="";""!==s&&(""===o&&(o=0),""===r&&(r=0),""===a&&(a=0),""===d&&(d=0),s.indexOf("rgb")<0&&(s="#"+s),f=o+"px ",f+=r+"px ",f+=a+"px ",u&&(f+=d+"px "),f+=s,f+=h),h=t.important&&""!==f?" !important":"",this.updateCSSRule(n,t.property,f,c)},_previewTypographyCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(l.target),i=s.closest(".fl-field"),o=s.closest(".fl-compound-field-setting"),r=o.data("property"),a=s.val(),d=o.find(".fl-field-unit-select"),u=!!s.closest(".fl-field-responsive-setting").length,c=t.important&&""!==a?" !important":"";"font-family"===r?(t.id=i.attr("id"),this._previewFont(t,{delegateTarget:o})):"text-shadow"===r?(t.property="text-shadow",this._previewShadowCSS(t,o,l)):(d.length&&""!==a&&("vw"===d.val()?a="calc("+FLBuilderConfig.global.responsive_base_fontsize+"px + "+a+"vw)":a+="SELECT"===d.prop("tagName")?d.val():"px"),this.updateCSSRule(n,r,a+c,u))},_initFieldAttributePreview:function(t){var i=t.data("preview"),l=i.attribute,n=t.find("input"),s=(t.val(),window[i.format_callback]),o=this._getPreviewSelector(this.classes.node,i.selector),r=e(o),a=this._previewAttribute.bind(this,n,r,l,s);n.on("change",a),n.on("keyup",a),n.on("input",a)},_previewAttribute:function(e,t,i,l){var n=e.val();"function"==typeof l&&(n=l(n)),t[0].setAttribute(i,n)},_initFieldWidgetPreview:function(t){var i=e.proxy(this.delayPreview,this);t.find("input").on("keyup",i),t.find("input[type=checkbox]").on("click",i),t.find("textarea").on("keyup",i),t.find("select").on("change",i)},_initFieldAnimationPreview:function(t,i){i.find(".fl-animation-field-style select").on("change",e.proxy(this._previewAnimationField,this,t,i)),i.find(".fl-animation-field-duration input").on("input",e.proxy(this._previewAnimationField,this,t,i))},_previewAnimationField:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(n),o=i.find(".fl-animation-field-style select"),r=i.find(".fl-animation-field-duration input"),a=o[0].options;s.removeClass("fl-animated"),s.removeClass("fl-animation"),s.css("animation-duration","");for(var d=0;d<a.length;d++)s.removeClass("fl-"+a[d].value);""!==o.val()&&(s.addClass("fl-animation"),s.addClass("fl-"+o.val()),s.data("animation-delay",0),s.data("animation-duration",r.val())),FLBuilderLayout._doModuleAnimation.apply(s)},_getPreviewSelector:function(e,t){return FLBuilderPreview.getFormattedSelector.call(this,e,t)},toUpperCaseWords:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},FLBuilderPreview.formatColor=function(e){return""!==e&&e.indexOf("rgb")<0&&e.indexOf("url")<0&&(e="#"+e),e},FLBuilderPreviewCallbacks={previewShape:function(e,t){var i=e.preview.position,l=e.preview.prefix,n=e.form,s=l+"transform[][scaleYSign]";yOrientation=n.find('input[name="'+s+'"]'),"bottom"===i?yOrientation.val("invert"):yOrientation.val(""),yOrientation.trigger("change"),this.delayPreview()},previewShapeLayerSize:function(e,t){var i=e.getValues(),l=i.unit,n=i.props.width,s=i.props.height,o=i.props.top,r=e.preview.prefix,a=e.preview.position,d=this._getPreviewSelector(this.classes.node,".fl-builder-"+a+"-edge-layer"),u=d+" > *",c=e.form.find('[name="'+r+'align"]'),f=c.val(),h=f.split(" "),g=h[0],p=h[1],b=e.form.find('[name="'+r+'shape"]'),m=b.val(),v=FLBuilderConfig.presets.shape[m];
|
8 |
if(shapeProps={},shapeProps.width="100%",shapeProps.left="auto",shapeProps.right="auto",shapeProps.height="auto",shapeProps.top="auto",shapeProps.bottom="auto",n){shapeProps.width=n+l;var _=n/2+l;switch(p){case"left":shapeProps.left="0",shapeProps.right="auto";break;case"right":shapeProps.left="auto",shapeProps.right="0";break;case"center":shapeProps.left="calc( 50% - "+_+")",shapeProps.right="auto"}}this.updateCSSRule(u,"width",shapeProps.width),this.updateCSSRule(u,"left",shapeProps.left),this.updateCSSRule(u,"right",shapeProps.right);var L;if(s)L=s/2+l;else if(n){var F=v.data.viewBox.width,w=n/F*100;L=w/2+l}else L="";switch(s&&(shapeProps.height=s+l),g){case"top":shapeProps.top="0",shapeProps.bottom="auto";break;case"bottom":shapeProps.top="auto",shapeProps.bottom="0";break;case"center":shapeProps.top="calc( 50% - "+L+")",shapeProps.bottom="auto"}this.updateCSSRule(u,"height",shapeProps.height),this.updateCSSRule(u,"top",shapeProps.top),this.updateCSSRule(u,"bottom",shapeProps.bottom),""===o?this.updateCSSRule(d,a,"0"):this.updateCSSRule(d,a,o+l)},previewShapeAlign:function(e,t){var i=e.preview.prefix,l=e.form.find('[name="'+i+'size_width"]');l.trigger("input")},previewShapeFillStyle:function(e,t){var i=e.input.val(),l=e.preview,n=e.preview.prefix,s="fl-row-"+e.nodeID+"-"+n+"-linear-gradient",o="fl-row-"+e.nodeID+"-"+n+"-radial-gradient",r="fl-row-"+e.nodeID+"-"+n+"-pattern",a=e.form;if("undefined"!=typeof i){var d=this._getPreviewSelector(this.classes.node,l.selector);switch(i){case"color":var u=a.find("[name="+n+"fill_color]").val();this.updateCSSRule(d,"fill",FLBuilderPreview.formatColor(u));break;case"gradient":var c=a.find("#fl-field-"+n+"fill_gradient"),f=c.find('select[name$="[type]"]').val(),h="radial"===f?o:s;this.updateCSSRule(d,"fill","url(#"+h+")");break;case"pattern":var g="url(#"+r+")";this.updateCSSRule(d,"fill",g)}}},previewShapeGradientFill:function(e,t){var i=e.getValues(),l=e.node,n=e.preview,s=".fl-builder-"+n.position+"-edge-layer",o=l.find(s+" "+i.type+"Gradient"),r="url(#"+o.attr("id")+")",a=this._getPreviewSelector(this.classes.node,s+" .fl-shape");this.updateCSSRule(a,"fill",r);var d=o.find("stop");for(var u in i.stops){var c=i.stops[u],f=d.eq(u),h=c.color,g=c.stop,p=1;if(0===h.indexOf("rgba")){var b=h.substring(h.indexOf("(")+1,h.lastIndexOf(")")).split(/,\s*/);p=b.pop(),h="rgb("+b.join(",")+")"}f.attr("stop-color",FLBuilderPreview.formatColor(h)),f.attr("stop-opacity",p),f.attr("offset",g+"%")}if("linear"===i.type&&"undefined"!=typeof o[0]&&o[0].setAttribute("gradientTransform","rotate("+i.angle+" .5 .5 )"),"radial"===i.type){parts=i.position.split(" ");var m,v,_,L=parts[0],F=parts[1];switch(L){case"top":case"left":m=0;break;case"center":m=.5;break;case"bottom":case"right":m=1}switch(F){case"top":case"left":v=0;break;case"center":v=.5;break;case"bottom":case"right":v=1}_=.5,.5===m&&.5===v||(_=1),o.attr("cx",m),o.attr("cy",v),o.attr("r",_)}},previewShapeTransform:function(e,t){var i=(e.form,e.preview),l=(i.prefix,this._getPreviewSelector(this.classes.node,i.selector)),n=l+" > *",s=e.getValues(),o=[];Object.keys(s).map(function(e){var t=s[e],i="",l="";switch(e){case"scaleXSign":case"scaleYSign":return;case"scaleX":case"scaleY":t&&""!==t&&0!==t||(t="1"),l="scaleX"===e?s.scaleXSign:s.scaleYSign,t="invert"===l?-Math.abs(t):Math.abs(t),o.push(e+"("+t+")");break;case"translateX":case"translateY":t&&(i="px",o.push(e+"("+t+i+")"));break;case"skewX":case"skewY":t&&(i="deg",o.push(e+"("+t+i+")"));break;case"rotate":i="deg",""!==t&&"0"!==t&&o.push("rotate("+t+i+")")}}),this.updateCSSRule(n,"transform",o.join(" "))}}}(jQuery),function(e){var t={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^{]*{([\s\S]+?})\s*}/gi,empty:/@media[^{]*{([^{}]*?)}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,i.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var t=e("link, style"),i=null,l=null,n=null,s=null,o=null,r=null,a=null,d=!1,u=0,c=0;u<t.length;u++)if(element=t[u],i=element.href,l=element.id,n=element.tagName.toLowerCase(),s=element.rel,o=element.media,r=i?i.split("?").shift():l?l:"style-"+u,a=!0,d=!1,"style"===n||i&&s&&"stylesheet"===s.toLowerCase()){for(c=0;c<this.ignored.length;c++)if(r.indexOf(this.ignored[c])>-1){d=!0;break}if(d)continue;for(c=0;c<this.reparsed.length;c++)if(r.indexOf(this.reparsed[c])>-1){this.sheets[r]=null;break}void 0!==this.sheets[r]&&this.sheets[r]||this.queue.push({element:t.eq(u),key:r,tagName:n,href:i,id:l,media:o})}return this.queue.length},runQueue:function(){var t;this.queue.length?(t=this.queue.shift(),"style"===t.tagName?(this.parse(t.element.html(),t),this.runQueue()):e.get(t.href,e.proxy(function(e){this.parse(e,t),this.runQueue()},this)).fail(this.runQueue.bind(this))):this.applyStyles()},parse:function(e,t){var i=this.regex,l=this.cleanStyles(e),n=l.match(i.media),s=n&&n.length||0,o=!s&&t.media,r=null,a=null,d=null,u="",c=0,f=0;for(n?u=l.replace(i.media,""):o&&"all"!=t.media?s=1:u=l,this.sheets[t.key]={element:t.element,key:t.key,tagName:t.tagName,href:t.href,id:t.id,all:u,queries:[]},c=0;c<s;c++)for(o?(r=t.media,l=this.convertURLs(l,t.href)):(r=n[c].match(i.findStyles)&&RegExp.$1,l=RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),a=r.split(","),f=0;f<a.length;f++)r=a[f],d=r.split("(")[0].match(i.only)&&RegExp.$2,"print"!=d&&(r.replace(i.minmaxwh,"").match(i.other)||this.sheets[t.key].queries.push({minw:r.match(i.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(i.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:l}))},applyStyles:function(){var t=e("head"),i={all:"",queries:[]},l=null,n=null,s=null,o=null,r=null,a=null,d=null,u=!1;this.clearStyles();for(s in this.sheets)if(n=this.sheets[s],n.queries.length&&this.width){for(i.all+=n.all,r=0;r<n.queries.length;r++)o=n.queries[r],a=o.minw,d=o.maxw,u=!1,a&&(a=parseFloat(a)*(a.indexOf("em")>-1?this.getEmPxValue():1),this.width>=a&&(i.queries.push({media:"min",width:a,styles:o.styles}),u=!0)),d&&!u&&(d=parseFloat(d)*(d.indexOf("em")>-1?this.getEmPxValue():1),this.width<=d&&i.queries.push({media:"max",width:d,styles:o.styles}));n.element[0].disabled=!0}for(""!==i.all&&(l=e('<style class="fl-builder-media-query" data-query="all"></style>'),this.styles.push(l),t.append(l),l.html(i.all)),r=0;r<i.queries.length;r++)o=i.queries[r],l=e('<style class="fl-builder-media-query" data-query="'+o.media+'" data-value="'+o.width+'"></style>'),this.styles.push(l),t.append(l),l.html(o.styles);this.callback&&(this.callback(),this.callback=null)},clearStyles:function(){var e=null,t=this.styles.slice(0);this.styles=[];for(e in this.sheets)this.sheets[e].element[0].disabled=!1;for(var i=0;i<t.length;i++)t[i].empty(),t[i].remove()},disableStyles:function(e){for(var t,i,l,n=0;n<this.styles.length;n++)t=this.styles[n],i=t.attr("data-query"),l=parseInt(t.attr("data-value")),"max"===i&&!isNaN(l)&&l<=e&&(this.styles[n][0].sheet.disabled=!0)},enableStyles:function(){for(var e=0;e<this.styles.length;e++)this.styles[e][0].sheet.disabled=!1},cleanStyles:function(e){var t=this.regex;return e.replace(t.comments,"").replace(t.keyframes,"").replace(t.empty,"")},convertURLs:function(e,t){return t?(t=t.substring(0,t.lastIndexOf("/")),t.length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")):e},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=null,t=window.document,i=t.documentElement,l=t.body,n=t.createElement("div"),s=i.style.fontSize,o=l&&l.style.fontSize,r=!1;return n.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=r=t.createElement("body"),l.style.background="none"),i.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(n),r&&i.insertBefore(l,i.firstChild),e=parseFloat(n.offsetWidth),r?i.removeChild(l):l.removeChild(n),i.style.fontSize=s,o?l.style.fontSize=o:l.style.fontSize="",this.emPxValue=e,e}},i={_functions:null,update:function(){var e;if(!this._functions){this._functions={};for(e in l)this._functions[e]=jQuery.fn[e]}if(t.width)for(e in l)jQuery.fn[e]=l[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},l={width:function(l){return void 0!=l?i._functions.width.call(this,l):e.isWindow(this[0])?t.width:i._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){t.ignore(e)},reparse:function(e){t.reparse(e)},update:function(e,i){t.update(e,i)},disableStyles:function(e){t.disableStyles(e)},enableStyles:function(){t.enableStyles()}}}(jQuery),function(e){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(t){var i;e(".fl-responsive-preview").length&&"default"!==this._mode?("responsive"==this._mode?(i=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)):"medium"==this._mode&&(i=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)),FLBuilder._resizeLayout()):t&&t()},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("endEditingSession",this._clearPreview),FLBuilder.addHook("didEnterRevisionPreview",this._clearPreview),FLBuilder.addHook("responsiveEditing",this._menuToggleClicked),FLBuilder.addHook("preview-init",this._switchAllSettingsToCurrentMode),e("body").delegate(".fl-field-responsive-toggle","click",this._settingToggleClicked),e("body").delegate(".fl-responsive-preview-message button","click",this._previewToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,FLBuilderConfig.relativePluginUrl,"fl-builder-preview","fl-theme-builder","/wp-includes/","/wp-admin/","admin-bar-inline-css","ace-tm","ace_editor.css"]),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css",FLBuilderConfig.postId+"-layout-draft-partial.css",FLBuilderConfig.postId+"-layout-preview.css",FLBuilderConfig.postId+"-layout-preview-partial.css","fl-builder-global-css","fl-builder-layout-css"])},_switchTo:function(t,i){var l=e("html"),n=e("body"),s=e(FLBuilder._contentClass),o=e(".fl-responsive-preview"),r=e(".fl-responsive-preview-mask"),a=e(".fl-content-placeholder"),d=null;if(FLBuilderResponsiveEditing._mode=t,"default"==t){if(0===a.length)return;l.removeClass("fl-responsive-preview-enabled"),a.after(s),a.remove(),o.remove(),r.remove()}else 0===o.length?(l.addClass("fl-responsive-preview-enabled"),s.after('<div class="fl-content-placeholder"></div>'),n.prepend(wp.template("fl-responsive-preview")()),e(".fl-responsive-preview").addClass("fl-preview-"+t),e(".fl-responsive-preview-content").append(s)):(o.removeClass("fl-preview-responsive fl-preview-medium"),o.addClass("fl-preview-"+t));"responsive"==t?(d=FLBuilderConfig.global.responsive_breakpoint>=360?360:FLBuilderConfig.global.responsive_breakpoint,s.width(d),FLBuilderSimulateMediaQuery.update(d,i)):"medium"==t?(d=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,s.width(d),FLBuilderSimulateMediaQuery.update(d,i)):(s.width(""),FLBuilderSimulateMediaQuery.update(null,i)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),this._previewFields(),FLBuilder.triggerHook("responsive-editing-switched",t)},_setContentBackgroundColor:function(){var t=e(FLBuilder._contentClass),i=e(".fl-responsive-preview"),l=e(".fl-content-placeholder"),n=l.parents(),s="#fff",o=0;if(0===i.length)t.css("background-color","");else{for(;o<n.length&&(s=n.eq(o).css("background-color"),"rgba(0, 0, 0, 0)"==s);o++);t.css("background-color",s)}},_switchToAndScroll:function(t){var i=e(".fl-builder-settings").data("node"),l=void 0===i?void 0:e(".fl-node-"+i);FLBuilderResponsiveEditing._switchTo(t,function(){if(void 0!==l&&l){var t=(e(window),e(".fl-responsive-preview-content"));t.length?(t.scrollTop(0),t.scrollTop(l.offset().top-150)):e("html, body").scrollTop(l.offset().top-100)}})},_switchAllSettingsTo:function(t){var i="dashicons-desktop dashicons-tablet dashicons-smartphone";e(".fl-field-responsive-toggle").removeClass(i),e(".fl-field-responsive-setting").hide(),i="default"==t?"dashicons-desktop":"medium"==t?"dashicons-tablet":"dashicons-smartphone",e(".fl-field-responsive-toggle").addClass(i).data("mode",t),e(".fl-field-responsive-setting-"+t).css("display","inline-block")},_switchAllSettingsToCurrentMode:function(){var e=FLBuilderResponsiveEditing;e._switchAllSettingsTo(e._mode),FLBuilder.triggerHook("responsive-editing-switched",e._mode)},_settingToggleClicked:function(){var t=e(this),i=t.data("mode");i="default"==i?"medium":"medium"==i?"responsive":"default",FLBuilderResponsiveEditing._switchAllSettingsTo(i),FLBuilderResponsiveEditing._switchToAndScroll(i),t.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_menuToggleClicked:function(){var e=FLBuilderResponsiveEditing._mode;e="default"==e?"medium":"medium"==e?"responsive":"default",FLBuilder.MainMenu.hide(),FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_previewToggleClicked:function(){var t=e(this).data("mode");FLBuilderResponsiveEditing._switchAllSettingsTo(t),FLBuilderResponsiveEditing._switchToAndScroll(t)},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_previewFields:function(){var t=FLBuilderResponsiveEditing._mode,i=e(".fl-builder-settings:visible");0!==i.length&&void 0!==i.attr("data-node")&&(FLBuilder.triggerHook("responsive-editing-before-preview-fields",t),i.find(".fl-builder-settings-tab").each(function(){var i=e(this);i.css("display","block"),i.find(".fl-field-responsive-setting-"+t+":visible").each(function(){var i=e(this),l=i.closest(".fl-field"),n=l.data("type"),s=l.data("preview"),o=l.find(".fl-field-connection-visible").length;"refresh"!=s.type&&(o?"photo"===n&&"default"!==t&&i.find(".fl-photo-remove").trigger("click"):(i.find("input").trigger("keyup"),i.find("select").trigger("change")))}),i.css("display","")}),FLBuilder.triggerHook("responsive-editing-after-preview-fields",t))}},e(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(e){FLBuilderResponsivePreview={enter:function(){this.render()},exit:function(){this.destroy()},switchTo:function(t){var i=FLBuilderConfig.global,l=e("#fl-builder-preview-frame"),n="100%";"responsive"==t?(n=i.responsive_breakpoint>=360?360:i.responsive_breakpoint,l.width(n)):"medium"==t&&(n=i.medium_breakpoint>=769?769:i.medium_breakpoint,l.width(n)),l.width(n)},render:function(){var t=e("body"),i=FLBuilderConfig.previewUrl,l=e("#fl-builder-preview-mask, #fl-builder-preview-frame"),n=e('<div id="fl-builder-preview-mask"></div>'),s=e('<iframe id="fl-builder-preview-frame" src="'+i+'"></iframe>');l.remove(),t.append(n),t.append(s),t.css("overflow","hidden")},destroy:function(){e("#fl-builder-preview-mask, #fl-builder-preview-frame").remove(),e("body").css("overflow","visible")}}}(jQuery),function(e){var t={init:function(){var t=e("body");t.delegate(".fl-builder-service-select","change",this._serviceChange),t.delegate(".fl-builder-service-connect-button","click",this._connectClicked),t.delegate(".fl-builder-service-account-select","change",this._accountChange),t.delegate(".fl-builder-service-account-delete","click",this._accountDeleteClicked),t.delegate(".fl-builder-campaign-monitor-client-select","change",this._campaignMonitorClientChange),t.delegate(".fl-builder-mailchimp-list-select","change",this._mailChimpListChange),t.delegate(".fl-builder-activecampaign-list_type-select","change",this._activeCampaignChange)},_startSettingsLoading:function(t){var i=e(".fl-builder-settings"),l=t.closest(".fl-builder-service-settings"),n=e(".fl-builder-service-error");i.append('<div class="fl-builder-loading"></div>'),l.addClass("fl-builder-service-settings-loading"),n.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),i=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),i.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this),n=l.closest("tr"),s=l.val();n.siblings("tr.fl-builder-service-account-row").remove(),n.siblings("tr.fl-builder-service-connect-row").remove(),n.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==s&&(t._startSettingsLoading(l),FLBuilder.ajax({action:"render_service_settings",node_id:i,service:s},t._serviceChangeComplete))},_serviceChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-select-row");s.after(l.html),t._addAccountDelete(n),t._finishSettingsLoading()},_connectClicked:function(){for(var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-connect-row"),o=l.find(".fl-builder-service-connect-input"),r=null,a=null,d=0,u={action:"connect_service",node_id:i,service:n.val(),fields:{}};d<o.length;d++)r=o.eq(d),a=r.attr("name"),u.fields[a]=r.val();s.hide(),t._startSettingsLoading(n),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-select-row"),o=n.find(".fl-builder-service-select"),r=n.find(".fl-builder-service-account-row"),a=n.find(".fl-builder-service-account-select"),d=n.find(".fl-builder-service-connect-row");l.error?(d.show(),0===a.length?o.after('<div class="fl-builder-service-error">'+l.error+"</div>"):a.after('<div class="fl-builder-service-error">'+l.error+"</div>")):(d.remove(),r.remove(),s.after(l.html)),t._addAccountDelete(n),t._finishSettingsLoading()},_accountChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=l.find(".fl-builder-service-connect-row"),r=l.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=s.val(),u=null;o.remove(),r.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:i,service:n.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:i,service:n.val(),account:d}),u&&(t._startSettingsLoading(n),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(l)},_accountChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-account-row");s.after(l.html),t._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");t.length>0&&(e.find(".fl-builder-service-account-delete").remove(),""!==t.val()&&"add_new_account"!=t.val()&&t.after('<a href="javascript:void(0);" class="fl-builder-service-account-delete">'+FLBuilderStrings.deleteAccount+"</a>"))},_accountDeleteClicked:function(){var i=e(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),n=i.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:l.val(),account:n.val()},t._accountDeleteComplete),t._startSettingsLoading(n))},_accountDeleteComplete:function(){var i=e(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select");t._finishSettingsLoading(),l.trigger("change")},_campaignMonitorClientChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=e(this),r=l.find(".fl-builder-service-list-select"),a=o.val();0!==r.length&&r.closest("tr").remove(),""!==a&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:s.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-campaign-monitor-client-select");s.closest("tr").after(l.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=l.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==o.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:s.val(),list_id:o.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-list-select");s.closest("tr").after(l.html),t._finishSettingsLoading()},_activeCampaignChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=l.find(".fl-builder-service-list-select");list_type=l.find('select[name="list_type"]'),0!==o.length&&o.closest("tr").remove(),""!==list_type.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:s.val(),list_type:list_type.val()},t._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-field-row");s.after(l.html),t._finishSettingsLoading()}};e(function(){t.init()})}(jQuery),function(e){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var t={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fas fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row:first-of-type",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row:first-of-type .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-templates-button",placement:"bottom",title:FLBuilderStrings.tourTemplatesButtonTitle,content:FLBuilderStrings.tourTemplatesButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-tools-button",placement:"bottom",title:FLBuilderStrings.tourToolsButtonTitle,content:FLBuilderStrings.tourToolsButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-done-button",placement:"bottom",title:FLBuilderStrings.tourDoneButtonTitle,content:FLBuilderStrings.tourDoneButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,orphan:!0,backdrop:!0,title:FLBuilderStrings.tourFinishedTitle,content:FLBuilderStrings.tourFinished,template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fas fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">'+FLBuilderStrings.tourEnd+"</button> </div> </div>"}]};return FLBuilderConfig.lite?t.steps.shift():"disabled"==FLBuilderConfig.enabledTemplates?t.steps.shift():"fl-builder-template"==FLBuilderConfig.postType&&t.steps.shift(),t},_onStart:function(){var t=e("body");t.scrollTop(0),t.append('<div class="fl-builder-tour-mask"></div>'),0===e(".fl-row").length&&"module"!=FLBuilderConfig.userTemplateType&&(e(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-row fl-row-fixed-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width:100%"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p></div> </div> </div> </div> </div> </div> </div> </div> </div>'),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols())},_onPrev:function(){e(".fl-builder-tour-dimmed").remove()},_onNext:function(){e(".fl-builder-tour-dimmed").remove()},_onEnd:function(){e("body").off("fl-builder.template-selector-loaded"),e(".fl-builder-tour-mask").remove(),e(".fl-builder-tour-dimmed").remove(),e(".fl-builder-tour-demo-content").remove(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(t){e(t).find(".fl-builder-tour-dimmed").remove(),e(t).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;var l=i.indexOf(e,t);return l!==-1&&l===t}),e.fn.textWidth=function(t,i){return e.fn.textWidth.fakeEl||(e.fn.textWidth.fakeEl=e("<span>").hide().appendTo(document.body)),e.fn.textWidth.fakeEl.text(t||this.val()||this.text()).css("font",i||this.css("font")),e.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(t){var i=Object.create(this);return i=e.extend(i,t),e(this).trigger("onCreate"),i}},e.fn.switchClass=function(t,i){return this.each(function(){return e(this).removeClass(function(e,i){var l=[],n=i.split(" ");for(var e in n)n[e].startsWith(t)&&l.push(n[e]);return l.join(" ")}),e(this).addClass(t+i)})};var i={init:function(){t.addHook("cancelTask",this.onCancelTask.bind(this)),t.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),t.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),t.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),t.addHook("endEditingSession",this.onEndEditingSession.bind(this)),t.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(t,i,l){var n=e.proxy(this,"onTriggerKey",t);l?Mousetrap.bindGlobal(i,n):Mousetrap.bind(i,n)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){this.reset();for(var e in FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,i){t.triggerHook(e),i.preventDefault?i.preventDefault():i.returnValue=!1},onCancelTask:function(){return s.isPreviewing?void s.endPreview():n.isShowing?void n.hide():t.ContentPanel.isShowing?void t.ContentPanel.hide():void 0},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){if(t.SaveManager.layoutNeedsPublish()){var e=FLBuilderStrings.savedStatus.hasAlreadySaved;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}else{var e=FLBuilderStrings.savedStatus.nothingToSave;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}},onNextPrevTabShortcut:function(i,l){var n,s,o=e(".fl-lightbox:visible"),r=o.find(".fl-builder-settings-tabs a");o.length>0&&(n=r.filter("a.fl-active"),s="next"==i?n.is(r.last())?r.first():n.next("a"):n.is(r.first())?r.last():n.prev("a"),s.trigger("click")),t._calculateSettingsTabsOverflow(),l.preventDefault()}},l={isShowing:!1,init:function(){this.render(),t.addHook("showKeyboardShortcuts",this.show.bind(this))},render:function(){var t=wp.template("fl-keyboard-shortcuts"),i=FLBuilderConfig.keyboardShortcuts;this.$el=e(t(i)),e("body").append(this.$el),this.$el.find(".dismiss-shortcut-ui").on("click",this.hide.bind(this)),this.$el.on("click",this.hide.bind(this))},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.isShowing=!0)},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.isShowing=!1)},toggle:function(){this.isShowing?this.hide():this.show()}},n=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=e(".fl-builder-publish-actions"),this.$defaultBarButtons=e(".fl-builder-bar-actions"),this.$clickAwayMask=e(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),
|
9 |
this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click touchend",this.onActionClicked.bind(this)),t.addHook("triggerDone",this.onDoneTriggered.bind(this));var i=this.hide.bind(this);t.addHook("cancelPublishActions",i),t.addHook("endEditingSession",i),this.$clickAwayMask.on("click",i)},onDoneTriggered:function(){t.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?t._exit():t._exitWithoutRefresh()},show:function(){this.isShowing||t._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,t.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(i){var l=e(i.currentTarget).data("action");switch(l){case"dismiss":this.hide();break;case"discard":this.hide(),s.muteToolbar(),t._discardButtonClicked();break;case"publish":this.hide(),s.muteToolbar(),t._publishButtonClicked(),t._destroyOverlayEvents();break;case"draft":this.hide(),s.muteToolbar(),t._draftButtonClicked();break;default:this.hide(),s.muteToolbar(),t._draftButtonClicked()}t.triggerHook(l+"ButtonClicked")}}),s={isPreviewing:!1,init:function(){this.$el=e("body"),this.$mainToolbar=e(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=e("#wpadminbar"),this.$endPreviewBtn=e(".fl-builder--preview-actions .end-preview-btn"),t.addHook("endEditingSession",this.endEditingSession.bind(this)),t.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=e(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));var i=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a");i.on("click",this.onClickPageBuilderToolbarLink.bind(this)),e("#wpadminbar a").attr("tabindex","-1");var l=this.restartEditingSession.bind(this);t.addHook("restartEditingSession",l),t.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),t.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),t.addHook("didEnterRevisionPreview",this.hide.bind(this)),t.addHook("didExitRevisionPreview",this.show.bind(this)),t.addHook("didPublishLayout",this.onPublish.bind(this))},endEditingSession:function(){t._destroyOverlayEvents(),t._removeAllOverlays(),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t._unbindEvents(),e("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),e("body").removeClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex",null),e(t._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(i){t._initTemplateSelector(),t._bindOverlayEvents(),t._highlightEmptyCols(),t._rebindEvents(),e("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),e("body").addClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex","-1"),e(t._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),i.preventDefault()},onClickPageBuilderToolbarLink:function(e){t.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){var e=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span");e.css("color","#6bc373")},hide:function(){e("html").hasClass("fl-builder-edit")&&(t._unbindEvents(),t._destroyOverlayEvents(),t._removeAllOverlays(),e("html").removeClass("fl-builder-edit"),e("body").removeClass("admin-bar"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init(),t.triggerHook("didHideEditingUI"))},show:function(){e("html").hasClass("fl-builder-edit")||(t._rebindEvents(),t._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),e("html").addClass("fl-builder-edit"),e("body").addClass("admin-bar"),t.triggerHook("didShowEditingUI"))},beginPreview:function(){t._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),e("html").addClass("fl-builder-preview"),e("html, body").removeClass("fl-builder-edit"),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t.triggerHook("didBeginPreview"),FLBuilderResponsivePreview.enter())},endPreview:function(){this.isPreviewing=!1,this.show(),t._highlightEmptyCols(),FLBuilderResponsivePreview.exit(),e("html").removeClass("fl-builder-preview"),e("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),e("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),e("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(t){var i=e(t.target).data("mode");FLBuilderResponsivePreview.switchTo(i)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),t._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},o={isEditing:!0,init:function(){history.pushState&&(t.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),t.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url),this.isEditing=!1}},r={$row:null,$rowContent:null,row:null,drag:{},init:function(){if(this.userCanResize()){var i=e(t._contentClass);i.delegate(".fl-row","mouseenter touchstart",this.onDragHandleHover.bind(this)),i.delegate(".fl-block-row-resize","mousedown touchstart",this.onDragHandleDown.bind(this))}},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(t){if(!this.drag.isDragging){var i=this,l=e(t.target),n=l.closest(".fl-row"),s=n.data("node"),o=e(".fl-builder-row-settings[data-node="+s+"]"),r=o.find("[name=max_content_width_unit]"),a="px";i.onSettingsReady(s,function(t){r.length?a=r.length:"undefined"!=typeof t&&(a=t.max_content_width_unit),i.$row=n,i.$rowContent=i.$row.find(".fl-row-content"),i.row={node:s,form:o,unit:a,isFixedWidth:i.$row.hasClass("fl-row-fixed-width"),parentWidth:"vw"===a?e(window).width():i.$row.parent().width()},i.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},i.row.isFixedWidth?i.drag.originalWidth=i.$row.width():i.drag.originalWidth=i.$rowContent.width(),i.dragInit()})}},onSettingsReady:function(e,t){var i="undefined"!=typeof FLBuilderSettingsConfig.nodes?FLBuilderSettingsConfig.nodes:null;null!==i&&"undefined"!=typeof i[e]?(t(i[e]),null!=r._mouseEnterTimeout&&(clearTimeout(r._mouseEnterTimeout),r._mouseEnterTimeout=null)):(clearTimeout(r._mouseEnterTimeout),r._mouseEnterTimeout=setTimeout(this.onSettingsReady.bind(this),350,e,t))},onDragHandleDown:function(){e("body").addClass("fl-builder-row-resizing"),null!=r._mouseEnterTimeout&&(clearTimeout(r._mouseEnterTimeout),r._mouseEnterTimeout=null)},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(i,l){var n=e("body"),s=e(l.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),s.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=s.find(".fl-block-col-resize-feedback-left")),s.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=s.find(".fl-block-col-resize-feedback-right")),n.addClass("fl-builder-row-resizing"),t._colResizing=!0,t._destroyOverlayEvents(),t._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,n=this.drag.originalWidth,s=0,o=this.drag.edge,r=FLBuilderConfig.rowResize.minAllowedWidth,a=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(o="w"==o?"e":"w"),l>i?"w"===o?this.drag.operation="+":this.drag.operation="-":"e"===o?this.drag.operation="+":this.drag.operation="-",s=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=n+2*s:this.drag.calculatedWidth=n-2*s,!1!==r&&this.drag.calculatedWidth<r&&(this.drag.calculatedWidth=r),!1!==a&&this.drag.calculatedWidth>a&&(this.drag.calculatedWidth=a),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),"px"!==this.row.unit&&(this.drag.calculatedWidth=Math.round(this.drag.calculatedWidth/this.row.parentWidth*100)),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+this.row.unit).show(),this.row.form.length&&this.row.form.find("[name=max_content_width]").val(this.drag.calculatedWidth))},dragStop:function(i,l){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();var n={action:"resize_row_content",node:this.row.node,width:this.drag.calculatedWidth},s=e("body");t.ajax(n),t._bindOverlayEvents(),s.removeClass("fl-builder-row-resizing"),e(".fl-block-overlay").each(function(){t._buildOverlayOverflowMenu(e(this))}),setTimeout(function(){t._colResizing=!1},50),t.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},a={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips();var e=this.$el.find(".fl-builder-content-panel-button");e.on("click",t._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",t._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",t._upgradeClicked),this.$el.find("#fl-builder-toggle-notifications").on("click",this.onNotificationsButtonClicked.bind(this)),t.addHook("notificationsLoaded",this.onNotificationsLoaded.bind(this))},render:function(t){var i=e(this.template(t));this.$el=i,this.el=i.get(0),s.$mainToolbar=this.$el,e("body").prepend(i),e("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),e(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})},onNotificationsButtonClicked:function(){t.triggerHook("toggleNotifications")},onNotificationsLoaded:function(){e("body").removeClass("fl-builder-has-new-notifications");var i={action:"fl_builder_notifications",read:!0};t.ajax(i)}};e(function(){t.ContentPanel.init(),FLBuilderConfig.simpleUi||t.MainMenu.init(),FLBuilderConfig.showToolbar?(a.init(),t.ContentPanel.alignPanelArrow()):e("html").addClass("fl-builder-no-toolbar"),i.init(),l.init(),s.init(),o.init(),r.init(),n.init(),t.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing"),this.isShowing=!0},hide:function(){this.$el.removeClass("is-showing"),this.isShowing=!1},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),l=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){this.template=wp.template(this.templateName),e("body").prepend(this.template(this)),this.$el=e(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html("");for(var i in FLBuilderConfig.mainMenu)this.renderPanel(i);e("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=e(".fl-builder-bar-title"),e("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var l=this.hide.bind(this);t.addHook("didShowPublishActions",l),t.addHook("didBeginSearch",l),t.addHook("didBeginPreview",l),t.addHook("didShowContentPanel",l),t.addHook("endEditingSession",l),t.addHook("didFocusSearchBox",l),t.addHook("didEnterRevisionPreview",l),t.addHook("didFailSettingsSave",l),t.addHook("showKeyboardShortcuts",l),this.$mask=e(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",l),n.init(),s.init()},renderPanel:function(t){var l,n,s,o=this.views[t];l=FLBuilderConfig.mainMenu[t],l.handle=t,n=i.create(l),n.init(),s=e(n.render()),n.$el=s,e(".fl-builder--main-menu-panel-views").append(s),n.bindEvents(),n.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),"undefined"!=typeof o&&(o.$el.remove(),o.isShowing&&(this.currentView=n,n.show())),n.isRootView&&(this.rootView=n,this.currentView=n),this.views[t]=n},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),t.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(i){var l=e(i.currentTarget),n=l.data("type");switch(n){case"view":var s=l.data("view");this.goToView(s);break;case"event":var o=l.data("event");t.triggerHook(o,l);break;case"link":}},goToView:function(e){var t=this.currentView,i=this.views[e];t.transitionOut(),i.transitionIn(),this.currentView=i,this.viewNavigationStack.push(t)},goToPreviousView:function(){var t=this.currentView,i=this.viewNavigationStack.pop();t.transitionOut(!0),i.transitionIn(!0),this.currentView=i,e(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});t.MainMenu=l;var n={init:function(){t.addHook("saveTemplate",this.saveTemplate.bind(this)),t.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),t.addHook("duplicateLayout",this.duplicateLayout.bind(this)),t.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),t.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),t.addHook("toggleUISkin",this.toggleUISkin.bind(this)),t.addHook("clearLayoutCache",this.clearLayoutCache.bind(this))},saveTemplate:function(){t._saveUserTemplateClicked(),l.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),l.hide()},duplicateLayout:function(){t._duplicateLayoutClicked(),l.hide()},showGlobalSettings:function(){t._globalSettingsClicked(),l.hide()},showLayoutSettings:function(){t._layoutSettingsClicked(),l.hide()},clearLayoutCache:function(){t.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),t.showAjaxLoader(),l.hide()},toggleUISkin:function(i){e('a[data-event="toggleUISkin"]');if(e("body").hasClass("fl-builder-ui-skin--light"))var l="light",n="dark";if(e("body").hasClass("fl-builder-ui-skin--dark"))var l="dark",n="light";e("body").removeClass("fl-builder-ui-skin--"+l).addClass("fl-builder-ui-skin--"+n),t.ajax({action:"save_ui_skin",skin_name:n})}},s={init:function(){t.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),l.hide()}}}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(i){this.categorySelector=a.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),e(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));i.views;if(this.initViews(i.views),0===Object.keys(this.views).length){var l={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"};this.addView(l)}if(!this.activeView){var n=Object.keys(this.views)[0],l=this.views[n];this.activeView=l}this.defaultView=this.activeView,e(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),e(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),t.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){var i=e[t];this.categorySelector.addItem(i),"separator"!==i.type&&this.addView(i)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=n;break;case"rows":t=s;break;case"templates":t=o;break;case"saved":t=r;break;default:t=l}_.isNull(this.viewController)||_.isUndefined(this.viewController)||(t=window[this.viewController]);var i=t.create(e),a=i.handle;i.init(),this.views[a]=i,i.isShowing&&(this.activeView=i)},renderView:function(e){if(this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),_.isObject(e))var i=e;else var i=this.views[e];if(_.isObject(i)&&_.isFunction(i.render)){var l=i.render();this.$el.find(".fl-nanoscroller-content").html(l),this.activeView=i,t._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0)}},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){e(this.activeView).trigger("onBeforeShow"),this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e=this.panel.$groupSelect,t=this.panel.$el.find(".fl-builder-panel-search");if(this.isSearchEnabled?t.show():t.hide(),Object.keys(this.views).length>1&&!_.isUndefined(this.categorySelector)){var i=this.categorySelector.render();this.panel.$el.find(".fl-builder-content-group-select");e.html(i),e.show(),this.panel.$el.removeClass("single-view")}else e.hide(),t.hide(),this.panel.$el.addClass("single-view")},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=t.Search.byQuery(this.query)),e},render:function(){e(this).trigger("beforeRender");var t=this;t=this.filterTemplateData(t);var i=e(this.template(t));return this.$el=i,e(this).trigger("afterRender"),i},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),n=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),s=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),o=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=e(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(t){var i=e(t.currentTarget),l=i.val(),n=i.siblings("button");""!==l?n.show():n.hide()},onSaveButtonClick:function(i){var l=e(i.currentTarget),n=l.siblings('input[name="template-name"]').val(),s=l.siblings('input[name="template-category"]').val(),o={name:n,category:s};""!==n&&t.ajax({action:"save_user_template",settings:o},t._saveUserTemplateSettingsComplete)},onTemplateClick:function(i){var l=e(i.currentTarget),n=l.data("id"),s=l.data("type");t._requestTemplateInsert(n,s)}}),r=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=t.Search.byQuery({kind:"template",type:"user",content:["module","column","row"]}),e}}),a=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var t=e(this.template(this));return this.$el=t,e(this).trigger("afterRender"),t},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t;t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle,this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(t){var i=e(t.target),l=i.data("view");if(i.hasClass("fl-has-children")){var n=e('[data-parent="'+l+'"]');n.is(":visible")?(this.items[l].hasChildrenOpen=!1,i.removeClass("fl-has-children-showing"),n.hide()):(this.items[l].hasChildrenOpen=!0,i.addClass("fl-has-children-showing"),n.show()),i.blur()}else e(this).trigger("categorySelected",l)}});t.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e=FLBuilderConfig.panelData.tabs;for(var l in e){var n=e[l];if(o=i.create(n),o.panel=this,o.views={},o.init(n),this.tabs[l]=o,o.isShowing&&(this.activeTab=o),!this.activeTab){var s=Object.keys(this.tabs)[0],o=this.tabs[s];o.isShowing=!0,this.activeTab=o}}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),t.triggerHook("contentPanelDidInit")}},render:function(){e("body").prepend(this.template(this)),this.$el=e(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),e(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),t.addHook("showContentPanel",this.show.bind(this)),t.addHook("showModules",this.show.bind(this,"modules")),t.addHook("showRows",this.show.bind(this,"rows")),t.addHook("showTemplates",this.show.bind(this,"templates")),t.addHook("showSaved",this.show.bind(this,"saved")),t.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);t.addHook("hideContentPanel",e),t.addHook("didShowLightbox",e),t.addHook("didShowPublishActions",e),t.addHook("didBeginSearch",e),t.addHook("didInitDrag",e),t.addHook("didOpenMainMenu",e),t.addHook("didApplyTemplate",e);var i=this.toggleShowHide.bind(this);t.addHook("toggleContentPanel",i),t.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var t,i,l=this.$el,n=null,s=this.$el.find(".fl-builder--panel-arrow"),o=e(".fl-builder-content-panel-button"),r=this.$el.css("animation-duration");if(0!=o.length){this.$el.css("animation-duration","0s"),this.show(),n=l[0].getBoundingClientRect(),t=s[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",r);var a=o[0].getBoundingClientRect(),d=a.x+a.width/2;i=d<n.x?20:d-n.x-t.width/2,s.css({right:"auto",left:i+"px"})}},show:function(i){"module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi||(t.triggerHook("willShowContentPanel"),"undefined"!=typeof i&&this.showTab(i),this.isShowing||t._triggerSettingsSave(!1,!0)&&(e("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,e(this).trigger("onShow"),t.triggerHook("didShowContentPanel")))},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(e("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,e(this).trigger("onHide"),t.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(t){var i=this.tabs[t];_.isObject(i)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),i.show(),this.$tabs.filter('[data-tab="'+i.handle+'"]').addClass("is-showing"),this.activeTab=i,e(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(t){e(t.currentTarget).blur()},onTabItemClick:function(t){var i=e(t.target),l=i.data("tab");this.showTab(l)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),e(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),e(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),e(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var i=this.$searchInput.val();if(""!==i){var l=t.Search.byTerm(i);""!=l.term?this.showSearchResults(l):this.hideSearchResults()}else this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(i){if(i.total>0){var l=e(this.renderSearchResults(i));this.$searchPanel.html(l),t._initSortables()}else{var l=e(this.renderNoResults(i));this.$searchPanel.html(l)}e("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){e("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(e){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(t,i){var l=FLBuilderSettingsConfig.forms,n=FLBuilderSettingsConfig.modules,s={type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],activeTab:null,buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null,messages:null};if(t.nodeId&&!t.settings)return void this.loadNodeSettings(t,i);if(t=e.extend(s,t),i=void 0===i?function(){}:i,t.id){if("general"===t.type&&void 0!==l[t.id])t=e.extend(!0,t,l[t.id]);else{if("module"!==t.type||void 0===n[t.id])return;t=e.extend(!0,t,n[t.id])}this.config=t,this.renderLightbox(t)&&(t.legacy||!this.renderLegacySettings(t,i)?this.renderComplete(t,i):this.showLightboxLoader())}},loadNodeSettings:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"get_node_settings",node_id:e.nodeId},function(i){e.settings=FLBuilder._jsonParse(i),FLBuilderSettingsConfig.nodes[e.nodeId]=e.settings,FLBuilderSettingsForms.render(e,t),FLBuilder.hideAjaxLoader()})},renderLightbox:function(t){var i=wp.template("fl-builder-settings"),l=FLBuilder._lightbox._node.find("form.fl-builder-settings"),n=(e(".fl-lightbox-wrap[data-parent]"),localStorage.getItem("fl-builder-settings-tab"));if(t.nodeId&&t.nodeId===l.data("node")&&!t.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(t.hide)return!0;if(n)for(var s in t.tabs)s===n.replace("fl-builder-settings-tab-","")&&(t.activeTab=s);if(t.activeTab||(t.activeTab=Object.keys(t.tabs).shift()),t.lightbox)t.lightbox.setContent(i(t));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(i(t))}return!0},renderComplete:function(t,i){var l=e(".fl-builder-settings:visible");setTimeout(function(){t.legacy&&this.renderLegacySettingsComplete(t.legacy),i(),FLBuilder._initSettingsForms(),t.rules&&FLBuilder._initSettingsValidation(t.rules,t.messages),t.preview&&(FLBuilder.preview=new FLBuilderPreview(t.preview)),t.helper&&t.helper.init(),l.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,l))}.bind(this),1)},renderFields:function(t,i){var l=wp.template("fl-builder-settings-row"),n="",s=null,o=null,r=null,a=!1,d=null,u=["align","border","dimension","unit","photo","select","typography"],i=i?i:this.config.settings,c=FLBuilderConfig.global;for(o in t)s=t[o],a=!!s.multiple,supportsResponsive=e.inArray(s.type,u)>-1,r=_.isUndefined(i[o])?"":i[o],s.type&&(_.isUndefined(i[o])&&s["default"]&&(r=s["default"]),d=s.responsive&&c.responsive_enabled&&!a&&supportsResponsive?s.responsive:null,n+=l({field:s,name:o,rootName:o,value:r,preview:JSON.stringify(s.preview?s.preview:{type:"refresh"}),responsive:d,rowClass:s.row_class?" "+s.row_class:"",isMultiple:a,supportsMultiple:"editor"!==s.type&&"service"!==s.type,settings:i,globalSettings:c,template:e("#tmpl-fl-builder-field-"+s.type)}));return n},renderField:function(e){var t=wp.template("fl-builder-field");return t(e)},renderSectionTemplate:function(e,t){var i=wp.template(e.template.id);return i({section:e,settings:t})},renderTabTemplate:function(e,t){var i=wp.template(e.template.id);return i({tab:e,settings:t})},renderLegacySettings:function(t,i){var l=e(".fl-builder-settings:visible"),n=null,s=!1,o={tabs:[],sections:[],fields:[],settings:null,node_id:null};return l.find(".fl-legacy-field").each(function(){n=e(this),o.fields.push(n.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(n),s=!0}),l.find(".fl-legacy-settings-section").each(function(){
|
10 |
-
n=e(this),o.sections.push({tab:n.attr("data-tab"),section:n.attr("data-section")}),s=!0}),l.find(".fl-legacy-settings-tab").each(function(){n=e(this),o.tabs.push(n.attr("data-tab")),s=!0}),l.attr("data-node")?o.node_id=l.attr("data-node"):o.settings=FLBuilder._getOriginalSettings(l,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(e.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:o,form:l.attr("data-form-id"),group:l.attr("data-form-group"),lightbox:l.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),s&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),s},renderLegacySettingsComplete:function(t){var i="object"==typeof t?t:FLBuilder._jsonParse(t),l=null,n=null,s="",o=null,r=null,a=null;if(i.lightbox?(l=e(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]"),n=l.length?l.find(".fl-builder-settings"):null):(n=e(".fl-builder-settings:visible"),l=n.closest(".fl-builder-lightbox")),n&&n.length){for(s in i.fields)o=e("#fl-field-"+s).attr("id",""),o.after(i.fields[s]).remove();for(s in i.extras)o=e("#fl-field-"+s).find(".fl-field-control-wrapper"),i.extras[s].multiple?o.each(function(t,l){t in i.extras[s].before&&""!=i.extras[s].before[t]&&e(this).prepend('<div class="fl-form-field-before">'+i.extras[s].before[t]+"</div>"),t in i.extras[s].after&&""!=i.extras[s].after[t]&&e(this).append('<div class="fl-form-field-after">'+i.extras[s].after[t]+"</div>")}):(""!=i.extras[s].before&&o.prepend('<div class="fl-form-field-before">'+i.extras[s].before+"</div>"),""!=i.extras[s].after&&o.append('<div class="fl-form-field-after">'+i.extras[s].after+"</div>"));for(a in i.sections)for(s in i.sections[a])r=e("#fl-builder-settings-section-"+s),r.html(i.sections[a][s]);for(s in i.tabs)a=e("#fl-builder-settings-tab-"+s),a.html(i.tabs[s]);l.data("parent")||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,n),FLBuilder.preview&&(this.settings=e.extend(this.settings,FLBuilder.preview._savedSettings),FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var t=e(".fl-builder-settings:visible"),i=t.closest(".fl-builder-lightbox"),l=i.attr("data-parent"),n=null,s=null,o={};return l&&(l=e(".fl-builder-lightbox[data-instance-id="+l+"]"),t=l.find("form.fl-builder-settings"),n=FLBuilder._getSettings(t),s=t.attr("data-node"),s&&(o.node_id=s,o.node_settings=n)),o},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),i=!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(t);return i},closeOnDeleteNode:function(t){var i=e(".fl-builder-settings[data-node]"),l=FLBuilder._contentClass+" .fl-node-"+i.data("node");i.length&&!e(l).length&&FLLightbox.closeAll()},showLightboxLoader:function(){e(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(t){e(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){var t=e.closest(".fl-field-control").find(".fl-field-control-wrapper");t.hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field"),i=e.closest(".fl-field-control").find(".fl-field-control-wrapper");i.show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,e.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.reload),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyColTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreHistoryComplete",this.updateOnHistoryRestored.bind(this))},reload:function(){var t=FLBuilderConfig.editUrl+"&fl_builder_load_settings_config=core";e('script[src*="fl_builder_load_settings_config=core"]').remove(),e("head").append('<script src="'+t+'"></script>')},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t,FLBuilderConfig.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];e.namespace.indexOf("didAdd")>-1?this.addNode("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didSaveNodeSettings")>-1?this.updateNode(arguments[1].nodeId,arguments[1].settings):e.namespace.indexOf("didDelete")>-1?this.deleteNodes("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didDuplicate")>-1&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(t,i){var l=this;i.cols.each(function(){var t=e(this),i=t.attr("data-node");l.nodes[i]&&(l.nodes[i].size=parseFloat(t[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},updateOnHistoryRestored:function(e,t){this.nodes=t.config.nodes,this.attachments=t.config.attachments,this.settings.layout=t.settings.layout,this.settings.global=t.settings.global,FLBuilderConfig.global=t.settings.global},addNode:function(t,i){var l=e(".fl-node-"+t),n=l.hasClass("fl-row"),s=l.hasClass("fl-col"),o=l.hasClass("fl-col-group"),r=l.hasClass("fl-module"),a=this;this.nodes[t]||(i||(n?i=e.extend({},this.defaults.row):s?i=e.extend({},this.defaults.column):r&&(i=e.extend({},this.defaults.modules[l.attr("data-type")])),n||o?l.find(".fl-col").each(function(){var t=e(this),i=e.extend({},a.defaults.column);i.size=parseFloat(t[0].style.width),a.addNode(t.attr("data-node"),i)}):r&&(a.addNode(l.closest(".fl-row").attr("data-node")),a.addNode(l.closest(".fl-col").attr("data-node")),a.updateOnResetColumnWidths(null,{cols:l.closest(".fl-col-group").find("> .fl-col")}))),i&&(this.nodes[t]=i))},updateNode:function(t,i){var l=e(".fl-node-"+t),n=this;l.hasClass("fl-col")&&l.closest(".fl-col-group").find("> .fl-col").each(function(){var t=e(this),l=t.attr("data-node");n.nodes[l].size=parseFloat(t[0].style.width),n.nodes[l].equal_height=i.equal_height,n.nodes[l].content_alignment=i.content_alignment,n.nodes[l].responsive_order=i.responsive_order}),this.nodes[t]=i},duplicateNode:function(t,i){var l=e(".fl-node-"+i),n=l.find("[data-node]"),s=e(".fl-node-"+t),o=s.find("[data-node]"),r=this;this.nodes[i]=this.nodes[t],n.each(function(l){t=o.eq(l).attr("data-node"),i=e(this).attr("data-node"),r.nodes[t]&&(r.nodes[i]=r.nodes[t])})},deleteNodes:function(){var t="",i=e(FLBuilder._contentClass).html();for(t in this.nodes)i.indexOf(t)===-1&&(this.nodes[t]=null,delete this.nodes[t])}}),e(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(e){FLBuilderSettingsCopyPaste={init:function(){FLBuilder.addHook("settings-form-init",this.initExportButton),FLBuilder.addHook("settings-form-init",this.initImportButton)},initExportButton:function(){new ClipboardJS("button.module-export-all",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),s=FLBuilder._getSettings(l),o=new Date,r=o.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-all"),u=d.attr("title");return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(s)}}),new ClipboardJS("button.module-export-style",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),s=FLBuilder._getSettings(l),o=new Date,r=o.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-style"),u=d.attr("title"),c={};for(var f in s){var h=l.find('[name="'+f+'"]'),g=l.find('[name*="'+f+'["]'),p=!1;h.length?p=h.closest(".fl-field").data("is-style"):g.length&&(p=g.closest(".fl-field").data("is-style")),p&&(c[f]=s[f])}return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(c)}})},initImportButton:function(){e("button.module-import-apply").click(function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=e(".module-import-input").val(),l=i.match(/\/\/\/\s\{type:([a-z0-9-]+)/),n=!1,s=e(".fl-builder-module-settings").data("type"),o=e(".fl-builder-settings-lightbox .module-import-error");if(o.hide(),l&&"undefined"!=typeof l[1]&&(n=l[1]),!n||n!==s)return o.html(FLBuilderStrings.module_import.type).show(),!1;var r=i.replace(/\/\/\/.+\/\/\//,"");try{var a=JSON.parse(r)}catch(d){var a=!1;return o.html(FLBuilderStrings.module_import.error).show(),!1}if(a){var u=t.attr("data-node"),c=e.extend({},FLBuilderSettingsConfig.nodes[u],a);FLBuilderSettingsConfig.nodes[u]=c,FLBuilder.ajax({action:"save_settings",node_id:u,settings:c},FLBuilder._saveSettingsComplete.bind(this,!0,null)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:u,settings:c}),FLBuilder._lightbox.close()}})}},e(function(){FLBuilderSettingsCopyPaste.init()})}(jQuery),function(e){var t={minWidth:320,maxWidth:600,minHeight:400,init:function(){this.initPanel(),this.pinOrUnpin(),this.bind()},bind:function(){var t=e(window),i=e("body");t.on("resize",_.throttle(this.windowResize.bind(this),250)),i.delegate(".fl-builder-ui-pinned-collapse","click",this.collapse),i.delegate(".fl-builder--content-library-panel .fl-builder--tabs","click",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return e(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didPinContentPanel")},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didUnpinContentPanel")},pinOrUnpin:function(){var t=e(".fl-builder--content-library-panel"),i=this.isPinned();t.hasClass("fl-builder-ui-pinned-hidden")||(window.innerWidth<=this.maxWidth?(i&&this.unpin(!1),this.disableDragAndResize()):(i||this.restorePosition(),this.enableDragAndResize()))},show:function(){var t=e(".fl-builder--content-library-panel");t.hasClass("fl-builder-ui-pinned-hidden")&&(t.removeClass("fl-builder-ui-pinned-hidden"),t.show(),this.restorePosition())},hide:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),i.addClass("fl-builder-ui-pinned-hidden"),i.hide(),t.css("margin",""),FLBuilder._resizeLayout())},collapse:function(){var t=e(this).find("i:visible"),i=e("body"),l=t.data("toggle"),n=t.data("position"),s=e(".fl-builder--content-library-panel"),o=s.outerWidth();"hide"===l?(s.css(n,"-"+o+"px"),i.css("margin-"+n,""),i.addClass("fl-builder-ui-pinned-is-collapsed")):(s.css(n,"0px"),i.css("margin-"+n,o+"px"),i.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&e(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return e("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var t=e(".fl-builder--content-library-panel");t.draggable({cursor:"move",handle:".fl-builder--tabs",cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:this.minHeight,minWidth:this.minWidth,maxWidth:this.maxWidth,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),t.addClass("fl-builder-ui-pinned-container"),t.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(t){var i=e(".fl-builder--content-library-panel"),l=i.outerWidth(),n=e("body"),s=e(".fl-responsive-preview, .fl-responsive-preview-mask"),o=e(FLBuilder._contentClass).parentsUntil("body").last();n.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+t),n.addClass("fl-builder-content-panel-is-showing"),n.css("margin-"+t,l+"px"),s.css("margin-"+t,l+"px"),o.addClass("fl-builder-ui-pinned-content-transform"),i.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+t),i.find(".ui-resizable-"+("left"===t?"e":"w")).show(),i.on("resize",_.throttle(this.resize.bind(this),250)),i.attr("style",""),FLBuilder.ContentPanel.isShowing=!0},unpinPanel:function(){var t=e(".fl-builder--content-library-panel"),i=t.find(".fl-builder--panel-content .is-showing").data("tab"),l=e("body"),n=e(".fl-responsive-preview, .fl-responsive-preview-mask"),s=e(FLBuilder._contentClass).parentsUntil("body").last();l.css("margin-left",""),l.css("margin-right",""),l.removeClass("fl-builder-ui-is-pinned"),l.removeClass("fl-builder-ui-is-pinned-left"),l.removeClass("fl-builder-ui-is-pinned-right"),n.css("margin-left",""),n.css("margin-right",""),s.removeClass("fl-lightbox-content-transform"),t.removeClass("fl-builder-ui-pinned"),t.removeClass("fl-builder-ui-pinned-left"),t.removeClass("fl-builder-ui-pinned-right"),t.find(".ui-resizable-handle").hide(),t.off("resize"),t.attr("style",""),t.find(".fl-builder--tabs [data-tab="+i+"]").addClass("is-showing")},pinLightboxes:function(){var t=this;e(".fl-lightbox-resizable").each(function(){t.pinLightbox(e(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(t){var i=e(".fl-builder--content-library-panel"),l=t.closest(".fl-lightbox-wrap");l.closest(".fl-builder-ui-pinned").length||(i.append(l),t.attr("style",""),t.draggable("disable"),t.resizable("disable")),t.is(":visible")&&i.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){var i=t._node.find(".fl-lightbox-resizable");i.length&&(i.hasClass("fl-builder-ui-pinning-initialized")||(i.draggable("option","start",this.dragStart.bind(this)),i.draggable("option","drag",this.drag.bind(this)),i.draggable("option","stop",this.dragStop.bind(this)),i.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(i),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var t=e(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=t.find(".fl-builder--panel-content .is-showing").data("tab"),t.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),e(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");i.find(".fl-lightbox-wrap").each(function(){var l=e(this),n=l.find(".fl-lightbox"),s=0,o=0,r=0;n.draggable("enable"),n.resizable("enable"),n.find(".ui-resizable-handle").show(),t.append(l),n.is(":visible")?(s=parseInt(i.css("top"))-parseInt(l.css("top"))-parseInt(l.css("padding-top")),o=parseInt(i.css("left"))-parseInt(l.css("padding-left")),r=parseInt(i.css("right"))-parseInt(l.css("padding-right")),n.css("top",(s<0?0:s)+"px"),n.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?r:o)+"px"),n.addClass("fl-lightbox-prevent-animation"),t.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):n.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var t=e("body"),i=e(".fl-responsive-preview, .fl-responsive-preview-mask"),l=e(".fl-builder--content-library-panel"),n=l.outerWidth();l.is(":visible")?l.hasClass("fl-builder-ui-pinned-left")?(t.css("margin-left",n+"px"),i.css("margin-left",n+"px")):l.hasClass("fl-builder-ui-pinned-right")&&(t.css("margin-right",n+"px"),i.css("margin-right",n+"px")):t.css("margin","")},resizeStop:function(){e("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(t,i){var l=e("body"),n=(e(t.target),e(".fl-builder-bar-actions"));e(".fl-lightbox-resizable:visible").length||n.addClass("fl-builder-content-panel-pin-zone"),l.addClass("fl-builder-draggable-is-dragging"),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(t,i){var l=e("body"),n=e(".fl-responsive-preview"),s=e(window),o=n.length?n.width():s.width(),r=s.scrollTop(),a=e(".fl-builder--content-library-panel"),d=a.offset().top,u=e(".fl-builder-bar-actions"),c=e(t.target);c.hasClass("fl-builder--content-library-panel")&&(t.clientX<o-75&&d-r<46?u.addClass("fl-builder-content-panel-pin-zone-hover"):u.removeClass("fl-builder-content-panel-pin-zone-hover")),c.hasClass("fl-builder-ui-pinned")?this.unpinPanel():t.clientX<75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):t.clientX>o-75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(t,i){var l=(e(window),e("body")),n=e(".fl-builder-bar-actions"),s=e(".fl-builder-ui-pin-zone"),o=e(".fl-builder--content-library-panel"),r=e(".fl-lightbox-resizable:visible");e(t.target);l.removeClass("fl-builder-draggable-is-dragging"),n.removeClass("fl-builder-content-panel-pin-zone"),n.removeClass("fl-builder-content-panel-pin-zone-hover"),s.remove(),r.length&&parseInt(r.css("top"))<0&&r.css("top","0"),l.hasClass("fl-builder-ui-show-pin-zone")?(l.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right")):o.find(".fl-lightbox").length?(this.unpin(!0),("module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi)&&o.hide()):(o.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable");t.draggable("disable"),t.resizable("disable"),i.draggable("disable"),i.resizable("disable")},enableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");t.draggable("enable"),t.resizable("enable"),this.isPinned()||(i.draggable("enable"),i.resizable("enable"))},savePosition:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:visible"),l={pinned:{width:t.outerWidth(),position:null}};t.hasClass("fl-builder-ui-pinned-left")?l.pinned.position="left":t.hasClass("fl-builder-ui-pinned-right")?l.pinned.position="right":i.length&&(l.lightbox={width:i.width(),height:i.height(),top:parseInt(i.css("top"))<0?"0px":i.css("top"),left:i.css("left")}),FLBuilderConfig.userSettings.pinned=l.pinned,l.lightbox&&(FLBuilderConfig.userSettings.lightbox=l.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:l})},restorePosition:function(){var t=e(".fl-builder--content-library-panel"),i=FLBuilderConfig.userSettings.pinned;i&&i.position&&(t.css("width",i.width+"px"),this.pin(i.position,!1),t.css("width",i.width+"px"))}};e(function(){t.init()})}(jQuery),function(e){var t={init:function(){this.setupMainMenuData(),e(".fl-builder--revision-actions select").on("change",this.selectChanged),e(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),e(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var t=FLBuilderConfig.revisions.posts,i=FLBuilderConfig.revisions.authors,l=wp.template("fl-revision-list-item"),n=e(".fl-builder--revision-actions select"),s="",o="",r=0;if(FLBuilderConfig.mainMenu.revisions.items=[],n.html(""),0===t.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()});else for(;r<t.length;r++)s=FLBuilderStrings.revisionDate.replace("%s",t[r].date.diff),s+=" ("+t[r].date.published+")",o=FLBuilderStrings.revisionAuthor.replace("%s",i[t[r].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:l({id:t[r].id,date:s,author:o,avatar:i[t[r].author].avatar})}),n.append('<option value="'+t[r].id+'">'+s+"</option>");FLBuilder.MainMenu.renderPanel("revisions")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=FLBuilder._jsonParse(e),this.setupMainMenuData()},itemClicked:function(t,i){var l=e(i).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(e(".fl-builder--revision-actions select").val(l),this.preview(l))},selectChanged:function(i){t.preview(e(this).val())},applyClicked:function(i){var l=e(".fl-builder--revision-actions select").val();t.restore(l)},preview:function(t){e(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:t},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(i){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:i},t.restoreComplete)},restoreComplete:function(e){var t=FLBuilder._jsonParse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",t.config),settings=t.settings,"undefined"!=typeof settings.css&&null!==settings.css&&(FLBuilderSettingsConfig.settings.layout.css=settings.css),"undefined"!=typeof settings.js&&null!==settings.js&&(FLBuilderSettingsConfig.settings.layout.js=settings.js)}};e(function(){t.init()})}(jQuery),function(e){var t={query:function(e){var t={},i=null,l={library:{}},n=null;if(e=this.normalizeQuery(e),_.isNull(e.kind))t=FLBuilderConfig.contentItems;else for(var s in e.kind)i=e.kind[s],t[i]=FLBuilderConfig.contentItems[i];return n=this.findMatches(e,t),l.library=this.formatResults(n,e),l},normalizeQuery:function(e){var t={kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1};return e=_.extend(t,e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i={},l=null,n=null,s=null,o=null,r=null,a=null;for(l in t){n=t[l],i[l]={items:[]};for(a in n)if(s=n[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(s.category,e.category)){switch(l){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(o=_.includes(e.content,s.content),r=e.content===s.content,o||r)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==s.type)continue;if(!_.isNull(e.group)){var d=e.group,u=s.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var f=d[a];_.includes(u,f)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(e.group===!1&&s.group.length>0)continue;if(e.group!==!1&&!_.includes(s.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(s,e.searchTerm))&&i[l].items.push(s)}}return i},matchesCategory:function(e,t){var i,l,n,s,o,r;if(e===t)return!0;_.isString(t)&&(t=[t]);for(l in t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(n in e)if(s=e[n],s===i)return!0;if(_.isObject(e))for(o in e)if(r=e[o],r===i||o===i)return!0}return!1},matchesSearchTerm:function(e,t){var i,l,n=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(n))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(n))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(n))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(n))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||(i="widget",!i.includes(n)))||!(_.isUndefined(e.editor_export)||(l="module",!l.includes(n))))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,t){var i,l,n={};return _.forEach(e,function(e,s,o){i=e[t],_.isNull(i)||_.isUndefined(i)||_.isString(i)&&""===e[i]||(_.isString(i)&&(n[i]=n[i]||[],n[i].push(e)),_.isArray(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})),_.isObject(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})))}),n},search:function(e){var t={searchTerm:e},i=this.query(t),l={total:0,term:e,sections:{}};if(!_.isUndefined(i.library.module.items)){var n={};for(var s in i.library.module.items){var o=i.library.module.items[s],r=o.group[0],a=o.category;o.name;_.isUndefined(n[r])&&(n[r]={}),_.isUndefined(n[r][a])&&(n[r][a]=[]),n[r][a].push(o)}l.grouped=n}for(var s in i.library){var d=i.library[s];!_.isUndefined(d.items)&&d.items.length>0&&(l.sections[s]={name:FLBuilderStrings.typeLabels[s],handle:s,type:"",items:d.items},l.total+=d.items.length)}return l}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){var i=t.search(e);return i}}}(jQuery),function(e,t){var i={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=e(".fl-builder--saving-indicator"),t.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),t.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),t.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),t.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),t.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabledd||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,e("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&("save_pinned_ui_position"!=e&&("fl_builder_notifications"!=e&&!(e.indexOf("history")>-1)))))))},onLayoutSaved:function(e,t){if(this.isUpdatingLayout(t.fl_builder_data.action)){this.showStatusMessage(this.messages.saved,this.messages.savedTooltip);var i=this;setTimeout(function(){i.resetStatusMessage()},2e3)}},onLayoutPublished:function(){this.layoutNeedsPublish=!1,e("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(i,l){this.$savingIndicator.html(i),t.isUndefined(l)||(this.$savingIndicator.attr("title",l),e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fas fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){if(t.MainMenu.hide(),this.layoutNeedsPublish)t._publishLayout(!1);else{this.showStatusMessage(this.messages.noChanges);var e=this;setTimeout(function(){e.resetStatusMessage()},2e3)}}};t.SaveManager={layoutNeedsPublish:function(){return i.layoutNeedsPublish},showStatusMessage:function(e,t){i.showStatusMessage(e,t)},resetStatusMessage:function(){i.resetStatusMessage()}},e(function(){i.init()})}(jQuery,FLBuilder),function(e){FLBuilderHistoryManager={states:[],position:0,rendering:!1,init:function(){var t=FLBuilderConfig.history,i=this;this.states=t.states,this.position=parseInt(t.position),this.setupMainMenuData(),e.each(t.hooks,function(e,t){FLBuilder.addHook(e,function(e,l){i.saveCurrentState(t,l)})}),FLBuilder.addHook("didPublishLayout",this.clearStatesOnPublish.bind(this)),FLBuilder.addHook("restartEditingSession",this.saveCurrentStateOnRestartSession.bind(this)),FLBuilder.addHook("historyItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("undo",this.onUndo.bind(this)),FLBuilder.addHook("redo",this.onRedo.bind(this))},saveCurrentState:function(e,t){var i=this,t="undefined"==typeof t?{}:t,l=null;"undefined"!=typeof t.moduleType&&t.moduleType&&(l=t.moduleType),FLBuilder.ajax({
|
11 |
action:"save_history_state",label:e,module_type:l},function(e){var t=JSON.parse(e);i.states=t.states,i.position=parseInt(t.position),i.setupMainMenuData()})},saveCurrentStateOnRestartSession:function(e){this.states.length||this.saveCurrentState("draft_created")},clearStatesOnPublish:function(e,t){var i=this;this.states=[],this.position=0,this.setupMainMenuData(),FLBuilder.ajax({action:"clear_history_states",post_id:FLBuilderConfig.postId},function(){t.shouldExit||i.saveCurrentState("draft_created")})},renderState:function(t){var i=this;if(!this.rendering&&this.states.length&&!e(".fl-builder-settings:visible").length){var l=setTimeout(FLBuilder.showAjaxLoader,2e3);this.rendering=!0,FLBuilder.ajax({action:"render_history_state",position:t},function(e){var t=JSON.parse(e);t.error||(i.position=parseInt(t.position),FLBuilder.triggerHook("didRestoreHistoryComplete",t),FLBuilder._renderLayout(t.layout),i.setupMainMenuData()),clearTimeout(l),i.rendering=!1})}},onUndo:function(){this.renderState("prev")},onRedo:function(){this.renderState("next")},setupMainMenuData:function(){var e=FLBuilderConfig.history.labels,t="";FLBuilderConfig.mainMenu.history.items=[];for(var i=this.states.length-1;i>=0;i--)"string"==typeof this.states[i]?t=e[this.states[i]]?e[this.states[i]]:this.states[i]:(t=e[this.states[i].label]?e[this.states[i].label]:this.states[i].label,(this.states[i].moduleType||this.states[i].label.indexOf("module")>-1)&&(t=t.replace("%s",this.getModuleName(this.states[i].moduleType)))),FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:t,current:i===this.position?1:0,position:i})});FLBuilder.MainMenu.renderPanel("history")},getModuleName:function(e){var t=FLBuilderConfig.contentItems.module,i=0;if("widget"===e)return FLBuilderStrings.widget;for(;i<t.length;i++)if("undefined"!=typeof t[i].slug&&e===t[i].slug)return t[i].name;return FLBuilderStrings.module},itemClicked:function(t,i){var l=e(i).find(".fl-history-list-item"),n=l.attr("data-position"),s=e(".fl-history-list-item[data-current=1]");e(".fl-builder-settings:visible").length&&(FLBuilder._closeNestedSettings(),FLBuilder._lightbox.close()),s.attr("data-current",0),l.attr("data-current",1),this.renderState(n)}},e(function(){FLBuilderHistoryManager.init()})}(jQuery),function(exports){"use strict";exports.stringify=function(e){return JSON.stringify(e,function(e,t){var i;return t instanceof Function||"function"==typeof t?(i=t.toString(),i.length<8||"function"!==i.substring(0,8)?"_NuFrRa_"+i:i):t instanceof RegExp?"_PxEgEr_"+t:t})},exports.parse=function(str,date2obj){var iso8061=!!date2obj&&/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/;return JSON.parse(str,function(key,value){var prefix;return"string"!=typeof value?value:value.length<8?value:(prefix=value.substring(0,8),iso8061&&value.match(iso8061)?new Date(value):"function"===prefix?eval("("+value+")"):"_PxEgEr_"===prefix?eval(value.slice(8)):"_NuFrRa_"===prefix?eval(value.slice(8)):value)})},exports.clone=function(e,t){return exports.parse(exports.stringify(e),t)}}("undefined"==typeof exports?window.JSONfn={}:exports);
|
7 |
this.updateCSSRule(this.classes.node+" h5 a","color",""),this.updateCSSRule(this.classes.node+" h6 a","color","")):(this.updateCSSRule(this.classes.node+" h1","color",s),this.updateCSSRule(this.classes.node+" h2","color",s),this.updateCSSRule(this.classes.node+" h3","color",s),this.updateCSSRule(this.classes.node+" h4","color",s),this.updateCSSRule(this.classes.node+" h5","color",s),this.updateCSSRule(this.classes.node+" h6","color",s),this.updateCSSRule(this.classes.node+" h1 a","color",s),this.updateCSSRule(this.classes.node+" h2 a","color",s),this.updateCSSRule(this.classes.node+" h3 a","color",s),this.updateCSSRule(this.classes.node+" h4 a","color",s),this.updateCSSRule(this.classes.node+" h5 a","color",s),this.updateCSSRule(this.classes.node+" h6 a","color",s))},this))},_initNodeBg:function(){e.extend(this.elements,{bgType:e(this.classes.settings+" select[name=bg_type]"),bgColor:e(this.classes.settings+" input[name=bg_color]"),bgColorPicker:e(this.classes.settings+" .fl-picker-bg_color"),bgGradientType:e(this.classes.settings+" select.fl-gradient-picker-type-select"),bgVideoSource:e(this.classes.settings+" select[name=bg_video_source]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:e(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:e(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:e(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:e(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:e(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:e(this.classes.settings+" input[name=ss_speed]"),bgSlideshowTrans:e(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:e(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:e(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayType:e(this.classes.settings+" select[name=bg_overlay_type]"),bgOverlayColor:e(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayGradient:e(this.classes.settings+" #fl-field-bg_overlay_gradient select")}),this.elements.bgType.on("change",e.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",e.proxy(this._bgColorChange,this)),this.elements.bgVideoServiceUrl.on("change",e.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",e.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayType.on("change",e.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayColor.on("change",e.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val(),i=FLBuilderResponsiveEditing._mode;this.elements.node.removeClass("fl-row-bg-video"),this.elements.node.removeClass("fl-row-bg-slideshow"),this.elements.node.removeClass("fl-row-bg-parallax"),this.elements.node.find(".fl-bg-video").remove(),this.elements.node.find(".fl-bg-slideshow").remove(),this.elements.content.css("background-image",""),this.updateCSSRule(this.classes.content,"background-color","transparent"),this.updateCSSRule(this.classes.content,"background-image","none"),this.updateCSSRule(this.classes.content,"background-image","none","medium"),this.updateCSSRule(this.classes.content,"background-image","none","responsive"),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"gradient"==t?(this.elements.bgGradientType.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.settings.find('[data-device="'+i+'"] select[name*="bg_"]').trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(t){var i;""===this.elements.bgColor.val()?this.updateCSSRule(this.classes.content,"background-color","transparent"):(i=this.hexOrRgb(this.elements.bgColor.val()),this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",i)},this)))},_bgVideoChange:function(t){var i=this.elements,l=i.bgVideoSource.val(),n=i.bgVideo.val(),s=i.bgVideoServiceUrl.val(),o="https://www.youtube.com/iframe_api",r="https://player.vimeo.com/api/player.js",a=e("<script>");"video_service"==l&&""!=s?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(s)&&e('script[src*="youtube.com"').length<1?a.attr("src",o):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(s)&&e('script[src*="vimeo.com"').length<1&&a.attr("src",r),a.attr("type","text/javascript").appendTo("head"),this.delay(500,e.proxy(this.preview,this))):""!=n&&this.preview()},_bgSlideshowChange:function(t){var i=this.elements,l=i.bgSlideshowSource.val(),n=i.bgSlideshowPhotos.val(),s=i.bgSlideshowFeedUrl.val(),o=i.bgSlideshowSpeed.val(),r=i.bgSlideshowTransSpeed.val();"wordpress"==l&&""===n||"smugmug"==l&&""===s||isNaN(parseInt(o))||isNaN(parseInt(r))||this.delay(500,e.proxy(this.preview,this))},_bgParallaxChange:function(e){this.elements.bgParallaxImageSrc.val()&&this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgParallaxImageSrc.val()+")","background-repeat":"no-repeat","background-position":"center center","background-attachment":"fixed","background-size":"cover"})},_bgOverlayChange:function(t){var i,l=this.elements.bgOverlayType.val(),n=this.elements.bgOverlayColor.val();"color"===l?(""===n?(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent")):(i=this.hexOrRgb(this.elements.bgOverlayColor.val()),this.delay(100,e.proxy(function(){this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color",i)},this))),this.updateCSSRule(this.classes.content+"::after","background-image","none")):"gradient"===l?(this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.elements.bgOverlayGradient.trigger("change")):(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.updateCSSRule(this.classes.content+"::after","background-image","none"))},_bgOverlayAddClasses:function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay")},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click"),this.elements.bgOverlayType.val("color").trigger("change")},_initNodeClassName:function(){e.extend(this.elements,{className:e(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",e.proxy(this._classNameChange,this)),this._lastClassName=this.elements.className.val()},_classNameChange:function(e){var t=this.elements.className.val();null!==this._lastClassName&&this.elements.node.removeClass(this._lastClassName),this.elements.node.addClass(t),this._lastClassName=t},_initNodeDimensions:function(t){var i={},l=["Top","Bottom","Left","Right"],n=["","Medium","Responsive"],s=this.classes.settings,o="",r="",a=null,d=null;for(a=0;a<l.length;a++)for(d=0;d<n.length;d++)o=t+l[a]+n[d],r=t+"_"+l[a].toLowerCase(),""!=n[d]&&(r+="_"+n[d].toLowerCase()),i[o]=e(s+" input[name="+r+"]");e.extend(this.elements,i)},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),contentWidth:e(this.classes.settings+" select[name=content_width]"),maxContentWidth:e(this.classes.settings+" input[name=max_content_width]"),maxContentWidthUnit:e(this.classes.settings+" select[name=max_content_width_unit]"),height:e(this.classes.settings+" select[name=full_height]"),minHeight:e(this.classes.settings+" input[name=min_height]"),align:e(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("input",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.maxContentWidthUnit.on("change",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.align.on("change",e.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_rowWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.width.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width")),this._rowMaxContentWidthChange()},_rowContentWidthChange:function(e){var t=(FLBuilderConfig.global,this.elements.node),i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.contentWidth.val()?(i.removeClass("fl-row-fixed-width"),i.addClass("fl-row-full-width")):(i.removeClass("fl-row-full-width"),i.addClass("fl-row-fixed-width"),this._rowMaxContentWidthChange())},_rowMaxContentWidthChange:function(e){var t=FLBuilderConfig.global,i=this.elements.node,l=this.elements.content.find(".fl-row-content"),n=this.elements.maxContentWidth.val(),s=this.elements.maxContentWidthUnit.val();""==n?n=t.row_width+t.row_width_unit:n+=s,"fixed"===this.elements.width.val()&&i.css("max-width",n),l.css("max-width",n)},_rowHeightChange:function(e){var t=this.elements.node;this.elements.content;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),t.removeClass("fl-row-full-height"),t.removeClass("fl-row-custom-height"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.val("").trigger("input")):"custom"==this.elements.height.val()?(t.addClass("fl-row-custom-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.trigger("input")):this.elements.minHeight.val("").trigger("input")},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),sizeMedium:e(this.classes.settings+" input[name=size_medium]"),sizeResponsive:e(this.classes.settings+" input[name=size_responsive]"),columnHeight:e(this.classes.settings+" select[name=equal_height]"),columnAlign:e(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:e(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeMedium.on("input",e.proxy(this._colSizeChange,this)),this.elements.sizeResponsive.on("input",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",e.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",e.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_colSizeChange:function(t){var i=e(t.target),l=8,n=100-l,s=parseFloat(i.val()),o=this.elements.node.closest(".fl-col-group"),r=this.elements.node.prev(".fl-col"),a=this.elements.node.next(".fl-col"),d=0===a.length?r:a,u=this.elements.node.siblings(".fl-col"),c=0,f=FLBuilderResponsiveEditing._mode;0!==u.length&&(isNaN(s)&&("medium"===f?s=this.elements.size.val():"responsive"===f&&(s=this.elements.sizeMedium.val()?this.elements.sizeMedium.val():"auto"),"auto"!==s&&isNaN(s)&&(s=l)),"default"===f?(u.each(function(){e(this).data("node")!=d.data("node")&&(n-=parseFloat(e(this)[0].style.width),c+=parseFloat(e(this)[0].style.width))}),s<l&&(s=l),s>n&&(s=n),this.elements.node.css("width",s+"%"),d.css("width",100-c-s+"%")):(s>100&&(s=100,i.val(100)),this.updateCSSRule(this.classes.node,{"max-width":("auto"===s?100:s)+"% !important",width:("auto"===s?s:s+"%")+" !important"},void 0,!0),"responsive"===f&&(i.val()?(this.updateCSSRule(this.classes.node,"float",FLBuilderConfig.isRtl?"right":"left",!0),this.updateCSSRule(this.classes.node,"clear","none",!0)):(this.updateCSSRule(this.classes.node,"float","none",!0),this.updateCSSRule(this.classes.node,"clear","both",!0)),i.val()||this._colsHaveCustomResponsiveWidth(u)?o.addClass("fl-col-group-custom-width"):o.removeClass("fl-col-group-custom-width"))))},_colsHaveCustomResponsiveWidth:function(t){var i=FLBuilderSettingsConfig.nodes,l=!1;return t.each(function(){var t=e(this).data("node");i[t]&&i[t].size_responsive&&(l=!0)}),l},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initNodeDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var e=FLBuilder.isUndefined(e)?this.elements.settings.find(".fl-field"):e,t=null,i=null,l=null,n=0;n<e.length;n++)t=e.eq(n),i=t.data("type"),l=t.data("preview"),"refresh"==l.type&&this._initFieldRefreshPreview(t),"text"==l.type&&this._initFieldTextPreview(t),"css"==l.type&&this._initFieldCSSPreview(t),"widget"==l.type&&this._initFieldWidgetPreview(t),"font"==l.type&&this._initFieldFontPreview(t),"attribute"==l.type&&this._initFieldAttributePreview(t),"animation"==l.type&&this._initFieldAnimationPreview(l,t),"callback"==l.type&&this._initFieldCallbackPreview(l,t,i,e),this._initFieldUnitSelect(t)},_initFieldCallbackPreview:function(t,i,l,n){var s,o=t.callback,r=e(".fl-builder-settings:visible"),a=r.data("node"),d=e(".fl-builder-content .fl-node-"+a);if("undefined"!=typeof FLBuilderPreviewCallbacks[o]?s=FLBuilderPreviewCallbacks[o]:"undefined"!=typeof window[o]&&(s=window[o]),"function"==typeof s){var u={field:i,fields:n,type:l,preview:t,form:r,nodeID:a,node:d};switch(l){case"align":case"button-group":case"text":case"multiple-photos":case"video":case"icon":case"ordering":u.input=i.find("input"),u.getValue=function(){return u.input.val()};break;case"color":u.input=i.find("input.fl-color-picker-value"),u.getValues=function(){var e=u.input.val();({value:e,formattedValue:FLBuilderPreview.formatColor(e)})};break;case"textarea":case"code":u.textarea=i.find("textarea"),u.getValue=function(){return u.textarea.val()};break;case"select":case"photo-sizes":case"post-type":u.select=i.find("select"),u.getValue=function(){return u.select.val()};break;case"photo":u.input=i.find("input[type=hidden]"),u.sizeSelect=i.find("select"),u.getValues=function(){return{value:u.input.val(),size:u.sizeSelect.val()}};break;case"unit":u.input=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var e=u.input.val(),t=u.unitSelect.val(),i={value:e,unit:t,formattedValue:e+t};return i};break;case"dimension":u.inputs=i.find("input[type=number]"),u.unitSelect=i.find(".fl-field-unit-select"),u.getValues=function(){var t={inputs:[],props:{},unit:u.unitSelect.val()};return u.inputs.each(function(i,l){var l=e(l),n=l.val(),s=l.data("unit");t.inputs.push(n),t.props[s]=n}),t};break;case"animation":u.input=i.find("input"),u.select=i.find("select"),u.getValues=function(){return{delay:u.input.val(),style:u.select.val()}};break;case"link":u.input=i.find(".fl-link-field-input-wrap input"),u.targetInput=i.find("input[name$=_target]"),u.noFollowInput=i.find("input[name$=_nofollow]"),u.getValues=function(){return{url:u.input.val(),target:u.targetInput.val(),noFollow:u.noFollowInput.val()}};break;case"shadow":u.colorInput=i.find("input.fl-color-picker-value"),u.inputs=i.find("input[type=number]"),u.getValues=function(){({color:u.colorInput.val(),x:u.inputs[0].val(),y:u.inputs[1].val(),blur:u.inputs[2].val(),spread:u.inputs[3].val()})};break;case"gradient":u.inputs=i.find("input"),u.select=i.find("select"),u.gradientInputs={},u.gradientInputs.type=i.find('select[name$="[type]"]'),u.gradientInputs.angle=i.find('input[name$="[angle]"]'),u.gradientInputs.position=i.find('select[name$="[position]"]'),u.gradientInputs.stops=[],i.find(".fl-gradient-picker-colors .fl-gradient-picker-color-row").each(function(t,i){i=e(i),u.gradientInputs.stops.push({color:i.find(".fl-gradient-picker-color input"),stop:i.find(".fl-gradient-picker-stop input")})}),u.getValues=function(){var e={type:u.gradientInputs.type.val(),angle:u.gradientInputs.angle.val(),position:u.gradientInputs.position.val(),stops:[]};for(var t in u.gradientInputs.stops){var i=u.gradientInputs.stops[t];e.stops[t]={color:i.color.val(),stop:i.stop.val()}}return e};break;case"shape-transform":u.inputs=i.find("input"),u.getValues=function(){return{scaleXSign:u.inputs.eq(0).val(),scaleYSign:u.inputs.eq(1).val(),skewX:u.inputs.eq(2).val(),skewY:u.inputs.eq(3).val(),scaleX:u.inputs.eq(4).val(),rotate:u.inputs.eq(5).val(),scaleY:u.inputs.eq(6).val()}};break;default:u.input=i.find("input"),u.getValue=function(){return u.input.val()}}var c=i.find(".fl-field-responsive-toggle");u.responsiveToggle=!!c.length&&c,s=s.bind(this,u);var f={input:"change keyup input",inputs:"change keyup input",targetInput:"change keyup input",noFollowInput:"change keyup input",colorInput:"change input",textarea:"change keyup input",select:"change",sizeSelect:"change",unitSelect:"change"};for(var h in f)"undefined"!=typeof u[h]&&u[h].on(f[h],s)}},_initFieldRefreshPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this.delayPreview,this);switch(i){case"align":t.find("input").on("change",n);break;case"text":t.find("input[type=text]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"select":t.find("select").on("change",n);break;case"color":t.find(".fl-color-picker-value").on("change",n);break;case"photo":t.find("select").on("change",n);break;case"multiple-photos":t.find("input").on("change",n);break;case"photo-sizes":t.find("select").on("change",n);break;case"video":t.find("input").on("change",n);break;case"multiple-audios":t.find("input").on("change",n);break;case"icon":t.find("input").on("change",n);break;case"form":t.delegate("input","change",n);break;case"editor":this._addTextEditorCallback(t,l);break;case"code":t.find("textarea").on("change",n);break;case"post-type":t.find("select").on("change",n);break;case"suggest":t.find(".as-values").on("change",n),t.find("select").on("change",n);break;case"unit":case"dimension":t.find("input[type=number]").on("input",n);break;case"ordering":t.find("input[type=hidden]").on("change",n);break;default:t.on("change",n)}},_initFieldTextPreview:function(t){var i=t.data("type"),l=t.data("preview"),n=e.proxy(this._previewText,this,l);switch(i){case"text":t.find("input[type=text]").on("keyup",n);break;case"unit":t.find("input[type=number]").on("keyup",n);break;case"textarea":t.find("textarea").on("keyup",n);break;case"code":t.find("textarea").on("change",n);break;case"editor":this._addTextEditorCallback(t,l)}},_previewText:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),n=e(l),s=e("<div>"+e(i.target).val()+"</div>");n.length>0?(s.find("script").remove(),n.html(s.html())):this.delayPreview(i)},_previewTextEditor:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(n),o="undefined"!=typeof tinyMCE?tinyMCE.get(i):null,r=e("#"+i),a="";s.length>0&&(a=e(o&&"none"==r.css("display")?"<div>"+o.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+r.val()+"</div>":"<div>"+switchEditors.wpautop(r.val())+"</div>"),a.find("script").remove(),s.html(a.html()))},_addTextEditorCallback:function(t,i){var l=t.find("textarea.wp-editor-area").attr("id"),n=null;if("refresh"==i.type)n=e.proxy(this.delayPreview,this);else{if("text"!=i.type)return;n=e.proxy(this._previewTextEditor,this,i,l)}e("#"+l).on("keyup",n),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(l),editor.on("change",n),editor.on("keyup",n))},_initFieldFontPreview:function(t){var i=t.data("type"),l=t.data("preview");l.id=t.attr("id");var n=e.proxy(this._previewFont,this,l);"font"==i&&t.find(".fl-font-field").on("change","select",n)},_previewFont:function(t,i){var l=e(i.delegateTarget),n=l.find(".fl-font-field-font"),s=e(n).find(":selected"),o=s.parent().attr("label"),r=l.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector),u=t.important?" !important":"",c="";"Google"!=o&&"Recently Used"!=o||this._buildFontStylesheet(a,n.val(),r.val()),c=n.val();var f=new RegExp("[0-9]");f.test(n.val())&&(c='"'+n.val()+'"'),this.updateCSSRule(d,"font-family","Default"===n.val()?"":c+u),this.updateCSSRule(d,"font-weight","default"===r.val()?"":r.val()+u)},_buildFontStylesheet:function(t,i,l){var n=FLBuilderConfig.googleFontsUrl,s="",o={},r={};o[i]=[l],FLBuilderPreview._fontsList[t]=o,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var i=t[e];r[e]=r[e]||[],i=i.filter(function(t){return r[e].indexOf(t)<0}),r[e]=r[e].concat(i)})}),e.each(r,function(e,t){s+=e+":"+t.join()+"|"}),s=n+s.slice(0,-1).replace(" ","+"),e("#fl-builder-google-fonts-preview").length<1?e("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",s).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",s)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if("undefined"!=typeof t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,i){switch(t.data("type")){case"align":t.find("input").on("change",e.proxy(this._previewCSS,this,i,t));break;case"border":t.find("select").on("change",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewBorderCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewBorderCSS,this,i,t));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColorCSS,this,i,t));break;case"dimension":t.find("input[type=number]").on("input",e.proxy(this._previewDimensionCSS,this,i,t));break;case"gradient":t.find("select").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-angle").on("input",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewGradientCSS,this,i,t)),t.find(".fl-gradient-picker-stop").on("input",e.proxy(this._previewGradientCSS,this,i,t));break;case"photo":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,i,t));break;case"shadow":t.find("input").on("input",e.proxy(this._previewShadowCSS,this,i,t)),t.find(".fl-color-picker-value").on("change",e.proxy(this._previewShadowCSS,this,i,t));break;case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,i,t));break;case"typography":t.find("select").on("change",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=number]").on("input",e.proxy(this._previewTypographyCSS,this,i,t)),t.find("input[type=hidden]").on("change",e.proxy(this._previewTypographyCSS,this,i,t));break;case"unit":t.find("input[type=number]").on("input",e.proxy(this._previewCSS,this,i,t))}},_previewCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=t.property,o=this._getPreviewCSSUnit(t,i,l),r=e(l.target),a=r.val(),d=!!r.closest(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";s.indexOf("image")>-1&&a?a="url("+a+")":"%"===o&&"opacity"===s?a=parseInt(a)/100:""!==a&&(a+=o),this.updateCSSRule(n,s,a+u,d)},_previewBorderCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(l.target),i=s.closest(".fl-field"),o=s.closest(".fl-compound-field-setting"),r=o.data("property"),a=s.val(),d=(o.find(".fl-field-unit-select"),!!s.closest(".fl-field-responsive-setting").length),u=t.important&&""!==a?" !important":"";t.property=r,"border-color"===r?this._previewColorCSS(t,i,l):"border-width"===r||"border-radius"===r?this._previewDimensionCSS(t,i,l):"box-shadow"===r?this._previewShadowCSS(t,o,l):("border-style"===r&&i.find(".fl-border-field-width input:visible").trigger("input"),this.updateCSSRule(n,r,a+u,d))},_previewColorCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(l.target),o=s.val(),r=!!s.closest(".fl-field-responsive-setting").length,a=t.important&&""!==o?" !important":"";""!==o&&o.indexOf("rgb")<0&&(o="#"+o),this.updateCSSRule(n,t.property,o+a,r)},_previewDimensionCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=t.property,o=i.attr("id").replace("fl-field-",""),r=e(l.target).data("unit"),a=this._getDimensionValue(t,i,r,l),d=!!i.find(".fl-field-responsive-setting").length,u=t.important&&""!==a?" !important":"";s="border-radius"===s?"border-"+r.replace("_","-")+"-radius":"border-width"===s?"border-"+r+"-width":s+"-"+r,this.updateCSSRule(n,s,a+u,d),"margin"!==o&&"padding"!==o&&"border"!==o||this.elements.node.find(".fl-bg-slideshow").length&&FLBuilder._resizeLayout()},_getDimensionValue:function(t,i,l,n){var s=e(n.target).val(),o="";return s=s.toLowerCase().replace(/[^a-z0-9%.\-]/g,""),null===s||""===s||isNaN(s)||(o=this._getPreviewCSSUnit(t,i,n),s=parseFloat(s)+(o?o:"px")),s},_getPreviewCSSUnit:function(t,i,l){var n=e(l.target),s=(FLBuilderResponsiveEditing._mode,!!n.closest(".fl-compound-field-setting").length),o=!!n.closest(".fl-field-responsive-setting").length,r=null;return r=s?n.closest(".fl-compound-field-setting").find(".fl-field-unit-select"):o?n.closest(".fl-field-responsive-setting").find(".fl-field-unit-select"):i.find(".fl-field-unit-select"),r&&r.length?"SELECT"===r.prop("tagName")?r.val():r.text():t.unit?t.unit:""},_initFieldUnitSelect:function(t){t.find(".fl-field-unit-select").on("change",function(){var t=e(this),i=t.closest(".fl-field-responsive-setting"),l=t.closest(".fl-field");i.length?i.find("input").trigger("input"):l.find("input").trigger("input")})},_previewGradientCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=i.find(".fl-gradient-picker-type-select").val(),o=i.find(".fl-gradient-picker-angle").val(),r=i.find(".fl-gradient-picker-position").val(),a=i.find(".fl-color-picker-value"),d=i.find(".fl-gradient-picker-stop input"),u=[],c="",f="";a.each(function(t){var i=e(this).val(),l=d.eq(t).val();""===i&&(i="rgba(255,255,255,0)"),i.indexOf("rgb")<0&&(i="#"+i),isNaN(l)&&(l=0),u.push(i+" "+l+"%")}),u=u.join(", "),"linear"===s?(isNaN(o)&&(o=0),c="linear-gradient("+o+"deg, "+u+")"):c="radial-gradient(at "+r+", "+u+")",f=t.important&&""!==c?" !important":"",this.updateCSSRule(n,t.property,c+f)},_previewShadowCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=i.find(".fl-shadow-field-color input").val(),o=i.find(".fl-shadow-field-horizontal input").val(),r=i.find(".fl-shadow-field-vertical input").val(),a=i.find(".fl-shadow-field-blur input").val(),d=i.find(".fl-shadow-field-spread input").val(),u=!!i.find(".fl-shadow-field-spread input").length,c=!!e(l.target).closest(".fl-field-responsive-setting").length,f="",h="";""!==s&&(""===o&&(o=0),""===r&&(r=0),""===a&&(a=0),""===d&&(d=0),s.indexOf("rgb")<0&&(s="#"+s),f=o+"px ",f+=r+"px ",f+=a+"px ",u&&(f+=d+"px "),f+=s,f+=h),h=t.important&&""!==f?" !important":"",this.updateCSSRule(n,t.property,f,c)},_previewTypographyCSS:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(l.target),i=s.closest(".fl-field"),o=s.closest(".fl-compound-field-setting"),r=o.data("property"),a=s.val(),d=o.find(".fl-field-unit-select"),u=!!s.closest(".fl-field-responsive-setting").length,c=t.important&&""!==a?" !important":"";"font-family"===r?(t.id=i.attr("id"),this._previewFont(t,{delegateTarget:o})):"text-shadow"===r?(t.property="text-shadow",this._previewShadowCSS(t,o,l)):(d.length&&""!==a&&("vw"===d.val()?a="calc("+FLBuilderConfig.global.responsive_base_fontsize+"px + "+a+"vw)":a+="SELECT"===d.prop("tagName")?d.val():"px"),this.updateCSSRule(n,r,a+c,u))},_initFieldAttributePreview:function(t){var i=t.data("preview"),l=i.attribute,n=t.find("input"),s=(t.val(),window[i.format_callback]),o=this._getPreviewSelector(this.classes.node,i.selector),r=e(o),a=this._previewAttribute.bind(this,n,r,l,s);n.on("change",a),n.on("keyup",a),n.on("input",a)},_previewAttribute:function(e,t,i,l){var n=e.val();"function"==typeof l&&(n=l(n)),t[0].setAttribute(i,n)},_initFieldWidgetPreview:function(t){var i=e.proxy(this.delayPreview,this);t.find("input").on("keyup",i),t.find("input[type=checkbox]").on("click",i),t.find("textarea").on("keyup",i),t.find("select").on("change",i)},_initFieldAnimationPreview:function(t,i){i.find(".fl-animation-field-style select").on("change",e.proxy(this._previewAnimationField,this,t,i)),i.find(".fl-animation-field-duration input").on("input",e.proxy(this._previewAnimationField,this,t,i))},_previewAnimationField:function(t,i,l){var n=this._getPreviewSelector(this.classes.node,t.selector),s=e(n),o=i.find(".fl-animation-field-style select"),r=i.find(".fl-animation-field-duration input"),a=o[0].options;s.removeClass("fl-animated"),s.removeClass("fl-animation"),s.css("animation-duration","");for(var d=0;d<a.length;d++)s.removeClass("fl-"+a[d].value);""!==o.val()&&(s.addClass("fl-animation"),s.addClass("fl-"+o.val()),s.data("animation-delay",0),s.data("animation-duration",r.val())),FLBuilderLayout._doModuleAnimation.apply(s)},_getPreviewSelector:function(e,t){return FLBuilderPreview.getFormattedSelector.call(this,e,t)},toUpperCaseWords:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},FLBuilderPreview.formatColor=function(e){return""!==e&&e.indexOf("rgb")<0&&e.indexOf("url")<0&&(e="#"+e),e},FLBuilderPreviewCallbacks={previewShape:function(e,t){var i=e.preview.position,l=e.preview.prefix,n=e.form,s=l+"transform[][scaleYSign]";yOrientation=n.find('input[name="'+s+'"]'),"bottom"===i?yOrientation.val("invert"):yOrientation.val(""),yOrientation.trigger("change"),this.delayPreview()},previewShapeLayerSize:function(e,t){var i=e.getValues(),l=i.unit,n=i.props.width,s=i.props.height,o=i.props.top,r=e.preview.prefix,a=e.preview.position,d=this._getPreviewSelector(this.classes.node,".fl-builder-"+a+"-edge-layer"),u=d+" > *",c=e.form.find('[name="'+r+'align"]'),f=c.val(),h=f.split(" "),g=h[0],p=h[1],b=e.form.find('[name="'+r+'shape"]'),m=b.val(),v=FLBuilderConfig.presets.shape[m];
|
8 |
if(shapeProps={},shapeProps.width="100%",shapeProps.left="auto",shapeProps.right="auto",shapeProps.height="auto",shapeProps.top="auto",shapeProps.bottom="auto",n){shapeProps.width=n+l;var _=n/2+l;switch(p){case"left":shapeProps.left="0",shapeProps.right="auto";break;case"right":shapeProps.left="auto",shapeProps.right="0";break;case"center":shapeProps.left="calc( 50% - "+_+")",shapeProps.right="auto"}}this.updateCSSRule(u,"width",shapeProps.width),this.updateCSSRule(u,"left",shapeProps.left),this.updateCSSRule(u,"right",shapeProps.right);var L;if(s)L=s/2+l;else if(n){var F=v.data.viewBox.width,w=n/F*100;L=w/2+l}else L="";switch(s&&(shapeProps.height=s+l),g){case"top":shapeProps.top="0",shapeProps.bottom="auto";break;case"bottom":shapeProps.top="auto",shapeProps.bottom="0";break;case"center":shapeProps.top="calc( 50% - "+L+")",shapeProps.bottom="auto"}this.updateCSSRule(u,"height",shapeProps.height),this.updateCSSRule(u,"top",shapeProps.top),this.updateCSSRule(u,"bottom",shapeProps.bottom),""===o?this.updateCSSRule(d,a,"0"):this.updateCSSRule(d,a,o+l)},previewShapeAlign:function(e,t){var i=e.preview.prefix,l=e.form.find('[name="'+i+'size_width"]');l.trigger("input")},previewShapeFillStyle:function(e,t){var i=e.input.val(),l=e.preview,n=e.preview.prefix,s="fl-row-"+e.nodeID+"-"+n+"-linear-gradient",o="fl-row-"+e.nodeID+"-"+n+"-radial-gradient",r="fl-row-"+e.nodeID+"-"+n+"-pattern",a=e.form;if("undefined"!=typeof i){var d=this._getPreviewSelector(this.classes.node,l.selector);switch(i){case"color":var u=a.find("[name="+n+"fill_color]").val();this.updateCSSRule(d,"fill",FLBuilderPreview.formatColor(u));break;case"gradient":var c=a.find("#fl-field-"+n+"fill_gradient"),f=c.find('select[name$="[type]"]').val(),h="radial"===f?o:s;this.updateCSSRule(d,"fill","url(#"+h+")");break;case"pattern":var g="url(#"+r+")";this.updateCSSRule(d,"fill",g)}}},previewShapeGradientFill:function(e,t){var i=e.getValues(),l=e.node,n=e.preview,s=".fl-builder-"+n.position+"-edge-layer",o=l.find(s+" "+i.type+"Gradient"),r="url(#"+o.attr("id")+")",a=this._getPreviewSelector(this.classes.node,s+" .fl-shape");this.updateCSSRule(a,"fill",r);var d=o.find("stop");for(var u in i.stops){var c=i.stops[u],f=d.eq(u),h=c.color,g=c.stop,p=1;if(0===h.indexOf("rgba")){var b=h.substring(h.indexOf("(")+1,h.lastIndexOf(")")).split(/,\s*/);p=b.pop(),h="rgb("+b.join(",")+")"}f.attr("stop-color",FLBuilderPreview.formatColor(h)),f.attr("stop-opacity",p),f.attr("offset",g+"%")}if("linear"===i.type&&"undefined"!=typeof o[0]&&o[0].setAttribute("gradientTransform","rotate("+i.angle+" .5 .5 )"),"radial"===i.type){parts=i.position.split(" ");var m,v,_,L=parts[0],F=parts[1];switch(L){case"top":case"left":m=0;break;case"center":m=.5;break;case"bottom":case"right":m=1}switch(F){case"top":case"left":v=0;break;case"center":v=.5;break;case"bottom":case"right":v=1}_=.5,.5===m&&.5===v||(_=1),o.attr("cx",m),o.attr("cy",v),o.attr("r",_)}},previewShapeTransform:function(e,t){var i=(e.form,e.preview),l=(i.prefix,this._getPreviewSelector(this.classes.node,i.selector)),n=l+" > *",s=e.getValues(),o=[];Object.keys(s).map(function(e){var t=s[e],i="",l="";switch(e){case"scaleXSign":case"scaleYSign":return;case"scaleX":case"scaleY":t&&""!==t&&0!==t||(t="1"),l="scaleX"===e?s.scaleXSign:s.scaleYSign,t="invert"===l?-Math.abs(t):Math.abs(t),o.push(e+"("+t+")");break;case"translateX":case"translateY":t&&(i="px",o.push(e+"("+t+i+")"));break;case"skewX":case"skewY":t&&(i="deg",o.push(e+"("+t+i+")"));break;case"rotate":i="deg",""!==t&&"0"!==t&&o.push("rotate("+t+i+")")}}),this.updateCSSRule(n,"transform",o.join(" "))}}}(jQuery),function(e){var t={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^{]*{([\s\S]+?})\s*}/gi,empty:/@media[^{]*{([^{}]*?)}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,i.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var t=e("link, style"),i=null,l=null,n=null,s=null,o=null,r=null,a=null,d=!1,u=0,c=0;u<t.length;u++)if(element=t[u],i=element.href,l=element.id,n=element.tagName.toLowerCase(),s=element.rel,o=element.media,r=i?i.split("?").shift():l?l:"style-"+u,a=!0,d=!1,"style"===n||i&&s&&"stylesheet"===s.toLowerCase()){for(c=0;c<this.ignored.length;c++)if(r.indexOf(this.ignored[c])>-1){d=!0;break}if(d)continue;for(c=0;c<this.reparsed.length;c++)if(r.indexOf(this.reparsed[c])>-1){this.sheets[r]=null;break}void 0!==this.sheets[r]&&this.sheets[r]||this.queue.push({element:t.eq(u),key:r,tagName:n,href:i,id:l,media:o})}return this.queue.length},runQueue:function(){var t;this.queue.length?(t=this.queue.shift(),"style"===t.tagName?(this.parse(t.element.html(),t),this.runQueue()):e.get(t.href,e.proxy(function(e){this.parse(e,t),this.runQueue()},this)).fail(this.runQueue.bind(this))):this.applyStyles()},parse:function(e,t){var i=this.regex,l=this.cleanStyles(e),n=l.match(i.media),s=n&&n.length||0,o=!s&&t.media,r=null,a=null,d=null,u="",c=0,f=0;for(n?u=l.replace(i.media,""):o&&"all"!=t.media?s=1:u=l,this.sheets[t.key]={element:t.element,key:t.key,tagName:t.tagName,href:t.href,id:t.id,all:u,queries:[]},c=0;c<s;c++)for(o?(r=t.media,l=this.convertURLs(l,t.href)):(r=n[c].match(i.findStyles)&&RegExp.$1,l=RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),a=r.split(","),f=0;f<a.length;f++)r=a[f],d=r.split("(")[0].match(i.only)&&RegExp.$2,"print"!=d&&(r.replace(i.minmaxwh,"").match(i.other)||this.sheets[t.key].queries.push({minw:r.match(i.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(i.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:l}))},applyStyles:function(){var t=e("head"),i={all:"",queries:[]},l=null,n=null,s=null,o=null,r=null,a=null,d=null,u=!1;this.clearStyles();for(s in this.sheets)if(n=this.sheets[s],n.queries.length&&this.width){for(i.all+=n.all,r=0;r<n.queries.length;r++)o=n.queries[r],a=o.minw,d=o.maxw,u=!1,a&&(a=parseFloat(a)*(a.indexOf("em")>-1?this.getEmPxValue():1),this.width>=a&&(i.queries.push({media:"min",width:a,styles:o.styles}),u=!0)),d&&!u&&(d=parseFloat(d)*(d.indexOf("em")>-1?this.getEmPxValue():1),this.width<=d&&i.queries.push({media:"max",width:d,styles:o.styles}));n.element[0].disabled=!0}for(""!==i.all&&(l=e('<style class="fl-builder-media-query" data-query="all"></style>'),this.styles.push(l),t.append(l),l.html(i.all)),r=0;r<i.queries.length;r++)o=i.queries[r],l=e('<style class="fl-builder-media-query" data-query="'+o.media+'" data-value="'+o.width+'"></style>'),this.styles.push(l),t.append(l),l.html(o.styles);this.callback&&(this.callback(),this.callback=null)},clearStyles:function(){var e=null,t=this.styles.slice(0);this.styles=[];for(e in this.sheets)this.sheets[e].element[0].disabled=!1;for(var i=0;i<t.length;i++)t[i].empty(),t[i].remove()},disableStyles:function(e){for(var t,i,l,n=0;n<this.styles.length;n++)t=this.styles[n],i=t.attr("data-query"),l=parseInt(t.attr("data-value")),"max"===i&&!isNaN(l)&&l<=e&&(this.styles[n][0].sheet.disabled=!0)},enableStyles:function(){for(var e=0;e<this.styles.length;e++)this.styles[e][0].sheet.disabled=!1},cleanStyles:function(e){var t=this.regex;return e.replace(t.comments,"").replace(t.keyframes,"").replace(t.empty,"")},convertURLs:function(e,t){return t?(t=t.substring(0,t.lastIndexOf("/")),t.length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")):e},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=null,t=window.document,i=t.documentElement,l=t.body,n=t.createElement("div"),s=i.style.fontSize,o=l&&l.style.fontSize,r=!1;return n.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=r=t.createElement("body"),l.style.background="none"),i.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(n),r&&i.insertBefore(l,i.firstChild),e=parseFloat(n.offsetWidth),r?i.removeChild(l):l.removeChild(n),i.style.fontSize=s,o?l.style.fontSize=o:l.style.fontSize="",this.emPxValue=e,e}},i={_functions:null,update:function(){var e;if(!this._functions){this._functions={};for(e in l)this._functions[e]=jQuery.fn[e]}if(t.width)for(e in l)jQuery.fn[e]=l[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},l={width:function(l){return void 0!=l?i._functions.width.call(this,l):e.isWindow(this[0])?t.width:i._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){t.ignore(e)},reparse:function(e){t.reparse(e)},update:function(e,i){t.update(e,i)},disableStyles:function(e){t.disableStyles(e)},enableStyles:function(){t.enableStyles()}}}(jQuery),function(e){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(t){var i;e(".fl-responsive-preview").length&&"default"!==this._mode?("responsive"==this._mode?(i=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)):"medium"==this._mode&&(i=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(i,t)),FLBuilder._resizeLayout()):t&&t()},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("endEditingSession",this._clearPreview),FLBuilder.addHook("didEnterRevisionPreview",this._clearPreview),FLBuilder.addHook("responsiveEditing",this._menuToggleClicked),FLBuilder.addHook("preview-init",this._switchAllSettingsToCurrentMode),e("body").delegate(".fl-field-responsive-toggle","click",this._settingToggleClicked),e("body").delegate(".fl-responsive-preview-message button","click",this._previewToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,FLBuilderConfig.relativePluginUrl,"fl-builder-preview","fl-theme-builder","/wp-includes/","/wp-admin/","admin-bar-inline-css","ace-tm","ace_editor.css"]),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css",FLBuilderConfig.postId+"-layout-draft-partial.css",FLBuilderConfig.postId+"-layout-preview.css",FLBuilderConfig.postId+"-layout-preview-partial.css","fl-builder-global-css","fl-builder-layout-css"])},_switchTo:function(t,i){var l=e("html"),n=e("body"),s=e(FLBuilder._contentClass),o=e(".fl-responsive-preview"),r=e(".fl-responsive-preview-mask"),a=e(".fl-content-placeholder"),d=null;if(FLBuilderResponsiveEditing._mode=t,"default"==t){if(0===a.length)return;l.removeClass("fl-responsive-preview-enabled"),a.after(s),a.remove(),o.remove(),r.remove()}else 0===o.length?(l.addClass("fl-responsive-preview-enabled"),s.after('<div class="fl-content-placeholder"></div>'),n.prepend(wp.template("fl-responsive-preview")()),e(".fl-responsive-preview").addClass("fl-preview-"+t),e(".fl-responsive-preview-content").append(s)):(o.removeClass("fl-preview-responsive fl-preview-medium"),o.addClass("fl-preview-"+t));"responsive"==t?(d=FLBuilderConfig.global.responsive_breakpoint>=360?360:FLBuilderConfig.global.responsive_breakpoint,s.width(d),FLBuilderSimulateMediaQuery.update(d,i)):"medium"==t?(d=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,s.width(d),FLBuilderSimulateMediaQuery.update(d,i)):(s.width(""),FLBuilderSimulateMediaQuery.update(null,i)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),this._previewFields(),FLBuilder.triggerHook("responsive-editing-switched",t)},_setContentBackgroundColor:function(){var t=e(FLBuilder._contentClass),i=e(".fl-responsive-preview"),l=e(".fl-content-placeholder"),n=l.parents(),s="#fff",o=0;if(0===i.length)t.css("background-color","");else{for(;o<n.length&&(s=n.eq(o).css("background-color"),"rgba(0, 0, 0, 0)"==s);o++);t.css("background-color",s)}},_switchToAndScroll:function(t){var i=e(".fl-builder-settings").data("node"),l=void 0===i?void 0:e(".fl-node-"+i);FLBuilderResponsiveEditing._switchTo(t,function(){if(void 0!==l&&l){var t=(e(window),e(".fl-responsive-preview-content"));t.length?(t.scrollTop(0),t.scrollTop(l.offset().top-150)):e("html, body").scrollTop(l.offset().top-100)}})},_switchAllSettingsTo:function(t){var i="dashicons-desktop dashicons-tablet dashicons-smartphone";e(".fl-field-responsive-toggle").removeClass(i),e(".fl-field-responsive-setting").hide(),i="default"==t?"dashicons-desktop":"medium"==t?"dashicons-tablet":"dashicons-smartphone",e(".fl-field-responsive-toggle").addClass(i).data("mode",t),e(".fl-field-responsive-setting-"+t).css("display","inline-block")},_switchAllSettingsToCurrentMode:function(){var e=FLBuilderResponsiveEditing;e._switchAllSettingsTo(e._mode),FLBuilder.triggerHook("responsive-editing-switched",e._mode)},_settingToggleClicked:function(){var t=e(this),i=t.data("mode");i="default"==i?"medium":"medium"==i?"responsive":"default",FLBuilderResponsiveEditing._switchAllSettingsTo(i),FLBuilderResponsiveEditing._switchToAndScroll(i),t.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_menuToggleClicked:function(){var e=FLBuilderResponsiveEditing._mode;e="default"==e?"medium":"medium"==e?"responsive":"default",FLBuilder.MainMenu.hide(),FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_previewToggleClicked:function(){var t=e(this).data("mode");FLBuilderResponsiveEditing._switchAllSettingsTo(t),FLBuilderResponsiveEditing._switchToAndScroll(t)},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_previewFields:function(){var t=FLBuilderResponsiveEditing._mode,i=e(".fl-builder-settings:visible");0!==i.length&&void 0!==i.attr("data-node")&&(FLBuilder.triggerHook("responsive-editing-before-preview-fields",t),i.find(".fl-builder-settings-tab").each(function(){var i=e(this);i.css("display","block"),i.find(".fl-field-responsive-setting-"+t+":visible").each(function(){var i=e(this),l=i.closest(".fl-field"),n=l.data("type"),s=l.data("preview"),o=l.find(".fl-field-connection-visible").length;"refresh"!=s.type&&(o?"photo"===n&&"default"!==t&&i.find(".fl-photo-remove").trigger("click"):(i.find("input").trigger("keyup"),i.find("select").trigger("change")))}),i.css("display","")}),FLBuilder.triggerHook("responsive-editing-after-preview-fields",t))}},e(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(e){FLBuilderResponsivePreview={enter:function(){this.render()},exit:function(){this.destroy()},switchTo:function(t){var i=FLBuilderConfig.global,l=e("#fl-builder-preview-frame"),n="100%";"responsive"==t?(n=i.responsive_breakpoint>=360?360:i.responsive_breakpoint,l.width(n)):"medium"==t&&(n=i.medium_breakpoint>=769?769:i.medium_breakpoint,l.width(n)),l.width(n)},render:function(){var t=e("body"),i=FLBuilderConfig.previewUrl,l=e("#fl-builder-preview-mask, #fl-builder-preview-frame"),n=e('<div id="fl-builder-preview-mask"></div>'),s=e('<iframe id="fl-builder-preview-frame" src="'+i+'"></iframe>');l.remove(),t.append(n),t.append(s),t.css("overflow","hidden")},destroy:function(){e("#fl-builder-preview-mask, #fl-builder-preview-frame").remove(),e("body").css("overflow","visible")}}}(jQuery),function(e){var t={init:function(){var t=e("body");t.delegate(".fl-builder-service-select","change",this._serviceChange),t.delegate(".fl-builder-service-connect-button","click",this._connectClicked),t.delegate(".fl-builder-service-account-select","change",this._accountChange),t.delegate(".fl-builder-service-account-delete","click",this._accountDeleteClicked),t.delegate(".fl-builder-campaign-monitor-client-select","change",this._campaignMonitorClientChange),t.delegate(".fl-builder-mailchimp-list-select","change",this._mailChimpListChange),t.delegate(".fl-builder-activecampaign-list_type-select","change",this._activeCampaignChange)},_startSettingsLoading:function(t){var i=e(".fl-builder-settings"),l=t.closest(".fl-builder-service-settings"),n=e(".fl-builder-service-error");i.append('<div class="fl-builder-loading"></div>'),l.addClass("fl-builder-service-settings-loading"),n.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),i=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),i.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this),n=l.closest("tr"),s=l.val();n.siblings("tr.fl-builder-service-account-row").remove(),n.siblings("tr.fl-builder-service-connect-row").remove(),n.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==s&&(t._startSettingsLoading(l),FLBuilder.ajax({action:"render_service_settings",node_id:i,service:s},t._serviceChangeComplete))},_serviceChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-select-row");s.after(l.html),t._addAccountDelete(n),t._finishSettingsLoading()},_connectClicked:function(){for(var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-connect-row"),o=l.find(".fl-builder-service-connect-input"),r=null,a=null,d=0,u={action:"connect_service",node_id:i,service:n.val(),fields:{}};d<o.length;d++)r=o.eq(d),a=r.attr("name"),u.fields[a]=r.val();s.hide(),t._startSettingsLoading(n),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-select-row"),o=n.find(".fl-builder-service-select"),r=n.find(".fl-builder-service-account-row"),a=n.find(".fl-builder-service-account-select"),d=n.find(".fl-builder-service-connect-row");l.error?(d.show(),0===a.length?o.after('<div class="fl-builder-service-error">'+l.error+"</div>"):a.after('<div class="fl-builder-service-error">'+l.error+"</div>")):(d.remove(),r.remove(),s.after(l.html)),t._addAccountDelete(n),t._finishSettingsLoading()},_accountChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=l.find(".fl-builder-service-connect-row"),r=l.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=s.val(),u=null;o.remove(),r.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:i,service:n.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:i,service:n.val(),account:d}),u&&(t._startSettingsLoading(n),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(l)},_accountChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-account-row");s.after(l.html),t._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");t.length>0&&(e.find(".fl-builder-service-account-delete").remove(),""!==t.val()&&"add_new_account"!=t.val()&&t.after('<a href="javascript:void(0);" class="fl-builder-service-account-delete">'+FLBuilderStrings.deleteAccount+"</a>"))},_accountDeleteClicked:function(){var i=e(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),n=i.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:l.val(),account:n.val()},t._accountDeleteComplete),t._startSettingsLoading(n))},_accountDeleteComplete:function(){var i=e(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select");t._finishSettingsLoading(),l.trigger("change")},_campaignMonitorClientChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=e(this),r=l.find(".fl-builder-service-list-select"),a=o.val();0!==r.length&&r.closest("tr").remove(),""!==a&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:s.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-campaign-monitor-client-select");s.closest("tr").after(l.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=l.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==o.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:s.val(),list_id:o.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-list-select");s.closest("tr").after(l.html),t._finishSettingsLoading()},_activeCampaignChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),n=l.find(".fl-builder-service-select"),s=l.find(".fl-builder-service-account-select"),o=l.find(".fl-builder-service-list-select");list_type=l.find('select[name="list_type"]'),0!==o.length&&o.closest("tr").remove(),""!==list_type.val()&&(t._startSettingsLoading(n),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:n.val(),account:s.val(),list_type:list_type.val()},t._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(i){var l=FLBuilder._jsonParse(i),n=e(".fl-builder-service-settings-loading"),s=n.find(".fl-builder-service-field-row");s.after(l.html),t._finishSettingsLoading()}};e(function(){t.init()})}(jQuery),function(e){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var t={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fas fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row:first-of-type",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row:first-of-type .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-templates-button",placement:"bottom",title:FLBuilderStrings.tourTemplatesButtonTitle,content:FLBuilderStrings.tourTemplatesButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-tools-button",placement:"bottom",title:FLBuilderStrings.tourToolsButtonTitle,content:FLBuilderStrings.tourToolsButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-done-button",placement:"bottom",title:FLBuilderStrings.tourDoneButtonTitle,content:FLBuilderStrings.tourDoneButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,orphan:!0,backdrop:!0,title:FLBuilderStrings.tourFinishedTitle,content:FLBuilderStrings.tourFinished,template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fas fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">'+FLBuilderStrings.tourEnd+"</button> </div> </div>"}]};return FLBuilderConfig.lite?t.steps.shift():"disabled"==FLBuilderConfig.enabledTemplates?t.steps.shift():"fl-builder-template"==FLBuilderConfig.postType&&t.steps.shift(),t},_onStart:function(){var t=e("body");t.scrollTop(0),t.append('<div class="fl-builder-tour-mask"></div>'),0===e(".fl-row").length&&"module"!=FLBuilderConfig.userTemplateType&&(e(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-row fl-row-fixed-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width:100%"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p></div> </div> </div> </div> </div> </div> </div> </div> </div>'),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols())},_onPrev:function(){e(".fl-builder-tour-dimmed").remove()},_onNext:function(){e(".fl-builder-tour-dimmed").remove()},_onEnd:function(){e("body").off("fl-builder.template-selector-loaded"),e(".fl-builder-tour-mask").remove(),e(".fl-builder-tour-dimmed").remove(),e(".fl-builder-tour-demo-content").remove(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(t){e(t).find(".fl-builder-tour-dimmed").remove(),e(t).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;var l=i.indexOf(e,t);return l!==-1&&l===t}),e.fn.textWidth=function(t,i){return e.fn.textWidth.fakeEl||(e.fn.textWidth.fakeEl=e("<span>").hide().appendTo(document.body)),e.fn.textWidth.fakeEl.text(t||this.val()||this.text()).css("font",i||this.css("font")),e.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(t){var i=Object.create(this);return i=e.extend(i,t),e(this).trigger("onCreate"),i}},e.fn.switchClass=function(t,i){return this.each(function(){return e(this).removeClass(function(e,i){var l=[],n=i.split(" ");for(var e in n)n[e].startsWith(t)&&l.push(n[e]);return l.join(" ")}),e(this).addClass(t+i)})};var i={init:function(){t.addHook("cancelTask",this.onCancelTask.bind(this)),t.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),t.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),t.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),t.addHook("endEditingSession",this.onEndEditingSession.bind(this)),t.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(t,i,l){var n=e.proxy(this,"onTriggerKey",t);l?Mousetrap.bindGlobal(i,n):Mousetrap.bind(i,n)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){this.reset();for(var e in FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,i){t.triggerHook(e),i.preventDefault?i.preventDefault():i.returnValue=!1},onCancelTask:function(){return s.isPreviewing?void s.endPreview():n.isShowing?void n.hide():t.ContentPanel.isShowing?void t.ContentPanel.hide():void 0},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){if(t.SaveManager.layoutNeedsPublish()){var e=FLBuilderStrings.savedStatus.hasAlreadySaved;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}else{var e=FLBuilderStrings.savedStatus.nothingToSave;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}},onNextPrevTabShortcut:function(i,l){var n,s,o=e(".fl-lightbox:visible"),r=o.find(".fl-builder-settings-tabs a");o.length>0&&(n=r.filter("a.fl-active"),s="next"==i?n.is(r.last())?r.first():n.next("a"):n.is(r.first())?r.last():n.prev("a"),s.trigger("click")),t._calculateSettingsTabsOverflow(),l.preventDefault()}},l={isShowing:!1,init:function(){this.render(),t.addHook("showKeyboardShortcuts",this.show.bind(this))},render:function(){var t=wp.template("fl-keyboard-shortcuts"),i=FLBuilderConfig.keyboardShortcuts;this.$el=e(t(i)),e("body").append(this.$el),this.$el.find(".dismiss-shortcut-ui").on("click",this.hide.bind(this)),this.$el.on("click",this.hide.bind(this))},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.isShowing=!0)},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.isShowing=!1)},toggle:function(){this.isShowing?this.hide():this.show()}},n=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=e(".fl-builder-publish-actions"),this.$defaultBarButtons=e(".fl-builder-bar-actions"),this.$clickAwayMask=e(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),
|
9 |
this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click touchend",this.onActionClicked.bind(this)),t.addHook("triggerDone",this.onDoneTriggered.bind(this));var i=this.hide.bind(this);t.addHook("cancelPublishActions",i),t.addHook("endEditingSession",i),this.$clickAwayMask.on("click",i)},onDoneTriggered:function(){t.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?t._exit():t._exitWithoutRefresh()},show:function(){this.isShowing||t._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,t.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(i){var l=e(i.currentTarget).data("action");switch(l){case"dismiss":this.hide();break;case"discard":this.hide(),s.muteToolbar(),t._discardButtonClicked();break;case"publish":this.hide(),s.muteToolbar(),t._publishButtonClicked(),t._destroyOverlayEvents();break;case"draft":this.hide(),s.muteToolbar(),t._draftButtonClicked();break;default:this.hide(),s.muteToolbar(),t._draftButtonClicked()}t.triggerHook(l+"ButtonClicked")}}),s={isPreviewing:!1,init:function(){this.$el=e("body"),this.$mainToolbar=e(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=e("#wpadminbar"),this.$endPreviewBtn=e(".fl-builder--preview-actions .end-preview-btn"),t.addHook("endEditingSession",this.endEditingSession.bind(this)),t.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=e(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));var i=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a");i.on("click",this.onClickPageBuilderToolbarLink.bind(this)),e("#wpadminbar a").attr("tabindex","-1");var l=this.restartEditingSession.bind(this);t.addHook("restartEditingSession",l),t.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),t.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),t.addHook("didEnterRevisionPreview",this.hide.bind(this)),t.addHook("didExitRevisionPreview",this.show.bind(this)),t.addHook("didPublishLayout",this.onPublish.bind(this))},endEditingSession:function(){t._destroyOverlayEvents(),t._removeAllOverlays(),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t._unbindEvents(),e("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),e("body").removeClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex",null),e(t._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(i){t._initTemplateSelector(),t._bindOverlayEvents(),t._highlightEmptyCols(),t._rebindEvents(),e("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),e("body").addClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex","-1"),e(t._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),i.preventDefault()},onClickPageBuilderToolbarLink:function(e){t.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){var e=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span");e.css("color","#6bc373")},hide:function(){e("html").hasClass("fl-builder-edit")&&(t._unbindEvents(),t._destroyOverlayEvents(),t._removeAllOverlays(),e("html").removeClass("fl-builder-edit"),e("body").removeClass("admin-bar"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init(),t.triggerHook("didHideEditingUI"))},show:function(){e("html").hasClass("fl-builder-edit")||(t._rebindEvents(),t._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),e("html").addClass("fl-builder-edit"),e("body").addClass("admin-bar"),t.triggerHook("didShowEditingUI"))},beginPreview:function(){t._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),e("html").addClass("fl-builder-preview"),e("html, body").removeClass("fl-builder-edit"),t._removeEmptyRowAndColHighlights(),t._removeColHighlightGuides(),t.triggerHook("didBeginPreview"),FLBuilderResponsivePreview.enter())},endPreview:function(){this.isPreviewing=!1,this.show(),t._highlightEmptyCols(),FLBuilderResponsivePreview.exit(),e("html").removeClass("fl-builder-preview"),e("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),e("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),e("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(t){var i=e(t.target).data("mode");FLBuilderResponsivePreview.switchTo(i)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),t._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},o={isEditing:!0,init:function(){history.pushState&&(t.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),t.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url),this.isEditing=!1}},r={$row:null,$rowContent:null,row:null,drag:{},init:function(){if(this.userCanResize()){var i=e(t._contentClass);i.delegate(".fl-row","mouseenter touchstart",this.onDragHandleHover.bind(this)),i.delegate(".fl-block-row-resize","mousedown touchstart",this.onDragHandleDown.bind(this))}},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(t){if(!this.drag.isDragging){var i=this,l=e(t.target),n=l.closest(".fl-row"),s=n.data("node"),o=e(".fl-builder-row-settings[data-node="+s+"]"),r=o.find("[name=max_content_width_unit]"),a="px";i.onSettingsReady(s,function(t){r.length?a=r.length:"undefined"!=typeof t&&(a=t.max_content_width_unit),i.$row=n,i.$rowContent=i.$row.find(".fl-row-content"),i.row={node:s,form:o,unit:a,isFixedWidth:i.$row.hasClass("fl-row-fixed-width"),parentWidth:"vw"===a?e(window).width():i.$row.parent().width()},i.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},i.row.isFixedWidth?i.drag.originalWidth=i.$row.width():i.drag.originalWidth=i.$rowContent.width(),i.dragInit()})}},onSettingsReady:function(e,t){var i="undefined"!=typeof FLBuilderSettingsConfig.nodes?FLBuilderSettingsConfig.nodes:null;null!==i&&"undefined"!=typeof i[e]?(t(i[e]),null!=r._mouseEnterTimeout&&(clearTimeout(r._mouseEnterTimeout),r._mouseEnterTimeout=null)):(clearTimeout(r._mouseEnterTimeout),r._mouseEnterTimeout=setTimeout(this.onSettingsReady.bind(this),350,e,t))},onDragHandleDown:function(){e("body").addClass("fl-builder-row-resizing"),null!=r._mouseEnterTimeout&&(clearTimeout(r._mouseEnterTimeout),r._mouseEnterTimeout=null)},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(i,l){var n=e("body"),s=e(l.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),s.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=s.find(".fl-block-col-resize-feedback-left")),s.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=s.find(".fl-block-col-resize-feedback-right")),n.addClass("fl-builder-row-resizing"),t._colResizing=!0,t._destroyOverlayEvents(),t._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,n=this.drag.originalWidth,s=0,o=this.drag.edge,r=FLBuilderConfig.rowResize.minAllowedWidth,a=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(o="w"==o?"e":"w"),l>i?"w"===o?this.drag.operation="+":this.drag.operation="-":"e"===o?this.drag.operation="+":this.drag.operation="-",s=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=n+2*s:this.drag.calculatedWidth=n-2*s,!1!==r&&this.drag.calculatedWidth<r&&(this.drag.calculatedWidth=r),!1!==a&&this.drag.calculatedWidth>a&&(this.drag.calculatedWidth=a),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),"px"!==this.row.unit&&(this.drag.calculatedWidth=Math.round(this.drag.calculatedWidth/this.row.parentWidth*100)),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+this.row.unit).show(),this.row.form.length&&this.row.form.find("[name=max_content_width]").val(this.drag.calculatedWidth))},dragStop:function(i,l){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();var n={action:"resize_row_content",node:this.row.node,width:this.drag.calculatedWidth},s=e("body");t.ajax(n),t._bindOverlayEvents(),s.removeClass("fl-builder-row-resizing"),e(".fl-block-overlay").each(function(){t._buildOverlayOverflowMenu(e(this))}),setTimeout(function(){t._colResizing=!1},50),t.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},a={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips();var e=this.$el.find(".fl-builder-content-panel-button");e.on("click",t._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",t._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",t._upgradeClicked),this.$el.find("#fl-builder-toggle-notifications").on("click",this.onNotificationsButtonClicked.bind(this)),t.addHook("notificationsLoaded",this.onNotificationsLoaded.bind(this))},render:function(t){var i=e(this.template(t));this.$el=i,this.el=i.get(0),s.$mainToolbar=this.$el,e("body").prepend(i),e("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),e(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})},onNotificationsButtonClicked:function(){t.triggerHook("toggleNotifications")},onNotificationsLoaded:function(){e("body").removeClass("fl-builder-has-new-notifications");var i={action:"fl_builder_notifications",read:!0};t.ajax(i)}};e(function(){t.ContentPanel.init(),FLBuilderConfig.simpleUi||t.MainMenu.init(),FLBuilderConfig.showToolbar?(a.init(),t.ContentPanel.alignPanelArrow()):e("html").addClass("fl-builder-no-toolbar"),i.init(),l.init(),s.init(),o.init(),r.init(),n.init(),t.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing"),this.isShowing=!0},hide:function(){this.$el.removeClass("is-showing"),this.isShowing=!1},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),l=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){this.template=wp.template(this.templateName),e("body").prepend(this.template(this)),this.$el=e(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html("");for(var i in FLBuilderConfig.mainMenu)this.renderPanel(i);e("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=e(".fl-builder-bar-title"),e("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var l=this.hide.bind(this);t.addHook("didShowPublishActions",l),t.addHook("didBeginSearch",l),t.addHook("didBeginPreview",l),t.addHook("didShowContentPanel",l),t.addHook("endEditingSession",l),t.addHook("didFocusSearchBox",l),t.addHook("didEnterRevisionPreview",l),t.addHook("didFailSettingsSave",l),t.addHook("showKeyboardShortcuts",l),this.$mask=e(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",l),n.init(),s.init()},renderPanel:function(t){var l,n,s,o=this.views[t];l=FLBuilderConfig.mainMenu[t],l.handle=t,n=i.create(l),n.init(),s=e(n.render()),n.$el=s,e(".fl-builder--main-menu-panel-views").append(s),n.bindEvents(),n.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),"undefined"!=typeof o&&(o.$el.remove(),o.isShowing&&(this.currentView=n,n.show())),n.isRootView&&(this.rootView=n,this.currentView=n),this.views[t]=n},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),t.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(i){var l=e(i.currentTarget),n=l.data("type");switch(n){case"view":var s=l.data("view");this.goToView(s);break;case"event":var o=l.data("event");t.triggerHook(o,l);break;case"link":}},goToView:function(e){var t=this.currentView,i=this.views[e];t.transitionOut(),i.transitionIn(),this.currentView=i,this.viewNavigationStack.push(t)},goToPreviousView:function(){var t=this.currentView,i=this.viewNavigationStack.pop();t.transitionOut(!0),i.transitionIn(!0),this.currentView=i,e(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});t.MainMenu=l;var n={init:function(){t.addHook("saveTemplate",this.saveTemplate.bind(this)),t.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),t.addHook("duplicateLayout",this.duplicateLayout.bind(this)),t.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),t.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),t.addHook("toggleUISkin",this.toggleUISkin.bind(this)),t.addHook("clearLayoutCache",this.clearLayoutCache.bind(this))},saveTemplate:function(){t._saveUserTemplateClicked(),l.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),l.hide()},duplicateLayout:function(){t._duplicateLayoutClicked(),l.hide()},showGlobalSettings:function(){t._globalSettingsClicked(),l.hide()},showLayoutSettings:function(){t._layoutSettingsClicked(),l.hide()},clearLayoutCache:function(){t.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),t.showAjaxLoader(),l.hide()},toggleUISkin:function(i){e('a[data-event="toggleUISkin"]');if(e("body").hasClass("fl-builder-ui-skin--light"))var l="light",n="dark";if(e("body").hasClass("fl-builder-ui-skin--dark"))var l="dark",n="light";e("body").removeClass("fl-builder-ui-skin--"+l).addClass("fl-builder-ui-skin--"+n),t.ajax({action:"save_ui_skin",skin_name:n})}},s={init:function(){t.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),l.hide()}}}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(i){this.categorySelector=a.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),e(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));i.views;if(this.initViews(i.views),0===Object.keys(this.views).length){var l={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"};this.addView(l)}if(!this.activeView){var n=Object.keys(this.views)[0],l=this.views[n];this.activeView=l}this.defaultView=this.activeView,e(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),e(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),t.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){var i=e[t];this.categorySelector.addItem(i),"separator"!==i.type&&this.addView(i)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=n;break;case"rows":t=s;break;case"templates":t=o;break;case"saved":t=r;break;default:t=l}_.isNull(this.viewController)||_.isUndefined(this.viewController)||(t=window[this.viewController]);var i=t.create(e),a=i.handle;i.init(),this.views[a]=i,i.isShowing&&(this.activeView=i)},renderView:function(e){if(this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),_.isObject(e))var i=e;else var i=this.views[e];if(_.isObject(i)&&_.isFunction(i.render)){var l=i.render();this.$el.find(".fl-nanoscroller-content").html(l),this.activeView=i,t._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0)}},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){e(this.activeView).trigger("onBeforeShow"),this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e=this.panel.$groupSelect,t=this.panel.$el.find(".fl-builder-panel-search");if(this.isSearchEnabled?t.show():t.hide(),Object.keys(this.views).length>1&&!_.isUndefined(this.categorySelector)){var i=this.categorySelector.render();this.panel.$el.find(".fl-builder-content-group-select");e.html(i),e.show(),this.panel.$el.removeClass("single-view")}else e.hide(),t.hide(),this.panel.$el.addClass("single-view")},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=t.Search.byQuery(this.query)),e},render:function(){e(this).trigger("beforeRender");var t=this;t=this.filterTemplateData(t);var i=e(this.template(t));return this.$el=i,e(this).trigger("afterRender"),i},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),n=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),s=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),o=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=e(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(t){var i=e(t.currentTarget),l=i.val(),n=i.siblings("button");""!==l?n.show():n.hide()},onSaveButtonClick:function(i){var l=e(i.currentTarget),n=l.siblings('input[name="template-name"]').val(),s=l.siblings('input[name="template-category"]').val(),o={name:n,category:s};""!==n&&t.ajax({action:"save_user_template",settings:o},t._saveUserTemplateSettingsComplete)},onTemplateClick:function(i){var l=e(i.currentTarget),n=l.data("id"),s=l.data("type");t._requestTemplateInsert(n,s)}}),r=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=t.Search.byQuery({kind:"template",type:"user",content:["module","column","row"]}),e}}),a=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var t=e(this.template(this));return this.$el=t,e(this).trigger("afterRender"),t},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t;t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle,this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(t){var i=e(t.target),l=i.data("view");if(i.hasClass("fl-has-children")){var n=e('[data-parent="'+l+'"]');n.is(":visible")?(this.items[l].hasChildrenOpen=!1,i.removeClass("fl-has-children-showing"),n.hide()):(this.items[l].hasChildrenOpen=!0,i.addClass("fl-has-children-showing"),n.show()),i.blur()}else e(this).trigger("categorySelected",l)}});t.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e=FLBuilderConfig.panelData.tabs;for(var l in e){var n=e[l];if(o=i.create(n),o.panel=this,o.views={},o.init(n),this.tabs[l]=o,o.isShowing&&(this.activeTab=o),!this.activeTab){var s=Object.keys(this.tabs)[0],o=this.tabs[s];o.isShowing=!0,this.activeTab=o}}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),t.triggerHook("contentPanelDidInit")}},render:function(){e("body").prepend(this.template(this)),this.$el=e(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),e(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),t.addHook("showContentPanel",this.show.bind(this)),t.addHook("showModules",this.show.bind(this,"modules")),t.addHook("showRows",this.show.bind(this,"rows")),t.addHook("showTemplates",this.show.bind(this,"templates")),t.addHook("showSaved",this.show.bind(this,"saved")),t.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);t.addHook("hideContentPanel",e),t.addHook("didShowLightbox",e),t.addHook("didShowPublishActions",e),t.addHook("didBeginSearch",e),t.addHook("didInitDrag",e),t.addHook("didOpenMainMenu",e),t.addHook("didApplyTemplate",e);var i=this.toggleShowHide.bind(this);t.addHook("toggleContentPanel",i),t.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var t,i,l=this.$el,n=null,s=this.$el.find(".fl-builder--panel-arrow"),o=e(".fl-builder-content-panel-button"),r=this.$el.css("animation-duration");if(0!=o.length){this.$el.css("animation-duration","0s"),this.show(),n=l[0].getBoundingClientRect(),t=s[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",r);var a=o[0].getBoundingClientRect(),d=a.x+a.width/2;i=d<n.x?20:d-n.x-t.width/2,s.css({right:"auto",left:i+"px"})}},show:function(i){"module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi||(t.triggerHook("willShowContentPanel"),"undefined"!=typeof i&&this.showTab(i),this.isShowing||t._triggerSettingsSave(!1,!0)&&(e("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,e(this).trigger("onShow"),t.triggerHook("didShowContentPanel")))},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(e("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,e(this).trigger("onHide"),t.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(t){var i=this.tabs[t];_.isObject(i)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),i.show(),this.$tabs.filter('[data-tab="'+i.handle+'"]').addClass("is-showing"),this.activeTab=i,e(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(t){e(t.currentTarget).blur()},onTabItemClick:function(t){var i=e(t.target),l=i.data("tab");this.showTab(l)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),e(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),e(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),e(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var i=this.$searchInput.val();if(""!==i){var l=t.Search.byTerm(i);""!=l.term?this.showSearchResults(l):this.hideSearchResults()}else this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(i){if(i.total>0){var l=e(this.renderSearchResults(i));this.$searchPanel.html(l),t._initSortables()}else{var l=e(this.renderNoResults(i));this.$searchPanel.html(l)}e("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){e("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(e){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(t,i){var l=FLBuilderSettingsConfig.forms,n=FLBuilderSettingsConfig.modules,s={type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],activeTab:null,buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null,messages:null};if(t.nodeId&&!t.settings)return void this.loadNodeSettings(t,i);if(t=e.extend(s,t),i=void 0===i?function(){}:i,t.id){if("general"===t.type&&void 0!==l[t.id])t=e.extend(!0,t,l[t.id]);else{if("module"!==t.type||void 0===n[t.id])return;t=e.extend(!0,t,n[t.id])}this.config=t,this.renderLightbox(t)&&(t.legacy||!this.renderLegacySettings(t,i)?this.renderComplete(t,i):this.showLightboxLoader())}},loadNodeSettings:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"get_node_settings",node_id:e.nodeId},function(i){e.settings=FLBuilder._jsonParse(i),FLBuilderSettingsConfig.nodes[e.nodeId]=e.settings,FLBuilderSettingsForms.render(e,t),FLBuilder.hideAjaxLoader()})},renderLightbox:function(t){var i=wp.template("fl-builder-settings"),l=FLBuilder._lightbox._node.find("form.fl-builder-settings"),n=(e(".fl-lightbox-wrap[data-parent]"),localStorage.getItem("fl-builder-settings-tab"));if(t.nodeId&&t.nodeId===l.data("node")&&!t.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(t.hide)return!0;if(n)for(var s in t.tabs)s===n.replace("fl-builder-settings-tab-","")&&(t.activeTab=s);if(t.activeTab||(t.activeTab=Object.keys(t.tabs).shift()),t.lightbox)t.lightbox.setContent(i(t));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(i(t))}return!0},renderComplete:function(t,i){var l=e(".fl-builder-settings:visible");setTimeout(function(){t.legacy&&this.renderLegacySettingsComplete(t.legacy),i(),FLBuilder._initSettingsForms(),t.rules&&FLBuilder._initSettingsValidation(t.rules,t.messages),t.preview&&(FLBuilder.preview=new FLBuilderPreview(t.preview)),t.helper&&t.helper.init(),l.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,l))}.bind(this),1)},renderFields:function(t,i){var l=wp.template("fl-builder-settings-row"),n="",s=null,o=null,r=null,a=!1,d=null,u=["align","border","dimension","unit","photo","select","typography"],i=i?i:this.config.settings,c=FLBuilderConfig.global;for(o in t)s=t[o],a=!!s.multiple,supportsResponsive=e.inArray(s.type,u)>-1,r=_.isUndefined(i[o])?"":i[o],s.type&&(_.isUndefined(i[o])&&s["default"]&&(r=s["default"]),d=s.responsive&&c.responsive_enabled&&!a&&supportsResponsive?s.responsive:null,n+=l({field:s,name:o,rootName:o,value:r,preview:JSON.stringify(s.preview?s.preview:{type:"refresh"}),responsive:d,rowClass:s.row_class?" "+s.row_class:"",isMultiple:a,supportsMultiple:"editor"!==s.type&&"service"!==s.type,settings:i,globalSettings:c,template:e("#tmpl-fl-builder-field-"+s.type)}));return n},renderField:function(e){var t=wp.template("fl-builder-field");return t(e)},renderSectionTemplate:function(e,t){var i=wp.template(e.template.id);return i({section:e,settings:t})},renderTabTemplate:function(e,t){var i=wp.template(e.template.id);return i({tab:e,settings:t})},renderLegacySettings:function(t,i){var l=e(".fl-builder-settings:visible"),n=null,s=!1,o={tabs:[],sections:[],fields:[],settings:null,node_id:null};return l.find(".fl-legacy-field").each(function(){n=e(this),o.fields.push(n.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(n),s=!0}),l.find(".fl-legacy-settings-section").each(function(){
|
10 |
+
n=e(this),o.sections.push({tab:n.attr("data-tab"),section:n.attr("data-section")}),s=!0}),l.find(".fl-legacy-settings-tab").each(function(){n=e(this),o.tabs.push(n.attr("data-tab")),s=!0}),l.attr("data-node")?o.node_id=l.attr("data-node"):o.settings=FLBuilder._getOriginalSettings(l,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(e.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:o,form:l.attr("data-form-id"),group:l.attr("data-form-group"),lightbox:l.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),s&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),s},renderLegacySettingsComplete:function(t){var i="object"==typeof t?t:FLBuilder._jsonParse(t),l=null,n=null,s="",o=null,r=null,a=null;if(i.lightbox?(l=e(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]"),n=l.length?l.find(".fl-builder-settings"):null):(n=e(".fl-builder-settings:visible"),l=n.closest(".fl-builder-lightbox")),n&&n.length){for(s in i.fields)o=e("#fl-field-"+s).attr("id",""),o.after(i.fields[s]).remove();for(s in i.extras)o=e("#fl-field-"+s).find(".fl-field-control-wrapper"),i.extras[s].multiple?o.each(function(t,l){t in i.extras[s].before&&""!=i.extras[s].before[t]&&e(this).prepend('<div class="fl-form-field-before">'+i.extras[s].before[t]+"</div>"),t in i.extras[s].after&&""!=i.extras[s].after[t]&&e(this).append('<div class="fl-form-field-after">'+i.extras[s].after[t]+"</div>")}):(""!=i.extras[s].before&&o.prepend('<div class="fl-form-field-before">'+i.extras[s].before+"</div>"),""!=i.extras[s].after&&o.append('<div class="fl-form-field-after">'+i.extras[s].after+"</div>"));for(a in i.sections)for(s in i.sections[a])r=e("#fl-builder-settings-section-"+s),r.html(i.sections[a][s]);for(s in i.tabs)a=e("#fl-builder-settings-tab-"+s),a.html(i.tabs[s]);l.data("parent")||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,n),FLBuilder.preview&&(this.settings=e.extend(this.settings,FLBuilder.preview._savedSettings),FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var t=e(".fl-builder-settings:visible"),i=t.closest(".fl-builder-lightbox"),l=i.attr("data-parent"),n=null,s=null,o={};return l&&(l=e(".fl-builder-lightbox[data-instance-id="+l+"]"),t=l.find("form.fl-builder-settings"),n=FLBuilder._getSettings(t),s=t.attr("data-node"),s&&(o.node_id=s,o.node_settings=n)),o},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),i=!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(t);return i},closeOnDeleteNode:function(t){var i=e(".fl-builder-settings[data-node]"),l=FLBuilder._contentClass+" .fl-node-"+i.data("node");i.length&&!e(l).length&&FLLightbox.closeAll()},showLightboxLoader:function(){e(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(t){e(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){var t=e.closest(".fl-field-control").find(".fl-field-control-wrapper");t.hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field"),i=e.closest(".fl-field-control").find(".fl-field-control-wrapper");i.show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,e.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.reload),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyColTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreHistoryComplete",this.updateOnHistoryRestored.bind(this))},reload:function(){var t=FLBuilderConfig.editUrl+"&fl_builder_load_settings_config=core";e('script[src*="fl_builder_load_settings_config=core"]').remove(),e("head").append('<script src="'+t+'"></script>')},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t,FLBuilderConfig.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];e.namespace.indexOf("didAdd")>-1?this.addNode("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didSaveNodeSettings")>-1?this.updateNode(arguments[1].nodeId,arguments[1].settings):e.namespace.indexOf("didDelete")>-1?this.deleteNodes("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):e.namespace.indexOf("didDuplicate")>-1&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(t,i){var l=this;i.cols.each(function(){var t=e(this),i=t.attr("data-node");l.nodes[i]&&(l.nodes[i].size=parseFloat(t[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},updateOnHistoryRestored:function(e,t){this.nodes=t.config.nodes,this.attachments=t.config.attachments,this.settings.layout=t.settings.layout,this.settings.global=t.settings.global,FLBuilderConfig.global=t.settings.global},addNode:function(t,i){var l=e(".fl-node-"+t),n=l.hasClass("fl-row"),s=l.hasClass("fl-col"),o=l.hasClass("fl-col-group"),r=l.hasClass("fl-module"),a=this;this.nodes[t]||(i||(n?i=e.extend({},this.defaults.row):s?i=e.extend({},this.defaults.column):r&&(i=e.extend({},this.defaults.modules[l.attr("data-type")])),n||o?l.find(".fl-col").each(function(){var t=e(this),i=e.extend({},a.defaults.column);i.size=parseFloat(t[0].style.width),a.addNode(t.attr("data-node"),i)}):r&&(a.addNode(l.closest(".fl-row").attr("data-node")),a.addNode(l.closest(".fl-col").attr("data-node")),a.updateOnResetColumnWidths(null,{cols:l.closest(".fl-col-group").find("> .fl-col")}))),i&&(this.nodes[t]=i))},updateNode:function(t,i){var l=e(".fl-node-"+t),n=this;l.hasClass("fl-col")&&l.closest(".fl-col-group").find("> .fl-col").each(function(){var t=e(this),l=t.attr("data-node");n.nodes[l].size=parseFloat(t[0].style.width),n.nodes[l].equal_height=i.equal_height,n.nodes[l].content_alignment=i.content_alignment,n.nodes[l].responsive_order=i.responsive_order}),this.nodes[t]=i},duplicateNode:function(t,i){var l=e(".fl-node-"+i),n=l.find("[data-node]"),s=e(".fl-node-"+t),o=s.find("[data-node]"),r=this;this.nodes[i]=this.nodes[t],n.each(function(l){t=o.eq(l).attr("data-node"),i=e(this).attr("data-node"),r.nodes[t]&&(r.nodes[i]=r.nodes[t])})},deleteNodes:function(){var t="",i=e(FLBuilder._contentClass).html();for(t in this.nodes)i.indexOf(t)===-1&&(this.nodes[t]=null,delete this.nodes[t])}}),e(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(e){FLBuilderSettingsCopyPaste={init:function(){FLBuilder.addHook("settings-form-init",this.initExportButton),FLBuilder.addHook("settings-form-init",this.initImportButton)},initExportButton:function(){new ClipboardJS("button.module-export-all",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),s=FLBuilder._getSettings(l),o=new Date,r=o.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-all"),u=d.attr("title");return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(s)}}),new ClipboardJS("button.module-export-style",{text:function(t){var i=e(".fl-builder-module-settings").data("node"),l=e(".fl-builder-module-settings[data-node="+i+"]"),n=e(".fl-builder-module-settings").data("type"),s=FLBuilder._getSettings(l),o=new Date,r=o.toDateString(),a="/// {type:"+n+"} "+r+" ///",d=e("button.module-export-style"),u=d.attr("title"),c={};for(var f in s){var h=l.find('[name="'+f+'"]'),g=l.find('[name*="'+f+'["]'),p=!1;h.length?p=h.closest(".fl-field").data("is-style"):g.length&&(p=g.closest(".fl-field").data("is-style")),p&&(c[f]=s[f])}return d.text(FLBuilderStrings.module_import.copied),setTimeout(function(){d.text(u)},1e3),a+"\n"+JSON.stringify(c)}})},initImportButton:function(){e("button.module-import-apply").click(function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=e(".module-import-input").val(),l=i.match(/\/\/\/\s\{type:([_a-z0-9-]+)/),n=!1,s=e(".fl-builder-module-settings").data("type"),o=e(".fl-builder-settings-lightbox .module-import-error");if(o.hide(),l&&"undefined"!=typeof l[1]&&(n=l[1]),!n||n!==s)return o.html(FLBuilderStrings.module_import.type).show(),!1;var r=i.replace(/\/\/\/.+\/\/\//,"");try{var a=JSON.parse(r)}catch(d){var a=!1;return o.html(FLBuilderStrings.module_import.error).show(),!1}if(a){var u=t.attr("data-node"),c=e.extend({},FLBuilderSettingsConfig.nodes[u],a);FLBuilderSettingsConfig.nodes[u]=c,FLBuilder.ajax({action:"save_settings",node_id:u,settings:c},FLBuilder._saveSettingsComplete.bind(this,!0,null)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:u,settings:c}),FLBuilder._lightbox.close()}})}},e(function(){FLBuilderSettingsCopyPaste.init()})}(jQuery),function(e){var t={minWidth:320,maxWidth:600,minHeight:400,init:function(){this.initPanel(),this.pinOrUnpin(),this.bind()},bind:function(){var t=e(window),i=e("body");t.on("resize",_.throttle(this.windowResize.bind(this),250)),i.delegate(".fl-builder-ui-pinned-collapse","click",this.collapse),i.delegate(".fl-builder--content-library-panel .fl-builder--tabs","click",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return e(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didPinContentPanel")},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didUnpinContentPanel")},pinOrUnpin:function(){var t=e(".fl-builder--content-library-panel"),i=this.isPinned();t.hasClass("fl-builder-ui-pinned-hidden")||(window.innerWidth<=this.maxWidth?(i&&this.unpin(!1),this.disableDragAndResize()):(i||this.restorePosition(),this.enableDragAndResize()))},show:function(){var t=e(".fl-builder--content-library-panel");t.hasClass("fl-builder-ui-pinned-hidden")&&(t.removeClass("fl-builder-ui-pinned-hidden"),t.show(),this.restorePosition())},hide:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),i.addClass("fl-builder-ui-pinned-hidden"),i.hide(),t.css("margin",""),FLBuilder._resizeLayout())},collapse:function(){var t=e(this).find("i:visible"),i=e("body"),l=t.data("toggle"),n=t.data("position"),s=e(".fl-builder--content-library-panel"),o=s.outerWidth();"hide"===l?(s.css(n,"-"+o+"px"),i.css("margin-"+n,""),i.addClass("fl-builder-ui-pinned-is-collapsed")):(s.css(n,"0px"),i.css("margin-"+n,o+"px"),i.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&e(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return e("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var t=e(".fl-builder--content-library-panel");t.draggable({cursor:"move",handle:".fl-builder--tabs",cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:this.minHeight,minWidth:this.minWidth,maxWidth:this.maxWidth,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),t.addClass("fl-builder-ui-pinned-container"),t.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(t){var i=e(".fl-builder--content-library-panel"),l=i.outerWidth(),n=e("body"),s=e(".fl-responsive-preview, .fl-responsive-preview-mask"),o=e(FLBuilder._contentClass).parentsUntil("body").last();n.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+t),n.addClass("fl-builder-content-panel-is-showing"),n.css("margin-"+t,l+"px"),s.css("margin-"+t,l+"px"),o.addClass("fl-builder-ui-pinned-content-transform"),i.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+t),i.find(".ui-resizable-"+("left"===t?"e":"w")).show(),i.on("resize",_.throttle(this.resize.bind(this),250)),i.attr("style",""),FLBuilder.ContentPanel.isShowing=!0},unpinPanel:function(){var t=e(".fl-builder--content-library-panel"),i=t.find(".fl-builder--panel-content .is-showing").data("tab"),l=e("body"),n=e(".fl-responsive-preview, .fl-responsive-preview-mask"),s=e(FLBuilder._contentClass).parentsUntil("body").last();l.css("margin-left",""),l.css("margin-right",""),l.removeClass("fl-builder-ui-is-pinned"),l.removeClass("fl-builder-ui-is-pinned-left"),l.removeClass("fl-builder-ui-is-pinned-right"),n.css("margin-left",""),n.css("margin-right",""),s.removeClass("fl-lightbox-content-transform"),t.removeClass("fl-builder-ui-pinned"),t.removeClass("fl-builder-ui-pinned-left"),t.removeClass("fl-builder-ui-pinned-right"),t.find(".ui-resizable-handle").hide(),t.off("resize"),t.attr("style",""),t.find(".fl-builder--tabs [data-tab="+i+"]").addClass("is-showing")},pinLightboxes:function(){var t=this;e(".fl-lightbox-resizable").each(function(){t.pinLightbox(e(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(t){var i=e(".fl-builder--content-library-panel"),l=t.closest(".fl-lightbox-wrap");l.closest(".fl-builder-ui-pinned").length||(i.append(l),t.attr("style",""),t.draggable("disable"),t.resizable("disable")),t.is(":visible")&&i.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){var i=t._node.find(".fl-lightbox-resizable");i.length&&(i.hasClass("fl-builder-ui-pinning-initialized")||(i.draggable("option","start",this.dragStart.bind(this)),i.draggable("option","drag",this.drag.bind(this)),i.draggable("option","stop",this.dragStop.bind(this)),i.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(i),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var t=e(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=t.find(".fl-builder--panel-content .is-showing").data("tab"),t.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),e(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");i.find(".fl-lightbox-wrap").each(function(){var l=e(this),n=l.find(".fl-lightbox"),s=0,o=0,r=0;n.draggable("enable"),n.resizable("enable"),n.find(".ui-resizable-handle").show(),t.append(l),n.is(":visible")?(s=parseInt(i.css("top"))-parseInt(l.css("top"))-parseInt(l.css("padding-top")),o=parseInt(i.css("left"))-parseInt(l.css("padding-left")),r=parseInt(i.css("right"))-parseInt(l.css("padding-right")),n.css("top",(s<0?0:s)+"px"),n.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?r:o)+"px"),n.addClass("fl-lightbox-prevent-animation"),t.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):n.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var t=e("body"),i=e(".fl-responsive-preview, .fl-responsive-preview-mask"),l=e(".fl-builder--content-library-panel"),n=l.outerWidth();l.is(":visible")?l.hasClass("fl-builder-ui-pinned-left")?(t.css("margin-left",n+"px"),i.css("margin-left",n+"px")):l.hasClass("fl-builder-ui-pinned-right")&&(t.css("margin-right",n+"px"),i.css("margin-right",n+"px")):t.css("margin","")},resizeStop:function(){e("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(t,i){var l=e("body"),n=(e(t.target),e(".fl-builder-bar-actions"));e(".fl-lightbox-resizable:visible").length||n.addClass("fl-builder-content-panel-pin-zone"),l.addClass("fl-builder-draggable-is-dragging"),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(t,i){var l=e("body"),n=e(".fl-responsive-preview"),s=e(window),o=n.length?n.width():s.width(),r=s.scrollTop(),a=e(".fl-builder--content-library-panel"),d=a.offset().top,u=e(".fl-builder-bar-actions"),c=e(t.target);c.hasClass("fl-builder--content-library-panel")&&(t.clientX<o-75&&d-r<46?u.addClass("fl-builder-content-panel-pin-zone-hover"):u.removeClass("fl-builder-content-panel-pin-zone-hover")),c.hasClass("fl-builder-ui-pinned")?this.unpinPanel():t.clientX<75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):t.clientX>o-75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(t,i){var l=(e(window),e("body")),n=e(".fl-builder-bar-actions"),s=e(".fl-builder-ui-pin-zone"),o=e(".fl-builder--content-library-panel"),r=e(".fl-lightbox-resizable:visible");e(t.target);l.removeClass("fl-builder-draggable-is-dragging"),n.removeClass("fl-builder-content-panel-pin-zone"),n.removeClass("fl-builder-content-panel-pin-zone-hover"),s.remove(),r.length&&parseInt(r.css("top"))<0&&r.css("top","0"),l.hasClass("fl-builder-ui-show-pin-zone")?(l.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right")):o.find(".fl-lightbox").length?(this.unpin(!0),("module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi)&&o.hide()):(o.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable");t.draggable("disable"),t.resizable("disable"),i.draggable("disable"),i.resizable("disable")},enableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");t.draggable("enable"),t.resizable("enable"),this.isPinned()||(i.draggable("enable"),i.resizable("enable"))},savePosition:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:visible"),l={pinned:{width:t.outerWidth(),position:null}};t.hasClass("fl-builder-ui-pinned-left")?l.pinned.position="left":t.hasClass("fl-builder-ui-pinned-right")?l.pinned.position="right":i.length&&(l.lightbox={width:i.width(),height:i.height(),top:parseInt(i.css("top"))<0?"0px":i.css("top"),left:i.css("left")}),FLBuilderConfig.userSettings.pinned=l.pinned,l.lightbox&&(FLBuilderConfig.userSettings.lightbox=l.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:l})},restorePosition:function(){var t=e(".fl-builder--content-library-panel"),i=FLBuilderConfig.userSettings.pinned;i&&i.position&&(t.css("width",i.width+"px"),this.pin(i.position,!1),t.css("width",i.width+"px"))}};e(function(){t.init()})}(jQuery),function(e){var t={init:function(){this.setupMainMenuData(),e(".fl-builder--revision-actions select").on("change",this.selectChanged),e(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),e(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var t=FLBuilderConfig.revisions.posts,i=FLBuilderConfig.revisions.authors,l=wp.template("fl-revision-list-item"),n=e(".fl-builder--revision-actions select"),s="",o="",r=0;if(FLBuilderConfig.mainMenu.revisions.items=[],n.html(""),0===t.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()});else for(;r<t.length;r++)s=FLBuilderStrings.revisionDate.replace("%s",t[r].date.diff),s+=" ("+t[r].date.published+")",o=FLBuilderStrings.revisionAuthor.replace("%s",i[t[r].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:l({id:t[r].id,date:s,author:o,avatar:i[t[r].author].avatar})}),n.append('<option value="'+t[r].id+'">'+s+"</option>");FLBuilder.MainMenu.renderPanel("revisions")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=FLBuilder._jsonParse(e),this.setupMainMenuData()},itemClicked:function(t,i){var l=e(i).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(e(".fl-builder--revision-actions select").val(l),this.preview(l))},selectChanged:function(i){t.preview(e(this).val())},applyClicked:function(i){var l=e(".fl-builder--revision-actions select").val();t.restore(l)},preview:function(t){e(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:t},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(i){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:i},t.restoreComplete)},restoreComplete:function(e){var t=FLBuilder._jsonParse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",t.config),settings=t.settings,"undefined"!=typeof settings.css&&null!==settings.css&&(FLBuilderSettingsConfig.settings.layout.css=settings.css),"undefined"!=typeof settings.js&&null!==settings.js&&(FLBuilderSettingsConfig.settings.layout.js=settings.js)}};e(function(){t.init()})}(jQuery),function(e){var t={query:function(e){var t={},i=null,l={library:{}},n=null;if(e=this.normalizeQuery(e),_.isNull(e.kind))t=FLBuilderConfig.contentItems;else for(var s in e.kind)i=e.kind[s],t[i]=FLBuilderConfig.contentItems[i];return n=this.findMatches(e,t),l.library=this.formatResults(n,e),l},normalizeQuery:function(e){var t={kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1};return e=_.extend(t,e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i={},l=null,n=null,s=null,o=null,r=null,a=null;for(l in t){n=t[l],i[l]={items:[]};for(a in n)if(s=n[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(s.category,e.category)){switch(l){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(o=_.includes(e.content,s.content),r=e.content===s.content,o||r)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==s.type)continue;if(!_.isNull(e.group)){var d=e.group,u=s.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var f=d[a];_.includes(u,f)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(e.group===!1&&s.group.length>0)continue;if(e.group!==!1&&!_.includes(s.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(s,e.searchTerm))&&i[l].items.push(s)}}return i},matchesCategory:function(e,t){var i,l,n,s,o,r;if(e===t)return!0;_.isString(t)&&(t=[t]);for(l in t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(n in e)if(s=e[n],s===i)return!0;if(_.isObject(e))for(o in e)if(r=e[o],r===i||o===i)return!0}return!1},matchesSearchTerm:function(e,t){var i,l,n=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(n))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(n))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(n))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(n))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||(i="widget",!i.includes(n)))||!(_.isUndefined(e.editor_export)||(l="module",!l.includes(n))))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,t){var i,l,n={};return _.forEach(e,function(e,s,o){i=e[t],_.isNull(i)||_.isUndefined(i)||_.isString(i)&&""===e[i]||(_.isString(i)&&(n[i]=n[i]||[],n[i].push(e)),_.isArray(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})),_.isObject(i)&&(l=i,_.forEach(l,function(t,i,l){n[t]=n[t]||[],n[t].push(e)})))}),n},search:function(e){var t={searchTerm:e},i=this.query(t),l={total:0,term:e,sections:{}};if(!_.isUndefined(i.library.module.items)){var n={};for(var s in i.library.module.items){var o=i.library.module.items[s],r=o.group[0],a=o.category;o.name;_.isUndefined(n[r])&&(n[r]={}),_.isUndefined(n[r][a])&&(n[r][a]=[]),n[r][a].push(o)}l.grouped=n}for(var s in i.library){var d=i.library[s];!_.isUndefined(d.items)&&d.items.length>0&&(l.sections[s]={name:FLBuilderStrings.typeLabels[s],handle:s,type:"",items:d.items},l.total+=d.items.length)}return l}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){var i=t.search(e);return i}}}(jQuery),function(e,t){var i={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=e(".fl-builder--saving-indicator"),t.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),t.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),t.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),t.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),t.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabledd||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,e("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&("save_pinned_ui_position"!=e&&("fl_builder_notifications"!=e&&!(e.indexOf("history")>-1)))))))},onLayoutSaved:function(e,t){if(this.isUpdatingLayout(t.fl_builder_data.action)){this.showStatusMessage(this.messages.saved,this.messages.savedTooltip);var i=this;setTimeout(function(){i.resetStatusMessage()},2e3)}},onLayoutPublished:function(){this.layoutNeedsPublish=!1,e("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(i,l){this.$savingIndicator.html(i),t.isUndefined(l)||(this.$savingIndicator.attr("title",l),e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fas fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){if(t.MainMenu.hide(),this.layoutNeedsPublish)t._publishLayout(!1);else{this.showStatusMessage(this.messages.noChanges);var e=this;setTimeout(function(){e.resetStatusMessage()},2e3)}}};t.SaveManager={layoutNeedsPublish:function(){return i.layoutNeedsPublish},showStatusMessage:function(e,t){i.showStatusMessage(e,t)},resetStatusMessage:function(){i.resetStatusMessage()}},e(function(){i.init()})}(jQuery,FLBuilder),function(e){FLBuilderHistoryManager={states:[],position:0,rendering:!1,init:function(){var t=FLBuilderConfig.history,i=this;this.states=t.states,this.position=parseInt(t.position),this.setupMainMenuData(),e.each(t.hooks,function(e,t){FLBuilder.addHook(e,function(e,l){i.saveCurrentState(t,l)})}),FLBuilder.addHook("didPublishLayout",this.clearStatesOnPublish.bind(this)),FLBuilder.addHook("restartEditingSession",this.saveCurrentStateOnRestartSession.bind(this)),FLBuilder.addHook("historyItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("undo",this.onUndo.bind(this)),FLBuilder.addHook("redo",this.onRedo.bind(this))},saveCurrentState:function(e,t){var i=this,t="undefined"==typeof t?{}:t,l=null;"undefined"!=typeof t.moduleType&&t.moduleType&&(l=t.moduleType),FLBuilder.ajax({
|
11 |
action:"save_history_state",label:e,module_type:l},function(e){var t=JSON.parse(e);i.states=t.states,i.position=parseInt(t.position),i.setupMainMenuData()})},saveCurrentStateOnRestartSession:function(e){this.states.length||this.saveCurrentState("draft_created")},clearStatesOnPublish:function(e,t){var i=this;this.states=[],this.position=0,this.setupMainMenuData(),FLBuilder.ajax({action:"clear_history_states",post_id:FLBuilderConfig.postId},function(){t.shouldExit||i.saveCurrentState("draft_created")})},renderState:function(t){var i=this;if(!this.rendering&&this.states.length&&!e(".fl-builder-settings:visible").length){var l=setTimeout(FLBuilder.showAjaxLoader,2e3);this.rendering=!0,FLBuilder.ajax({action:"render_history_state",position:t},function(e){var t=JSON.parse(e);t.error||(i.position=parseInt(t.position),FLBuilder.triggerHook("didRestoreHistoryComplete",t),FLBuilder._renderLayout(t.layout),i.setupMainMenuData()),clearTimeout(l),i.rendering=!1})}},onUndo:function(){this.renderState("prev")},onRedo:function(){this.renderState("next")},setupMainMenuData:function(){var e=FLBuilderConfig.history.labels,t="";FLBuilderConfig.mainMenu.history.items=[];for(var i=this.states.length-1;i>=0;i--)"string"==typeof this.states[i]?t=e[this.states[i]]?e[this.states[i]]:this.states[i]:(t=e[this.states[i].label]?e[this.states[i].label]:this.states[i].label,(this.states[i].moduleType||this.states[i].label.indexOf("module")>-1)&&(t=t.replace("%s",this.getModuleName(this.states[i].moduleType)))),FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:t,current:i===this.position?1:0,position:i})});FLBuilder.MainMenu.renderPanel("history")},getModuleName:function(e){var t=FLBuilderConfig.contentItems.module,i=0;if("widget"===e)return FLBuilderStrings.widget;for(;i<t.length;i++)if("undefined"!=typeof t[i].slug&&e===t[i].slug)return t[i].name;return FLBuilderStrings.module},itemClicked:function(t,i){var l=e(i).find(".fl-history-list-item"),n=l.attr("data-position"),s=e(".fl-history-list-item[data-current=1]");e(".fl-builder-settings:visible").length&&(FLBuilder._closeNestedSettings(),FLBuilder._lightbox.close()),s.attr("data-current",0),l.attr("data-current",1),this.renderState(n)}},e(function(){FLBuilderHistoryManager.init()})}(jQuery),function(exports){"use strict";exports.stringify=function(e){return JSON.stringify(e,function(e,t){var i;return t instanceof Function||"function"==typeof t?(i=t.toString(),i.length<8||"function"!==i.substring(0,8)?"_NuFrRa_"+i:i):t instanceof RegExp?"_PxEgEr_"+t:t})},exports.parse=function(str,date2obj){var iso8061=!!date2obj&&/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/;return JSON.parse(str,function(key,value){var prefix;return"string"!=typeof value?value:value.length<8?value:(prefix=value.substring(0,8),iso8061&&value.match(iso8061)?new Date(value):"function"===prefix?eval("("+value+")"):"_PxEgEr_"===prefix?eval(value.slice(8)):"_NuFrRa_"===prefix?eval(value.slice(8)):value)})},exports.clone=function(e,t){return exports.parse(exports.stringify(e),t)}}("undefined"==typeof exports?window.JSONfn={}:exports);
|
languages/cs_CZ.mo
CHANGED
Binary file
|
languages/de_DE.mo
CHANGED
Binary file
|
languages/en_GB.mo
CHANGED
Binary file
|
languages/es_CO.mo
ADDED
Binary file
|
languages/es_ES.mo
CHANGED
Binary file
|
languages/fa_IR.mo
CHANGED
Binary file
|
languages/fi.mo
CHANGED
Binary file
|
languages/fr_CA.mo
CHANGED
Binary file
|
languages/fr_FR.mo
CHANGED
Binary file
|
languages/it_IT.mo
CHANGED
Binary file
|
languages/ja.mo
CHANGED
Binary file
|
languages/ko_KR.mo
CHANGED
Binary file
|
languages/nb_NO.mo
CHANGED
Binary file
|
languages/nl_NL.mo
CHANGED
Binary file
|
languages/pl_PL.mo
CHANGED
Binary file
|
languages/pt_BR.mo
CHANGED
Binary file
|
languages/pt_PT.mo
CHANGED
Binary file
|
languages/sl_SI.mo
CHANGED
Binary file
|
languages/th.mo
CHANGED
Binary file
|
languages/tr_TR.mo
CHANGED
Binary file
|
languages/uk.mo
CHANGED
Binary file
|
modules/photo/photo.php
CHANGED
@@ -365,7 +365,8 @@ class FLPhotoModule extends FLBuilderModule {
|
|
365 |
if ( $this->_has_source() && null === $this->_editor ) {
|
366 |
|
367 |
$url_path = $this->_get_uncropped_url();
|
368 |
-
|
|
|
369 |
|
370 |
if ( fl_builder_filesystem()->file_exists( $file_path ) ) {
|
371 |
$this->_editor = wp_get_image_editor( $file_path );
|
365 |
if ( $this->_has_source() && null === $this->_editor ) {
|
366 |
|
367 |
$url_path = $this->_get_uncropped_url();
|
368 |
+
|
369 |
+
$file_path = trailingslashit( WP_CONTENT_DIR ) . ltrim( str_replace( basename( WP_CONTENT_DIR ), '', wp_make_link_relative( $url_path ) ), '/' );
|
370 |
|
371 |
if ( fl_builder_filesystem()->file_exists( $file_path ) ) {
|
372 |
$this->_editor = wp_get_image_editor( $file_path );
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: justinbusa, RobbyMcCullough, billyyoung, hinampaksh, diegoliv, webmandesign, eugenealegiojo, helgatheviking, ozancanakli, brentjettgmailcom, jproffitt71, brainstormforce, ideaboxcreations, laubsterboy, nikolayyordanov, codente, pross, pedromendonca
|
3 |
Tags: page builder, beaver builder, landing page, front-end builder, drag and drop editor
|
4 |
Requires at least: 4.6
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 5.6
|
7 |
Stable tag: trunk
|
8 |
License: GPL2+
|
@@ -80,6 +80,10 @@ Every part of a Beaver Builder layout or landing page is fully responsive and lo
|
|
80 |
|
81 |
We've designed Beaver Builder to create layouts and landing pages that load quickly. Many page builders load in an ungodly number of scripts and stylesheets to every page on your site. Not Beaver Builder! It only loads the assets needed for a given layout or landing page.
|
82 |
|
|
|
|
|
|
|
|
|
83 |
== Installation ==
|
84 |
|
85 |
1. Install Beaver Builder either via the WordPress plugin directory or by uploading the files to your server at wp-content/plugins.
|
@@ -110,4 +114,4 @@ Visit our [changelog page](https://www.wpbeaverbuilder.com/change-logs/?utm_medi
|
|
110 |
|
111 |
== Upgrade Notice ==
|
112 |
|
113 |
-
Visit our [changelog page](https://www.wpbeaverbuilder.com/change-logs/?utm_medium=bb-lite&utm_source=repo-readme&utm_campaign=repo-upgrade-page) for up-to-date information on what has been going on with the development of Beaver Builder.
|
2 |
Contributors: justinbusa, RobbyMcCullough, billyyoung, hinampaksh, diegoliv, webmandesign, eugenealegiojo, helgatheviking, ozancanakli, brentjettgmailcom, jproffitt71, brainstormforce, ideaboxcreations, laubsterboy, nikolayyordanov, codente, pross, pedromendonca
|
3 |
Tags: page builder, beaver builder, landing page, front-end builder, drag and drop editor
|
4 |
Requires at least: 4.6
|
5 |
+
Tested up to: 5.5
|
6 |
Requires PHP: 5.6
|
7 |
Stable tag: trunk
|
8 |
License: GPL2+
|
80 |
|
81 |
We've designed Beaver Builder to create layouts and landing pages that load quickly. Many page builders load in an ungodly number of scripts and stylesheets to every page on your site. Not Beaver Builder! It only loads the assets needed for a given layout or landing page.
|
82 |
|
83 |
+
= ClassicPress =
|
84 |
+
|
85 |
+
This plugin is compatible with [ClassicPress](https://www.classicpress.net/).
|
86 |
+
|
87 |
== Installation ==
|
88 |
|
89 |
1. Install Beaver Builder either via the WordPress plugin directory or by uploading the files to your server at wp-content/plugins.
|
114 |
|
115 |
== Upgrade Notice ==
|
116 |
|
117 |
+
Visit our [changelog page](https://www.wpbeaverbuilder.com/change-logs/?utm_medium=bb-lite&utm_source=repo-readme&utm_campaign=repo-upgrade-page) for up-to-date information on what has been going on with the development of Beaver Builder.
|