Version Description
- Annoucement: Partnership with Easy IO! Probably the best deal on the market to optimize your images :)
- Fix: Some variables should be initialized as arrays instead of booleans.
- Fix: The CDN domain could not be modifed.
Download this release
Release Info
Developer | TigrouMeow |
Plugin | WP Retina 2x |
Version | 6.1.1 |
Comparing to | |
See all releases |
Code changes from version 5.6.1 to 6.1.1
- ajax.php +0 -497
- app/debug.js +3 -0
- app/index.js +2 -0
- app/index.js.map +1 -0
- {js → app}/lazysizes.min.js +2 -0
- {js → app}/picturefill.min.js +3 -0
- {js → app}/retina-cookie.js +3 -1
- {js → app}/retina.js +2 -0
- {js → app}/retina.min.js +2 -0
- app/vendor.js +27 -0
- app/vendor.js.map +1 -0
- classes/admin.php +127 -0
- api.php → classes/api.php +0 -0
- core.php → classes/core.php +379 -169
- classes/dashboard.php +23 -0
- classes/init.php +37 -0
- classes/library.php +26 -0
- classes/rest.php +508 -0
- common/admin.css +0 -404
- common/admin.php +111 -508
- common/classes/issues.php +29 -0
- common/classes/ratings.php +114 -0
- common/classes/rest.php +90 -0
- common/classes/rest_license.php +40 -0
- common/classes/updater.php +591 -0
- common/helpers.php +81 -0
- common/licenser.php +126 -0
- dashboard.php +0 -334
- js/admin.js +0 -497
- js/debug.js +0 -1
- loading.gif +0 -0
- media-library.php +0 -58
- readme.txt +63 -16
- wp-retina-2x.php +45 -37
- wr2x_admin.css +0 -226
- wr2x_admin.php +0 -475
- wr2x_image.php +0 -169
ajax.php
DELETED
@@ -1,497 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Meow_WR2X_Ajax {
|
4 |
-
|
5 |
-
public $core = null;
|
6 |
-
|
7 |
-
public function __construct( $core) {
|
8 |
-
$this->core = $core;
|
9 |
-
add_action( 'wp_ajax_wr2x_generate', array( $this, 'wp_ajax_wr2x_generate' ) );
|
10 |
-
add_action( 'wp_ajax_wr2x_delete', array( $this, 'wp_ajax_wr2x_delete' ) );
|
11 |
-
add_action( 'wp_ajax_wr2x_delete_full', array( $this, 'wp_ajax_wr2x_delete_full' ) );
|
12 |
-
add_action( 'wp_ajax_wr2x_list_all', array( $this, 'wp_ajax_wr2x_list_all' ) );
|
13 |
-
add_action( 'wp_ajax_wr2x_replace', array( $this, 'wp_ajax_wr2x_replace' ) );
|
14 |
-
add_action( 'wp_ajax_wr2x_upload', array( $this, 'wp_ajax_wr2x_upload' ) );
|
15 |
-
add_action( 'wp_ajax_wr2x_retina_upload', array( $this, 'wp_ajax_wr2x_retina_upload' ) );
|
16 |
-
add_action( 'wp_ajax_wr2x_retina_details', array( $this, 'wp_ajax_wr2x_retina_details' ) );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Checks nonce for the specified action
|
21 |
-
* @param string $action
|
22 |
-
*/
|
23 |
-
function check_nonce( $action ) {
|
24 |
-
if ( !wp_verify_nonce( $_POST['nonce'], $action ) ) {
|
25 |
-
echo json_encode(
|
26 |
-
array (
|
27 |
-
'success' => false,
|
28 |
-
'message' => __( "Invalid API request.", 'wp-retina-2x' )
|
29 |
-
)
|
30 |
-
);
|
31 |
-
die();
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Checks if the current user has sufficient permissions to perform the Ajax actions
|
37 |
-
*/
|
38 |
-
function check_capability() {
|
39 |
-
$cap = 'upload_files';
|
40 |
-
if ( !current_user_can( $cap ) ) {
|
41 |
-
echo json_encode(
|
42 |
-
array (
|
43 |
-
'success' => false,
|
44 |
-
'message' => __( "You do not have permission to upload files.", 'wp-retina-2x' )
|
45 |
-
)
|
46 |
-
);
|
47 |
-
die();
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
*
|
53 |
-
* AJAX SERVER-SIDE
|
54 |
-
*
|
55 |
-
*/
|
56 |
-
|
57 |
-
// Using issuesOnly, only the IDs with a PENDING status will be processed
|
58 |
-
function wp_ajax_wr2x_list_all( $issuesOnly ) {
|
59 |
-
$this->check_nonce( 'wr2x_list_all' );
|
60 |
-
$this->check_capability();
|
61 |
-
|
62 |
-
$issuesOnly = intval( $_POST['issuesOnly'] );
|
63 |
-
if ( $issuesOnly == 1 ) {
|
64 |
-
$ids = $this->core->get_issues();
|
65 |
-
echo json_encode(
|
66 |
-
array(
|
67 |
-
'success' => true,
|
68 |
-
'message' => "List of issues only.",
|
69 |
-
'ids' => $ids,
|
70 |
-
'total' => count( $ids )
|
71 |
-
) );
|
72 |
-
die;
|
73 |
-
}
|
74 |
-
$reply = array();
|
75 |
-
try {
|
76 |
-
$ids = array();
|
77 |
-
$total = 0;
|
78 |
-
global $wpdb;
|
79 |
-
$postids = $wpdb->get_col( "
|
80 |
-
SELECT p.ID
|
81 |
-
FROM $wpdb->posts p
|
82 |
-
WHERE post_status = 'inherit'
|
83 |
-
AND post_type = 'attachment'
|
84 |
-
AND ( post_mime_type = 'image/jpeg' OR
|
85 |
-
post_mime_type = 'image/png' OR
|
86 |
-
post_mime_type = 'image/gif' )
|
87 |
-
" );
|
88 |
-
foreach ($postids as $id) {
|
89 |
-
if ( $this->core->is_ignore( $id ) )
|
90 |
-
continue;
|
91 |
-
array_push( $ids, $id );
|
92 |
-
$total++;
|
93 |
-
}
|
94 |
-
echo json_encode(
|
95 |
-
array(
|
96 |
-
'success' => true,
|
97 |
-
'message' => "List of everything.",
|
98 |
-
'ids' => $ids,
|
99 |
-
'total' => $total
|
100 |
-
) );
|
101 |
-
die;
|
102 |
-
}
|
103 |
-
catch (Exception $e) {
|
104 |
-
echo json_encode(
|
105 |
-
array(
|
106 |
-
'success' => false,
|
107 |
-
'message' => $e->getMessage()
|
108 |
-
) );
|
109 |
-
die;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
function wp_ajax_wr2x_delete_full( $pleaseReturn = false ) {
|
114 |
-
if ( !$pleaseReturn ) $this->check_nonce( 'wr2x_delete_full' );
|
115 |
-
$this->check_capability();
|
116 |
-
|
117 |
-
if ( !isset( $_POST['attachmentId'] ) ) {
|
118 |
-
echo json_encode(
|
119 |
-
array(
|
120 |
-
'success' => false,
|
121 |
-
'message' => __( "The attachment ID is missing.", 'wp-retina-2x' )
|
122 |
-
)
|
123 |
-
);
|
124 |
-
die();
|
125 |
-
}
|
126 |
-
$attachmentId = intval( $_POST['attachmentId'] );
|
127 |
-
$originalfile = get_attached_file( $attachmentId );
|
128 |
-
$pathinfo = pathinfo( $originalfile );
|
129 |
-
$retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->core->retina_extension() . $pathinfo['extension'];
|
130 |
-
if ( $retina_file && file_exists( $retina_file ) )
|
131 |
-
unlink( $retina_file );
|
132 |
-
|
133 |
-
// RESULTS FOR RETINA DASHBOARD
|
134 |
-
$info = $this->core->html_get_basic_retina_info_full( $attachmentId, $this->core->retina_info( $attachmentId ) );
|
135 |
-
$results[$attachmentId] = $info;
|
136 |
-
|
137 |
-
// Return if that's not the final step.
|
138 |
-
if ( $pleaseReturn )
|
139 |
-
return $info;
|
140 |
-
|
141 |
-
echo json_encode(
|
142 |
-
array(
|
143 |
-
'results' => $results,
|
144 |
-
'success' => true,
|
145 |
-
'message' => __( "Full retina file deleted.", 'wp-retina-2x' )
|
146 |
-
)
|
147 |
-
);
|
148 |
-
die();
|
149 |
-
}
|
150 |
-
|
151 |
-
function wp_ajax_wr2x_delete() {
|
152 |
-
$this->check_nonce( 'wr2x_delete' );
|
153 |
-
$this->check_capability();
|
154 |
-
|
155 |
-
if ( !isset( $_POST['attachmentId'] ) ) {
|
156 |
-
echo json_encode(
|
157 |
-
array(
|
158 |
-
'success' => false,
|
159 |
-
'message' => __( "The attachment ID is missing.", 'wp-retina-2x' )
|
160 |
-
)
|
161 |
-
);
|
162 |
-
die();
|
163 |
-
}
|
164 |
-
|
165 |
-
// Information for the retina version of the full-size
|
166 |
-
$attachmentId = intval( $_POST['attachmentId'] );
|
167 |
-
$results_full[$attachmentId] = $this->wp_ajax_wr2x_delete_full( true );
|
168 |
-
|
169 |
-
$this->core->delete_attachment( $attachmentId, true );
|
170 |
-
$meta = wp_get_attachment_metadata( $attachmentId );
|
171 |
-
|
172 |
-
// RESULTS FOR RETINA DASHBOARD
|
173 |
-
$this->core->update_issue_status( $attachmentId );
|
174 |
-
$info = $this->core->html_get_basic_retina_info( $attachmentId, $this->core->retina_info( $attachmentId ) );
|
175 |
-
$results[$attachmentId] = $info;
|
176 |
-
echo json_encode(
|
177 |
-
array(
|
178 |
-
'results' => $results,
|
179 |
-
'results_full' => $results_full,
|
180 |
-
'success' => true,
|
181 |
-
'message' => __( "Retina files deleted.", 'wp-retina-2x' )
|
182 |
-
)
|
183 |
-
);
|
184 |
-
die();
|
185 |
-
}
|
186 |
-
|
187 |
-
function wp_ajax_wr2x_retina_details() {
|
188 |
-
$this->check_nonce( 'wr2x_retina_details' );
|
189 |
-
$this->check_capability();
|
190 |
-
|
191 |
-
if ( !isset( $_POST['attachmentId'] ) ) {
|
192 |
-
echo json_encode(
|
193 |
-
array(
|
194 |
-
'success' => false,
|
195 |
-
'message' => __( "The attachment ID is missing.", 'wp-retina-2x' )
|
196 |
-
)
|
197 |
-
);
|
198 |
-
die();
|
199 |
-
}
|
200 |
-
|
201 |
-
$attachmentId = intval( $_POST['attachmentId'] );
|
202 |
-
$info = $this->core->html_get_details_retina_info( $attachmentId, $this->core->retina_info( $attachmentId ) );
|
203 |
-
echo json_encode(
|
204 |
-
array(
|
205 |
-
'result' => $info,
|
206 |
-
'success' => true,
|
207 |
-
'message' => __( "Details retrieved.", 'wp-retina-2x' )
|
208 |
-
)
|
209 |
-
);
|
210 |
-
die();
|
211 |
-
}
|
212 |
-
|
213 |
-
function wp_ajax_wr2x_generate() {
|
214 |
-
$this->check_nonce( 'wr2x_generate' );
|
215 |
-
$this->check_capability();
|
216 |
-
|
217 |
-
if ( !isset( $_POST['attachmentId'] ) ) {
|
218 |
-
echo json_encode(
|
219 |
-
array(
|
220 |
-
'success' => false,
|
221 |
-
'message' => __( "The attachment ID is missing.", 'wp-retina-2x' )
|
222 |
-
)
|
223 |
-
);
|
224 |
-
die();
|
225 |
-
}
|
226 |
-
|
227 |
-
$attachmentId = intval( $_POST['attachmentId'] );
|
228 |
-
|
229 |
-
/**
|
230 |
-
* @param $attachmentId ID of the attchment to regenerate
|
231 |
-
*/
|
232 |
-
do_action( 'wr2x_before_regenerate', $attachmentId );
|
233 |
-
|
234 |
-
$this->core->delete_attachment( $attachmentId, false );
|
235 |
-
|
236 |
-
// Regenerate the Thumbnails
|
237 |
-
$regenerate = get_option( 'wr2x_regenerate_thumbnails', false );
|
238 |
-
if ( $regenerate ) {
|
239 |
-
|
240 |
-
/**
|
241 |
-
* @param $attachmentId ID of the attachment to generate thumbnails
|
242 |
-
*/
|
243 |
-
do_action( 'wr2x_before_generate_thumbnails', $attachmentId );
|
244 |
-
|
245 |
-
$file = get_attached_file( $attachmentId );
|
246 |
-
$meta = wp_generate_attachment_metadata( $attachmentId, $file );
|
247 |
-
wp_update_attachment_metadata( $attachmentId, $meta );
|
248 |
-
|
249 |
-
/**
|
250 |
-
* @param $attachmentId ID of the attachment that has generated its thumbnails
|
251 |
-
*/
|
252 |
-
do_action( 'wr2x_generate_thumbnails', $attachmentId );
|
253 |
-
}
|
254 |
-
|
255 |
-
// Regenerate Retina
|
256 |
-
$meta = wp_get_attachment_metadata( $attachmentId );
|
257 |
-
$this->core->generate_images( $meta );
|
258 |
-
|
259 |
-
/**
|
260 |
-
* @param $attachmentId ID of the attachment that has been regenerated
|
261 |
-
*/
|
262 |
-
do_action( 'wr2x_regenerate', $attachmentId );
|
263 |
-
|
264 |
-
// RESULTS FOR RETINA DASHBOARD
|
265 |
-
$info = $this->core->html_get_basic_retina_info( $attachmentId, $this->core->retina_info( $attachmentId ) );
|
266 |
-
$results[$attachmentId] = $info;
|
267 |
-
echo json_encode(
|
268 |
-
array(
|
269 |
-
'results' => $results,
|
270 |
-
'success' => true,
|
271 |
-
'message' => __( "Retina files generated.", 'wp-retina-2x' )
|
272 |
-
)
|
273 |
-
);
|
274 |
-
die();
|
275 |
-
}
|
276 |
-
|
277 |
-
function check_get_ajax_uploaded_file() {
|
278 |
-
$this->check_capability();
|
279 |
-
|
280 |
-
$tmpfname = $_FILES['file']['tmp_name'];
|
281 |
-
|
282 |
-
// Check if it is an image
|
283 |
-
$file_info = getimagesize( $tmpfname );
|
284 |
-
if ( empty( $file_info ) ) {
|
285 |
-
$this->core->log( "The file is not an image or the upload went wrong." );
|
286 |
-
unlink( $tmpfname );
|
287 |
-
echo json_encode( array(
|
288 |
-
'success' => false,
|
289 |
-
'message' => __( "The file is not an image or the upload went wrong.", 'wp-retina-2x' )
|
290 |
-
));
|
291 |
-
die();
|
292 |
-
}
|
293 |
-
|
294 |
-
$filedata = wp_check_filetype_and_ext( $tmpfname, $_POST['filename'] );
|
295 |
-
if ( $filedata["ext"] == "" ) {
|
296 |
-
$this->core->log( "You cannot use this file (wrong extension? wrong type?)." );
|
297 |
-
unlink( $current_file );
|
298 |
-
echo json_encode( array(
|
299 |
-
'success' => false,
|
300 |
-
'message' => __( "You cannot use this file (wrong extension? wrong type?).", 'wp-retina-2x' )
|
301 |
-
));
|
302 |
-
die();
|
303 |
-
}
|
304 |
-
|
305 |
-
$this->core->log( "The temporary file was written successfully." );
|
306 |
-
return $tmpfname;
|
307 |
-
}
|
308 |
-
|
309 |
-
function wp_ajax_wr2x_upload( $checksNonce = true ) {
|
310 |
-
if ( $checksNonce ) $this->check_nonce( 'wr2x_upload' );
|
311 |
-
|
312 |
-
try {
|
313 |
-
$tmpfname = $this->check_get_ajax_uploaded_file();
|
314 |
-
$attachmentId = (int) $_POST['attachmentId'];
|
315 |
-
$meta = wp_get_attachment_metadata( $attachmentId );
|
316 |
-
$current_file = get_attached_file( $attachmentId );
|
317 |
-
$pathinfo = pathinfo( $current_file );
|
318 |
-
$basepath = $pathinfo['dirname'];
|
319 |
-
$retinafile = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->core->retina_extension() . $pathinfo['extension'];
|
320 |
-
|
321 |
-
/**
|
322 |
-
* @param $attachmentId ID of the attachment that the uploaded retina image is attached to
|
323 |
-
* @param $retinafile Path to the uploaded retina image
|
324 |
-
*/
|
325 |
-
do_action( 'wr2x_before_upload_retina', $attachmentId, $retinafile );
|
326 |
-
|
327 |
-
if ( file_exists( $retinafile ) )
|
328 |
-
unlink( $retinafile );
|
329 |
-
|
330 |
-
// Insert the new file and delete the temporary one
|
331 |
-
list( $width, $height ) = getimagesize( $tmpfname );
|
332 |
-
|
333 |
-
if ( !$this->core->are_dimensions_ok( $width, $height, $meta['width'] * 2, $meta['height'] * 2 ) ) {
|
334 |
-
echo json_encode( array(
|
335 |
-
'success' => false,
|
336 |
-
'message' => "This image has a resolution of ${width}×${height} but your Full Size image requires a retina image of at least " . ( $meta['width'] * 2 ) . "x" . ( $meta['height'] * 2 ) . "."
|
337 |
-
));
|
338 |
-
die();
|
339 |
-
}
|
340 |
-
$this->core->resize( $tmpfname, $meta['width'] * 2, $meta['height'] * 2, null, $retinafile );
|
341 |
-
chmod( $retinafile, 0644 );
|
342 |
-
unlink( $tmpfname );
|
343 |
-
|
344 |
-
/**
|
345 |
-
* @param $attachmentId ID of the attachment that the uploaded retina image is attached to
|
346 |
-
* @param $retinafile Path to the uploaded retina image
|
347 |
-
*/
|
348 |
-
do_action( 'wr2x_upload_retina', $attachmentId, $retinafile );
|
349 |
-
|
350 |
-
// Get the results
|
351 |
-
$info = $this->core->retina_info( $attachmentId );
|
352 |
-
$this->core->update_issue_status( $attachmentId );
|
353 |
-
$results[$attachmentId] = $this->core->html_get_basic_retina_info_full( $attachmentId, $info );
|
354 |
-
}
|
355 |
-
catch (Exception $e) {
|
356 |
-
echo json_encode( array(
|
357 |
-
'success' => false,
|
358 |
-
'results' => null,
|
359 |
-
'message' => __( "Error: " . $e->getMessage(), 'wp-retina-2x' )
|
360 |
-
));
|
361 |
-
die();
|
362 |
-
}
|
363 |
-
|
364 |
-
echo json_encode( array(
|
365 |
-
'success' => true,
|
366 |
-
'results' => $results,
|
367 |
-
'message' => __( "Uploaded successfully.", 'wp-retina-2x' ),
|
368 |
-
'media' => array(
|
369 |
-
'id' => $attachmentId,
|
370 |
-
'src' => wp_get_attachment_image_src( $attachmentId, 'thumbnail' ),
|
371 |
-
'edit_url' => get_edit_post_link( $attachmentId, 'attribute' )
|
372 |
-
)
|
373 |
-
));
|
374 |
-
die();
|
375 |
-
}
|
376 |
-
|
377 |
-
function wp_ajax_wr2x_retina_upload() {
|
378 |
-
require_once ABSPATH . 'wp-admin/includes/image.php';
|
379 |
-
$this->check_nonce( 'wr2x_retina_upload' );
|
380 |
-
$this->check_capability();
|
381 |
-
|
382 |
-
try {
|
383 |
-
$tmpf = $this->check_get_ajax_uploaded_file();
|
384 |
-
$ftype = wp_check_filetype( $_POST['filename'] );
|
385 |
-
$image = wp_get_image_editor( $tmpf, array ( 'mime_type' => $ftype['type'] ) );
|
386 |
-
$size = $image->get_size();
|
387 |
-
|
388 |
-
// Halve the size of the uploaded image
|
389 |
-
if ( $size['width'] >= $size['height'] ) $image->resize( round($size['width'] * .5), null );
|
390 |
-
else $image->resize( null, round($size['height'] * .5) );
|
391 |
-
$image->set_quality( get_option('wr2x_quality', 90) );
|
392 |
-
$halved = $image->save( $tmpf . 'H', $ftype['type'] );
|
393 |
-
if ( !$halved ) throw new Exception( "Failed to halve the uploaded image" );
|
394 |
-
if ( is_wp_error($halved) ) throw new Exception( $halved->get_error_message() );
|
395 |
-
|
396 |
-
// Upload the halved image
|
397 |
-
$content = file_get_contents( $halved['path'] );
|
398 |
-
if ( $content === false ) throw new Exception( "Couldn't read the uploaded file: {$halved['file']}" );
|
399 |
-
$uploaded = wp_upload_bits( $_POST['filename'], null, $content );
|
400 |
-
if ( isset($uploaded['error']) && $uploaded['error'] ) throw new Exception( $uploaded['error'] );
|
401 |
-
|
402 |
-
// Register the file as a new attachment
|
403 |
-
$attachTo = 0; // TODO Support specifying which post the media attach to
|
404 |
-
$attachment = array (
|
405 |
-
'post_mime_type' => $ftype['type'],
|
406 |
-
'post_parent' => $attachTo,
|
407 |
-
'post_title' => preg_replace( '/\.[^.]+$/', '', $_POST['filename'] ),
|
408 |
-
'post_content' => '',
|
409 |
-
'post_status' => 'inherit'
|
410 |
-
);
|
411 |
-
$attachmentId = wp_insert_attachment( $attachment, $uploaded['file'], $attachTo );
|
412 |
-
if ( !$attachmentId ) throw new Exception( "Couldn't add an attachment file: {$uploaded['file']}" );
|
413 |
-
if ( is_wp_error($attachmentId) ) throw new Exception( $attachmentId->get_error_message() );
|
414 |
-
$meta = wp_generate_attachment_metadata( $attachmentId, $uploaded['file'] );
|
415 |
-
wp_update_attachment_metadata( $attachmentId, $meta );
|
416 |
-
|
417 |
-
} catch ( Exception $e ) {
|
418 |
-
echo json_encode( array (
|
419 |
-
'success' => false,
|
420 |
-
'results' => null,
|
421 |
-
'message' => __( "Error: " . $e->getMessage(), 'wp-retina-2x' )
|
422 |
-
));
|
423 |
-
die();
|
424 |
-
}
|
425 |
-
// Redirect to 'wr2x_upload'
|
426 |
-
$_POST['attachmentId'] = $attachmentId;
|
427 |
-
$this->wp_ajax_wr2x_upload( false );
|
428 |
-
}
|
429 |
-
|
430 |
-
function wp_ajax_wr2x_replace() {
|
431 |
-
$this->check_nonce( 'wr2x_replace' );
|
432 |
-
|
433 |
-
$tmpfname = $this->check_get_ajax_uploaded_file();
|
434 |
-
$attachmentId = (int) $_POST['attachmentId'];
|
435 |
-
$meta = wp_get_attachment_metadata( $attachmentId );
|
436 |
-
$current_file = get_attached_file( $attachmentId );
|
437 |
-
|
438 |
-
/**
|
439 |
-
* @param $attachmentId ID of the attachment to replace
|
440 |
-
* @param $tmpfname Path to the temporary file that is to be the replacement
|
441 |
-
*/
|
442 |
-
do_action( 'wr2x_before_replace', $attachmentId, $tmpfname );
|
443 |
-
|
444 |
-
$this->core->delete_attachment( $attachmentId, false );
|
445 |
-
$pathinfo = pathinfo( $current_file );
|
446 |
-
$basepath = $pathinfo['dirname'];
|
447 |
-
|
448 |
-
// Let's clean everything first
|
449 |
-
if ( wp_attachment_is_image( $attachmentId ) ) {
|
450 |
-
$sizes = $this->core->get_image_sizes();
|
451 |
-
foreach ($sizes as $name => $attr) {
|
452 |
-
if ( isset( $meta['sizes'][$name] ) && isset( $meta['sizes'][$name]['file'] ) && file_exists( trailingslashit( $basepath ) . $meta['sizes'][$name]['file'] ) ) {
|
453 |
-
$normal_file = trailingslashit( $basepath ) . $meta['sizes'][$name]['file'];
|
454 |
-
$pathinfo = pathinfo( $normal_file );
|
455 |
-
$retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->core->retina_extension() . $pathinfo['extension'];
|
456 |
-
|
457 |
-
// Test if the file exists and if it is actually a file (and not a dir)
|
458 |
-
// Some old WordPress Media Library are sometimes broken and link to directories
|
459 |
-
if ( file_exists( $normal_file ) && is_file( $normal_file ) )
|
460 |
-
unlink( $normal_file );
|
461 |
-
if ( file_exists( $retina_file ) && is_file( $retina_file ) )
|
462 |
-
unlink( $retina_file );
|
463 |
-
}
|
464 |
-
}
|
465 |
-
}
|
466 |
-
if ( file_exists( $current_file ) )
|
467 |
-
unlink( $current_file );
|
468 |
-
|
469 |
-
// Insert the new file and delete the temporary one
|
470 |
-
rename( $tmpfname, $current_file );
|
471 |
-
chmod( $current_file, 0644 );
|
472 |
-
|
473 |
-
// Generate the images
|
474 |
-
wp_update_attachment_metadata( $attachmentId, wp_generate_attachment_metadata( $attachmentId, $current_file ) );
|
475 |
-
$meta = wp_get_attachment_metadata( $attachmentId );
|
476 |
-
$this->core->generate_images( $meta );
|
477 |
-
|
478 |
-
/**
|
479 |
-
* @param $attachmentId ID of the attachment that has been replaced
|
480 |
-
*/
|
481 |
-
do_action( 'wr2x_replace', $attachmentId );
|
482 |
-
|
483 |
-
// Get the results
|
484 |
-
$info = $this->core->retina_info( $attachmentId );
|
485 |
-
$results[$attachmentId] = $this->core->html_get_basic_retina_info( $attachmentId, $info );
|
486 |
-
|
487 |
-
echo json_encode( array(
|
488 |
-
'success' => true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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/debug.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/* eslint-disable */
|
2 |
+
|
3 |
+
window.devicePixelRatio = 2;
|
app/index.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
!function(e){function t(t){for(var r,i,l=t[0],o=t[1],s=t[2],m=0,d=[];m<l.length;m++)i=l[m],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&d.push(a[i][0]),a[i]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,s||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,l=1;l<n.length;l++){var o=n[l];0!==a[o]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},a={0:0},c=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var l=window.wpJsonWr2x=window.wpJsonWr2x||[],o=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=o;c.push([116,1]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";var r=n(14);n.d(t,"b",(function(){return r.a}));var a=n(11);n.d(t,"c",(function(){return a.a}));var c=n(32);n.d(t,"m",(function(){return c.a})),n.d(t,"n",(function(){return c.b}));var i=n(44);n.d(t,"s",(function(){return i.a}));var l=n(45);n.d(t,"a",(function(){return l.a}));var o=n(46);n.d(t,"g",(function(){return o.a}));var s=n(47);n.d(t,"x",(function(){return s.a}));n(48);var u=n(33);n.d(t,"G",(function(){return u.b})),n.d(t,"f",(function(){return u.a}));var m=n(49);n.d(t,"d",(function(){return m.a}));var d=n(50);n.d(t,"e",(function(){return d.a}));var p=n(51);n.d(t,"k",(function(){return p.a}));n(52);var f=n(34);n.d(t,"w",(function(){return f.b})),n.d(t,"r",(function(){return f.a}));n(7),n(35),n(20);var h=n(53);n.d(t,"u",(function(){return h.a}));var g=n(54);n.d(t,"i",(function(){return g.a}));var y=n(55);n.d(t,"t",(function(){return y.a}));var b=n(15);n.d(t,"j",(function(){return b.a}));var R=n(19);n.d(t,"E",(function(){return R.a}));var E=n(36);n.d(t,"v",(function(){return E.b})),n.d(t,"l",(function(){return E.a}));var v=n(56);n.d(t,"h",(function(){return v.a}));var w=n(37);n.d(t,"o",(function(){return w.a})),n.d(t,"p",(function(){return w.b}));var x=n(57);n.d(t,"F",(function(){return x.a}));var _=n(17);n.d(t,"D",(function(){return _.a}));var k=n(58);n.d(t,"q",(function(){return k.a}));var I=n(63);n.d(t,"z",(function(){return I.a}));var O=n(39);n.d(t,"A",(function(){return O.b})),n.d(t,"y",(function(){return O.a}));n(40);var S=n(64);n.d(t,"C",(function(){return S.a}));var j=n(3);n.d(t,"B",(function(){return j.a}));var P=n(6);n.d(t,"M",(function(){return P.d})),n.d(t,"K",(function(){return P.b})),n.d(t,"L",(function(){return P.c}));var A=n(13);n.d(t,"J",(function(){return A.c})),n.d(t,"I",(function(){return A.b})),n.d(t,"H",(function(){return A.a}));n(18)},107:function(e,t){e.exports=ReactDOM},116:function(e,t,n){"use strict";n.r(t);var r=n(10),a=n(1),c=n(4),i=wp.i18n.__,l={};l.GENERATE=i("Generate","wp-retina-2x"),l.DASHBOARD=i("Dashboard","wp-retina-2x"),l.PENDING=i("Pending","wp-retina-2x"),l.RENAMED=i("Renamed","wp-retina-2x"),l.ALL=i("All","wp-retina-2x"),l.THUMB=i("Thumb","wp-retina-2x"),l.TITLE_REPLACE=i("Replace / Title / Size","wp-retina-2x"),l.ATTACHED_TO=i("Attached To","wp-retina-2x"),l.FILENAME=i("Filename","wp-retina-2x");var o=l,s=wr2x_retina.prefix,u=wr2x_retina.domain,m=wr2x_retina.rest_url.replace(/\/+$/,""),d=wr2x_retina.api_url.replace(/\/+$/,""),p=wr2x_retina.plugin_url.replace(/\/+$/,""),f=wr2x_retina.upload_url.replace(/\/+$/,""),h="1"===wr2x_retina.is_pro,g=h&&"1"===wr2x_retina.is_registered,y=wr2x_retina.rest_nonce,b=(wr2x_retina.home_url.replace(/\/+$/,""),wr2x_retina.site_url.replace(/\/+$/,"")),R=wr2x_retina.retina_sizes,E=!!wr2x_retina.full_size;function v(e,t,n,r,a,c,i){try{var l=e[c](i),o=l.value}catch(e){return void n(e)}l.done?t(o):Promise.resolve(o).then(r,a)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){v(c,r,a,i,l,"next",e)}function l(e){v(c,r,a,i,l,"throw",e)}i(void 0)}))}}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n display: block;\n color: white;\n padding: 8px 0px;\n font-size: 10px;\n text-align: center;\n width: 24px;\n height: 24px;\n line-height: 8px;\n margin-left: 2px;\n margin-right: -6px;\n box-sizing: border-box;\n margin-bottom: 2px;\n background: ",";\n border-radius: 25px;\n box-shadow: 0px 0px 3px white;\n cursor: pointer;\n\n &.disabled {\n background: gray;\n }\n\n &.missing {\n background: ",";\n }\n\n &.cannot {\n background: ",";\n }\n\n &.pending {\n background: ",";\n }\n\n &.ignored {\n background: gray;\n }\n\n &:last-child {\n margin-right: 6px;\n }\n"]);return k=function(){return e},e}var I=wp.element,O=I.useState,S=I.useEffect,j=c.a.div(k(),a.B.blue,a.B.red,a.B.red,a.B.orange),P=function(e){var t=e.mutate,n=e.actionButton,r=void 0===n||n,c=e.displaySizes,i=void 0===c||c,l=e.displayFullSize,s=void 0===l||l,u=x(O(e.entry),2),m=u[0],p=u[1],f=x(O(!1),2),h=f[0],g=f[1],b=Object(a.L)({concurrency:2}).runTask;S((function(){e.entry?p(e.entry):e.mediaId&&R(e.mediaId)}),[e.entry]);var R=function(){var e=w(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g((function(e){return e+1})),e.next=3,b(w(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(a.J)("".concat(d,"/details"),{json:{mediaId:t}}));case 1:case"end":return e.stop()}}),e)}))));case 3:n=e.sent,p(n.data),g((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=w(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(n),t&&t();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var t=w(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g((function(e){return e+1})),t.next=3,Object(a.J)("".concat(d,"/build_retina"),{json:{mediaId:e.mediaId},nonce:y});case 3:n=t.sent,E(n.data),g((function(e){return e-1}));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=function(e,t){return"CANNOT"===t.status?"".concat(t.name,": The Full-Size is too small to generate this size. A Full-Size of at least ").concat(t.required.width,"×").concat(t.required.height," is required."):"PENDING"===t.status?"".concat(t.name,": The retina can be generated."):t.name};return React.createElement(a.b,{busy:h},React.createElement("div",{style:{display:"flex",alignItems:"center"}},r&&React.createElement(a.c,{style:{marginLeft:0},title:"Generate",onClick:v},o.GENERATE),i&&m&&m.filter((function(e){return"IGNORED"!==e.status&&"full-size"!==e.name})).map((function(e){return React.createElement(React.Fragment,null,React.createElement(j,{className:e.status.toLowerCase(),title:_(0,e)},e.shortname))})),s&&m&&m.filter((function(e){return"IGNORED"!==e.status&&"full-size"===e.name})).map((function(e){return React.createElement(React.Fragment,null,React.createElement(j,{className:e.status.toLowerCase(),title:_(0,e)},e.shortname))}))))};function A(e,t,n,r,a,c,i){try{var l=e[c](i),o=l.value}catch(e){return void n(e)}l.done?t(o):Promise.resolve(o).then(r,a)}function C(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){A(c,r,a,i,l,"next",e)}function l(e){A(c,r,a,i,l,"throw",e)}i(void 0)}))}}function T(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw c}}return n}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n display: block;\n color: white;\n padding: 8px 0px;\n font-size: 10px;\n text-align: center;\n width: 24px;\n height: 24px;\n line-height: 8px;\n margin-left: 2px;\n margin-right: -6px;\n box-sizing: border-box;\n margin-bottom: 2px;\n background: ",";\n border-radius: 25px;\n box-shadow: 0px 0px 3px white;\n cursor: pointer;\n\n &.disabled {\n background: #a6ceea;\n }\n\n &.missing {\n background: ",";\n }\n\n &.cannot {\n background: ",";\n }\n\n &.pending {\n background: ",";\n }\n\n &.ignored {\n background: #a6ceea;\n }\n\n\n"]);return F=function(){return e},e}var M=wp.element,B=M.useState,L=M.useEffect,q=M.useMemo,W=R.length>0||E,G={width:40,height:40,objectFit:"cover"},U=[{accessor:"thumbnail_url",title:o.THUMB,style:{width:16}},{accessor:"title_metadata",title:o.TITLE_REPLACE,sortable:!0,style:{width:280}},{accessor:"metadata",title:"Thumbnails (Retina in Colors)",style:{width:280}},{accessor:"retina_full",title:"Retina for Full-Size",visible:W&&E},{accessor:"actions",title:"Actions"}],H={accessor:"id",by:"asc"},J=c.a.div(F(),a.B.blue,a.B.red,a.B.red,a.B.orange),Y=function(e){var t=e.entry,n=e.metadata;if(!n.sizes||!n.file)return null;var r=Object.keys(n.sizes),c=f+"/"+n.file.replace(/[^/]*$/,"");return React.createElement(React.Fragment,null,r.map((function(e){var r=n.sizes[e],i=r.width,l=r.height,o=r.shortname,s=r.file,u=c+s,m=t.find((function(t){return t.name===e}));return React.createElement(a.D,{text:React.createElement(React.Fragment,null,"Size Name: ",e," (",o,")",React.createElement("br",null),"Dimension: ",i,"×",l,React.createElement("br",null),"Retina: ",m?m.status:"MISSING")},React.createElement(J,{className:m?m.status.toLowerCase():"missing",onClick:function(){return e=u,void console.log(e);var e}},o))})))},$=function(){var e=z(B("issues"),2),t=e[0],n=e[1],c=z(B(),2),i=c[0],l=c[1],o=z(B(),2),s=o[0],u=(o[1],z(B([]),2)),m=u[0],p=u[1],f=z(B(!1),2),h=f[0],b=f[1],R=z(B(""),2),v=R[0],w=R[1],x=z(B(""),2),_=x[0],k=x[1],I=z(B(""),2),O=I[0],S=I[1],j=z(B(H),2),A=j[0],D=j[1],N=z(B(1),2),F=N[0],M=N[1],W=z(B(10),2),J=W[0],$=W[1],K=Object(a.M)(),V=(F-1)*J,Q=A.accessor,X=A.by,Z=Object(r.b)("".concat(d,"/stats")),ee=Z.data,te=Z.mutate,ne=Object(r.b)("".concat(d,"/all_settings/")).data,re=Object(r.b)(Object(a.H)("".concat(d,"/media"),{limit:J,skip:V,filterBy:t,orderBy:Q,order:X,search:v})),ae=re.data,ce=re.mutate,ie=Object(a.K)(ne,{},!0),le=ie.busy,oe=ie.data,se=ie.error,ue=Object(a.K)(ee,{issues:"-",ignored:"-",all:"-"},!0),me=ue.busy,de=ue.data,pe=ue.error,fe=Object(a.K)(ae,[],!0),he=fe.busy,ge=fe.data,ye=fe.total,be=fe.error,Re=he||le||me||h,Ee=oe.wr2x_image_replace?parseInt(oe.wr2x_image_replace):0,ve=function(e,t){var n=T(ae.data),r=n.findIndex((function(t){return t.ID===e}));n[r]=t,ce({success:!0,data:n},!1),te()},we=function(e){var t=e.mediaId;return React.createElement(a.F,{height:40,width:40,iconSize:16,style:{marginRight:5},onFailure:function(e){alert(e.message)},onSuccess:function(e){l(null),ve(t,e.data),te()},apiUrl:"".concat(d,"/replace"),apiConfig:{json:{mediaId:t},nonce:y}})},xe=function(e){var t=e.mediaId;return React.createElement(a.F,{height:40,width:40,iconSize:16,style:{marginRight:5},onFailure:function(e){alert(e.message)},onSuccess:function(e){l(null),ve(t,e.data),te()},apiUrl:"".concat(d,"/upload_retina_fullsize"),apiConfig:{json:{mediaId:t},nonce:y}})},_e=q((function(){return ge.map((function(e){var n,r,c,i=e.info.filter((function(e){return"EXISTS"===e.status&&"full-size"===e.name})).length>0,l=e.info.filter((function(e){return"MISSING"===e.status||"CANNOT"===e.status})).length>0;return{id:e.ID,thumbnail_url:React.createElement("img",{src:"".concat(e.thumbnail_url,"?version=").concat(e.version),style:G}),title_metadata:React.createElement("div",{style:{display:"flex",alignItems:"center"}},!!Ee&&React.createElement(we,{mediaId:e.ID}),React.createElement("div",{style:{display:"flex",flexDirection:"column"}},React.createElement("a",{href:"post.php?post=".concat(e.ID,"&action=edit")},e.post_title),React.createElement("small",null,"Full-Size: ",e.metadata.width,"×",e.metadata.height," (",e.filesize,")"))),metadata:React.createElement("div",{style:{display:"flex",alignItems:"center"}},React.createElement(Y,(n={entry:e,metadata:e.metadata},r="entry",c=e.info,r in n?Object.defineProperty(n,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):n[r]=c,n))),retina_full:React.createElement("div",{style:{display:"flex",alignItems:"center"}},(E||i)&&React.createElement("div",{style:{display:"flex",alignItems:"center"}},!i&&React.createElement(xe,{mediaId:e.ID}),React.createElement(P,{actionButton:!1,displaySizes:!1,displayFullSize:!0,entry:e.info}))),actions:React.createElement("div",{style:{textAlign:"right"}},React.createElement(a.c,{title:"Regenerate Thumbnails, Metadata and Build Retina",onClick:function(){return Ae([e.ID])}},"Build Thumbnails"),React.createElement(a.c,{onClick:function(){return Oe([e.ID])}},"Build Retina"),i&&React.createElement(a.c,{onClick:function(){confirm("Are you sure?")&&je([e.ID])}},"Delete ",React.createElement("small",null,"Full-Size Retina")),l&&"issues"===t&&React.createElement(a.c,{onClick:function(){return Se(e.ID)}},"Ignore"),"ignored"===t&&React.createElement(a.c,{onClick:function(){return Se(e.ID)}},"Un-Ignore"))}}))}),[ge]);L((function(){p([]),D(H),M(1)}),[t]),L((function(){if(null!==K.busy&&(b(K.busy),!K.busy)){var e=K.getErrorCount();e>0&&S("The process has finished, but ".concat(e," error(s) occurred (check your console).")),K.reset(),p([]),ce(),te()}}),[K.busy]);var ke=function(){var e=C(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(a.J)("".concat(d,"/get_all_ids"),{json:{issuesOnly:t},nonce:y});case 2:if((n=e.sent).success){e.next=6;break}return alert(n.message),e.abrupt("return",[]);case 6:return e.abrupt("return",n.data);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ie=function(){var e=C(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,Object(a.J)("".concat(d,"/refresh"),{nonce:y});case 3:ce(),te(),b(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=C(regeneratorRuntime.mark((function e(){var t,n,r,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:null,k("Preparing..."),b(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,ke(!0);case 9:e.t0=e.sent;case 10:if(!(n=e.t0)){e.next=16;break}return r=n.map((function(e){return function(){var t=C(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k("Build Retina for #".concat(e)),t.next=3,Object(a.J)("".concat(d,"/build_retina"),{json:{mediaId:e},nonce:y,signal:n});case 3:return(r=t.sent).success?ve(e,r.data):alert("Error!"),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=15,K.start(r);case 15:te();case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=C(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,Object(a.J)("".concat(d,"/ignore"),{json:{mediaId:t},nonce:y});case 3:return(n=e.sent).success?(te(),ce()):alert("Error!"),b(!1),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),je=function(){var e=C(regeneratorRuntime.mark((function e(){var t,n,r,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:null,k("Preparing..."),b(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,ke();case 9:e.t0=e.sent;case 10:if(!(n=e.t0)){e.next=16;break}return r=n.map((function(e){return function(){var t=C(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k("Delete Full-Size Retina for #".concat(e)),t.next=3,Object(a.J)("".concat(d,"/delete_retina_fullsize"),{json:{mediaId:e},nonce:y,signal:n});case 3:return(r=t.sent).success?ve(e,r.data):alert("Error!"),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=15,K.start(r);case 15:te();case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=C(regeneratorRuntime.mark((function e(){var t,n,r,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:null,k("Preparing..."),b(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,ke();case 9:e.t0=e.sent;case 10:if(!(n=e.t0)){e.next=16;break}return r=n.map((function(e){return function(){var t=C(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k("Delete Retina for #".concat(e)),t.next=3,Object(a.J)("".concat(d,"/delete_retina"),{json:{mediaId:e},nonce:y,signal:n});case 3:return(r=t.sent).success?ve(e,r.data):alert("Error!"),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=15,K.start(r);case 15:te();case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=C(regeneratorRuntime.mark((function e(){var t,n,r,c=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:null,k("Preparing..."),b(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,ke();case 9:e.t0=e.sent;case 10:if(!(n=e.t0)){e.next=16;break}return r=n.map((function(e){return function(){var t=C(regeneratorRuntime.mark((function t(n){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return k("Regenerate #".concat(e)),t.next=3,Object(a.J)("".concat(d,"/regenerate"),{json:{mediaId:e},nonce:y,signal:n});case 3:return(r=t.sent).success?ve(e,r.data):alert("Error!"),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})),e.next=15,K.start(r);case 15:te();case 16:b(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ce=React.createElement(React.Fragment,null,React.createElement(a.c,{className:"secondary",onClick:function(){return window.open("https://meowapps.com/plugin/wp-retina-2x/","_blank")}},"Get the Pro Version"),React.createElement(a.c,{className:"primary",onClick:function(){return window.open("https://meowapps.com/wp-retina-2x-tutorial/","_blank")}},"Read the tutorial"));return React.createElement(a.s,{nekoErrors:[pe,se,be]},React.createElement(a.i,{title:"Perfect Images + Retina | Dashboard",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(a.c,{className:"primary",onClick:function(){return window.open("https://meowapps.com/wp-retina-2x-tutorial/","_blank")}},"Tutorial"),React.createElement(a.c,{icon:"cog",color:"#8554bb",onClick:function(){return location.href="admin.php?page=wr2x_settings"}},"Settings"))),React.createElement(a.G,null,React.createElement(a.f,{full:!0},React.createElement(a.g,{footer:!g&&Ce},React.createElement(a.E,{p:!0},"Welcome to the new version of the former WP Retina 2x, now ",React.createElement("b",null,"Perfect Images"),". The goal is to make your images sizes and thumbnails more manageable, with Retina support. Please let me know if this dashboard is not clear enough, or if you have ideas how to make it even better.")),React.createElement(a.C,null,React.createElement(a.c,{onClick:function(){return Ie()}},"Refresh Stats"),!Re&&m.length>0&&React.createElement(React.Fragment,null,React.createElement(a.c,{className:"secondary",onClick:function(){return Oe(m)}},"Build Retina for ",React.createElement("strong",null,m.length," Entries")),React.createElement(a.c,{className:"secondary",title:"Regenerate Thumbnails, Metadata and Build Retina",onClick:function(){return Ae(m)}},"Regenerate ",React.createElement("strong",null,m.length," Entries")),React.createElement(a.c,{className:"danger",onClick:function(){return Pe(m)}},"Delete Retina for ",React.createElement("strong",null,m.length," Entries"))),React.createElement("div",{style:{flex:1}},h&&React.createElement(a.u,{status:function(e){return"".concat(_," (").concat(e,"%)")},busy:h,value:K.value,max:K.max,onStopClick:K.stop})),!Re&&React.createElement(React.Fragment,null,React.createElement(a.k,{onBlur:function(e){w(e)},value:v,onEnter:function(e){w(e)}}),!v&&React.createElement(a.j,{icon:"search",width:24,style:{position:"relative",left:-34,marginRight:-22},color:"#5a5a5a82"}),v&&React.createElement(a.j,{icon:"close",width:24,style:{position:"relative",left:-34,marginRight:-22},color:a.B.blue,onClick:function(){w("")}})),!Re&&0===m.length&&React.createElement(React.Fragment,null,React.createElement(a.m,{title:"Bulk Actions",style:{minWidth:180}},React.createElement(a.n,{className:"primary",onClick:function(){return Oe()}},"Build Retina for ",React.createElement("strong",null,"All Issues")),React.createElement(a.n,{className:"primary",title:"Regenerate Thumbnails, Metadata and Build Retina",onClick:function(){return Ae()}},"Regenerate ",React.createElement("strong",null,"All Entries")),React.createElement(a.n,{className:"danger",onClick:function(){return Pe()}},"Delete Retina for ",React.createElement("strong",null,"All"))))),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,marginBottom:10}},React.createElement(a.v,{value:t,busy:me,onChange:function(e){n(e),M(1)}},React.createElement(a.l,{title:"All",value:"all",count:de.all}),React.createElement(a.l,{title:"Retina Issues",value:"issues",count:de.issues}),React.createElement(a.l,{title:"Ignored",value:"ignored",count:de.ignored})),React.createElement(a.t,{currentPage:F,limit:J,total:ye,onClick:function(e){return M(e)}})),React.createElement(a.z,{busy:Re,data:_e,columns:U,sort:A,onSortChange:function(e,t){D({accessor:e,by:t})},onSelect:function(e){p([].concat(T(m),T(e)))},onUnselect:function(e){p(T(m.filter((function(t){return!e.includes(t)}))))},selectedItems:m}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(a.w,{scrolldown:!0,value:J,onChange:function(e){$(e),M(1)}},React.createElement(a.r,{value:10,label:"10 items per page"}),React.createElement(a.r,{value:25,label:"25 items per page"}),React.createElement(a.r,{value:50,label:"50 items per page"}),React.createElement(a.r,{value:100,label:"100 items per page"}),React.createElement(a.r,{value:250,label:"250 items per page"})),React.createElement(a.t,{currentPage:F,limit:J,total:ye,onClick:function(e){return M(e)}}))),React.createElement(a.q,{isOpen:"upload_retina_fullsize"===i,onRequestClose:function(){l(null)},title:"Upload Retina for Full-Size",content:React.createElement(React.Fragment,null,React.createElement(a.F,{height:200,onFailure:function(e){alert(e.message)},onSuccess:function(e){l(null),ve(s,e.data),te()},apiUrl:"".concat(d,"/upload_retina_fullsize"),apiConfig:{json:{mediaId:s},nonce:y}}),React.createElement("p",{style:{marginTop:20,marginBottom:-20}},"Drop your image here! If the thumbnails could not be created before, the plugin will also use this image to create the missing Retina Images."))}),React.createElement(a.q,{isOpen:O,title:"Success",ok:"Close",content:O,onOkClick:function(){S(""),K.reset()}})))};function K(){var e=ee(["\n color: white;\n margin: 0px 15px 15px 15px;\n\n .fatal {\n padding: 8px 12px;\n border-radius: 10px;\n background: #ab3014;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .warning {\n padding: 8px 12px;\n border-radius: 10px;\n background: #b98c0e;\n margin: 0 0 10px 0;\n border: 0;\n }\n\n .notice {\n padding: 8px 12px;\n border-radius: 10px;\n background: #23ad74;\n margin: 0 0 10px 0;\n border: 0;\n }\n"]);return K=function(){return e},e}function V(){var e=ee(["\n\n margin: 15px;\n\n .center {\n background: white;\n border-radius: 10px;\n padding: 10px;\n font-family: Lato;\n max-width: 100%\n overflow: none;\n\n h2 {\n font-size: 26px;\n }\n\n table {\n width: 100%;\n\n tr td:first-child {\n width: 220px;\n font-weight: bold;\n color: #1e7cba;\n }\n\n * {\n overflow-wrap: anywhere;\n }\n }\n }\n\n hr {\n border-color: #1e7cba;\n }\n"]);return V=function(){return e},e}function Q(){var e=ee(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]);return Q=function(){return e},e}function X(){var e=ee(["\n\n .nui-block-title {\n display: none;\n }\n\n .nui-block-content {\n display: flex;\n padding: 10px;\n\n h2 {\n color: #055082;\n font-size: 16px;\n margin: 5px 0 5px 0;\n\n a {\n text-decoration: none;\n }\n }\n\n p {\n margin: 0px;\n line-height: 18px;\n }\n }\n"]);return X=function(){return e},e}function Z(){var e=ee(["\n color: white;\n padding: 15px;\n margin-bottom: -15px;\n\n a {\n color: #7dedff;\n text-decoration: none;\n }\n\n p {\n font-size: 15px;\n }\n"]);return Z=function(){return e},e}function ee(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var te=c.a.div(Z()),ne=Object(c.a)(a.a)(X()),re=c.a.img(Q()),ae=c.a.div(V()),ce=c.a.div(K());function ie(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ue(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e,t,n,r,a,c,i){try{var l=e[c](i),o=l.value}catch(e){return void n(e)}l.done?t(o):Promise.resolve(o).then(r,a)}function oe(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){le(c,r,a,i,l,"next",e)}function l(e){le(c,r,a,i,l,"throw",e)}i(void 0)}))}}function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw c}}return n}(e,t)||ue(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var de=wp.element,pe=de.useState,fe=de.useEffect,he="".concat(m,"/meow-common/v1"),ge=function(e){var t=e.request,n=e.title,r=e.max,c=se(pe(!1),2),i=c[0],l=c[1],o=se(pe([]),2),s=o[0],u=o[1],m=s.length>0?s.reduce((function(e,t){return e+t})):0,d=s.length>0?Math.ceil(m/s.length):0,p=!s.length&&i;fe((function(){i&&setTimeout(oe(regeneratorRuntime.mark((function e(){var n,r,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(new Date).getTime(),e.next=3,Object(a.J)("".concat(he,"/").concat(t));case 3:r=(new Date).getTime(),c=r-n,u((function(e){return[].concat(ie(e),[c])}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[s]);return React.createElement(te,{style:{width:200,textAlign:"center"}},React.createElement(a.E,{h2:!0,style:{color:"white"}},n),React.createElement(a.h,{size:200,value:p?r:d,max:r},React.createElement("span",{style:{fontSize:20}},p?"START":d+" ms"),React.createElement("span",{style:{fontSize:12}},p?"YOUR ENGINE":s.length+" requests")),React.createElement(a.c,{style:{width:"100%",marginTop:10},color:i?"#cc3627":"#ccb027",onClick:function(){i||u([]),l(!i)}},i?"Stop":"Start"))};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e,t,n,r,a,c,i){try{var l=e[c](i),o=l.value}catch(e){return void n(e)}l.done?t(o):Promise.resolve(o).then(r,a)}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return we(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return we(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xe=wp.element,_e=xe.useState,ke=xe.useEffect;d&&m&&p||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var Ie="".concat(m,"/meow-common/v1"),Oe=React.createElement(te,null,React.createElement(a.E,{p:!0},"Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking ",React.createElement("a",{target:"_blank",href:"https://offbeatjapan.org"},"a lot of photos"),"). Meow Apps proposes a suite of plugins focusing on photography, imaging, optimization and SEO. The ultimate goal is to make your website better, faster, while making it easy. Meow Apps also teams up with the best players in the community. For more information, please check ",React.createElement("a",{href:"http://meowapps.com",target:"_blank"},"Meow Apps"),".")),Se=React.createElement(te,null,React.createElement(a.E,{p:!0},"The ",React.createElement("b",null,"Empty Request Time")," helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then Start this again to see how it influences the results. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms! For more information, ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time",target:"_blank"},"click here"),"."),React.createElement(a.E,{p:!0},React.createElement("b",null,"File Operation Time")," creates a temporary size of 10MB every time. ",React.createElement("b",null,"SQL Request Time")," counts the number of posts. Those two should be very fast, and almost the same as the ",React.createElement("b",null,"Empty Request Time"),".")),je=React.createElement(te,null,React.createElement(a.E,{p:!0},"Too many WordPress installs are blown-up with useless and/or heavy plugins, and not aware of best practices. That's not the fault of the users; WordPress pretends to be simple but it is in fact very complex, and the immensity and diversity of the community around it makes it a real jungle where everything is possible."),React.createElement(a.E,{p:!0},"A rule of thumb is to keep your WordPress install as simple as possible, with the least number of plugins installed (run away from the heavy ones) and an excellent hosting service. Avoid VPS or self-hosted solutions; you must be a professional to actually set them up so that they are actually performant."),React.createElement(a.E,{p:!0},"On the Meow Apps website, you will find articles which are always updated with the latest recommendations.",React.createElement("ul",null,React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/debugging-wordpress/",target:"_blank"},"How To Debug")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/seo-optimization/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/clean-optimize-wordpress/",target:"_blank"},"Clean Up and Optimize")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/optimize-images-cdn/",target:"_blank"},"Optimize Images")),React.createElement("li",null,"☘️ ",React.createElement("a",{href:"https://meowapps.com/best-hosting-services-wordpress/",target:"_blank"},"Best Hosting Services"))))),Pe=React.createElement(te,null,React.createElement(a.E,{p:!0},"A summarized version of your PHP Error Logs will be displayed here, with the latest errors at the top. After it, you will find information about your PHP, so make sure your scroll down.")),Ae=function(){var e=ve(_e(!1),2),t=e[0],n=e[1],c=Object(r.b)("".concat(Ie,"/all_settings/"),a.I),i=c.data,l=c.mutate,o=c.error,s=null==i?void 0:i.data,u=null==s?void 0:s.meowapps_hide_meowapps,m=null==s?void 0:s.force_sslverify,d=ve(_e(!1),2),f=d[0],h=d[1],g=ve(_e(""),2),b=g[0],R=g[1],E=ve(_e(""),2),v=E[0],w=E[1];ke((function(){o&&!t&&(n(!0),console.error("Error from UseSWR",o.message))}),[o]),ke((function(){var e=document.getElementById("meow-common-phperrorlogs"),t=document.getElementById("meow-common-phpinfo");R(e.innerHTML),w(t.innerHTML)}),[]);var x=function(){var e,t=(e=regeneratorRuntime.mark((function e(t,n){var r,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=be({},i.data))[n]=t,l(be(be({},i),{},{data:r}),!1),h(!0),e.next=6,Object(a.J)("".concat(Ie,"/update_option"),{json:{name:n,value:t},nonce:y});case 6:c=e.sent,h(!1),c.success||alert(c.message),l();case 10:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){Ee(c,r,a,i,l,"next",e)}function l(e){Ee(c,r,a,i,l,"throw",e)}i(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),_=React.createElement(a.x,{title:"Main Menu"},React.createElement(a.e,{max:"1"},React.createElement(a.d,{id:"meowapps_hide_meowapps",label:"Hide (Not Recommended)",description:React.createElement(a.E,{p:!0},"This will hide the Meow Apps Menu (on the left side) and everything it contains. You can re-enable it through though an option that will be added in Settings → General."),value:"1",disabled:f,checked:u,onChange:x}))),k=React.createElement(a.x,{title:"SSL Verify"},React.createElement(a.e,{max:"1"},React.createElement(a.d,{id:"force_sslverify",label:"Force (Not Recommended)",description:React.createElement(a.E,{p:!0},"This will enforce the usage of SSL when checking the license or updating the plugin."),value:"1",disabled:f,checked:m,onChange:x})));return React.createElement(a.s,{showRestError:t},React.createElement(a.i,{title:"The Dashboard"}),React.createElement(a.G,null,React.createElement(a.f,{full:!0},React.createElement(a.A,null,React.createElement(a.y,{title:"Meow Apps"},Oe,React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(ne,{title:"Media Cleaner",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/media-cleaner.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-cleaner/"},"Media Cleaner")),React.createElement("p",null,"The Cleaner analyzes your WordPress entirely to find out which files are not used. You can trash them, before deleting them permanently. Your WordPress will breath again :)"))),React.createElement(ne,{title:"Media File Renamer",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/media-file-renamer.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/media-file-renamer/"},"Media File Renamer")),React.createElement("p",null,"The Renamer will help you in getting nicer filenames for an improved SEO and a tidier filesystem. It's mostly automatic and very fun to use."))),React.createElement(ne,{title:"Contact Form Block",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/contact-form-block/"},"Contact Form Block")),React.createElement("p",null,"A simple, pretty and superlight contact form. If you simply want your visitors to get in touch with you, this contact form will be perfect for you and your WordPress."))),React.createElement(ne,{title:"Meow Analytics",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/default.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-analytics/"},"Meow Analytics")),React.createElement("p",null,"Are you tired of those heavy plugins, accessing your Google Analytics deliberately? Switch to Meow Analytics!")))),React.createElement(a.f,{minimal:!0},React.createElement(ne,{title:"Meow Gallery",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/meow-gallery.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-gallery/"},"Meow Gallery")),React.createElement("p",null,"This is the fastest gallery system... and it is pretty as well! It is 100% compatible with the native WordPress galleries and therefore, works right away."))),React.createElement(ne,{title:"Meow Lightbox",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/meow-lightbox.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/meow-lightbox/"},"Meow Lightbox")),React.createElement("p",null,"A very sleek and performant Lightbox which will also display your EXIF data (camera, lens, aperture...). Photographers love it."))),React.createElement(ne,{title:"WP/LR Sync",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/wplr-sync.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"WP/LR Sync")),React.createElement("p",null,"Are you using Lightroom? So you know WP/LR Sync already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(ne,{title:"Perfect Images + Retina",className:"primary"},React.createElement(re,{src:"".concat(p,"/common/img/wp-retina-2x.jpg")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wp-retina-2x/"},"Perfect Images + Retina")),React.createElement("p",null,"It handles Retina, help you managing the Image Sizes registered in your WP, and much more.")))))),React.createElement(a.y,{title:"Performance"},Se,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(ge,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(ge,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(ge,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(a.y,{title:"Recommendations"},je),React.createElement(a.y,{title:"PHP Errors & Info"},Pe,React.createElement(ce,{dangerouslySetInnerHTML:{__html:b}}),React.createElement(ae,{dangerouslySetInnerHTML:{__html:v}})),React.createElement(a.y,{title:"Settings"},React.createElement(a.a,{title:"Settings",className:"primary"},_,k))))))};function Ce(e,t,n,r,a,c,i){try{var l=e[c](i),o=l.value}catch(e){return void n(e)}l.done?t(o):Promise.resolve(o).then(r,a)}function Te(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){Ce(c,r,a,i,l,"next",e)}function l(e){Ce(c,r,a,i,l,"throw",e)}i(void 0)}))}}function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return De(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ne=wp.element,Fe=Ne.useState,Me=Ne.useEffect,Be="".concat(m,"/meow-licenser/").concat(s,"/v1"),Le=function(){var e=ze(Fe(!1),2),t=e[0],n=e[1],r=ze(Fe(null),2),c=r[0],i=r[1],l=ze(Fe(null),2),o=l[0],s=l[1],m=ze(Fe(""),2),d=m[0],p=m[1],f=g&&(!o||"valid"!==o.license),b=function(){var e=Te(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h){e.next=2;break}return e.abrupt("return");case 2:return n(!0),e.next=5,Object(a.J)("".concat(Be,"/get_license"),{nonce:y});case 5:t=e.sent,s(t.data),t.data.key&&p(t.data.key),n(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=Te(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,Object(a.J)("".concat(Be,"/set_license"),{nonce:y,json:{serialKey:null}});case 3:e.sent.success&&(p(""),s(null),i("licenseRemoved")),n(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=Te(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,Object(a.J)("".concat(Be,"/set_license"),{nonce:y,json:{serialKey:d}});case 3:(t=e.sent).success&&(s(t.data),t.data&&!t.data.issue&&i("licenseAdded")),n(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Me((function(){b()}),[]);var v=f?"Forced License":g?"Enabled":"Disabled",w=o&&"valid"===o.license,x="Your license is active. Thanks a lot for your support :)";w||(o?"no_activations_left"===o.issue?x=React.createElement("span",null,"There are no activations left for this license. You can visit your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===o.issue?x=React.createElement("span",null,"Your license has expired. You can get another license or renew the current one by visiting your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com"},"Meow Apps Store"),"."):"missing"===o.issue?x="This license does not exist.":"disabled"===o.issue?x="This license has been disabled.":"item_name_mismatch"===o.issue?x="This license seems to be for a different plugin... isn't it? :)":(x=React.createElement("span",null,"There is an unknown error related to this serial key. Really sorry about this! Please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:o})):x="Unknown error :(");var _=React.createElement(a.a,{title:"Pro Version (Not Installed)",className:"primary"},"You will find more information about the Pro Version ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/plugin/".concat(u,"/")},"here"),". If you actually bought the Pro Version already, please remove the current plugin and download the Pro Version from your account at the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://store.meowapps.com/"},"Meow Apps Store"),"."),k=React.createElement(a.a,{title:"Pro Version (".concat(v,")"),busy:t,className:"primary"},React.createElement(a.x,{title:"Serial Key",style:{fontWeight:"bold"}},React.createElement(a.k,{id:"mfrh_pro_serial",name:"mfrh_pro_serial",disabled:t,value:d,onChange:function(e){return p(e)},placeholder:""})),o&&!w&&React.createElement(a.o,null,x),o&&w&&React.createElement(a.p,null,x),!o&&React.createElement(a.E,{p:!0},"Insert your serial key above. If you don't have one yet, you can get one ",React.createElement("a",{href:"/plugin/media-file-renamer/"},"here"),". If there was an error during the validation, try the ",React.createElement("i",null,"Retry")," to ",React.createElement("i",null,"validate")," button."),React.createElement(a.x,{contentAlign:"right"},o&&!w&&React.createElement(a.c,{className:"secondary",disabled:t||!d,onClick:E},"Retry to validate"),o&&o.key===d&&React.createElement(a.c,{className:"secondary",disabled:t||!d,onClick:R},"Remove License"),React.createElement(a.c,{disabled:t||!d||o&&o.key===d,onClick:E},"Validate License")),React.createElement(a.q,{isOpen:"licenseAdded"===c,title:"Thank you :)",content:"The Pro features have been enabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}),React.createElement(a.q,{isOpen:"licenseRemoved"===c,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return h?k:_},qe=wp.element.render;function We(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ke(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){He(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t,n,r,a,c,i){try{var l=e[c](i),o=l.value}catch(e){return void n(e)}l.done?t(o):Promise.resolve(o).then(r,a)}function Ye(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){Je(c,r,a,i,l,"next",e)}function l(e){Je(c,r,a,i,l,"throw",e)}i(void 0)}))}}function $e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,c=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw c}}return n}(e,t)||Ke(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}document.meowDashboardLoaded||(document.meowDashboardLoaded=!0,document.addEventListener("DOMContentLoaded",(function(e){var t=document.getElementById("meow-common-dashboard");t&&qe(React.createElement(Ae,null),t)})));var Qe=wp.element,Xe=Qe.useState,Ze=Qe.useEffect,et=function(e,t){if(0==e)return"0 Bytes";var n=t||2,r=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},tt=function(){var e=Object(r.b)("".concat(d,"/all_settings/"),a.I),t=e.data,n=e.mutate,c=e.error,i=Object(a.K)(t,{},!0),l=i.busy,o=i.data,m=$e(Xe(!1),2),p=m[0],f=m[1],y=$e(Xe(null),2),R=y[0],E=y[1],v=$e(Xe(null),2),w=v[0],x=v[1],_=l||p,k=null==o?void 0:o.wr2x_method,I=null==o?void 0:o.wr2x_sizes,O=null==o?void 0:o.wr2x_retina_sizes,S=null==o?void 0:o.wr2x_disabled_sizes,j=null==o?void 0:o.wr2x_full_size,P=null==o?void 0:o.wr2x_picturefill_keep_src,A=null==o?void 0:o.wr2x_picturefill_lazysizes,C=null==o?void 0:o.wr2x_picturefill_css_background,T=null==o?void 0:o.wr2x_picturefill_noscript,z=null==o?void 0:o.wr2x_auto_generate,D=null==o?void 0:o.wr2x_over_http_check,N=null==o?void 0:o.wr2x_debug,F=null==o?void 0:o.wr2x_disable_responsive,M=null==o?void 0:o.wr2x_cdn_domain,B=null==o?void 0:o.wr2x_big_image_size_threshold,L=null==o?void 0:o.wr2x_hide_retina_column,q=null==o?void 0:o.wr2x_hide_retina_dashboard,W=null==o?void 0:o.wr2x_image_replace,G=null==o?void 0:o.wr2x_easyio_domain,U=null==o?void 0:o.wr2x_easyio_lossless,H="none"===k,J=function(){var e=Ye(regeneratorRuntime.mark((function e(r,c){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=Ue({},t.data))[c]=r,n(Ue(Ue({},t),{},{data:i}),!1),f(!0),e.prev=4,e.next=7,Object(a.J)("".concat(d,"/update_option"),{json:{name:c,value:r}});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),alert(e.t0.message);case 12:f(!1),n();case 14:case"end":return e.stop()}}),e,null,[[4,9]])})));return function(t,n){return e.apply(this,arguments)}}(),Y=[{value:"Responsive",label:React.createElement("span",null,"Responsive Images")},{value:"Picturefill",label:React.createElement("span",null,"Picturefill (Hybrid)")},{value:"retina.js",label:React.createElement("span",null,"Retina.js (Client-side)")},{value:"HTML Rewrite",label:React.createElement("span",null,"HTML Rewrite (Not Recommended)")},{value:"Retina-Images",label:React.createElement("span",null,"Retina-Images (Not Recommended)")},{value:"none",label:React.createElement("span",null,"None")}],$=function(){var e=Ye(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!G){e.next=7;break}return e.next=4,Object(a.J)("".concat(d,"/easy_io_stats"));case 4:(null==(t=e.sent)?void 0:t.stats.original)&&(null==t?void 0:t.stats.savings)&&E(t.stats),(null==t?void 0:t.stats.bandwidth)&&(null==t?void 0:t.stats.quota)&&x(t.stats);case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),alert(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();Ze((function(){$()}),[G]);var K=function(){var e=Ye(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t?We(S.filter((function(e){return e!==n}))):[].concat(We(S),[n]),J(r,"wr2x_disabled_sizes");case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),V=function(){var e=Ye(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t?[].concat(We(O),[n]):We(O.filter((function(e){return e!==n}))),J(r,"wr2x_retina_sizes");case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Q=function(){var e=Ye(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,Object(a.J)("".concat(d,"/easy_io_link"));case 4:e.sent,n(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),alert(e.t0.message);case 11:f(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}(),X=function(){var e=Ye(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,Object(a.J)("".concat(d,"/easy_io_unlink"));case 4:e.sent,n(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),alert(e.t0.message);case 11:f(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}(),Z=React.createElement(a.x,null,React.createElement("table",{style:{width:"100%"}},React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{style:{textAlign:"left"}}),React.createElement("th",{style:{textAlign:"left"}},"Name"),React.createElement("th",{style:{textAlign:"left"}},"Dimensions"),React.createElement("th",{style:{textAlign:"left"}},"Enabled"),React.createElement("th",{style:{textAlign:"left"}},"Retina"))),React.createElement("tbody",null,I&&I.map((function(e){return React.createElement("tr",{key:"wr2x-sizes-"+e.name},React.createElement("td",null,e.shortname),React.createElement("td",{style:{color:"#007cb9"}},e.name),React.createElement("td",null,e.width?React.createElement(React.Fragment,null,e.width,"x",e.height):React.createElement("small",null,"Unknown (disabled)")),React.createElement("td",null,React.createElement(a.d,{id:"enabled-"+e.name,disabled:_,value:"1",checked:e.enabled,onChange:function(){return K(!e.enabled,e.name)}})),React.createElement("td",null,React.createElement(a.d,{id:"retina-"+e.name,disabled:_||!e.enabled,value:"1",checked:e.retina,onChange:function(){return V(!e.retina,e.name)}})))}))))),ee=React.createElement(a.x,{title:"Delivery Method"},React.createElement(a.w,{scrolldown:!0,id:"wr2x_method",name:"wr2x_method",disabled:_,value:k,description:"",onChange:J},Y.map((function(e){return React.createElement(a.r,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),te=React.createElement(a.x,{title:"Full-Size Retina"},React.createElement(a.d,{id:"wr2x_full_size",disabled:H||_,label:"Enable",description:React.createElement(React.Fragment,null,"Enable Retina for Full-Size. A ",React.createElement("i",null,"Upload Retina for Full-Size")," button is added in the ",React.createElement("i",null,"Perfect Images Dashboard"),"."),value:"1",requirePro:!g,checked:!H&&j,onChange:J})),ne=React.createElement(a.x,{title:"Keep IMG SRC"},React.createElement(a.d,{id:"wr2x_picturefill_keep_src",disabled:H||_,label:"Enable",description:React.createElement(React.Fragment,null,"With PictureFill, ",React.createElement("b",null,"src")," tags are replaced by ",React.createElement("b",null,"src-set")," tags, but Google might fail to reference those images. This option will keep the SRC for SEO purpose, but that will force the download of two images (standard, then retina) by the browsers. Please use the ",React.createElement("b",null,"Lazy Retina")," option below as it avoid this to happen (as well as making it loading lazily)."),value:"1",checked:!H&&P,onChange:J})),re=React.createElement(a.x,{title:"Responsive Images"},React.createElement(a.d,{id:"wr2x_picturefill_lazysizes",disabled:_,label:"Enable Lazy",description:React.createElement(React.Fragment,null,"Images (including Retina Images) will not be loaded until the visitor gets closer to them. The result will be a ",React.createElement("b",null,"faster")," website that consumes less bandwidth."),value:"1",requirePro:!g,checked:A,onChange:J})),ae=React.createElement(a.x,{title:"CSS Background"},React.createElement(a.d,{id:"wr2x_picturefill_css_background",disabled:_,label:"Retina-ize",description:React.createElement(React.Fragment,null,"In your HTML, inline CSS Background will be replaced by the Retina version of the image."),value:"1",requirePro:!g,checked:C,onChange:J})),ce=React.createElement(a.x,{title:"Polyfill Script"},React.createElement(a.d,{id:"wr2x_picturefill_noscript",disabled:_,label:"Do not load",description:React.createElement(React.Fragment,null,"Only ",React.createElement("a",{rel:"noreferrer",target:"_blank",href:"https://caniuse.com/srcset"},"the browsers with src-set support")," will display Retina images. You can also choose this if you want to load the Picturefill Polyfill script manually or if it is already loaded by your theme."),value:"1",checked:T,onChange:J})),ie=React.createElement(a.x,{title:"Retina Images"},React.createElement(a.d,{id:"wr2x_auto_generate",disabled:H||_,label:"Build Automatically",description:React.createElement(React.Fragment,null,"The Retina Images will be built automatically every time the thumbnails as generated or regenerated."),value:"1",checked:!H&&z,onChange:J})),le=React.createElement(a.x,{title:"Over HTTP Check"},React.createElement(a.d,{id:"wr2x_over_http_check",disabled:H||_,label:"Enable",description:React.createElement(React.Fragment,null,"This will check the existence of retina images on remote servers. This is useful if your images are hosted on a different server than your WordPress. ",D?React.createElement("b",null,"This option slows down processing dramatically; therefore, caching is absolutely necessary."):""),value:"1",requirePro:!g,checked:!H&&D,onChange:J})),oe=React.createElement(a.x,{title:"Debug"},React.createElement(a.d,{id:"wr2x_debug",disabled:_,label:"Force Retina + Logging",description:React.createElement(React.Fragment,null,"Displays retina and creates a log file in the plugin folder."),value:"1",checked:N,onChange:J})),se=React.createElement(a.x,{title:"Responsive Images"},React.createElement(a.d,{id:"wr2x_disable_responsive",disabled:_,label:"Disable",description:React.createElement(React.Fragment,null,"Disable the natural Responsive Images feature built in WordPress. For developers only."),value:"1",checked:F,onChange:J})),ue=React.createElement(a.x,{title:"CDN Domain",requirePro:!g},React.createElement(a.k,{id:"wr2x_cdn_domain",type:"text",disabled:_,value:M,onEnter:J,onBlur:J,description:React.createElement(React.Fragment,null,"If not empty, your site domain will be replaced with this CDN domain.")})),me=React.createElement(React.Fragment,null,React.createElement(a.x,{title:"Status"},React.createElement("div",{style:{display:"flex",flexDirection:"column"}},React.createElement("div",{style:{marginBottom:5}},React.createElement(a.E,null,G&&React.createElement("div",null,React.createElement("b",null,"Easy IO is active."),React.createElement("br",null),React.createElement("small",null,"This is your CDN domain: ",G,".")),!G&&React.createElement("b",null,"Not linked with Easy IO."),!G&&React.createElement("ul",null,React.createElement("li",null,"1. Check the offer and create your account at ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://ewww.io/easy-perfect/ref/6/?campaign=EasyPerfect"},"Perfect Images + Easy IO"),"."),React.createElement("li",null,"2. Use the [",React.createElement("b",null,"PERFECT20"),"] coupon and you will get ",React.createElement("b",null,"20% off"),"."),React.createElement("li",null,"3. Register this website [",React.createElement("b",null,b),"] in the ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://ewww.io/manage-sites/"},"Easy IO Dashboard"),"."),React.createElement("li",null,"4. Click on the button below, and it's all done! 🏁")))),G&&React.createElement("div",null,React.createElement(a.c,{className:"danger",onClick:X},"Disable Easy IO")),!G&&React.createElement("div",null,React.createElement(a.c,{onClick:Q},"Verify & Enable Easy IO"))))),de=G?React.createElement(a.x,{title:"Stats"},React.createElement("div",{style:{display:"flex",flexDirection:"column",fontSize:14}},React.createElement(a.E,null,React.createElement("span",null,"Bandwidth Usage: "),!w&&React.createElement("span",null,"N/A"),w&&React.createElement("span",null,et(w.bandwidth)," of ",et(w.quota)," (",Math.round(w.bandwidth/w.quota*100)+"%",")")),React.createElement(a.E,null,React.createElement("span",null,"Image Size Reduction: "),!R&&React.createElement("span",null,"N/A"),R&&React.createElement("span",null,Math.round(R.savings/R.original*100)+"%")))):null,pe=G?React.createElement(a.x,{title:"Lossless Quality"},React.createElement(a.d,{id:"wr2x_easyio_lossless",disabled:!G||_,label:"Enable",description:React.createElement(React.Fragment,null,"Make sure that the visual quality of your images is the same as the original, while still being optimized."),value:"1",checked:U,onChange:J})):null,fe=React.createElement(a.x,{title:"Image Threshold"},React.createElement(a.d,{id:"wr2x_big_image_size_threshold",disabled:_,label:"Disable",value:"1",checked:B,onChange:J})),he=React.createElement(a.x,{title:"Image Replace"},React.createElement(a.d,{id:"wr2x_image_replace",disabled:_,label:"Enable",description:React.createElement(React.Fragment,null),requirePro:!g,value:"1",checked:W,onChange:J})),ge=React.createElement(a.x,{title:"Hide Retina Column"},React.createElement(a.d,{id:"wr2x_hide_retina_column",disabled:H||_,label:"Yes",description:React.createElement(React.Fragment,null,"Hide the ",React.createElement("i",null,"Retina Column")," in the Media Library."),value:"1",checked:!H&&L,onChange:J})),ye=React.createElement(a.x,{title:"Hide Dashboard"},React.createElement(a.d,{id:"wr2x_hide_retina_dashboard",disabled:_,label:"Yes",description:React.createElement(React.Fragment,null,"Hide the ",React.createElement("i",null,"Perfect Images Dashboard")," menu and tools."),value:"1",checked:q,onChange:J}));return React.createElement(a.s,{nekoError:[c]},React.createElement(a.i,{title:"Perfect Images + Retina | Settings",subtitle:"By Jordy Meow"},React.createElement("div",{style:{display:"flex",justifyContent:"flex-end"}},React.createElement(a.c,{className:"primary",onClick:function(){return window.open("https://meowapps.com/wp-retina-2x-tutorial/","_blank")}},"Tutorial"),React.createElement(a.c,{icon:"dashboard",color:"#8554bb",onClick:function(){return location.href="admin.php?page=wr2x_dashboard"}},"Dashboard"))),React.createElement(a.G,null,React.createElement(a.f,{full:!0},React.createElement(a.g,null,React.createElement(a.E,{p:!0},"Perfect Images works out of the box. However, to make your install really nice and smooth, you should really take a look at the ",React.createElement("a",{rel:"noreferrer",target:"_blank",href:"https://meowapps.com/wp-retina-2x-tutorial/"},"tutorial"),". Take a bit of time and you will enjoy managing your images with WordPress even more! :)")),React.createElement(a.A,null,React.createElement(a.y,{title:"General"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,title:"Image Sizes",className:"primary"},React.createElement(a.E,{p:!0},"In this screen, you can disable sizes not only the default sizes added by WordPress, but also the ones added by your theme or other plugins. For each of those sizes, you can choose whether or not you would like the Retina image to be generated for it."),Z,ie,te)),React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,title:"Big Image Threshold",className:"primary"},React.createElement(a.E,{p:!0},"Since WordPress 5.3, images bigger than 2560px are resized automatically and renamed with ",React.createElement("i",null,"-scaled"),". To learn more about this, have a look at this article: ",React.createElement("a",{rel:"noreferrer",target:"_blank",href:"https://meowapps.com/wordpress-images-sizes/#The_Big_Image_Treshold"},"The WordPress Image Sizes"),"."),fe),React.createElement(a.a,{busy:_,title:"Image Replace & UI Features",className:"primary"},React.createElement(a.E,{p:!0},"You will be able to replace your images directly in WordPress (in the Perfect Images Dashboard). This plays nicely with the CDN (if handled by Perfect Images) and the cache."),he,ye,ge)))),React.createElement(a.y,{title:"Retina Delivery"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,title:"Basics",className:"primary"},React.createElement(a.E,{p:!0},"This controls how the retina images are integrated into your content and delivered to your visitors. The ",React.createElement("b",null,"Responsive Images")," method is recommended. If your theme and plugins are not using WordPress latest evolutions, you might have to try ",React.createElement("b",null,"PictureFill")," or ",React.createElement("b",null,"Retina.js"),"."),ee,le)),React.createElement(a.f,{minimal:!0},"Picturefill"===k&&React.createElement(a.a,{busy:_,title:"PictureFill",className:"primary"},ne,ae,ce)))),React.createElement(a.y,{title:"Optimization & Speed"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,title:"Perfect Images + Easy IO",className:"primary"},!G&&React.createElement(a.E,{p:!0},"Are you interested in optimizing your images (including WebP) without slowing down your own server, while using a powerful CDN? This all-in-one solution now exists and is very affordable thanks to an unique partnership between Meow Apps and Easy IO (EWWW). More information is available ",React.createElement("a",{target:"_blank",href:"https://meowapps.com/wp-retina-2x-tutorial/#Optimize_your_Images_and_Use_a_CDN"},"here"),"."),me,de,pe)),React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,title:"Lazy Loading",className:"primary"},React.createElement(a.E,{p:!0},"Since WordPress 5.5, images are automatically lazy, and it is also using a feature included in the modern browser. It is recommended to use this new feature instead of customized one (through other plugins, or this option) since it is using no script and does not require any modification. If there is an problem with it, you can still enable the option below."),re)))),React.createElement(a.y,{title:"Advanced"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,className:"primary"},se,oe)),React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:_,className:"primary"},React.createElement(a.E,{p:!0},"If you are using a CDN, enter your CDN subdomain here. If you are using Easy IO CDN, you don't need this, and you can directly use the options available in ",React.createElement("i",null,"Optimization & Speed"),"."),ue)))),React.createElement(a.y,{title:"Pro Version"},React.createElement(Le,{domain:u,prefix:s,isPro:h,isRegistered:g}))))))},nt=function(){return React.createElement(React.Fragment,null,React.createElement("h1",{style:{marginTop:20}},"Upload New Retina Image"),React.createElement("p",null,"The Retina Image you upload here will become your Retina Image for Full-Size. Automatically, WP Retina 2x will generate the normal Full-Size image which will be basically divided by two. The thumbnails and retina thumbnails will also be generated based on your options. ",React.createElement("b",null,"For now, this uploader only works with one by one file.")),React.createElement(a.F,{style:{border:"4px dashed #b4b9be"},height:200,onFailure:function(e){alert(e.message)},onSuccess:function(){alert("Uploaded!")},apiUrl:"".concat(d,"/upload_retina"),apiConfig:{nonce:y}}))},rt=wp.element.render,at={fetcher:a.I,revalidateOnFocus:!1};function ct(){Array.from(document.getElementsByClassName("wr2x-retina-field")).forEach((function(e){var t=e.getAttribute("data-id");rt(React.createElement(r.a,{value:at},React.createElement(P,{natural:!0,mediaId:t})),e)}))}document.addEventListener("DOMContentLoaded",(function(){var e,t;new window.MutationObserver((function(){ct()})).observe(document.documentElement,{childList:!0,subtree:!0}),(e=document.getElementById("wr2x-admin-settings"))&&rt(React.createElement(r.a,{value:at},React.createElement(tt,null)),e),(t=document.getElementById("wr2x-dashboard"))&&rt(React.createElement(r.a,{value:at},React.createElement($,null)),t),ct(),function(){var e=document.getElementById("wr2x-fullsize-uploader");e&&rt(React.createElement(r.a,{value:at},React.createElement(nt,null)),e)}()}))}});
|
2 |
+
//# sourceMappingURL=index.js.map
|
app/index.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"React\"","webpack:///../neko-ui/index.js","webpack:///external \"ReactDOM\"","webpack:///./app/js/i18n.js","webpack:///./app/js/settings.js","webpack:///./app/js/components/RetinaField.js","webpack:///./app/js/components/Dashboard.js","webpack:///./common/js/dashboard/Dashboard.styled.js","webpack:///./common/js/dashboard/SpeedTester.js","webpack:///./common/js/dashboard/Dashboard.js","webpack:///./common/js/components/LicenseBlock.js","webpack:///./common/js/index.js","webpack:///./app/js/components/Settings.js","webpack:///./app/js/components/FullUploader.js","webpack:///./app/js/index.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","React","ReactDOM","__","wp","i18n","GENERATE","DASHBOARD","PENDING","RENAMED","ALL","THUMB","TITLE_REPLACE","ATTACHED_TO","FILENAME","prefix","wr2x_retina","domain","restUrl","rest_url","replace","apiUrl","api_url","pluginUrl","plugin_url","uploadUrl","upload_url","isPro","is_pro","isRegistered","is_registered","restNonce","rest_nonce","siteUrl","home_url","site_url","retinaSizes","retina_sizes","fullSizeEnabled","full_size","element","useState","useEffect","StyledRetinaSize","Styled","div","NekoTheme","blue","red","orange","RetinaField","props","mutate","actionButton","displaySizes","displayFullSize","entry","setEntry","busy","setBusy","runTask","useNekoGlobalQueue","concurrency","mediaId","loadEntry","postFetch","json","onConsolidateAfterAction","freshEntry","onGenerateClick","nonce","res","generateTitle","size","status","required","width","height","style","display","alignItems","marginLeft","title","onClick","filter","x","map","className","toLowerCase","shortname","useMemo","retinaEnabled","ThumbnailStyle","objectFit","columns","accessor","sortable","visible","defaultSort","by","StyledSize","MetadataViewer","metadata","sizes","file","sizeKeys","keys","baseFileUrl","filepath","retina","find","text","url","console","log","Dashboard","filterBy","setFilterBy","currentModal","setCurrentModal","currentMediaId","selectedItems","setSelectedItems","busyAction","setBusyAction","search","setSearch","setStatus","finalMessage","setFinalMessage","sort","setSort","page","setPage","limit","setLimit","bulkTasks","useNekoTasks","skip","orderBy","order","useSWR","swrStats","mutateSwrStats","swrSettings","buildUrlWithParams","swrEntries","mutateSwrEntries","useHandleSWR","busySettings","settings","swrSettingsError","error","issues","ignored","all","busyStats","stats","swrStatsError","busyEntries","entries","totalEntries","total","swrEntriesError","imageReplace","wr2x_image_replace","parseInt","mutateSwrEntry","newSwrEntriesData","foundIndex","findIndex","ID","success","ReplaceImage","iconSize","marginRight","onFailure","alert","message","onSuccess","apiConfig","FullSizeUpload","rows","hasFullSize","info","hasIssues","id","thumbnail_url","src","version","title_metadata","flexDirection","href","post_title","filesize","retina_full","actions","textAlign","onRegenerateThumbnailsClick","onBuildRetinaClick","confirm","onDeleteFullSizeRetinaClick","onIgnoreIssues","errorCount","getErrorCount","reset","getAllIds","issuesOnly","onRefreshStats","ids","mediaIds","tasks","signal","start","onDeleteRetinaClick","jsxFooterMessage","open","nekoErrors","subtitle","justifyContent","icon","color","location","full","footer","flex","max","onStopClick","stop","onBlur","onEnter","position","left","minWidth","marginTop","marginBottom","onChange","count","currentPage","onSortChange","onSelect","onUnselect","includes","scrolldown","label","isOpen","onRequestClose","content","ok","onOkClick","TabText","StyledPluginBlock","NekoBlock","StyledPluginImage","img","StyledPhpInfo","StyledPhpErrorLogs","CommonApiUrl","SpeedTester","request","runRequests","setRunRequests","results","setResults","resultsTotal","reduce","a","b","resultsAverage","Math","ceil","isInitializing","setTimeout","Date","getTime","end","time","h2","fontSize","jsxTextStory","target","jsxTextPerformance","jsxTextRecommendations","jsxPhpErrorLogs","fatalError","setFatalError","jsonFetcher","mutateSwrSettings","swrError","hide_meowapps","meowapps_hide_meowapps","force_sslverify","phpErrorLogs","setPhpErrorLogs","phpInfo","setPhpInfo","logs","document","getElementById","innerHTML","updateOption","newSettingsData","jsxHideMeowApps","description","disabled","checked","jsxForceSSLVerify","showRestError","minimal","dangerouslySetInnerHTML","__html","LicenseBlock","license","setLicense","serialKey","setSerialKey","isOverridenLicense","checkLicense","removeLicense","validateLicense","issue","licenseTextStatus","rel","jsxNonPro","jsxProVersion","fontWeight","txt","placeholder","contentAlign","reload","render","meowDashboardLoaded","addEventListener","event","commmonDash","formatBytes","bytes","decimals","dm","floor","parseFloat","pow","toFixed","Settings","savings","setSavings","quota","setQuota","wr2xMethod","wr2x_method","wr2xSizes","wr2x_sizes","wr2xRetinaSizes","wr2x_retina_sizes","wr2xDisabledSizes","wr2x_disabled_sizes","wr2xFullSize","wr2x_full_size","wr2xKeepImageSrc","wr2x_picturefill_keep_src","wr2xLazyRetina","wr2x_picturefill_lazysizes","wr2xCssBackground","wr2x_picturefill_css_background","wr2xNoScript","wr2x_picturefill_noscript","wr2xAutoGenerate","wr2x_auto_generate","wr2xOverHttpCheck","wr2x_over_http_check","wr2xDebug","wr2x_debug","wr2xDisableResponsive","wr2x_disable_responsive","wr2xCdnDomain","wr2x_cdn_domain","wr2xBigImageSizeThreshold","wr2x_big_image_size_threshold","wr2xHideRetinaColumn","wr2x_hide_retina_column","wr2xHideRetinaDashboard","wr2x_hide_retina_dashboard","wr2xImageReplace","wr2xEasyIoDomain","wr2x_easyio_domain","wr2xEasyIoLossless","wr2x_easyio_lossless","retinaIsDisabled","methodOptions","refreshStats","original","bandwidth","updateSizeEnabled","newDisabledSizes","updateSizeRetina","newRetinaSizes","linkEasyIo","unlinkEasyIo","jsxImageSizes","enabled","jsxDeliveryMethod","option","requirePro","jsxFullSize","jsxKeepImgSrc","jsxLazyRetina","jsxCssBackground","jsxPolyfillScript","jsxAutoGenerate","jsxOverHttpCheck","jsxDebug","jsxDisableResponsive","jsxCdnDomain","type","jsxEasyIoConnection","jsxEasyIoStats","round","jsxEasyIoLossless","jsxBigImageSizeThreshold","jsxImageReplace","jsxHideRetinaColumn","jsxHideRetinaDashboard","nekoError","FullUploader","border","swrConfig","fetcher","revalidateOnFocus","addRetinaFields","Array","from","getElementsByClassName","forEach","field","getAttribute","natural","container","dashboard","MutationObserver","observe","documentElement","childList","subtree","addFullSizeUploader"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAG/D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Owb,IAAW,oBAAC,GAAD,OAA0BW,IAKzDC,EAAY5I,SAASC,eAAe,oBAEzCgC,GAAO,oBAAC,IAAD,CAAWzV,MAAOwb,IAAW,oBAAC,EAAD,OAA2BY,GAgBhET,KAZD,WACC,IAAMS,EAAY5I,SAASC,eAAe,0BACtC2I,GACH3G,GAAO,oBAAC,IAAD,CAAWzV,MAAOwb,IAAW,oBAAC,GAAD,OAA8BY,GAUnEM","file":"index.js","sourceRoot":""}
|
{js → app}/lazysizes.min.js
RENAMED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
/*! lazysizes - v5.2.2 */
|
2 |
|
3 |
!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return i[t].test(e[$]("class")||"")&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(i," "))}},V=function(t,i,e){var a=e?P:"removeEventListener";if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent("Event");if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i<H.minSize&&t&&!e._lazysizesWidth){i=t.offsetWidth;t=t.parentNode}return i},ee=function(){var i,a;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;i=true;a=false;while(e.length){e.shift()()}i=false};var e=function(e,t){if(i&&!t){e.apply(this,arguments)}else{n.push(e);if(!a){a=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(i,e){return e?function(){ee(i)}:function(){var e=this;var t=arguments;ee(function(){i.apply(e,t)})}},ie=function(e){var i;var a=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){i=false;a=f.now();e()};var s=l&&n>49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e<a){I(n,a-e)}else{(l||r)(r)}};return function(){i=f.now();if(!t){t=I(n,a)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var N=0;var M=-1;var x=function(e){N--;if(!e||N<0||!e.target){N=0}};var W=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var S=function(e,t){var i;var a=e;var r=W(e);g-=t;b+=t;p-=t;C+=t;while(r&&(a=a.offsetParent)&&a!=D.body&&a!=O){r=(Z(a,"opacity")||1)>0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&p<i.right&&b>i.top-1&&g<i.bottom+1}}return r};var t=function(){var e,t,i,a,r,n,s,l,o,u,f,c;var d=k.elements;if((h=H.loadMode)&&N<8&&(e=d.length)){t=0;M++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(l=d[t][$]("data-expand"))||!(n=l*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&N<1&&M>2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",a)}}if(!i.detail.dataAttr){Y(e,i.detail)}});var a=function(e,t,i){var a;var r=e.parentNode;if(r){i=s(e,r,i);a=X(e,"lazybeforesizes",{width:i,dataAttr:!!t});if(!a.defaultPrevented){i=a.detail.width;if(i&&i!==e._lazysizesWidth){n(e,r,a,i)}}}};var e=function(){var e;var t=i.length;if(t){e=0;for(;e<t;e++){a(i[e])}}};var t=ae(e);return{_:function(){i=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:a}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});
|
1 |
+
/* eslint-disable */
|
2 |
+
|
3 |
/*! lazysizes - v5.2.2 */
|
4 |
|
5 |
!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return i[t].test(e[$]("class")||"")&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(i," "))}},V=function(t,i,e){var a=e?P:"removeEventListener";if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent("Event");if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i<H.minSize&&t&&!e._lazysizesWidth){i=t.offsetWidth;t=t.parentNode}return i},ee=function(){var i,a;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;i=true;a=false;while(e.length){e.shift()()}i=false};var e=function(e,t){if(i&&!t){e.apply(this,arguments)}else{n.push(e);if(!a){a=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(i,e){return e?function(){ee(i)}:function(){var e=this;var t=arguments;ee(function(){i.apply(e,t)})}},ie=function(e){var i;var a=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){i=false;a=f.now();e()};var s=l&&n>49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e<a){I(n,a-e)}else{(l||r)(r)}};return function(){i=f.now();if(!t){t=I(n,a)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var N=0;var M=-1;var x=function(e){N--;if(!e||N<0||!e.target){N=0}};var W=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var S=function(e,t){var i;var a=e;var r=W(e);g-=t;b+=t;p-=t;C+=t;while(r&&(a=a.offsetParent)&&a!=D.body&&a!=O){r=(Z(a,"opacity")||1)>0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&p<i.right&&b>i.top-1&&g<i.bottom+1}}return r};var t=function(){var e,t,i,a,r,n,s,l,o,u,f,c;var d=k.elements;if((h=H.loadMode)&&N<8&&(e=d.length)){t=0;M++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(l=d[t][$]("data-expand"))||!(n=l*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&N<1&&M>2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",a)}}if(!i.detail.dataAttr){Y(e,i.detail)}});var a=function(e,t,i){var a;var r=e.parentNode;if(r){i=s(e,r,i);a=X(e,"lazybeforesizes",{width:i,dataAttr:!!t});if(!a.defaultPrevented){i=a.detail.width;if(i&&i!==e._lazysizesWidth){n(e,r,a,i)}}}};var e=function(){var e;var t=i.length;if(t){e=0;for(;e<t;e++){a(i[e])}}};var t=ae(e);return{_:function(){i=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:a}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{});
|
{js → app}/picturefill.min.js
RENAMED
@@ -1,5 +1,8 @@
|
|
|
|
|
|
1 |
/*! picturefill - v3.0.2 - 2016-02-12
|
2 |
* https://scottjehl.github.io/picturefill/
|
3 |
* Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
|
4 |
*/
|
|
|
5 |
!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||" "===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")},j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);
|
1 |
+
/* eslint-disable */
|
2 |
+
|
3 |
/*! picturefill - v3.0.2 - 2016-02-12
|
4 |
* https://scottjehl.github.io/picturefill/
|
5 |
* Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
|
6 |
*/
|
7 |
+
|
8 |
!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||" "===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")},j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);
|
{js → app}/retina-cookie.js
RENAMED
@@ -1 +1,3 @@
|
|
1 |
-
|
|
|
|
1 |
+
/* eslint-disable */
|
2 |
+
|
3 |
+
document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';
|
{js → app}/retina.js
RENAMED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
(function (global, factory) {
|
2 |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
3 |
typeof define === 'function' && define.amd ? define(factory) :
|
1 |
+
/* eslint-disable */
|
2 |
+
|
3 |
(function (global, factory) {
|
4 |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
5 |
typeof define === 'function' && define.amd ? define(factory) :
|
{js → app}/retina.min.js
RENAMED
@@ -1,2 +1,4 @@
|
|
|
|
|
|
1 |
(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?module.exports=b():'function'==typeof define&&define.amd?define(b):a.retinajs=b()})(this,function(){'use strict';function a(a){return Array.prototype.slice.call(a)}function b(a){var b=parseInt(a,10);return k<b?k:b}function c(a){return a.hasAttribute('data-no-resize')||(0===a.offsetWidth&&0===a.offsetHeight?(a.setAttribute('width',a.naturalWidth),a.setAttribute('height',a.naturalHeight)):(a.setAttribute('width',a.offsetWidth),a.setAttribute('height',a.offsetHeight))),a}function d(a,b){var d=a.nodeName.toLowerCase(),e=document.createElement('img');e.addEventListener('load',function(){'img'===d?c(a).setAttribute('src',b):a.style.backgroundImage='url('+b+')'}),e.setAttribute('src',b),a.setAttribute(o,!0)}function e(a,c){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,f=b(e);if(c&&1<f){var g=c.replace(l,'@'+f+'x$1');d(a,g)}}function f(a,b,c){1<k&&d(a,c)}function g(b){return b?'function'==typeof b.forEach?b:a(b):'undefined'==typeof document?[]:a(document.querySelectorAll(n))}function h(a){return a.style.backgroundImage.replace(m,'$2')}function i(a){g(a).forEach(function(a){if(!a.getAttribute(o)){var b='img'===a.nodeName.toLowerCase(),c=b?a.getAttribute('src'):h(a),d=a.getAttribute('data-rjs'),g=!isNaN(parseInt(d,10));if(null===d)return;g?e(a,c,d):f(a,c,d)}})}var j='undefined'!=typeof window,k=Math.round(j?window.devicePixelRatio||1:1),l=/(\.[A-z]{3,4}\/?(\?.*)?)$/,m=/url\(('|")?([^)'"]+)('|")?\)/i,n='[data-rjs]',o='data-rjs-processed';return j&&(window.addEventListener('load',function(){i()}),window.retinajs=i),i});
|
2 |
//# sourceMappingURL=retina.min.js.map
|
1 |
+
/* eslint-disable */
|
2 |
+
|
3 |
(function(a,b){'object'==typeof exports&&'undefined'!=typeof module?module.exports=b():'function'==typeof define&&define.amd?define(b):a.retinajs=b()})(this,function(){'use strict';function a(a){return Array.prototype.slice.call(a)}function b(a){var b=parseInt(a,10);return k<b?k:b}function c(a){return a.hasAttribute('data-no-resize')||(0===a.offsetWidth&&0===a.offsetHeight?(a.setAttribute('width',a.naturalWidth),a.setAttribute('height',a.naturalHeight)):(a.setAttribute('width',a.offsetWidth),a.setAttribute('height',a.offsetHeight))),a}function d(a,b){var d=a.nodeName.toLowerCase(),e=document.createElement('img');e.addEventListener('load',function(){'img'===d?c(a).setAttribute('src',b):a.style.backgroundImage='url('+b+')'}),e.setAttribute('src',b),a.setAttribute(o,!0)}function e(a,c){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,f=b(e);if(c&&1<f){var g=c.replace(l,'@'+f+'x$1');d(a,g)}}function f(a,b,c){1<k&&d(a,c)}function g(b){return b?'function'==typeof b.forEach?b:a(b):'undefined'==typeof document?[]:a(document.querySelectorAll(n))}function h(a){return a.style.backgroundImage.replace(m,'$2')}function i(a){g(a).forEach(function(a){if(!a.getAttribute(o)){var b='img'===a.nodeName.toLowerCase(),c=b?a.getAttribute('src'):h(a),d=a.getAttribute('data-rjs'),g=!isNaN(parseInt(d,10));if(null===d)return;g?e(a,c,d):f(a,c,d)}})}var j='undefined'!=typeof window,k=Math.round(j?window.devicePixelRatio||1:1),l=/(\.[A-z]{3,4}\/?(\?.*)?)$/,m=/url\(('|")?([^)'"]+)('|")?\)/i,n='[data-rjs]',o='data-rjs-processed';return j&&(window.addEventListener('load',function(){i()}),window.retinajs=i),i});
|
4 |
//# sourceMappingURL=retina.min.js.map
|
app/vendor.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(window.wpJsonWr2x=window.wpJsonWr2x||[]).push([[1],[,,function(e,n,t){e.exports=t(96)()},function(e,n,t){"use strict";n.a={black:"black",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#F1F1F1",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#134675",proGray:"#7F8EA0",progress:"#8414a8",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"white",fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",fontSizeSmallButton:"10px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"}},function(e,n,t){"use strict";(function(e){var r=t(28),o=t(0),a=t.n(o),i=(t(84),t(85)),l=t(86),c=t(43),u=t(41),s=t.n(u);function f(){return(f=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}var d=function(e,n){for(var t=[e[0]],r=0,o=n.length;r<o;r+=1)t.push(n[r],e[r+1]);return t},p=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},h=Object.freeze([]),m=Object.freeze({});function b(e){return"function"==typeof e}function v(e){return e.displayName||e.name||"Component"}function y(e){return e&&"string"==typeof e.styledComponentId}var g=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",w="undefined"!=typeof window&&"HTMLElement"in window,x="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||void 0!==e&&(e.env.REACT_APP_SC_DISABLE_SPEEDY||e.env.SC_DISABLE_SPEEDY)||!1,O=function(){return t.nc};function k(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];throw new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#"+e+" for more information."+(t.length>0?" Additional arguments: "+t.join(", "):""))}var C=function(e){var n=document.head,t=e||n,r=document.createElement("style"),o=function(e){for(var n=e.childNodes,t=n.length;t>=0;t--){var r=n[t];if(r&&1===r.nodeType&&r.hasAttribute(g))return r}}(t),a=void 0!==o?o.nextSibling:null;r.setAttribute(g,"active"),r.setAttribute("data-styled-version","5.1.1");var i=O();return i&&r.setAttribute("nonce",i),t.insertBefore(r,a),r},E=function(){function e(e){var n=this.element=C(e);n.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var n=document.styleSheets,t=0,r=n.length;t<r;t++){var o=n[t];if(o.ownerNode===e)return o}k(17)}(n),this.length=0}var n=e.prototype;return n.insertRule=function(e,n){try{return this.sheet.insertRule(n,e),this.length++,!0}catch(e){return!1}},n.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},n.getRule=function(e){var n=this.sheet.cssRules[e];return void 0!==n&&"string"==typeof n.cssText?n.cssText:""},e}(),j=function(){function e(e){var n=this.element=C(e);this.nodes=n.childNodes,this.length=0}var n=e.prototype;return n.insertRule=function(e,n){if(e<=this.length&&e>=0){var t=document.createTextNode(n),r=this.nodes[e];return this.element.insertBefore(t,r||null),this.length++,!0}return!1},n.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},n.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),S=function(){function e(e){this.rules=[],this.length=0}var n=e.prototype;return n.insertRule=function(e,n){return e<=this.length&&(this.rules.splice(e,0,n),this.length++,!0)},n.deleteRule=function(e){this.rules.splice(e,1),this.length--},n.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),_=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var n=e.prototype;return n.indexOfGroup=function(e){for(var n=0,t=0;t<e;t++)n+=this.groupSizes[t];return n},n.insertRules=function(e,n){if(e>=this.groupSizes.length){for(var t=this.groupSizes,r=t.length,o=r;e>=o;)(o<<=1)<0&&k(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(t),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),l=0,c=n.length;l<c;l++)this.tag.insertRule(i,n[l])&&(this.groupSizes[e]++,i++)},n.clearGroup=function(e){if(e<this.length){var n=this.groupSizes[e],t=this.indexOfGroup(e),r=t+n;this.groupSizes[e]=0;for(var o=t;o<r;o++)this.tag.deleteRule(t)}},n.getGroup=function(e){var n="";if(e>=this.length||0===this.groupSizes[e])return n;for(var t=this.groupSizes[e],r=this.indexOfGroup(e),o=r+t,a=r;a<o;a++)n+=this.tag.getRule(a)+"/*!sc*/\n";return n},e}(),P=new Map,A=new Map,I=1,T=function(e){if(P.has(e))return P.get(e);var n=I++;return P.set(e,n),A.set(n,e),n},M=function(e){return A.get(e)},z=function(e,n){n>=I&&(I=n+1),P.set(e,n),A.set(n,e)},R="style["+g+'][data-styled-version="5.1.1"]',N=new RegExp("^"+g+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),F=function(e,n,t){for(var r,o=t.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(n,r)},L=function(e,n){for(var t=n.innerHTML.split("/*!sc*/\n"),r=[],o=0,a=t.length;o<a;o++){var i=t[o].trim();if(i){var l=i.match(N);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(z(u,c),F(e,u,l[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},D=w,q={isServer:!w,useCSSOMInjection:!x},U=function(){function e(e,n,t){void 0===e&&(e=q),void 0===n&&(n={}),this.options=f({},q,{},e),this.gs=n,this.names=new Map(t),!this.options.isServer&&w&&D&&(D=!1,function(e){for(var n=document.querySelectorAll(R),t=0,r=n.length;t<r;t++){var o=n[t];o&&"active"!==o.getAttribute(g)&&(L(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return T(e)};var n=e.prototype;return n.reconstructWithOptions=function(n){return new e(f({},this.options,{},n),this.gs,this.names)},n.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},n.getTag=function(){return this.tag||(this.tag=(n=this.options,t=n.isServer,r=n.useCSSOMInjection,o=n.target,e=t?new S(o):r?new E(o):new j(o),new _(e)));var e,n,t,r,o},n.hasNameForId=function(e,n){return this.names.has(e)&&this.names.get(e).has(n)},n.registerName=function(e,n){if(T(e),this.names.has(e))this.names.get(e).add(n);else{var t=new Set;t.add(n),this.names.set(e,t)}},n.insertRules=function(e,n,t){this.registerName(e,n),this.getTag().insertRules(T(e),t)},n.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},n.clearRules=function(e){this.getTag().clearGroup(T(e)),this.clearNames(e)},n.clearTag=function(){this.tag=void 0},n.toString=function(){return function(e){for(var n=e.getTag(),t=n.length,r="",o=0;o<t;o++){var a=M(o);if(void 0!==a){var i=e.names.get(a),l=n.getGroup(o);if(void 0!==i&&0!==l.length){var c=g+".g"+o+'[id="'+a+'"]',u="";void 0!==i&&i.forEach((function(e){e.length>0&&(u+=e+",")})),r+=""+l+c+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),H=function(e,n){for(var t=n.length;t;)e=33*e^n.charCodeAt(--t);return e},B=function(e){return H(5381,e)};var $=/^\s*\/\/.*$/gm;function W(e){var n,t,r,o=void 0===e?m:e,a=o.options,l=void 0===a?m:a,c=o.plugins,u=void 0===c?h:c,s=new i.a(l),f=[],d=function(e){function n(n){if(n)try{e(n+"}")}catch(e){}}return function(t,r,o,a,i,l,c,u,s,f){switch(t){case 1:if(0===s&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(n)}}}((function(e){f.push(e)})),p=function(e,r,o){return r>0&&-1!==o.slice(0,r).indexOf(t)&&o.slice(r-t.length,r)!==t?"."+n:e};function b(e,o,a,i){void 0===i&&(i="&");var l=e.replace($,""),c=o&&a?a+" "+o+" { "+l+" }":l;return n=i,t=o,r=new RegExp("\\"+t+"\\b","g"),s(a||!o?"":o,c)}return s.use([].concat(u,[function(e,n,o){2===e&&o.length&&o[0].lastIndexOf(t)>0&&(o[0]=o[0].replace(r,p))},d,function(e){if(-2===e){var n=f;return f=[],n}}])),b.hash=u.length?u.reduce((function(e,n){return n.name||k(15),H(e,n.name)}),5381).toString():"",b}var V=a.a.createContext(),G=(V.Consumer,a.a.createContext()),K=(G.Consumer,new U),Y=W();function J(){return Object(o.useContext)(V)||K}function X(){return Object(o.useContext)(G)||Y}var Z=function(){function e(e,n){var t=this;this.inject=function(e){e.hasNameForId(t.id,t.name)||e.insertRules(t.id,t.name,Y.apply(void 0,t.stringifyArgs))},this.toString=function(){return k(12,String(t.name))},this.name=e,this.id="sc-keyframes-"+e,this.stringifyArgs=n}return e.prototype.getName=function(){return this.name},e}(),Q=/([A-Z])/g,ee=/^ms-/;function ne(e){return e.replace(Q,"-$1").toLowerCase().replace(ee,"-ms-")}var te=function(e){return null==e||!1===e||""===e},re=function e(n,t){var r=[];return Object.keys(n).forEach((function(t){if(!te(n[t])){if(p(n[t]))return r.push.apply(r,e(n[t],t)),r;if(b(n[t]))return r.push(ne(t)+":",n[t],";"),r;r.push(ne(t)+": "+(o=t,(null==(a=n[t])||"boolean"==typeof a||""===a?"":"number"!=typeof a||0===a||o in l.a?String(a).trim():a+"px")+";"))}var o,a;return r})),t?[t+" {"].concat(r,["}"]):r};function oe(e,n,t){if(Array.isArray(e)){for(var r,o=[],a=0,i=e.length;a<i;a+=1)""!==(r=oe(e[a],n,t))&&(Array.isArray(r)?o.push.apply(o,r):o.push(r));return o}return te(e)?"":y(e)?"."+e.styledComponentId:b(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!n?e:oe(e(n),n,t):e instanceof Z?t?(e.inject(t),e.getName()):e:p(e)?re(e):e.toString();var l}function ae(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return b(e)||p(e)?oe(d(h,[e].concat(t))):0===t.length&&1===e.length&&"string"==typeof e[0]?e:oe(d(e,t))}var ie=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},le=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function ce(e,n,t){var r=e[t];ie(n)&&ie(r)?ue(r,n):e[t]=n}function ue(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];for(var o=0,a=t;o<a.length;o++){var i=a[o];if(ie(i))for(var l in i)le(l)&&ce(e,i[l],l)}return e}var se=/(a)(d)/gi,fe=function(e){return String.fromCharCode(e+(e>25?39:97))};function de(e){var n,t="";for(n=Math.abs(e);n>52;n=n/52|0)t=fe(n%52)+t;return(fe(n%52)+t).replace(se,"$1-$2")}function pe(e){for(var n=0;n<e.length;n+=1){var t=e[n];if(b(t)&&!y(t))return!1}return!0}var he=function(){function e(e,n){this.rules=e,this.staticRulesId="",this.isStatic=pe(e),this.componentId=n,this.baseHash=B(n),U.registerId(n)}return e.prototype.generateAndInjectStyles=function(e,n,t){var r=this.componentId;if(this.isStatic&&!t.hash){if(this.staticRulesId&&n.hasNameForId(r,this.staticRulesId))return this.staticRulesId;var o=oe(this.rules,e,n).join(""),a=de(H(this.baseHash,o.length)>>>0);if(!n.hasNameForId(r,a)){var i=t(o,"."+a,void 0,r);n.insertRules(r,a,i)}return this.staticRulesId=a,a}for(var l=this.rules.length,c=H(this.baseHash,t.hash),u="",s=0;s<l;s++){var f=this.rules[s];if("string"==typeof f)u+=f;else{var d=oe(f,e,n),p=Array.isArray(d)?d.join(""):d;c=H(c,p+s),u+=p}}var h=de(c>>>0);if(!n.hasNameForId(r,h)){var m=t(u,"."+h,void 0,r);n.insertRules(r,h,m)}return h},e}(),me=(new Set,function(e,n,t){return void 0===t&&(t=m),e.theme!==t.theme&&e.theme||n||t.theme}),be=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ve=/(^-|-$)/g;function ye(e){return e.replace(be,"-").replace(ve,"")}function ge(e){return"string"==typeof e&&!0}var we=function(e){return de(B(e)>>>0)};var xe=a.a.createContext();xe.Consumer;var Oe={};function ke(e,n,t){var r=e.attrs,a=e.componentStyle,i=e.defaultProps,l=e.foldedComponentIds,u=e.shouldForwardProp,s=e.styledComponentId,d=e.target;Object(o.useDebugValue)(s);var p=function(e,n,t){void 0===e&&(e=m);var r=f({},n,{theme:e}),o={};return t.forEach((function(e){var n,t,a,i=e;for(n in b(i)&&(i=i(r)),i)r[n]=o[n]="className"===n?(t=o[n],a=i[n],t&&a?t+" "+a:t||a):i[n]})),[r,o]}(me(n,Object(o.useContext)(xe),i)||m,n,r),h=p[0],v=p[1],y=function(e,n,t,r){var a=J(),i=X(),l=e.isStatic&&!n?e.generateAndInjectStyles(m,a,i):e.generateAndInjectStyles(t,a,i);return Object(o.useDebugValue)(l),l}(a,r.length>0,h),g=t,w=v.$as||n.$as||v.as||n.as||d,x=ge(w),O=v!==n?f({},n,{},v):n,k=u||x&&c.a,C={};for(var E in O)"$"!==E[0]&&"as"!==E&&("forwardedAs"===E?C.as=O[E]:k&&!k(E,c.a)||(C[E]=O[E]));return n.style&&v.style!==n.style&&(C.style=f({},n.style,{},v.style)),C.className=Array.prototype.concat(l,s,y!==s?y:null,n.className,v.className).filter(Boolean).join(" "),C.ref=g,Object(o.createElement)(w,C)}function Ce(e,n,t){var r=y(e),o=!ge(e),i=n.displayName,l=void 0===i?function(e){return ge(e)?"styled."+e:"Styled("+v(e)+")"}(e):i,c=n.componentId,u=void 0===c?function(e,n){var t="string"!=typeof e?"sc":ye(e);Oe[t]=(Oe[t]||0)+1;var r=t+"-"+we(t+Oe[t]);return n?n+"-"+r:r}(n.displayName,n.parentComponentId):c,d=n.attrs,p=void 0===d?h:d,m=n.displayName&&n.componentId?ye(n.displayName)+"-"+n.componentId:n.componentId||u,b=r&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,g=n.shouldForwardProp;r&&e.shouldForwardProp&&(g=g?function(t,r){return e.shouldForwardProp(t,r)&&n.shouldForwardProp(t,r)}:e.shouldForwardProp);var w,x=new he(r?e.componentStyle.rules.concat(t):t,m),O=function(e,n){return ke(w,e,n)};return O.displayName=l,(w=a.a.forwardRef(O)).attrs=b,w.componentStyle=x,w.displayName=l,w.shouldForwardProp=g,w.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):h,w.styledComponentId=m,w.target=r?e.target:e,w.withComponent=function(e){var r=n.componentId,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(n,["componentId"]),a=r&&r+"-"+(ge(e)?e:ye(v(e)));return Ce(e,f({},o,{attrs:b,componentId:a}),t)},Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(n){this._foldedDefaultProps=r?ue({},e.defaultProps,n):n}}),w.toString=function(){return"."+w.styledComponentId},o&&s()(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,self:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}var Ee=function(e){return function e(n,t,o){if(void 0===o&&(o=m),!Object(r.isValidElementType)(t))return k(1,String(t));var a=function(){return n(t,o,ae.apply(void 0,arguments))};return a.withConfig=function(r){return e(n,t,f({},o,{},r))},a.attrs=function(r){return e(n,t,f({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},a}(Ce,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ee[e]=Ee(e)}));n.a=Ee}).call(this,t(99))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.InlineIcon=n.Icon=void 0;var r,o=(r=t(0))&&r.__esModule?r:{default:r};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=0,c=/(-?[0-9.]*[0-9]+[0-9.]*)/g,u=/^-?[0-9.]*[0-9]+[0-9.]*$/g,s=["width","height","inline","hFlip","vFlip","flip","rotate","align","color","box"],f={left:0,top:0,width:16,height:16,rotate:0,hFlip:!1,vFlip:!1};var d=function(){function e(n){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this._item=n}var n,t,r;return n=e,r=[{key:"splitAttributes",value:function(e){var n={icon:Object.create(null),node:Object.create(null)};return Object.keys(e).forEach((function(t){n[-1===s.indexOf(t)?"node":"icon"][t]=e[t]})),n}},{key:"calculateDimension",value:function(e,n,t){if(1===n)return e;if(t=void 0===t?100:t,"number"==typeof e)return Math.ceil(e*n*t)/t;var r=e.split(c);if(null===r||!r.length)return null;for(var o,a=[],i=r.shift(),l=u.test(i);;){if(l?(o=parseFloat(i),isNaN(o)?a.push(i):a.push(Math.ceil(o*n*t)/t)):a.push(i),void 0===(i=r.shift()))return a.join("");l=!l}}},{key:"replaceIDs",value:function(e){var n,t,r=/\sid="(\S+)"/g,o=[];function a(e,n,t){for(var r=0;-1!==(r=t.indexOf(e,r));)t=t.slice(0,r)+n+t.slice(r+e.length),r+=n.length;return t}for(;n=r.exec(e);)o.push(n[1]);return o.length?(t="IconifyId-"+Date.now().toString(16)+"-"+(16777216*Math.random()|0).toString(16)+"-",o.forEach((function(n){var r=t+l;l++,e=a('="'+n+'"','="'+r+'"',e),e=a('="#'+n+'"','="#'+r+'"',e),e=a("(#"+n+")","(#"+r+")",e)})),e):e}}],(t=[{key:"getAttributes",value:function(n){var t=this._item;"object"!==a(n)&&(n=Object.create(null));var r={horizontal:"center",vertical:"middle",slice:!1},o={rotate:t.rotate,hFlip:t.hFlip,vFlip:t.vFlip},i=Object.create(null),l=Object.create(null),c=!0===n.inline||"true"===n.inline||"1"===n.inline,u={left:t.left,top:c?t.inlineTop:t.top,width:t.width,height:c?t.inlineHeight:t.height};if(["hFlip","vFlip"].forEach((function(e){void 0===n[e]||!0!==n[e]&&"true"!==n[e]&&"1"!==n[e]||(o[e]=!o[e])})),void 0!==n.flip&&n.flip.toLowerCase().split(/[\s,]+/).forEach((function(e){switch(e){case"horizontal":o.hFlip=!o.hFlip;break;case"vertical":o.vFlip=!o.vFlip}})),void 0!==n.rotate){var s=n.rotate;if("number"==typeof s)o.rotate+=s;else if("string"==typeof s){var f=s.replace(/^-?[0-9.]*/,"");if(""===f)s=parseInt(s),isNaN(s)||(o.rotate+=s);else if(f!==s){var d=!1;switch(f){case"%":d=25;break;case"deg":d=90}d&&(s=parseInt(s.slice(0,s.length-f.length)),isNaN(s)||(o.rotate+=Math.round(s/d)))}}}var p,h=[];switch(o.hFlip?o.vFlip?o.rotate+=2:(h.push("translate("+(u.width+u.left)+" "+(0-u.top)+")"),h.push("scale(-1 1)"),u.top=u.left=0):o.vFlip&&(h.push("translate("+(0-u.left)+" "+(u.height+u.top)+")"),h.push("scale(1 -1)"),u.top=u.left=0),o.rotate%4){case 1:p=u.height/2+u.top,h.unshift("rotate(90 "+p+" "+p+")"),0===u.left&&0===u.top||(p=u.left,u.left=u.top,u.top=p),u.width!==u.height&&(p=u.width,u.width=u.height,u.height=p);break;case 2:h.unshift("rotate(180 "+(u.width/2+u.left)+" "+(u.height/2+u.top)+")");break;case 3:p=u.width/2+u.left,h.unshift("rotate(-90 "+p+" "+p+")"),0===u.left&&0===u.top||(p=u.left,u.left=u.top,u.top=p),u.width!==u.height&&(p=u.width,u.width=u.height,u.height=p)}var m,b,v=n.width?n.width:null,y=n.height?n.height:null;null===v&&null===y&&(y="1em"),null!==v&&null!==y?(m=v,b=y):null!==v?(m=v,b=e.calculateDimension(m,u.height/u.width)):(b=y,m=e.calculateDimension(b,u.width/u.height)),!1!==m&&(l.width="auto"===m?u.width:m),!1!==b&&(l.height="auto"===b?u.height:b),c&&0!==t.verticalAlign&&(i["vertical-align"]=t.verticalAlign+"em"),void 0!==n.align&&n.align.toLowerCase().split(/[\s,]+/).forEach((function(e){switch(e){case"left":case"right":case"center":r.horizontal=e;break;case"top":case"bottom":case"middle":r.vertical=e;break;case"crop":r.slice=!0;break;case"meet":r.slice=!1}})),l.preserveAspectRatio=function(e){var n;switch(e.horizontal){case"left":n="xMin";break;case"right":n="xMax";break;default:n="xMid"}switch(e.vertical){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=e.slice?" slice":" meet"}(r),l.viewBox=u.left+" "+u.top+" "+u.width+" "+u.height;var g=e.replaceIDs(t.body);return void 0!==n.color&&(g=g.replace(/currentColor/g,n.color)),h.length&&(g='<g transform="'+h.join(" ")+'">'+g+"</g>"),!0!==n.box&&"true"!==n.box&&"1"!==n.box||(g+='<rect x="'+u.left+'" y="'+u.top+'" width="'+u.width+'" height="'+u.height+'" fill="rgba(0, 0, 0, 0)" />'),{attributes:l,body:g,style:i}}},{key:"getSVG",value:function(n,t){var r=e.splitAttributes(n),o=this.getAttributes(r.icon),a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"';return t&&Object.keys(r.node).forEach((function(e){a+=" "+e+'="'+r.node[e]+'"'})),Object.keys(o.attributes).forEach((function(e){a+=" "+e+'="'+o.attributes[e]+'"'})),a+=' style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);',Object.keys(o.style).forEach((function(e){a+=" "+e+": "+o.style[e]+";"})),n&&void 0!==n.style&&(a+=n.style),a+='">',a+=o.body+"</svg>"}}])&&i(n.prototype,t),r&&i(n,r),e}();function p(e,n){if("object"!==a(e.icon))return null;var t=d.splitAttributes(e),r=t.icon,i=t.node;delete i.icon,void 0===r.inline&&(r.inline=n);var l=new d(function(e){var n,t=Object.create(null);for(n in f)t[n]=f[n];for(n in e)t[n]=e[n];return void 0===t.inlineTop&&(t.inlineTop=t.top),void 0===t.inlineHeight&&(t.inlineHeight=t.height),void 0===t.verticalAlign&&(t.verticalAlign=t.height%7==0&&t.height%8!=0?-.143:-.125),t}(e.icon)).getAttributes(r),c={transform:"rotate(360deg)"};if(void 0!==l.style["vertical-align"]&&(c.verticalAlign=l.style["vertical-align"]),void 0!==e.style)for(var u in e.style)c[u]=e.style[u];var s,p={xmlns:"http://www.w3.org/2000/svg",focusable:!1,style:c};for(s in i)p[s]=i[s];for(s in l.attributes)p[s]=l.attributes[s];return p.dangerouslySetInnerHTML={__html:l.body},o.default.createElement("svg",p,null)}var h=function(e){return p(e,!1)};n.Icon=h;n.InlineIcon=function(e){return p(e,!0)};var m=h;n.default=m},function(e,n,t){"use strict";t.d(n,"b",(function(){return d})),t.d(n,"e",(function(){return h})),t.d(n,"c",(function(){return b})),t.d(n,"d",(function(){return y})),t.d(n,"a",(function(){return p}));var r=t(0),o=t(42),a=t.n(o);function i(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=s(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function l(e,n,t,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,o)}function c(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var a=e.apply(n,t);function i(e){l(a,r,o,i,c,"next",e)}function c(e){l(a,r,o,i,c,"throw",e)}i(void 0)}))}}function u(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||s(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Object(r.useState)(n),a=u(o,2),i=a[0],l=a[1],c=Object(r.useState)(null),s=u(c,2),f=s[0],d=s[1],p=Object(r.useState)(t),h=u(p,2),m=h[0],b=h[1],v=Object(r.useState)(0),y=u(v,2),g=y[0],w=y[1];return Object(r.useEffect)((function(){void 0!==e&&(e.success?(d(null),l(e.data),w(e.total?e.total:0)):d(e.error)),b(void 0===e)}),[e]),{busy:m,data:i,total:g,error:f}},p=function(){var e=Object(r.useRef)(),n=u(Object(r.useState)({}),2),t=n[0],o=n[1];return Object(r.useEffect)((function(){if(e&&e.current){var n=new ResizeObserver((function(e){var n=e[0];n.contentRect&&o({width:n.contentRect.left+n.contentRect.right,height:n.contentRect.top+n.contentRect.bottom})}));return n.observe(e.current),function(){n.unobserve(e.current)}}}),[]),{ref:e,width:t.width?t.width:0,height:t.height?t.height:0}},h=function(e){var n=Object(r.useRef)(),t=function(t){e&&!n.current.contains(t.target)&&e()};return Object(r.useEffect)((function(){return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}})),n},m=null,b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!m){var n=e.concurrency,t=void 0===n?2:n;m=new a.a({concurrency:t,autoStart:!0})}var r=function(){var e=c(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.add(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return{runTask:r}},v=new a.a({concurrency:1,autoStart:!1}),y=function(){var e=u(Object(r.useState)(new AbortController),2),n=e[0],t=e[1],o=Object(r.useRef)(!1),a=Object(r.useRef)(0),l=u(Object(r.useState)(null),2),s=l[0],f=l[1],d=u(Object(r.useState)(!1),2),p=d[0],h=d[1],m=u(Object(r.useState)(0),2),b=m[0],y=m[1],g=u(Object(r.useState)(!1),2),w=g[0],x=g[1],O=u(Object(r.useState)(!1),2),k=O[0],C=O[1],E=u(Object(r.useState)(0),2),j=E[0],S=E[1],_=function(){var e=c(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=new AbortController,t(n),x(!1),a.current=0,o.current=!1,h(!1),C(!1),S(0),y(0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=c(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Promise((function(e,t){x(!1),a.current=0,o.current=!1,h(!1),C(!1),R(n),f(!0),v.start(),v.onIdle().then((function(){M(),e()}))})),e.abrupt("return",t);case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,v.pause(),h(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,x(!1),h(!1),v.start();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,v.pause(),n.abort(),f(!1),x(!1),C(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(){var e=c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:0,C(!0),f(!1);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=c(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.add(c(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t(n.signal);case 3:(r=e.sent)&&r.success||console.error("[useNekoTasks] Task returned nothing.",r),r.success||(a.current++,o.current||(x(r.error),A())),e.next=17;break;case 8:if(e.prev=8,e.t0=e.catch(0),"AbortError"!==e.t0.name){e.next=15;break}return console.log("Aborted"),e.abrupt("return");case 15:a.current++,o.current||(x("An error was caught (more information in the console)."),A());case 17:return e.prev=17,S((function(e){return e+1})),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[0,8,17,20]])})))),y((function(e){return e+1}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=c(regeneratorRuntime.mark((function e(n){var t,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.clear(),t=i(n);try{for(t.s();!(r=t.n()).done;)o=r.value,z(o)}catch(e){t.e(e)}finally{t.f()}S(0);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=Object(r.useCallback)((function(){o.current=!0}),[]),F=Object(r.useCallback)((function(){return a.current}),[]);return{start:P,stop:T,pause:A,resume:I,reset:_,addTask:z,setAlwaysSkip:N,getErrorCount:F,error:w,success:k,busy:s,paused:p,value:j,max:b}}},function(e,n,t){"use strict";t.d(n,"a",(function(){return h}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){return(u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function s(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function f(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n position: relative;\n border-radius: 10px;\n color: ",";\n font-family: ",";\n font-size: 9px;\n line-height: 10px;\n padding: 5px 8px;\n text-transform: uppercase;\n text-decoration: none;\n\n &:hover {\n color: ",";\n background-color: #f78c1f;\n }\n\n &.inline {\n display: inline;\n margin-left: 5px;\n vertical-align: middle;\n }\n"]);return f=function(){return e},e}var d=l.a.a(f(),c.a.yellow,c.a.white,c.a.fontFamily,c.a.white),p=function(e){var n=e.show,t=void 0===n||n,r=e.className,a=s(e,["show","className"]);return t?o.a.createElement(d,u({href:"https://store.meowapps.com",target:"_blank",className:"".concat(r||"")},a),"Pro Only"):null},h=function(e){return o.a.createElement(p,e)};h.propTypes={show:i.a.bool,className:i.a.string},h.defaultProps={show:!0,className:void 0}},function(e,n,t){"use strict";function r(){return(r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,n){return(a=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e,n,t){return(l=i()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&a(o,t.prototype),o}).apply(null,arguments)}function c(e){var n="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return l(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.d(n,"a",(function(){return L}));var s=function(e){var n,t;function r(n){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/master/src/internalHelpers/errors.md#"+n+" for more information.")||this)}return t=e,(n=r).prototype=Object.create(t.prototype),n.prototype.constructor=n,n.__proto__=t,r}(c(Error));function f(e){return Math.round(255*e)}function d(e,n,t){return f(e)+","+f(n)+","+f(t)}function p(e,n,t,r){if(void 0===r&&(r=d),0===n)return r(t,t,t);var o=(e%360+360)%360/60,a=(1-Math.abs(2*t-1))*n,i=a*(1-Math.abs(o%2-1)),l=0,c=0,u=0;o>=0&&o<1?(l=a,c=i):o>=1&&o<2?(l=i,c=a):o>=2&&o<3?(c=a,u=i):o>=3&&o<4?(c=i,u=a):o>=4&&o<5?(l=i,u=a):o>=5&&o<6&&(l=a,u=i);var s=t-a/2;return r(l+s,c+s,u+s)}var h={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var m=/^#[a-fA-F0-9]{6}$/,b=/^#[a-fA-F0-9]{8}$/,v=/^#[a-fA-F0-9]{3}$/,y=/^#[a-fA-F0-9]{4}$/,g=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,w=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,x=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,O=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function k(e){if("string"!=typeof e)throw new s(3);var n=function(e){if("string"!=typeof e)return e;var n=e.toLowerCase();return h[n]?"#"+h[n]:e}(e);if(n.match(m))return{red:parseInt(""+n[1]+n[2],16),green:parseInt(""+n[3]+n[4],16),blue:parseInt(""+n[5]+n[6],16)};if(n.match(b)){var t=parseFloat((parseInt(""+n[7]+n[8],16)/255).toFixed(2));return{red:parseInt(""+n[1]+n[2],16),green:parseInt(""+n[3]+n[4],16),blue:parseInt(""+n[5]+n[6],16),alpha:t}}if(n.match(v))return{red:parseInt(""+n[1]+n[1],16),green:parseInt(""+n[2]+n[2],16),blue:parseInt(""+n[3]+n[3],16)};if(n.match(y)){var r=parseFloat((parseInt(""+n[4]+n[4],16)/255).toFixed(2));return{red:parseInt(""+n[1]+n[1],16),green:parseInt(""+n[2]+n[2],16),blue:parseInt(""+n[3]+n[3],16),alpha:r}}var o=g.exec(n);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=w.exec(n);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var i=x.exec(n);if(i){var l="rgb("+p(parseInt(""+i[1],10),parseInt(""+i[2],10)/100,parseInt(""+i[3],10)/100)+")",c=g.exec(l);if(!c)throw new s(4,n,l);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var u=O.exec(n);if(u){var f="rgb("+p(parseInt(""+u[1],10),parseInt(""+u[2],10)/100,parseInt(""+u[3],10)/100)+")",d=g.exec(f);if(!d)throw new s(4,n,f);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+u[4])}}throw new s(5)}function C(e){return function(e){var n,t=e.red/255,r=e.green/255,o=e.blue/255,a=Math.max(t,r,o),i=Math.min(t,r,o),l=(a+i)/2;if(a===i)return void 0!==e.alpha?{hue:0,saturation:0,lightness:l,alpha:e.alpha}:{hue:0,saturation:0,lightness:l};var c=a-i,u=l>.5?c/(2-a-i):c/(a+i);switch(a){case t:n=(r-o)/c+(r<o?6:0);break;case r:n=(o-t)/c+2;break;default:n=(t-r)/c+4}return n*=60,void 0!==e.alpha?{hue:n,saturation:u,lightness:l,alpha:e.alpha}:{hue:n,saturation:u,lightness:l}}(k(e))}var E=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function j(e){var n=e.toString(16);return 1===n.length?"0"+n:n}function S(e){return j(Math.round(255*e))}function _(e,n,t){return E("#"+S(e)+S(n)+S(t))}function P(e,n,t){return p(e,n,t,_)}function A(e,n,t){if("number"==typeof e&&"number"==typeof n&&"number"==typeof t)return P(e,n,t);if("object"===u(e)&&void 0===n&&void 0===t)return P(e.hue,e.saturation,e.lightness);throw new s(1)}function I(e,n,t,r){if("number"==typeof e&&"number"==typeof n&&"number"==typeof t&&"number"==typeof r)return r>=1?P(e,n,t):"rgba("+p(e,n,t)+","+r+")";if("object"===u(e)&&void 0===n&&void 0===t&&void 0===r)return e.alpha>=1?P(e.hue,e.saturation,e.lightness):"rgba("+p(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new s(2)}function T(e,n,t){if("number"==typeof e&&"number"==typeof n&&"number"==typeof t)return E("#"+j(e)+j(n)+j(t));if("object"===u(e)&&void 0===n&&void 0===t)return E("#"+j(e.red)+j(e.green)+j(e.blue));throw new s(6)}function M(e,n,t,r){if("string"==typeof e&&"number"==typeof n){var o=k(e);return"rgba("+o.red+","+o.green+","+o.blue+","+n+")"}if("number"==typeof e&&"number"==typeof n&&"number"==typeof t&&"number"==typeof r)return r>=1?T(e,n,t):"rgba("+e+","+n+","+t+","+r+")";if("object"===u(e)&&void 0===n&&void 0===t&&void 0===r)return e.alpha>=1?T(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new s(7)}function z(e){if("object"!==u(e))throw new s(8);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha}(e))return M(e);if(function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return T(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}(e))return I(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)}(e))return A(e);throw new s(8)}function R(e){return function e(n,t,r){return function(){var o=r.concat(Array.prototype.slice.call(arguments));return o.length>=t?n.apply(this,o):e(n,t,o)}}(e,e.length,[])}function N(e,n,t){return Math.max(e,Math.min(n,t))}function F(e,n){if("transparent"===n)return n;var t=C(n);return z(r({},t,{lightness:N(0,1,t.lightness+parseFloat(e))}))}var L=R(F)},function(e,n){n.__esModule=!0,n.default={body:'<path d="M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6l1.41-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";t.d(n,"a",(function(){return I}));var r=t(0),o=t(65),a=t.n(o);function i(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}var l=new WeakMap,c=0;var u=new(function(){function e(e){void 0===e&&(e={}),this.__cache=new Map(Object.entries(e)),this.__listeners=[]}return e.prototype.get=function(e){var n=this.serializeKey(e)[0];return this.__cache.get(n)},e.prototype.set=function(e,n){var t=this.serializeKey(e)[0];this.__cache.set(t,n),this.notify()},e.prototype.keys=function(){return Array.from(this.__cache.keys())},e.prototype.has=function(e){var n=this.serializeKey(e)[0];return this.__cache.has(n)},e.prototype.clear=function(){this.__cache.clear(),this.notify()},e.prototype.delete=function(e){var n=this.serializeKey(e)[0];this.__cache.delete(n),this.notify()},e.prototype.serializeKey=function(e){var n=null;if("function"==typeof e)try{e=e()}catch(n){e=""}return Array.isArray(e)?(n=e,e=function(e){if(!e.length)return"";for(var n="arg",t=0;t<e.length;++t){var r=void 0;null===e[t]||"object"!=typeof e[t]?r="string"==typeof e[t]?'"'+e[t]+'"':String(e[t]):l.has(e[t])?r=l.get(e[t]):(r=c,l.set(e[t],c++)),n+="@"+r}return n}(e)):e=String(e||""),[e,n,e?"err@"+e:""]},e.prototype.subscribe=function(e){var n=this;if("function"!=typeof e)throw new Error("Expected the listener to be a function.");var t=!0;return this.__listeners.push(e),function(){if(t){t=!1;var r=n.__listeners.indexOf(e);r>-1&&(n.__listeners[r]=n.__listeners[n.__listeners.length-1],n.__listeners.length--)}}},e.prototype.notify=function(){for(var e=0,n=this.__listeners;e<n.length;e++){(0,n[e])()}},e}());var s="undefined"!=typeof window&&navigator.connection&&-1!==["slow-2g","2g"].indexOf(navigator.connection.effectiveType),f={onLoadingSlow:function(){},onSuccess:function(){},onError:function(){},onErrorRetry:function(e,n,t,r,o){if(i()&&!("number"==typeof t.errorRetryCount&&o.retryCount>t.errorRetryCount)){var a=Math.min(o.retryCount||0,8),l=~~((Math.random()+.5)*(1<<a))*t.errorRetryInterval;setTimeout(r,l,o)}},errorRetryInterval:1e3*(s?10:5),focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:1e3*(s?5:3),refreshInterval:0,revalidateOnFocus:!0,revalidateOnReconnect:!0,refreshWhenHidden:!1,refreshWhenOffline:!1,shouldRetryOnError:!0,suspense:!1,compare:a.a};function d(){return void 0===navigator.onLine||navigator.onLine}var p=Object(r.createContext)({});p.displayName="SWRConfigContext";var h=p,m=function(e,n,t,r){return new(t||(t=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function l(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,l)}c((r=r.apply(e,n||[])).next())}))},b=function(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},v="undefined"==typeof window,y=v?null:window.requestIdleCallback||function(e){return setTimeout(e,1)},g=v?r.useEffect:r.useLayoutEffect,w={},x={},O={},k={},C={},E={},j={};if(!v&&window.addEventListener){var S=function(e){if(i()&&d())for(var n in e)e[n][0]&&e[n][0]()};window.addEventListener("visibilitychange",(function(){return S(O)}),!1),window.addEventListener("focus",(function(){return S(O)}),!1),window.addEventListener("online",(function(){return S(k)}),!1)}var _=function(e,n){void 0===n&&(n=!0);var t=u.serializeKey(e),r=t[0],o=t[2];if(!r)return Promise.resolve();var a=C[r];if(r&&a){for(var i=u.get(r),l=u.get(o),c=[],s=0;s<a.length;++s)c.push(a[s](n,i,l,s>0));return Promise.all(c).then((function(){return u.get(r)}))}return Promise.resolve(u.get(r))},P=function(e,n,t){var r=C[e];if(e&&r)for(var o=0;o<r.length;++o)r[o](!1,n,t)},A=function(e,n,t){return void 0===t&&(t=!0),m(void 0,void 0,void 0,(function(){var r,o,a,i,l,c,s,f,d,p,h,m;return b(this,(function(b){switch(b.label){case 0:if(r=u.serializeKey(e),o=r[0],a=r[2],!o)return[2];if(void 0===n)return[2,_(e,t)];if(E[o]=Date.now()-1,j[o]=0,i=E[o],l=x[o],!n||"function"!=typeof n)return[3,5];b.label=1;case 1:return b.trys.push([1,3,,4]),[4,n(u.get(o))];case 2:return c=b.sent(),[3,4];case 3:return f=b.sent(),s=f,[3,4];case 4:return[3,11];case 5:if(!n||"function"!=typeof n.then)return[3,10];b.label=6;case 6:return b.trys.push([6,8,,9]),[4,n];case 7:return c=b.sent(),[3,9];case 8:return d=b.sent(),s=d,[3,9];case 9:return[3,11];case 10:c=n,b.label=11;case 11:if(i!==E[o]||l!==x[o]){if(s)throw s;return[2,c]}if(void 0!==c&&u.set(o,c),u.set(a,s),j[o]=Date.now()-1,p=C[o]){for(h=[],m=0;m<p.length;++m)h.push(p[m](!!t,c,s,m>0));return[2,Promise.all(h).then((function(){if(s)throw s;return u.get(o)}))]}if(s)throw s;return[2,c]}}))}))};var I=h.Provider,T=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var o,a,l={};n.length>=1&&(o=n[0]),n.length>2?(a=n[1],l=n[2]):"function"==typeof n[1]?a=n[1]:"object"==typeof n[1]&&(l=n[1]);var c=u.serializeKey(o),s=c[0],p=c[1],v=c[2];l=Object.assign({},f,Object(r.useContext)(h),l);var S=Object(r.useRef)(l);g((function(){S.current=l})),void 0===a&&(a=l.fetcher);var _=u.get(s)||l.initialData,I=u.get(v),T=Object(r.useRef)({data:!1,error:!1,isValidating:!1}),M=Object(r.useRef)({data:_,error:I,isValidating:!1});Object(r.useDebugValue)(M.current.data);var z=Object(r.useState)(null)[1],R=Object(r.useCallback)((function(e){var n=!1;for(var t in e)M.current[t]=e[t],T.current[t]&&(n=!0);if(n||l.suspense){if(N.current)return;z({})}}),[]),N=Object(r.useRef)(!1),F=Object(r.useRef)(s),L=Object(r.useRef)({emit:function(e){for(var n,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];N.current||(n=S.current)[e].apply(n,t)}}),D=Object(r.useCallback)((function(e,n){return A(s,e,n)}),[s]),q=function(e,n){n&&(e[s]?e[s].push(n):e[s]=[n])},U=function(e,n){if(e[s]){var t=e[s],r=t.indexOf(n);r>=0&&(t[r]=t[t.length-1],t.pop())}},H=Object(r.useCallback)((function(n){return void 0===n&&(n={}),m(e,void 0,void 0,(function(){var e,t,r,o,i,c,f;return b(this,(function(d){switch(d.label){case 0:if(!s||!a)return[2,!1];if(N.current)return[2,!1];n=Object.assign({dedupe:!1},n),e=!0,t=void 0!==w[s]&&n.dedupe,d.label=1;case 1:return d.trys.push([1,6,,7]),R({isValidating:!0}),r=void 0,o=void 0,t?(o=x[s],[4,w[s]]):[3,3];case 2:return r=d.sent(),[3,5];case 3:return l.loadingTimeout&&!u.get(s)&&setTimeout((function(){e&&L.current.emit("onLoadingSlow",s,l)}),l.loadingTimeout),w[s]=null!==p?a.apply(void 0,p):a(s),x[s]=o=Date.now(),[4,w[s]];case 4:r=d.sent(),setTimeout((function(){delete w[s],delete x[s]}),l.dedupingInterval),L.current.emit("onSuccess",r,s,l),d.label=5;case 5:return x[s]>o||E[s]&&(o<=E[s]||o<=j[s]||0===j[s])?(R({isValidating:!1}),[2,!1]):(u.set(s,r),u.set(v,void 0),i={isValidating:!1},void 0!==M.current.error&&(i.error=void 0),l.compare(M.current.data,r)||(i.data=r),R(i),t||P(s,r,void 0),[3,7]);case 6:return c=d.sent(),delete w[s],delete x[s],u.set(v,c),M.current.error!==c&&(R({isValidating:!1,error:c}),t||P(s,void 0,c)),L.current.emit("onError",c,s,l),l.shouldRetryOnError&&(f=(n.retryCount||0)+1,L.current.emit("onErrorRetry",c,s,l,H,Object.assign({dedupe:!0},n,{retryCount:f}))),[3,7];case 7:return e=!1,[2,!0]}}))}))}),[s]);if(g((function(){if(s){N.current=!1;var e=M.current.data,n=u.get(s)||l.initialData;F.current!==s&&(F.current=s),l.compare(e,n)||R({data:n});var t=function(){return H({dedupe:!0})};(l.revalidateOnMount||!l.initialData&&void 0===l.revalidateOnMount)&&(void 0!==n?y(t):t());var r=!1,o=function(){!r&&S.current.revalidateOnFocus&&(r=!0,t(),setTimeout((function(){return r=!1}),S.current.focusThrottleInterval))},a=function(){S.current.revalidateOnReconnect&&t()},i=function(e,n,r,o){void 0===e&&(e=!0),void 0===o&&(o=!0);var a={},i=!1;return void 0===n||l.compare(M.current.data,n)||(a.data=n,i=!0),M.current.error!==r&&(a.error=r,i=!0),i&&R(a),!!e&&(o?t():H())};return q(O,o),q(k,a),q(C,i),function(){R=function(){return null},N.current=!0,U(O,o),U(k,a),U(C,i)}}}),[s,H]),g((function(){var n=null,t=function(){return m(e,void 0,void 0,(function(){return b(this,(function(e){switch(e.label){case 0:return M.current.error||!l.refreshWhenHidden&&!i()||!l.refreshWhenOffline&&!d()?[3,2]:[4,H({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return l.refreshInterval&&(n=setTimeout(t,l.refreshInterval)),[2]}}))}))};return l.refreshInterval&&(n=setTimeout(t,l.refreshInterval)),function(){n&&clearTimeout(n)}}),[l.refreshInterval,l.refreshWhenHidden,l.refreshWhenOffline,H]),l.suspense){var B=u.get(s),$=u.get(v);if(void 0===B&&(B=_),void 0===$&&($=I),void 0===B&&void 0===$){if(w[s]||H(),w[s]&&"function"==typeof w[s].then)throw w[s];B=w[s]}if(void 0===B&&$)throw $;return{error:$,data:B,revalidate:H,mutate:D,isValidating:M.current.isValidating}}return Object(r.useMemo)((function(){var e={revalidate:H,mutate:D};return Object.defineProperties(e,{error:{get:function(){return T.current.error=!0,F.current===s?M.current.error:I},enumerable:!0},data:{get:function(){return T.current.data=!0,F.current===s?M.current.data:_},enumerable:!0},isValidating:{get:function(){return T.current.isValidating=!0,M.current.isValidating},enumerable:!0}}),e}),[H])};n.b=T},function(e,n,t){"use strict";t.d(n,"a",(function(){return v}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(8),u=t(3),s=t(5),f=t(21);function d(){return(d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function p(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function h(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: inline-block;\n box-sizing: border-box;\n height: 30px;\n min-width: 6em;\n border: none;\n border-radius: 4px;\n text-align: center;\n font-family: ",";\n font-size: ",";\n padding: 0 15px;\n\n background-color: ",";\n color: white;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.has-icon {\n align-items: center;\n display: inline-flex;\n padding: 2.5px 6px 2.5px 4px;\n }\n\n &.secondary {\n background-color: ",";\n border: 1px solid ",";\n color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n\n &.danger {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.success {\n background-color: ",";\n border-color: ",";\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n & + button {\n margin-left: .25rem;\n }\n\n &.small {\n font-size: ",";\n height: 24px;\n }\n\n ","\n"]);return h=function(){return e},e}var m=Object(l.a)((function(e){var n=e.className,t=e.icon,r=void 0===t?null:t,a=e.onClick,i=e.disabled,l=void 0!==i&&i,c=e.color,u=void 0===c?null:c,h=e.small,m=e.children,b=p(e,["className","icon","onClick","disabled","color","small","children"]),v=!!r,y="nui-button ".concat(n||"").concat(v?" has-icon":"").concat(u?" custom-color":"").concat(h?" small":"");return o.a.createElement("button",d({type:"button",className:y,onClick:a,disabled:l},b),v&&o.a.createElement(s.Icon,{icon:"string"==typeof r?f.a[r]||null:r,width:"24",height:"24",style:{marginRight:"4px"}}),o.a.createElement("span",null,m))}))(h(),u.a.fontFamily,u.a.fontSizeText,u.a.blue,Object(c.a)(.1,u.a.blue),u.a.lightBlue,u.a.blue,u.a.blue,Object(c.a)(.1,u.a.lightBlue),u.a.red,u.a.red,Object(c.a)(.1,u.a.red),u.a.green,u.a.green,Object(c.a)(.1,u.a.green),u.a.fontSizeSmallButton,(function(e){return b(e.color)})),b=function(e){if(e)return"\n &.custom-color {\n background-color: ".concat(e,";\n border: 1px solid ").concat(e,";\n\n &:hover {\n background-color: ").concat(Object(c.a)(.1,e),";\n }\n }\n ")},v=function(e){return o.a.createElement(m,e)};v.propTypes={className:i.a.oneOf(["primary","secondary","danger","success"]),disabled:i.a.bool,icon:i.a.oneOfType([i.a.instanceOf(s.IconifyIcon),i.a.oneOf(["setting","edit","trash"])]),color:i.a.string,onClick:i.a.func.isRequired},v.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){}}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";t.d(n,"c",(function(){return N})),t.d(n,"b",(function(){return R})),t.d(n,"a",(function(){return F}));var r=t(0),o=t(95),a=t.n(o);function i(){return"undefined"==typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState}function l(){return void 0===navigator.onLine||navigator.onLine}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var u=new WeakMap,s=0;var f=new(function(){function e(e){void 0===e&&(e={}),this.__cache=new Map(Object.entries(e)),this.__listeners=[]}return e.prototype.get=function(e){var n=this.serializeKey(e)[0];return this.__cache.get(n)},e.prototype.set=function(e,n,t){void 0===t&&(t=!0);var r=this.serializeKey(e)[0];this.__cache.set(r,n),t&&j(e,n,!1),this.notify()},e.prototype.keys=function(){return Array.from(this.__cache.keys())},e.prototype.has=function(e){var n=this.serializeKey(e)[0];return this.__cache.has(n)},e.prototype.clear=function(e){void 0===e&&(e=!0),e&&this.__cache.forEach((function(e){return j(e,null,!1)})),this.__cache.clear(),this.notify()},e.prototype.delete=function(e,n){void 0===n&&(n=!0);var t=this.serializeKey(e)[0];n&&j(e,null,!1),this.__cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var n=null;if("function"==typeof e)try{e=e()}catch(n){e=""}return Array.isArray(e)?(n=e,e=function(e){if(!e.length)return"";for(var n="arg",t=0;t<e.length;++t){var r=void 0;null===e[t]||"object"!==c(e[t])?r="string"==typeof e[t]?'"'+e[t]+'"':String(e[t]):u.has(e[t])?r=u.get(e[t]):(r=s,u.set(e[t],s++)),n+="@"+r}return n}(e)):e=String(e||""),[e,n,e?"err@"+e:""]},e.prototype.subscribe=function(e){var n=this;if("function"!=typeof e)throw new Error("Expected the listener to be a function.");var t=!0;return this.__listeners.push(e),function(){if(t){t=!1;var r=n.__listeners.indexOf(e);r>-1&&(n.__listeners[r]=n.__listeners[n.__listeners.length-1],n.__listeners.length--)}}},e.prototype.notify=function(){for(var e=0,n=this.__listeners;e<n.length;e++){(0,n[e])()}},e}()),d={},p={},h={},m={};var b="undefined"!=typeof window&&navigator.connection&&-1!==["slow-2g","2g"].indexOf(navigator.connection.effectiveType),v=(a.a,!1);if("undefined"!=typeof window&&window.addEventListener&&!v){var y=function(){if(i()&&l())for(var e in p)p[e][0]&&p[e][0]()};window.addEventListener("visibilitychange",y,!1),window.addEventListener("focus",y,!1),v=!0}var g=Object(r.createContext)({});g.displayName="SWRConfigContext";var w=g;var O=function(e,n,t,r){return new(t||(t=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function l(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,l)}c((r=r.apply(e,n||[])).next())}))},k=function(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e],r=0}finally{t=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},C="undefined"==typeof window,E=(C?r.useEffect:r.useLayoutEffect,function(e,n){void 0===n&&(n=!0);var t=f.serializeKey(e),r=t[0],o=t[2];if(!r)return Promise.resolve();var a=h[r];if(r&&a){for(var i=f.get(r),l=f.get(o),c=[],u=0;u<a.length;++u)c.push(a[u](n,i,l,u>0));return Promise.all(c).then((function(){return f.get(r)}))}return Promise.resolve(f.get(r))}),j=function(e,n,t){return void 0===t&&(t=!0),O(void 0,void 0,void 0,(function(){var r,o,a,i,l,c,u,s,p,b;return k(this,(function(v){switch(v.label){case 0:if(!(r=f.serializeKey(e)[0]))return[2];if(void 0===n)return[2,E(e,t)];if(m[r]=Date.now()-1,i=m[r],l=d[r],!n||"function"!=typeof n)return[3,5];v.label=1;case 1:return v.trys.push([1,3,,4]),[4,n(f.get(r))];case 2:return o=v.sent(),[3,4];case 3:return c=v.sent(),a=c,[3,4];case 4:return[3,11];case 5:if(!n||"function"!=typeof n.then)return[3,10];v.label=6;case 6:return v.trys.push([6,8,,9]),[4,n];case 7:return o=v.sent(),[3,9];case 8:return u=v.sent(),a=u,[3,9];case 9:return[3,11];case 10:o=n,v.label=11;case 11:if(i!==m[r]||l!==d[r]){if(a)throw a;return[2,o]}if(void 0!==o&&f.set(r,o,!1),s=h[r]){for(p=[],b=0;b<s.length;++b)p.push(s[b](!!t,o,a,b>0));return[2,Promise.all(p).then((function(){return f.get(r)}))]}if(a)throw a;return[2,o]}}))}))};w.Provider,new Map;var S=t(18);function _(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||T(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,n,t,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,o)}function A(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var a=e.apply(n,t);function i(e){P(a,r,o,i,l,"next",e)}function l(e){P(a,r,o,i,l,"throw",e)}i(void 0)}))}}function I(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=T(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function T(e,n){if(e){if("string"==typeof e)return M(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?M(e,n):void 0}}function M(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var z=function(e){if(!e.data)return e;if(e.data.length>0&&e.data[0].meta){var n,t=I(e.data);try{for(t.s();!(n=t.n()).done;){var r=n.value;try{r.meta=JSON.parse(r.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",r.meta)}}}catch(e){t.e(e)}finally{t.f()}}else if(e.data.meta)try{e.data.meta=JSON.parse(e.data.meta)}catch(e){console.error("[JsonFetcher]","Could not decode meta.",x.meta)}return e},R=function(){var e=A(regeneratorRuntime.mark((function e(n){var t,r,o,a,i,l,c,u,s,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f.length>1&&void 0!==f[1]?f[1]:{},r=null,o={},a=null,i=null,e.prev=5,(t=t||{}).headers=t.headers?t.headers:{},t.headers.Pragma="no-cache",t.headers["Cache-Control"]="no-cache",e.next=12,fetch("".concat(n),t);case 12:return i=e.sent,e.next=15,i.text();case 15:r=e.sent,(o=JSON.parse(r)).success||(l=!1===o.success?"NOT-SUCCESS":"N/A",c=o.message?o.message:"Unknown error. Check your Console Logs.","rest_no_route"===o.code?(c="The API can't be accessed. Is Rest API enabled?",l="NO-ROUTE"):"internal_server_error"===o.code&&(c="Server error. Please check your PHP Error Logs.",l="SERVER-ERROR"),a=new S.a(c,l,n,r||i)),e.next=26;break;case 20:e.prev=20,e.t0=e.catch(5),u="BROKEN-REPLY",s="The reply sent by the server is broken.",i&&i.status&&408===i.status&&(u="REQUEST-TIMEOUT",s="The request generated a timeout."),a=new S.a(s,u,n,r||i,e.t0);case 26:return a&&(console.error("[NekoError] JsonFetcher",a.url,{code:a.code,error:a.error,body:a.body}),o.success=!1,o.error=a),e.abrupt("return",z(o));case 28:case"end":return e.stop()}}),e,null,[[5,20]])})));return function(n){return e.apply(this,arguments)}}(),N=function(){var e=A(regeneratorRuntime.mark((function e(n){var t,r,o,a,i,l,c,u,s,f,d,p,h,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=m.length>1&&void 0!==m[1]?m[1]:{},r=t.json,o=void 0===r?{}:r,a=t.signal,i=t.file,l=t.nonce,c=i?new FormData:null,i)for(c.append("file",i),u=0,s=Object.entries(o);u<s.length;u++)f=_(s[u],2),d=f[0],p=f[1],c.append(d,p);return h=l?{"X-WP-Nonce":l}:{},c||(h["Content-Type"]="application/json"),e.abrupt("return",R(n,{method:"POST",headers:h,body:c||JSON.stringify(o),signal:a}));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),F=function(e,n){var t=e.includes("index.php?rest_route");return e+(t?"&":"?")+new URLSearchParams(n).toString()}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(2),i=t.n(a);function l(){return(l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function c(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?c(Object(t),!0).forEach((function(n){s(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function f(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var p=function(e){var n=e.spinner,t=void 0===n||n,a=e.busy,i=void 0!==a&&a,c=e.overlayStyle,s=f(Object(r.useState)(!0),2),d=s[0],p=s[1];Object(r.useEffect)((function(){var e;return i?p(!0):e=setTimeout((function(){p(!1),e=null}),250),function(){e&&clearTimeout(e)}}),[i]);var h=d?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"overlay "+(i?"":"overlayHidden"),style:c},Boolean(t)&&o.a.createElement("div",{className:"lds-ellipsis "+(i?"":"spinnerHidden")},o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null),o.a.createElement("div",null))),o.a.createElement("style",{jsx:!0},"\n .overlay {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n background: rgb(30 124 186 / 85%);\n transition: opacity 1s ease-out;\n z-index: 10;\n display: flex;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n }\n\n .overlayHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .spinnerHidden {\n opacity: 0;\n transition: opacity 0.25s ease-out;\n }\n .lds-ellipsis {\n position: relative;\n width: 80px;\n height: 80px;\n display: flex;\n justify-items: center;\n align-items: center;\n }\n .lds-ellipsis div {\n position: absolute;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: white;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .lds-ellipsis div:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n .lds-ellipsis div:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n } \n ")):null,m=u(u({},e),{},{busy:void 0,spinner:void 0});return o.a.createElement("div",l({style:{position:"relative"}},m),h,e.children)};p.propTypes={busy:i.a.bool.isRequired,spinner:i.a.bool,children:i.a.oneOfType([i.a.arrayOf(i.a.node),i.a.node]).isRequired},n.a=p},function(e,n,t){"use strict";t.d(n,"a",(function(){return w}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(8),u=t(5),s=t(21),f=t(17);function d(){return(d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function p(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function h(){var e=b(["\n\n path {\n fill: ",";\n }\n\n ","\n\n &.nui-clickable {\n cursor: pointer;\n }\n\n &.spin {\n animation-name: spin;\n animation-duration: 700ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n\n @keyframes spin {\n 0% {\n transform: rotate(360deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n }\n }\n"]);return h=function(){return e},e}function m(){var e=b(["\n display: flex;\n align-items: center;\n"]);return m=function(){return e},e}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var v=l.a.div(m()),y=Object(l.a)(u.Icon)(h(),(function(e){return e.color}),(function(e){return function(e){if(e)return"\n &:hover {\n path {\n fill: ".concat(Object(c.a)(.1,e),";\n }\n }\n ")}(e.color)})),g=function(e){var n=e.icon,t=e.spinning,r=void 0!==t&&t,a=e.className,i=void 0===a?"":a,l=e.title,c=e.tooltip,u=e.containerStyle,h=e.color,m=p(e,["icon","spinning","className","title","tooltip","containerStyle","color"]);m.width||m.height||(m.width=m.height=30);var b=function(){return"string"==typeof n?s.a[n]||null:n},g="nui-icon ".concat(i).concat(m.onClick?" nui-clickable":"").concat(r?" spin":"");return c?o.a.createElement(f.a,{text:c.text,position:c.position||"top"},o.a.createElement(v,{style:u},o.a.createElement(y,d({icon:b(),className:g,color:h},m)))):o.a.createElement(v,{style:u,title:l},o.a.createElement(y,d({icon:b(),className:g,color:h},m)),c?o.a.createElement(f.a,null,c):null)},w=function(e){return o.a.createElement(g,e)};w.propTypes={icon:i.a.oneOfType([i.a.instanceOf(u.IconifyIcon),i.a.oneOf(["lock","lock-open","file-undo","chevron-double-left","chevron-double-right","chevron-left","chevron-right","chevron-down","chevron-up","pause","play","replay","check","stop","delete","undo","alert","database","pencil","tools","cog","close","cat","upload"])]),color:i.a.string,spinning:i.a.bool,className:i.a.string,tooltip:i.a.string},w.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";t.d(n,"a",(function(){return y}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(6),u=t(3);function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function d(){var e=h(["\n\tbackground-color: rgba(",", 0.8);\n\tborder-radius: 4px;\n\tcolor: ",";\n\tfont-family: ",";\n\tfont-weight: normal;\n\tmin-width: 180px;\n\tmax-width: 280px;\n\tfont-size: ",";\n\tpadding: 8px 12px;\n\tposition: absolute;\n \tmax-width: 280px;\n\tdisplay: ",';\n\tz-index: 100;\n\n\t&:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\tborder: 4px solid transparent;\n\t}\n\n\t&.top {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: 100%;\n\t\t\tleft: 50%;\n\t\t\tborder-top: 4px solid rgba(',", 0.8);\n\t\t}\n\t}\n\n\t&.left {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tright: -8px;\n\t\t\tborder-left: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.right {\n\t\t&:before {\n\t\t\tmargin-top: -4px;\n\t\t\ttop: 50%;\n\t\t\tleft: -8px;\n\t\t\tborder-right: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t&.bottom {\n\t\t&:before {\n\t\t\tmargin-left: -4px;\n\t\t\ttop: -8px;\n\t\t\tleft: 50%;\n\t\t\tborder-bottom: 4px solid rgba(",", 0.8);\n\t\t}\n\t}\n\n\t","\n"]);return d=function(){return e},e}function p(){var e=h(["\n\tdisplay: flex;\n"]);return p=function(){return e},e}function h(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=l.a.div(p()),b=l.a.div(d(),u.a.blackRGB,u.a.white,u.a.fontFamily,u.a.fontSizeText,(function(e){return e.visible?"inline-block":"none"}),u.a.blackRGB,u.a.blackRGB,u.a.blackRGB,u.a.blackRGB,(function(e){return e.style})),v=function(e){var n=e.text,t=void 0===n?"Hello world!":n,a=e.position,i=void 0===a?"top":a,l=s(Object(r.useState)(!1),2),u=l[0],f=l[1],d=Object(c.a)(),p=d.ref,h=d.width,v=d.height,y=Object(c.a)(),g=y.ref,w=y.width,x=y.height,O=Object(r.useMemo)((function(){var e=0,n=0;if("top"===i)e=-1*v-5,n=h/2*-1+w/2;else if("bottom"===i)e=x+5,n=h/2*-1+w/2;else if("left"===i){e=(v-x)/2*-1,n=-1*h-5}else if("right"===i){e=(v-x)/2*-1,n=w+5}return{transform:"translateX(".concat(n,"px) translateY(").concat(e,"px)")}}),[i,h,v,w,x]);return o.a.createElement(m,null,o.a.createElement(b,{ref:p,visible:u,className:i,style:O},t),o.a.createElement("div",{ref:g,onMouseEnter:function(){return f(!0)},onMouseLeave:function(){return f(!1)}},e.children))},y=function(e){return o.a.createElement(v,e)};y.propTypes={text:i.a.string,position:i.a.oneOf(["top","right","bottom","left"])},y.defaultProps={text:"Hello world!",position:"top"}},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}t.d(n,"a",(function(){return o}));var o=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};r(this,e),this.url=o,this.message=n,this.code=t,this.body=a,this.debug=i}},function(e,n,t){"use strict";t.d(n,"a",(function(){return w}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(){var e=h(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return s=function(){return e},e}function f(){var e=h(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return f=function(){return e},e}function d(){var e=h(["\n font-family: ",";\n font-size: ",";\n font-weight: normal;\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return d=function(){return e},e}function p(){var e=h(["\n font-family: ",";\n font-weight: normal;\n font-size: ",";\n line-height: normal;\n margin-top: 0;\n margin-bottom: 16px;\n padding: 0;\n"]);return p=function(){return e},e}function h(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var m=l.a.h1(p(),c.a.fontFamily,c.a.fontSizeH1),b=l.a.h2(d(),c.a.fontFamily,c.a.fontSizeH2),v=l.a.p(f(),c.a.fontFamily,c.a.fontSizeText),y=l.a.span(s(),c.a.fontFamily,c.a.fontSizeText),g=function(e){var n=e.children,t=u(e,["children"]);return e.h1?o.a.createElement(m,t,n):e.h2?o.a.createElement(b,t,n):e.p?o.a.createElement(v,t,n):o.a.createElement(y,t,n)},w=function(e){return o.a.createElement(g,e)};w.propTypes={h1:i.a.any,h2:i.a.any,p:i.a.any},w.defaultProps={h1:void 0,h2:void 0,p:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return c}));var r=t(0),o=t.n(r);t(2);function a(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n width: 100%;\n height: 100%;\n max-width: 128px;\n max-height: 128px;\n\n & > * {\n width: 100%;\n height: auto;\n object-fit: contain;\n }\n"]);return a=function(){return e},e}var i=t(4).a.div(a()),l=function(){return o.a.createElement(i,null,o.a.createElement("svg",{width:"54",height:"38",viewBox:"0 0 54 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.9038 19.1156 23.9038 19.1156C23.9038 19.1156 13.4345 22.0656 11.3663 9.40518Z",fill:"#724024",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",fill:"#B7782E"}),o.a.createElement("path",{d:"M10.7517 8.0531C10.0142 10.7573 6.32673 12.1093 3.99131 11.2489C1.65589 10.3885 2.63923 13.8302 5.09756 14.9364C7.55589 16.0427 11.2434 14.1989 12.1038 12.4781C12.9642 10.7573 11.4892 5.34893 10.7517 8.0531Z",stroke:"black"}),o.a.createElement("path",{d:"M14.0705 17.2718C13.8246 19.2385 9.64547 19.976 7.55589 19.8531C5.46631 19.7302 9.76839 23.5406 11.3663 23.5406C12.9642 23.5406 17.3892 21.2052 17.1434 19.2385C16.8976 17.2718 14.3163 15.3052 14.0705 17.2718Z",stroke:"black"}),o.a.createElement("path",{d:"M17.5121 26.2448C18.6184 25.3843 20.9538 21.8198 19.8476 19.8531C18.7413 17.8864 22.4288 20.9593 22.4288 20.9593L21.6913 26.2448C21.6913 26.2448 16.4059 27.1052 17.5121 26.2448Z",stroke:"black"}),o.a.createElement("path",{d:"M11.3663 9.40518C9.2981 -3.25522 -0.310763 2.76769 2.5163 9.40518C2.5163 9.40518 8.29338 29.9322 22.3059 26.3677C36.3184 22.8031 23.658 19.4843 23.658 19.4843C23.658 19.4843 13.4345 22.0656 11.3663 9.40518Z",stroke:"black",strokeWidth:"2.1869"}),o.a.createElement("path",{d:"M25.3788 9.89685C25.3788 9.89685 21.3225 35.0947 21.9371 35.7093C22.5517 36.3239 27.4684 36.3239 28.083 35.7093C28.6975 35.0947 29.6523 22.5858 30.2955 21.9427C30.9386 21.2995 35.7226 33.1281 36.81 33.1281C37.8975 33.1281 43.2303 21.3567 43.8163 21.9427C44.4023 22.5287 45.2913 35.0947 45.9059 35.7093C46.5204 36.3239 51.3142 36.3239 51.9288 35.7093C52.5434 35.0947 48.9788 9.89685 48.9788 9.89685H42.9559C42.9559 9.89685 37.7934 21.9427 36.81 21.9427C35.8267 21.9427 31.4017 9.89685 31.4017 9.89685H25.3788Z",fill:"white",stroke:"black",strokeWidth:"2.1869"})))},c=function(e){return o.a.createElement(l,e)};c.propTypes={},c.defaultProps={}},function(e,n,t){"use strict";var r=t(66),o=t.n(r),a=t(67),i=t.n(a),l=t(68),c=t.n(l),u=t(22),s=t.n(u),f=t(23),d=t.n(f),p=t(24),h=t.n(p),m=t(12),b=t.n(m),v=t(9),y=t.n(v),g=t(16),w=t.n(g),x=t(25),O=t.n(x),k=t(26),C=t.n(k),E=t(69),j=t.n(E),S=t(70),_=t.n(S),P=t(27),A=t.n(P),I=t(71),T=t.n(I),M=t(72),z=t.n(M),R=t(73),N=t.n(R),F=t(74),L=t.n(F),D=(t(98),t(75)),q=t.n(D),U=t(76),H=t.n(U),B=t(77),$=t.n(B),W=t(78),V=t.n(W),G=t(79),K=t.n(G),Y=t(80),J=t.n(Y),X=t(81),Z=t.n(X),Q=t(82),ee=t.n(Q),ne=t(83),te=t.n(ne),re={lock:o.a,"lock-open":i.a,"file-undo":c.a,"chevron-double-left":s.a,"chevron-double-right":d.a,"chevron-left":h.a,"chevron-right":b.a,"chevron-down":y.a,"chevron-up":w.a,pause:O.a,play:C.a,replay:j.a,check:_.a,stop:A.a,delete:T.a,undo:z.a,alert:N.a,database:L.a,tools:q.a,cog:H.a,close:$.a,cat:V.a,upload:K.a,trash:J.a,pencil:Z.a,dashboard:ee.a,search:te.a};n.a=re},function(e,n){n.__esModule=!0,n.default={body:'<path d="M18.41 7.41L17 6l-6 6l6 6l1.41-1.41L13.83 12l4.58-4.59m-6 0L11 6l-6 6l6 6l1.41-1.41L7.83 12l4.58-4.59z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M5.59 7.41L7 6l6 6l-6 6l-1.41-1.41L10.17 12L5.59 7.41m6 0L13 6l6 6l-6 6l-1.41-1.41L16.17 12l-4.58-4.59z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6l1.41-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M14 19h4V5h-4M6 19h4V5H6v14z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M8 5.14v14l11-7l-11-7z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M18 18H6V6h12v12z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";e.exports=t(100)},function(e,n){n.__esModule=!0,n.default={body:'<path d="M19 3H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M10 17l-5-5l1.41-1.42L10 14.17l7.59-7.59L19 8m0-5H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M10 4H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";t.d(n,"a",(function(){return _})),t.d(n,"b",(function(){return P}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(8),u=t(3),s=t(7),f=t(5),d=t(9),p=t.n(d),h=t(6);function m(){var e=x(["\n align-items: center;\n background-color: ",";\n border: none;\n box-sizing: border-box;\n color: white;\n display: flex;\n font-family: ",";\n font-size: ",";\n width: 100%;\n padding: 8px 15px 8px 15px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled:not(.is-pro) {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n &.is-pro {\n background-color: ",";\n justify-content: space-between;\n }\n"]);return m=function(){return e},e}function b(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return v(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function y(){var e=x(["\n position: relative;\n display: block;\n margin-top: 18px;\n background-color: ",";\n position: absolute;\n z-index: 10;\n box-shadow: ",';\n\n &:before {\n content: "";\n position: absolute;\n top: -18px;\n left: 50%;\n margin-left: -8px;\n border: 8px solid transparent;\n border-bottom: 10px solid ',";\n }\n"]);return y=function(){return e},e}function g(){var e=x(["\n align-items: center;\n background-color: ",";\n border: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: white;\n display: inline-flex;\n justify-content: space-between;\n font-family: ",";\n font-size: ",";\n height: 30px;\n min-width: 6em;\n padding: 0px 10px;\n text-align: center;\n transition: background-color .10s, opacity .25s;\n\n :not([disabled]):hover {\n cursor: pointer;\n background-color: ",";\n }\n\n :disabled {\n opacity: 0.35;\n }\n\n :focus {\n outline: none;\n }\n\n & + button {\n margin-left: .25rem;\n }\n"]);return g=function(){return e},e}function w(){var e=x(["\n display: inline-block;\n"]);return w=function(){return e},e}function x(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var O=l.a.div(w()),k=l.a.button(g(),u.a.blue,u.a.fontFamily,u.a.fontSizeText,Object(c.a)(.1,u.a.blue)),C=l.a.div(y(),u.a.blue,u.a.lightShadow,u.a.blue),E=function(e){var n=e.title,t=e.disabled,r=void 0!==t&&t,a=e.isPro,i=void 0!==a&&a,l=e.style,c=void 0===l?{}:l,u=b(o.a.useState(!1),2),s=u[0],d=u[1],m=Object(h.e)((function(){d(!1)})),v=Object(h.a)(),y=v.ref,g=v.width,w=function(){d(!s)},x=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{isPro:i,disabled:e.props.disabled||r,onClick:function(){e.props.onClick&&e.props.onClick(),w()}})}));return o.a.createElement(O,{ref:m},o.a.createElement(k,{ref:y,type:"button",disabled:r,onClick:w,style:c},o.a.createElement("span",null,n),o.a.createElement(f.Icon,{icon:p.a,width:"24",height:"24",style:{marginLeft:"4px"}})),s&&o.a.createElement(C,{style:{transform:"translateX(calc(-50% + ".concat(g/2,"px))")}},x))},j=l.a.button(m(),u.a.blue,u.a.fontFamily,u.a.fontSizeText,Object(c.a)(.1,u.a.blue),u.a.proGray),S=function(e){var n=e.onClick,t=e.children,r=e.isPro,a=e.requirePro,i=void 0!==a&&a,l=e.disabled,c=i&&!r;return o.a.createElement(j,{type:"button",className:c?"is-pro":"",onClick:n,disabled:l||c},o.a.createElement("span",null,t),c&&!r&&o.a.createElement(s.a,null))},_=function(e){return o.a.createElement(E,e)},P=function(e){return o.a.createElement(S,e)};_.propTypes={title:i.a.string,disabled:i.a.bool,isPro:i.a.bool},_.defaultProps={title:void 0,disabled:!1,isPro:!1},P.propTypes={onClick:i.a.func.isRequired,requirePro:i.a.bool},P.defaultProps={onClick:function(){},requirePro:!1}},function(e,n,t){"use strict";t.d(n,"b",(function(){return v})),t.d(n,"a",(function(){return y}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4);function c(){return(c=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function u(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function s(){var e=d(["\n flex: 1;\n padding: 32px 30px;\n\n .nui-block:not(:first-child) {\n margin-top: -20px;\n }\n\n .nui-block:last-child {\n margin-bottom: 0px;\n }\n\n &.minimal {\n padding: 0;\n }\n\n &.full {\n flex-basis: 100%;\n padding-bottom: 0;\n }\n\n & + .full {\n padding-bottom: 32px;\n padding-top: 0;\n }\n\n &:not(.full) + div:not(.full) {\n padding-left: 0;\n }\n"]);return s=function(){return e},e}function f(){var e=d(["\n display: flex;\n flex-wrap: wrap;\n"]);return f=function(){return e},e}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=l.a.div(f()),h=l.a.div(s()),m=function(e){return o.a.createElement(p,null,e.children)},b=function(e){var n=e.full,t=e.minimal,r=u(e,["full","minimal"]),a=n?"full":"";return a+=t?" minimal":"",o.a.createElement(h,c({className:a},r),e.children)},v=function(e){return o.a.createElement(m,e)},y=function(e){return o.a.createElement(b,e)};v.propTypes={},v.defaultProps={},y.propTypes={full:i.a.any},y.defaultProps={full:void 0}},function(e,n,t){"use strict";t.d(n,"b",(function(){return U})),t.d(n,"a",(function(){return H}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(7),s=t(6),f=t(5),d=t(87),p=t.n(d),h=t(88),m=t.n(h),b=t(9),v=t.n(b),y=t(16),g=t.n(y);function w(){var e=I(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\n padding: 8px 12px;\n\n &:hover {\n filter: brightness(80%);\n }\n\n input {\n display: none;\n }\n\n .option {\n align-items: center;\n color: ",";\n display: flex;\n justify-content: space-between;\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n pointer-events: none;\n\n .option {\n color: rgb(255 255 255 / 35%);\n }\n }\n"]);return w=function(){return e},e}function x(){var e=I(["\n font-family: ",";\n margin-bottom: 6px;\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n\n .inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n .description {\n display: block;\n font-size: 12px;\n }\n }\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n"]);return x=function(){return e},e}function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function k(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return C(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function E(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function j(){var e=I(["\n background-color: ",";\n"]);return j=function(){return e},e}function S(){var e=I(["\n border-radius: 8px;\n overflow: hidden;\n padding-top: 28px;\n position: absolute;\n top: 0;\n z-index: 10;\n width: 100%;\n transition: all 0.2s ease-in;\n\n &.hidden {\n opacity: 0;\n }\n"]);return S=function(){return e},e}function _(){var e=I(["\n display: block;\n margin-top: 5px;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n"]);return _=function(){return e},e}function P(){var e=I(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 8px;\n display: flex;\n font-family: ",";\n font-size: 14px;\n padding: 0 5px 0 10px;\n box-sizing: border-box;\n height: 30px;\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return P=function(){return e},e}function A(){var e=I(["\n border-radius: 8px;\n position: relative;\n user-select: none;\n cursor: pointer;\n\n &.show-options {\n background-color: ",";\n border-radius: 8px 8px 0 0;\n }\n"]);return A=function(){return e},e}function I(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var T=l.a.div(A(),c.a.blue),M=l.a.div(P(),c.a.white,c.a.blue,c.a.fontFamily),z=l.a.div(_()),R=l.a.div(S()),N=l.a.div(j(),c.a.white),F=function(e){var n,t=e.id,a=e.name,i=e.value,l=e.scrolldown,c=void 0!==l&&l,d=e.isPro,p=void 0!==d&&d,h=e.onChange,m=E(e,["id","name","value","scrolldown","isPro","onChange"]),b=null===(n=o.a.Children.toArray(e.children).find((function(e){return e.props.value===i||e.props.checked})))||void 0===n?void 0:n.props,y=(null==b?void 0:b.label)||"Select",w=(null==b?void 0:b.description)||e.description,x=(null==b?void 0:b.requirePro)||!1,C=k(Object(r.useState)(!1),2),j=C[0],S=C[1],_=c?Object(s.e)((function(){S(!1)})):null,P=x&&!p,A=function(n){if(n!==i){if(!h)return void console.log("The onChange handler it not set for this checkbox.",e);h(n,t)}c&&S(!1)},I=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{name:e.props.name||a,checked:e.props.value===i||e.props.checked,onClick:A,scrolldown:c,isPro:p})}));return c?o.a.createElement(T,O({id:t,ref:_},m,{onClick:function(){return S(!j)},className:["nui-select",j?"show-options":""],childrenLength:I.length}),o.a.createElement(M,null,y,o.a.createElement("div",{className:"rightContent"},P&&o.a.createElement(u.a,null),o.a.createElement(f.Icon,{icon:j?g.a:v.a,width:"24"}))),w&&o.a.createElement(z,null,w),j&&o.a.createElement(R,{className:j?"":"hidden"},o.a.createElement(N,null,[I]))):I},L=l.a.div(x(),c.a.fontFamily,c.a.disabledForm),D=l.a.div(w(),c.a.blue,c.a.fontFamily,c.a.white,c.a.fontFamily),q=function(e){var n=e.id,t=e.name,r=e.value,a=e.checked,i=e.label,l=e.description,s=e.onClick,d=e.scrolldown,h=e.isPro,b=void 0!==h&&h,v=e.requirePro,y=void 0!==v&&v&&!b,g=y?"disabled":"",w=o.a.createElement(L,{className:"nui-select ".concat(e.className||""," ").concat(g)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(e){return s(e.target.value)},disabled:y}),o.a.createElement("label",{htmlFor:n},o.a.createElement(f.Icon,{icon:a?m.a:p.a,width:"24px",color:y?c.a.disabledForm:c.a.blue}),o.a.createElement("div",{className:"inner-container"},o.a.createElement("span",{className:"label"},i,o.a.createElement(u.a,{className:"inline",style:{top:-1},show:y})),l?o.a.createElement("small",{className:"description"},l):null))),x=o.a.createElement(D,{className:"nui-select ".concat(e.className||""," ").concat(g)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,disabled:y}),o.a.createElement("div",{className:"option",onClick:function(){return s(r)}},i,o.a.createElement(u.a,{show:y})));return d?x:w},U=function(e){return o.a.createElement(F,e)};U.propTypes={id:i.a.string,name:i.a.string,description:i.a.string,scrolldown:i.a.bool,isPro:i.a.bool,onChange:i.a.func},U.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0};var H=function(e){return o.a.createElement(q,e)};H.propTypes={id:i.a.string,name:i.a.string,value:i.a.string,checked:i.a.bool,label:i.a.string,description:i.a.string,onClick:i.a.func,scrolldown:i.a.bool,isPro:i.a.bool,requirePro:i.a.bool},H.defaultProps={id:void 0,name:void 0,value:void 0,checked:!1,label:void 0,description:void 0,onClick:void 0,scrolldown:!1,isPro:!1,requirePro:!1}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(5),s=t(31),f=t.n(s),d=t(89),p=t.n(d),h=t(90),m=t.n(h),b=t(12),v=t.n(b),y=t(9),g=t.n(y),w=t(91),x=t.n(w);function O(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return k(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return k(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(){var e=_(["\n margin-left: 5px;\n"]);return C=function(){return e},e}function E(){var e=_(["\n border-left: 1px solid ",";\n margin-left: 12px;\n padding-left: 6px;\n\n &.no-line {\n border-left: 0;\n padding-left: 12px;\n }\n\n &.no-chevron {\n border-left: 0;\n margin-left: 0;\n padding-left: 0;\n }\n"]);return E=function(){return e},e}function j(){var e=_(["\n height: 24px;\n width: 24px;\n"]);return j=function(){return e},e}function S(){var e=_(["\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n\n &.can-expand {\n cursor: pointer;\n }\n\n p {\n margin: 0 0 0 8px;\n }\n"]);return S=function(){return e},e}function _(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var P=function(e){var n=e.chevron,t=void 0===n||n;return o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:t})}))},A=l.a.div(S()),I=l.a.div(j()),T=l.a.div(E(),c.a.finderBorder),M=l.a.div(C()),z=function(e){var n={gallery:m.a,tag:x.a},t=e.title,r=e.chevron,a=e.rightElement,i=void 0===a?null:a,l=e.showRightElement,s=void 0!==l&&l,d=!e.icon,h=!!e.icon,b=!!e.children,y=O(o.a.useState(!1),2),w=y[0],k=y[1],C=O(o.a.useState((function(){return"string"==typeof e.icon&&Object.keys(n).includes(e.icon)?n[e.icon]:e.icon?e.icon:f.a})),2),E=C[0],j=C[1],S=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:r})}));return o.a.createElement("div",null,o.a.createElement(A,{onClick:function(){e.onClick&&e.onClick(),(d||b)&&(h||j(w?f.a:p.a),k(!w))},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,className:"".concat(d||S||e.onClick?"can-expand":"")},r?d||S?o.a.createElement(u.Icon,{icon:w?g.a:v.a,width:"24",height:"24"}):o.a.createElement(I,null):null,o.a.createElement(u.Icon,{icon:E,color:c.a.blue,width:"24",height:"24"}),o.a.createElement("p",null,t),s&&o.a.createElement(M,null,i)),w&&o.a.createElement(T,{className:"".concat(d?"":"no-line"," ").concat(r?"":"no-chevron")},S))},R=function(e){return o.a.createElement(P,e)};R.propTypes={chevron:i.a.bool},R.defaultProps={chevron:!0};var N=function(e){return o.a.createElement(z,e)};N.propTypes={icon:i.a.oneOfType([i.a.instanceOf(u.IconifyIcon),i.a.oneOf(["gallery"])]),title:i.a.string},N.defaultProps={icon:f.a,title:void 0}},function(e,n,t){"use strict";t.d(n,"b",(function(){return v})),t.d(n,"a",(function(){return y}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(15);function s(){var e=d(["\n color: ",";\n cursor: pointer;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 17px;\n\n &.is-active {\n cursor: default;\n color: ",';\n font-weight: bold;\n }\n\n &::after {\n content: "|";\n color: ',";\n padding: 0 4px;\n }\n\n &:last-child::after {\n content: none;\n }\n\n span {\n color: ",";\n font-weight: normal;\n margin-left: 4px;\n }\n"]);return s=function(){return e},e}function f(){var e=d(["\n display: flex;\n align-items: center;\n"]);return f=function(){return e},e}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p=l.a.div(f()),h=l.a.span(s(),c.a.blue,c.a.fontFamily,c.a.black,c.a.darkGray,c.a.darkGray),m=function(e){var n=e.id,t=e.value,r=e.onChange,a=e.busy,i=void 0!==a&&a,l=o.a.Children.map(e.children,(function(e,a){return o.a.cloneElement(e,{busy:i,isActive:e.props.value===t,onClick:function(e){e!==t&&r(e,n)}})}));return o.a.createElement(p,null,l)},b=function(e){var n=e.title,t=e.value,r=void 0===t?0:t,a=e.count,i=e.onClick,l=e.busy,c=e.isActive;return o.a.createElement(h,{onClick:function(){return i(r)},className:"".concat(c?"is-active":"")},n,null===a?null:o.a.createElement("span",null,"(",l?o.a.createElement(u.a,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):a,")"))},v=function(e){return o.a.createElement(m,e)};v.propTypes={id:i.a.string,value:i.a.string,onChange:i.a.func},v.defaultProps={id:void 0,value:void 0,onChange:void 0};var y=function(e){return o.a.createElement(b,e)};y.propTypes={title:i.a.string,value:i.a.string,count:i.a.number,onClick:i.a.func,isActive:i.a.bool},y.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return c}));var r=t(4);function o(){var e=i(["\n background: #1eba96;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n text-align: center;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return o=function(){return e},e}function a(){var e=i(["\n background: #ba341e;\n padding: 20px;\n color: white;\n border-radius: 10px;\n font-size: 15px;\n\n a {\n color: white;\n font-weight: bold;\n }\n"]);return a=function(){return e},e}function i(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var l=r.a.p(a()),c=r.a.p(o())},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.canUseDOM=void 0;var r,o=t(112);var a=((r=o)&&r.__esModule?r:{default:r}).default,i=a.canUseDOM?window.HTMLElement:{};n.canUseDOM=a.canUseDOM;n.default=i},function(e,n,t){"use strict";t.d(n,"a",(function(){return C})),t.d(n,"b",(function(){return k}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(7);function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function d(){var e=b(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return d=function(){return e},e}function p(){var e=b(["\n font-family: ",";\n font-size: ",";\n border-radius: 8px 8px 0px 0px;\n border: 0;\n background-color: #459ad2;\n color: rgb(255 255 255 / 35%);\n\n cursor: pointer;\n line-height: 17px;\n margin-right: 5px;\n text-align: left;\n padding: 10px 15px 10px 15px;\n\n &:focus {\n outline: none;\n }\n\n &.active {\n background-color: ",";\n color: ",";\n }\n\n &.disabled {\n background-color: rgb(224 156 54);\n cursor: default;\n display: inline-flex;\n padding-bottom: 7px;\n }\n"]);return p=function(){return e},e}function h(){var e=b(["\n"]);return h=function(){return e},e}function m(){var e=b(["\n"]);return m=function(){return e},e}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var v=l.a.div(m()),y=l.a.div(h()),g=l.a.button(p(),c.a.fontFamily,c.a.fontSizeText,c.a.blue,c.a.white),w=l.a.div(d(),c.a.blue),x=function(e){var n=s(o.a.useState(0),2),t=n[0],r=n[1],a=o.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),i=o.a.Children.map(e.children,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})}));return o.a.createElement(v,null,o.a.createElement(y,null,a.map((function(n,a){return o.a.createElement(g,{key:n.key,className:"neko-tab-title ".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(t){!function(n,t,o){t.requirePro||(r(n),e.onChange&&e.onChange(n,t,o))}(a,n,t)}},n.title,o.a.createElement(u.a,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:n.requirePro}))}))),i)},O=function(e){var n=e.children,t=e.isActive;return o.a.createElement(w,{className:"".concat(t?"active":"")},n)},k=function(e){return o.a.createElement(x,e)};k.propTypes={isPro:i.a.bool,onChange:i.a.func},k.defaultProps={isPro:!1,onChange:void 0};var C=function(e){return o.a.createElement(O,e)};C.propTypes={isActive:i.a.bool,requirePro:i.a.bool,title:i.a.string},C.defaultProps={isActive:!1,requirePro:!1,title:void 0}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(7),s=t(5),f=t(9),d=t.n(f),p=t(12),h=t.n(p);function m(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return b(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return b(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function v(){var e=w(["\n background-color: ",";\n display: none;\n\n &.active {\n display: block;\n }\n"]);return v=function(){return e},e}function y(){var e=w(["\n align-items: center;\n background-color: ",";\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 2px 3px 2px 19px;\n\n &.disabled {\n background-color: rgba(",", 0.25);\n cursor: default;\n }\n\n p {\n color: ",";\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n margin: 0;\n }\n\n .neko-side-tab-icon {\n color: ",";\n margin-left: auto;\n height: 36px;\n width: 36px;\n }\n"]);return y=function(){return e},e}function g(){var e=w(["\n"]);return g=function(){return e},e}function w(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var x=l.a.div(g()),O=l.a.div(y(),c.a.blue,c.a.yellowRGB,c.a.white,c.a.fontFamily,c.a.white),k=l.a.div(v(),c.a.white),C=function(e){var n=m(o.a.useState(),2),t=n[0],r=n[1],a=o.a.Children.map(e.children,(function(n,t){var r=n.props.title||"Untitled Tab "+(t+1);return{key:n.props.key||"neko-tab-"+r.toLowerCase(),title:r,onClick:n.props.onClick?n.props.onClick:null,requirePro:!e.isPro&&(n.props.requirePro||!1)}})),i=o.a.Children.map(e.children,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})}));return o.a.createElement(x,null,a.map((function(n,a){return o.a.createElement(o.a.Fragment,null,o.a.createElement(O,{key:n.key,className:"".concat(a===t?"active":""," ").concat(n.requirePro?"disabled":""),onClick:function(o){!function(n,o,a){if(!o.requirePro){var i=n===t?null:n;r(i),e.onChange&&e.onChange(i,o,a)}}(a,n,o)}},o.a.createElement("p",null,n.title,o.a.createElement(u.a,{className:"inline",show:n.requirePro})),o.a.createElement(s.Icon,{icon:a===t?d.a:h.a,className:"neko-side-tab-icon"})),i[a])})))},E=function(e){var n=e.children,t=e.isActive;return o.a.createElement(k,{className:"".concat(t?"active":"")},n)},j=function(e){return o.a.createElement(C,e)};j.propTypes={isPro:i.a.bool,onChange:i.a.func},j.defaultProps={isPro:!1,onChange:void 0};var S=function(e){return o.a.createElement(E,e)};S.propTypes={isActive:i.a.bool,requirePro:i.a.bool,title:i.a.string},S.defaultProps={isActive:!1,requirePro:!1,title:void 0}},function(e,n,t){"use strict";var r=t(28),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function c(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(n,t,r){if("string"!=typeof t){if(h){var o=p(t);o&&o!==h&&e(n,o,r)}var i=s(t);f&&(i=i.concat(f(t)));for(var l=c(n),m=c(t),b=0;b<i.length;++b){var v=i[b];if(!(a[v]||r&&r[v]||m&&m[v]||l&&l[v])){var y=d(t,v);try{u(n,v,y)}catch(e){}}}}return n}},function(e,n,t){"use strict";function r(e,n,t,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var n=this,t=arguments;return new Promise((function(o,a){var i=e.apply(n,t);function l(e){r(i,o,a,l,c,"next",e)}function c(e){r(i,o,a,l,c,"throw",e)}l(void 0)}))}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,n){return(l=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function c(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=f(e);if(n){var o=f(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)}}function u(e,n){return!n||"object"!==a(n)&&"function"!=typeof n?s(e):n}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(n,"__esModule",{value:!0});var d=t(101),p=t(102),h=t(104),m=function(){},b=new p.TimeoutError,v=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&l(e,n)}(g,e);var n,t,r,u,f,d,v,y=c(g);function g(e){var n,t,r,o,i;if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,g),n=y.call(this),Object.defineProperty(s(n),"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s(n),"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s(n),"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s(n),"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:m}),Object.defineProperty(s(n),"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:m}),Object.defineProperty(s(n),"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s(n),"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:h.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(null!==(r=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==r?r:"","` (").concat(a(e.intervalCap),")"));if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(null!==(i=null===(o=e.interval)||void 0===o?void 0:o.toString())&&void 0!==i?i:"","` (").concat(a(e.interval),")"));return n._carryoverConcurrencyCount=e.carryoverConcurrencyCount,n._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,n._intervalCap=e.intervalCap,n._interval=e.interval,n._queue=new e.queueClass,n._queueClass=e.queueClass,n.concurrency=e.concurrency,n._timeout=e.timeout,n._throwOnTimeout=!0===e.throwOnTimeout,n._isPaused=!1===e.autoStart,n}return n=g,(t=[{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother()}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=m,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=m,this.emit("idle"))}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var e=this,n=Date.now();if(void 0===this._intervalId){var t=this._intervalEnd-n;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){e._onResumeInterval()}),t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}},{key:"_tryToStartAnother",value:function(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){var e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),e&&this._initializeIntervalIfNeeded(),!0}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var e=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){e._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}},{key:"_onInterval",value:function(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}},{key:"_processQueue",value:function(){for(;this._tryToStartAnother(););}},{key:"add",value:(v=o(regeneratorRuntime.mark((function e(n){var t,r=this,a=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise((function(e,a){var i=function(){var i=o(regeneratorRuntime.mark((function o(){var i;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r._pendingCount++,r._intervalCount++,o.prev=2,i=void 0===r._timeout&&void 0===t.timeout?n():p.default(Promise.resolve(n()),void 0===t.timeout?r._timeout:t.timeout,(function(){(void 0===t.throwOnTimeout?r._throwOnTimeout:t.throwOnTimeout)&&a(b)})),o.t0=e,o.next=7,i;case 7:o.t1=o.sent,(0,o.t0)(o.t1),o.next=14;break;case 11:o.prev=11,o.t2=o.catch(2),a(o.t2);case 14:r._next();case 15:case"end":return o.stop()}}),o,null,[[2,11]])})));return function(){return i.apply(this,arguments)}}();r._queue.enqueue(i,t),r._tryToStartAnother()})));case 2:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)})},{key:"addAll",value:(d=o(regeneratorRuntime.mark((function e(n,t){var r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(n.map(function(){var e=o(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.add(n,t));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e)}))),function(e,n){return d.apply(this,arguments)})},{key:"start",value:function(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}},{key:"pause",value:function(){this._isPaused=!0}},{key:"clear",value:function(){this._queue=new this._queueClass}},{key:"onEmpty",value:(f=o(regeneratorRuntime.mark((function e(){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var t=n._resolveEmpty;n._resolveEmpty=function(){t(),e()}})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"onIdle",value:(u=o(regeneratorRuntime.mark((function e(){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var t=n._resolveIdle;n._resolveIdle=function(){t(),e()}})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"sizeBy",value:function(e){return this._queue.filter(e).length}},{key:"_doesIntervalAllowAnother",get:function(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}},{key:"_doesConcurrentAllowAnother",get:function(){return this._pendingCount<this._concurrency}},{key:"concurrency",get:function(){return this._concurrency},set:function(e){if(!("number"==typeof e&&e>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(e,"` (").concat(a(e),")"));this._concurrency=e,this._processQueue()}},{key:"size",get:function(){return this._queue.size}},{key:"pending",get:function(){return this._pendingCount}},{key:"isPaused",get:function(){return this._isPaused}},{key:"timeout",get:function(){return this._timeout},set:function(e){this._timeout=e}}])&&i(n.prototype,t),r&&i(n,r),g}(d);n.default=v},function(e,n,t){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var n={};return function(t){return void 0===n[t]&&(n[t]=e(t)),n[t]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));n.a=o},function(e,n,t){"use strict";t.d(n,"a",(function(){return m}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(11);function u(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||s(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,n):void 0}}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function d(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n background: #f1f1f1;\n margin-left: -20px;\n background-color: rgb(30 124 186 / 10%);\n padding-bottom: 50px;\n margin-bottom: -26px;\n\n .neko-rest-error {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: #1e232deb;\n z-index: 100;\n\n .container {\n color: white;\n padding: 5px 20px 15px 20px;\n min-width: 480px;\n max-width: 600px;\n border-radius: 20px;\n background: #883131;\n margin-left: 50%;\n transform: translateX(-50%);\n margin-top: 100px;\n\n h3 {\n color: white;\n }\n\n .neko-debug {\n padding: 5px 10px;\n background: #692426;\n border-radius: 10px;\n\n * {\n margin: 0px;\n padding: 0px;\n } \n }\n }\n }\n"]);return d=function(){return e},e}var p=l.a.div(d()),h=function(e){var n=e.className,t=e.children,a=e.nekoErrors,i=void 0===a?[]:a,l=e.style,f=void 0===l?{}:l,d=u(Object(r.useState)(!1),2),h=d[0],m=d[1],b=u(Object(r.useState)(!1),2),v=b[0],y=b[1];if(i&&!h){var g,w=function(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=s(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}(i);try{for(w.s();!(g=w.n()).done;){var x=g.value;if(x){m(x);break}}}catch(e){w.e(e)}finally{w.f()}}return o.a.createElement(p,{className:n||"",style:f},h&&o.a.createElement("div",{className:"neko-rest-error"},o.a.createElement("div",{className:"container"},!v&&o.a.createElement(o.a.Fragment,null,o.a.createElement("h3",null,"The Rest API is disabled or broken 😢"),o.a.createElement("p",null,"The Rest API is required for this plugin to work. It is enabled in WordPress by default since December 2016 and used by the Gutenberg Editor since 2019. In short, it allows more robustness and a much cleaner infrastructure. Soon, Wordpress will entirely depends on it, so it is important to keep it enabled."),o.a.createElement("p",null,o.a.createElement("i",null,"Last but not least: check your PHP Error Logs and your Debugging Console.")),o.a.createElement("p",{className:"neko-debug"},o.a.createElement("small",null,"URL: ",h.url,o.a.createElement("br",null),"CODE: ",h.code,o.a.createElement("br",null),"MESSAGE: ",h.message,o.a.createElement("br",null)))),h.body&&v&&o.a.createElement("p",{className:"neko-debug"},o.a.createElement("div",{dangerouslySetInnerHTML:{__html:h.body}})),h.body&&o.a.createElement(c.a,{color:"#a94242",onClick:function(){return y(!v)}},v?"Hide":"Display"," response from server"),o.a.createElement(c.a,{color:"#a94242",onClick:function(){window.open("https://meowapps.com/debugging-wordpress/","_blank")}},"Learn about WordPress Debugging"))),t)},m=function(e){return o.a.createElement(h,e)};m.propTypes={className:i.a.string,style:i.a.object,nekoErrors:i.a.bool},m.defaultProps={className:void 0,style:{},nekoErrors:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return h}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(19),s=t(14);function f(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-size: ",";\n margin-bottom: 15px;\n \n .nui-block-title {\n color: ",";\n padding: 5px 10px;\n margin-bottom: 5px;\n }\n\n .nui-block-content {\n background-color: #f1f1f1;\n padding: 26px;\n box-shadow: 0px 2px 5px 0px #0000004a;\n border-radius: 10px;\n\n p:first-child {\n margin-top: 0;\n }\n\n p:last-child {\n margin-bottom: 0;\n }\n }\n\n &.primary {\n padding: 8px;\n background-color: ",";\n\n .nui-block-title {\n color: ",";\n }\n\n .nui-block-content {\n background-color: ",";\n }\n }\n"]);return f=function(){return e},e}var d=l.a.div(f(),c.a.fontSizeText,c.a.blue,c.a.blue,c.a.white,c.a.white),p=function(e){var n=e.title,t=e.children,r=e.className,a=e.busy,i=void 0!==a&&a,l=e.style,c=void 0===l?{}:l;return o.a.createElement(d,{className:"nui-block "+(r||""),style:c},o.a.createElement(s.a,{busy:i},o.a.createElement(u.a,{h2:!0,className:"nui-block-title"},n),o.a.createElement("div",{className:"nui-block-content"},t)))},h=function(e){return o.a.createElement(p,e)};h.propTypes={title:i.a.string,className:i.a.oneOf(["","primary"]),style:i.a.object},h.defaultProps={title:void 0,className:"",style:{}}},function(e,n,t){"use strict";t.d(n,"a",(function(){return m}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){var e=f(["\n justify-content: flex-start;\n background-color: ",";\n display: flex;\n align-items: center;\n padding: 8px 10px;\n\n &.align-right {\n justify-content: flex-end;\n }\n"]);return u=function(){return e},e}function s(){var e=f(["\n font-size: ",";\n font-family: ",";\n background-color: ",";\n box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);\n margin-bottom: 25px;\n\n &.primary {\n background-color: ",";\n }\n\n p:first-child {\n margin-top: 0px;\n }\n\n p:last-child {\n margin-bottom: 0px;\n }\n\n .content {\n padding: 20px 20px;\n }\n"]);return s=function(){return e},e}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=l.a.div(s(),c.a.fontSizeText,c.a.fontFamily,c.a.white,c.a.blue),p=l.a.div(u(),c.a.lightGray),h=function(e){var n=e.children,t=e.header,r=e.headerAlign,a=void 0===r?"left":r,i=e.footer,l=e.footerAlign,c=void 0===l?"right":l,u=e.className,s=e.style,f=void 0===s?{}:s;return o.a.createElement(d,{className:u||"",style:f},t&&o.a.createElement(p,{className:"align-".concat(a)},t),o.a.createElement("div",{className:"content"},n),i&&o.a.createElement(p,{className:"align-".concat(c)},i))},m=function(e){return o.a.createElement(h,e)};m.propTypes={header:i.a.element,headerAlign:i.a.oneOf(["left","right"]),footer:i.a.element,footerAlign:i.a.oneOf(["left","right"]),className:i.a.string,style:i.a.object},m.defaultProps={header:void 0,headerAlign:"left",footer:void 0,footerAlign:"right",className:void 0,style:{}}},function(e,n,t){"use strict";t.d(n,"a",(function(){return f}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n display: flex;\n font-family: ",";\n\n > .nui-settings-head {\n font-family: ",";\n font-size: 14px;\n line-height: 17px;\n width: 120px;\n margin-right: 16px;\n }\n\n /* Select, Checkbox, Input need to be a bit higher to be in front of the settings title */\n\n .nui-settings-content > .nui-select:first-child {\n position: relative;\n margin-top: -5px;\n }\n \n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-checkbox:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > .nui-button:first-child {\n position: relative;\n margin-top: -5px;\n }\n\n .nui-settings-content > div:first-child > .neko-input {\n position: relative;\n margin-top: -5px;\n }\n\n > .nui-settings-content {\n flex: 1;\n\n &.nui-settings-content-align-right {\n flex: none;\n margin-left: auto;\n }\n\n input[type=text] {\n width: 100%;\n }\n\n\n }\n\n & + div {\n margin-top: 15px;\n }\n"]);return u=function(){return e},e}var s=Object(l.a)((function(e){var n=e.title,t=void 0===n?"":n,r=e.contentAlign,a=void 0===r?"left":r;return o.a.createElement("div",{className:e.className||""},t?o.a.createElement("div",{className:"nui-settings-head"},t):null,o.a.createElement("div",{className:"nui-settings-content nui-settings-content-align-".concat(a)},e.children))}))(u(),c.a.fontFamily,c.a.fontFamily),f=function(e){return o.a.createElement(s,e)};f.propTypes={title:i.a.string,className:i.a.string,contentAlign:i.a.string},f.defaultProps={title:"",className:void 0,contentAlign:"left"}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){var e=f(["\n background-color: ",";\n color: white;\n"]);return u=function(){return e},e}function s(){var e=f(["\n margin: 20px;\n padding: 14px;\n background-color: white;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n\n > * + * {\n /* Base margin between child elements */\n margin-top: 14px;\n }\n"]);return s=function(){return e},e}function f(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d=l.a.div(s()),p=Object(l.a)((function(e){return e.children?o.a.createElement("div",{className:e.className},e.children):null}))(u(),c.a.blue),h=function(e){return o.a.createElement(d,{className:"window"},o.a.createElement(p,null,e.title),e.children)},m=function(e){return o.a.createElement(h,e)};m.propTypes={title:i.a.string},m.defaultProps={title:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return v}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3),u=t(7),s=t(5),f=t(29),d=t.n(f),p=t(30),h=t.n(p);function m(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-family: ",";\n\n &.disabled {\n color: ",";\n\n label {\n cursor: default;\n }\n }\n\n input {\n display: none;\n }\n\n label {\n cursor: pointer;\n display: flex;\n }\n .nui-checkbox-check-container {\n flex-basis: 30px;\n }\n .nui-checkbox-inner-container {\n margin-top: 1.5px;\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\n padding-top: 4.5px;\n padding-bottom: 4px;\n }\n \n .description {\n display: block;\n font-size: 13px;\n line-height: 14px;\n color: #8a8a8a;\n\n * {\n font-size: 13px;\n line-height: inherit;\n margin: 0;\n }\n }\n }\n"]);return m=function(){return e},e}var b=Object(l.a)((function(e){var n=e.id,t=e.name,r=e.checked,a=void 0!==r&&r,i=e.onChange,l=e.label,f=e.description,p=e.isPro,m=e.disabled,b=e.requirePro,v=void 0!==b&&b&&!p,y=m||v,g=y?"disabled":"";return o.a.createElement("div",{className:["nui-checkbox",e.className,g].join(" ")},o.a.createElement("input",{id:n,name:t,type:"checkbox",defaultChecked:!1,onClick:function(){i?i(!a,n):console.log("The onChange handler it not set for this checkbox.",e)},disabled:y}),o.a.createElement("label",{htmlFor:n},o.a.createElement("div",{className:"nui-checkbox-check-container"},o.a.createElement(s.Icon,{icon:a?h.a:d.a,width:"30px",height:"30px",color:y?c.a.disabledForm:c.a.blue})),o.a.createElement("div",{className:"nui-checkbox-inner-container"},o.a.createElement("span",{className:"label"},l,o.a.createElement(u.a,{className:"inline",show:v})),f?o.a.createElement("small",{className:"description"},f):null)))}))(m(),c.a.fontFamily,c.a.disabledForm),v=function(e){return o.a.createElement(b,e)};v.propTypes={id:i.a.string,name:i.a.string,checked:i.a.bool,label:i.a.string,description:i.a.string,isPro:i.a.bool,requirePro:i.a.bool},v.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return s}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4);function c(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n"]);return c=function(){return e},e}var u=Object(l.a)((function(e){var n=e.name,t=(e.max,e.isPro),r=void 0!==t&&t;return o.a.Children.map(e.children,(function(e){return e.props.name?e:o.a.cloneElement(e,{name:n,isPro:r})}))}))(c()),s=function(e){return o.a.createElement(u,e)};s.propTypes={name:i.a.string,mas:i.a.number,isPro:i.a.bool},s.defaultProps={name:void 0,mas:-1,isPro:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return m}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){return(u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function d(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function p(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-input {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 30px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &.natural {\n border-color: gray;\n border-width: 1px;\n }\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return p=function(){return e},e}var h=Object(l.a)((function(e){var n=e.id,t=e.name,a=e.value,i=void 0===a?"":a,l=e.description,c=e.placeholder,f=void 0===c?"":c,p=e.onEnter,h=void 0===p?null:p,m=e.readOnly,b=void 0!==m&&m,v=e.type,y=void 0===v?"text":v,g=e.step,w=void 0===g?1:g,x=e.min,O=void 0===x?1:x,k=e.max,C=void 0===k?999:k,E=e.maxLength,j=void 0===E?3:E,S=e.className,_=e.style,P=e.natural,A=void 0!==P&&P,I=d(e,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural"]),T=s(Object(r.useState)(i),2),M=T[0],z=T[1],R=!!e.onChange;Object(r.useEffect)((function(){R||z(i)}),[i]);var N=function(t){R?e.onChange(t.target.value,n):z(t.target.value,n)},F=function(t){h&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},L=function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},D="neko-input ".concat(A?" natural":"");return o.a.createElement("div",{className:[S].join(" "),style:_},"number"===y?o.a.createElement("input",u({className:[D].join(" ")},I,{id:n,name:t,value:R?i:M,type:y,step:w,min:O,max:C,maxlength:j,placeholder:f,onChange:N,onKeyPress:F,onBlur:L,readOnly:b})):o.a.createElement("input",u({className:[D].join(" ")},I,{id:n,name:t,value:R?i:M,type:y,spellcheck:"false",placeholder:f,onChange:N,onKeyPress:F,onBlur:L,readOnly:b})),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(p(),c.a.fontFamily,c.a.fontSizeText,c.a.blue,c.a.gray,c.a.fontFamily,c.a.fontSizeSmall),m=function(e){return o.a.createElement(h,e)};m.propTypes={id:i.a.string,type:i.a.oneOf(["number","text"]),name:i.a.string,value:i.a.string,description:i.a.string,placeholder:i.a.string,onChange:i.a.func,onEnter:i.a.func,onBlur:i.a.func,readOnly:i.a.bool,step:i.a.number,min:i.a.number,max:i.a.number,maxLength:i.a.number,natural:i.a.bool},m.defaultProps={id:void 0,type:"text",name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1,step:1,min:1,max:999,maxLength:3,natural:!1}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){return(u=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function d(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function p(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n height: 160px;\n background: rgb(0 124 186 / 10%);\n padding: 0 10px;\n width: 100%;\n\n &::placeholder {\n color: rgba(0, 0, 0, 0.25);\n }\n\n :focus {\n background-color: white;\n }\n\n :read-only {\n background-color: ",";\n }\n }\n\n .neko-input-description {\n font-family: ",";\n font-size: ",";\n line-height: 14px;\n margin-top: 8px;\n margin-bottom: 0;\n }\n"]);return p=function(){return e},e}var h=Object(l.a)((function(e){var n=e.id,t=e.name,a=e.value,i=void 0===a?"":a,l=e.description,c=e.placeholder,f=void 0===c?"":c,p=e.onEnter,h=void 0===p?null:p,m=e.readOnly,b=void 0!==m&&m,v=(e.maxLength,e.className),y=e.style,g=d(e,["id","name","value","description","placeholder","onEnter","readOnly","maxLength","className","style"]),w=s(Object(r.useState)(i),2),x=w[0],O=w[1],k=!!e.onChange;Object(r.useEffect)((function(){k||O(i)}),[i]);return o.a.createElement("div",{className:[v].join(" "),style:y},o.a.createElement("textarea",u({className:"neko-textarea"},g,{id:n,name:t,spellCheck:"false",placeholder:f,onChange:function(t){k?e.onChange(t.target.value,n):O(t.target.value,n)},onKeyPress:function(t){h&&"Enter"===event.key&&(t.preventDefault(),e.onEnter(t.target.value,n))},onBlur:function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},readOnly:b}),k?i:x),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(p(),c.a.fontFamily,c.a.fontSizeText,c.a.blue,c.a.gray,c.a.fontFamily,c.a.fontSizeSmall),m=function(e){return o.a.createElement(h,e)};m.propTypes={id:i.a.string,name:i.a.string,value:i.a.string,description:i.a.string,placeholder:i.a.string,onChange:i.a.func,onEnter:i.a.func,onBlur:i.a.func,readOnly:i.a.bool},m.defaultProps={id:void 0,name:void 0,value:"",description:void 0,placeholder:"",onChange:void 0,onEnter:void 0,onBlur:void 0,readOnly:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return k}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(8),u=t(5),s=t(25),f=t.n(s),d=t(27),p=t.n(d),h=t(26),m=t.n(h),b=t(3);function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(){var e=w(["\n position: absolute;\n overflow: hidden;\n top: 0; left: 0;\n height: 100%;\n background-color: ",";\n border-radius: 12px;\n text-align: center;\n padding: 0 10px;\n vertical-align: middle;\n color: white;\n font-family: ",";\n font-size: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: min-width .2s ease-out;\n\n background-size: 30px 30px;\n background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%,\n transparent 25%,\n transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,\n transparent 75%, transparent);\n animation: ",";\n\n @keyframes animate-stripes {\n 0% { background-position: 0 0; }\n 100% { background-position: 60px 0; }\n }\n"]);return y=function(){return e},e}function g(){var e=w(["\n position: relative;\n box-sizing: border-box;\n height: 30px;\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 0.06) 0%,\n rgba(0, 0, 0, 0.02) 50%,\n rgba(0, 0, 0, 0.10) 100%\n );\n border-radius: 12px;\n\n .nui-progress-buttons {\n position: absolute;\n height: 100%;\n right: 0px;\n display: flex;\n align-items: center;\n padding-right: 5px;\n\n .nui-progress-button {\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: 2px;\n border-radius: 100%;\n color: white;\n padding: 2px;\n width: 18px;\n height: 18px;\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &.stop {\n background: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return g=function(){return e},e}function w(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var x=Object(l.a)((function(e){var n=e.value,t=void 0===n?0:n,r=e.max,a=void 0===r?100:r,i=e.busy,l=void 0!==i&&i,c=e.status;t=Math.min(t,a);var s=parseFloat(t)/parseFloat(a);return o.a.createElement("div",{className:e.className},o.a.createElement(O,{ratio:s,busy:e.busy,status:c}),o.a.createElement("div",{className:"nui-progress-buttons"},l&&e.onPauseClick&&o.a.createElement("div",{className:"nui-progress-button pause",onClick:e.onPauseClick},e.paused?o.a.createElement(u.InlineIcon,{icon:m.a}):o.a.createElement(u.InlineIcon,{icon:f.a})),l&&e.onStopClick&&o.a.createElement("div",{className:"nui-progress-button stop",onClick:e.onStopClick},o.a.createElement(u.InlineIcon,{icon:p.a}))))}))(g(),b.a.blue,Object(c.a)(.1,b.a.blue),b.a.red,Object(c.a)(.1,b.a.red)),O=Object(l.a)((function(e){var n,t,r,a=isNaN(e.ratio)?0:parseInt(Math.round(100*e.ratio)),i=v(e.status),l="undefined"!==i?"string"===i?e.status:e.status(a):"".concat(a,"%");return o.a.createElement("div",{className:e.className,style:(n={minWidth:28},t="minWidth",r=a+"%",t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r,n)},o.a.createElement("div",null,l))}))(y(),b.a.progress,b.a.fontFamily,(function(e){return e.busy?"animate-stripes 1.6s linear infinite":"none"})),k=function(e){return o.a.createElement(x,e)};k.propTypes={value:i.a.number,max:i.a.number,busy:i.a.bool,paused:i.a.bool,onPauseClick:i.a.func,onStopClick:i.a.func,status:i.a.oneOf([i.a.string,i.a.func])},k.defaultProps={value:0,max:100,busy:!1,paused:!1,onPauseClick:void 0,onStopClick:void 0,status:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return b}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(20),u=t(15),s=t(3),f=t(92),d=t.n(f);function p(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n position: relative;\n color: white;\n font-family: ",";\n font-size: ",";\n display: flex;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n border-bottom: 5px #2981b5 solid;\n display: flex;\n\n .nui-header-logo-container {\n width: 55px;\n height: 55px;\n padding: 10px;\n margin-right: 20px;\n background: #3D5D8D;\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .nui-header-title-container {\n flex-direction: column;\n display: flex;\n\n .nui-header-title {\n color: white;\n font-family: ",";\n font-size: 23px;\n line-height: normal;\n margin: 0;\n }\n\n .nui-header-subtitle {\n color: white;\n font-family: ",";\n line-height: normal;\n font-size: ",";\n }\n }\n\n .nui-header-extra-content {\n flex: 1;\n margin: 0 20px;\n }\n"]);return p=function(){return e},e}var h=l.a.div(p(),s.a.fontFamily,s.a.fontSizeText,s.a.header,s.a.fontFamily,s.a.fontFamily,s.a.fontSizeText),m=function(e){var n=e.title,t=void 0===n?"NekoUI":n,r=e.subtitle,a=void 0===r?"By Jordy Meow":r,i=e.children,l=e.saving,s=void 0!==l&&l;return o.a.createElement(h,null,o.a.createElement("div",{className:"nui-header-logo-container"},o.a.createElement(c.a,null)),o.a.createElement("div",{className:"nui-header-title-container"},o.a.createElement("h1",{className:"nui-header-title"},t),o.a.createElement("small",{className:"nui-header-subtitle"},o.a.createElement("a",{target:"_blank",href:"https://meowapps.com",style:{color:"white",textDecoration:"none"}},a))),o.a.createElement("div",{className:"nui-header-extra-content"},i),s&&o.a.createElement(u.a,{icon:d.a,width:"36",height:"36"}))},b=function(e){return o.a.createElement(m,e)};b.propTypes={title:i.a.string,subtitle:i.a.string,saving:i.a.bool},b.defaultProps={title:"NekoUI",subtitle:"By Jordy Meow",saving:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return k}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(5),u=t(22),s=t.n(u),f=t(24),d=t.n(f),p=t(23),h=t.n(p),m=t(12),b=t.n(m),v=t(3);function y(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return g(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return g(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function w(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n align-items: center;\n display: flex;\n\n .neko-paging-text {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 15px;\n line-height: 14px;\n }\n\n .neko-paging-controller {\n box-sizing: border-box;\n height: 30px;\n align-items: center;\n background-color: rgba(",", 0.8);\n border-radius: 15px;\n display: flex;\n margin-left: 15px;\n padding: 3px 5px;\n\n .nako-paging-controller-icon {\n background-color: ",";\n border-radius: 100%;\n cursor: pointer;\n margin-right: 2px;\n height: 22px;\n width: 22px;\n box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25);\n transition: transform 0.1s ease-in;\n box-sizing: border-box;\n\n :last-child {\n margin-right: 0;\n }\n\n &.disabled {\n color: ",";\n cursor: default;\n pointer-events: none;\n }\n\n &:hover {\n transform: scale(1.2) !important;\n z-index: 10;\n position: relative;\n }\n }\n\n .nako-paging-controller-text {\n color: ",";\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n margin: 0 40px;\n user-select: none;\n }\n\n span.neko-paging-current-page {\n cursor: pointer;\n text-decoration: underline;\n }\n input.neko-paging-current-page {\n width: 1.5rem;\n }\n }\n"]);return w=function(){return e},e}var x=l.a.div(w(),v.a.fontFamily,v.a.blueRGB,v.a.white,v.a.darkGray,v.a.white,v.a.fontFamily),O=function(e){var n=e.currentPage,t=e.limit,a=e.onClick,i=e.total,l=e.onCurrentPageChanged,u=Math.ceil(0===i?1:t>0?i/t:1),f="nako-paging-controller-icon ".concat(1===n?"disabled":""),p="nako-paging-controller-icon ".concat(n===u?"disabled":""),m=y(Object(r.useState)(!1),2),v=m[0],g=m[1],w=function(e){g(!1),a(e)},O=function(e){var n=Number(e);return n>u?u:n<1?1:n},k=function(e){var n=e.target.value;!isNaN(n)&&l&&l(O(n)),g(!1)},C=function(e){if("Enter"===event.key){e.preventDefault();var n=e.target.value;!isNaN(n)&&l&&l(O(n)),g(!1)}},E=Object(r.useMemo)((function(){return v?o.a.createElement("input",{type:"text",className:"neko-paging-current-page",defaultValue:n,onBlur:k,onKeyPress:C}):o.a.createElement("span",{className:"neko-paging-current-page",onClick:function(){return g(!0)}},n)}),[v]),j=function(e){v&&e.target===e.currentTarget&&g(!1)};return o.a.createElement(x,null,o.a.createElement("span",{className:"neko-paging-text"},i," result",i>0?"s":""),o.a.createElement("div",{className:"neko-paging-controller",onClick:j},o.a.createElement(c.Icon,{icon:s.a,className:f,onClick:function(){return w(1)}}),o.a.createElement(c.Icon,{icon:d.a,className:f,onClick:function(){return w(n-1)}}),o.a.createElement("p",{className:"nako-paging-controller-text",onClick:j},"Page ",E," of ",u),o.a.createElement(c.Icon,{icon:b.a,className:p,onClick:function(){return w(n+1)}}),o.a.createElement(c.Icon,{icon:h.a,className:p,onClick:function(){return w(u)}})))},k=function(e){return o.a.createElement(O,e)};k.propTypes={currentPage:i.a.number,limit:i.a.number,total:i.a.number,onClick:i.a.func},k.defaultProps={currentPage:void 0,limit:void 0,total:void 0,onClick:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return u}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a);function l(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n .mask {\n position: absolute;\n overflow: hidden;\n display: block;\n width: ","px;\n height: ","px;\n }\n\n .semi-circle {\n position: relative;\n display: block;\n width: ","px;\n height: ",'px;\n background: linear-gradient(to right, #27b775 0%, #f3f32c 50%, #f71b1b 100%);\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n\n &::before {\n content: "";\n position: absolute;\n bottom: 0;\n left: 50%;\n z-index: 2;\n display: block;\n width: 140px;\n height: 70px;\n margin-left: -70px;\n background: ',";\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .semi-circle--mask {\n position: absolute;\n top: 0;\n left: 0;\n width: ","px;\n height: ",'px;\n background: transparent;\n transform-origin: center center;\n backface-visibility: hidden;\n transition: all .3s ease-in-out;\n\n &::before {\n content: "";\n position: absolute;\n top: 0;\n left: 0%;\n z-index: 2;\n display: block;\n width: ',"px;\n height: ","px;\n margin-top: -1px;\n margin-left: -1px;\n background: #5396c1d6;\n border-radius: 50% 50% 50% 50% / 100% 100% 0% 0% ;\n } \n }\n\n .gauge { \n width: ","px;\n height: ","px;\n \n .semi-circle--mask {\n transform: rotate(","deg) translate3d(0,0,0);\n }\n }\n\n .child-container {\n position: absolute;\n font-size: 16px;\n display: flex;\n width: ","px;\n height: ","px;\n z-index: 10;\n\n .spacing {\n flex: auto;\n }\n\n .child {\n color: white;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n }\n"]);return l=function(){return e},e}var c=t(4).a.section(l(),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.backgroundColor}),(function(e){return e.width}),(function(e){return e.width}),(function(e){return e.width+2}),(function(e){return e.width/2+2}),(function(e){return e.width}),(function(e){return e.width/2}),(function(e){return e.degrees}),(function(e){return e.width+2}),(function(e){return e.width/2})),u=function(e){var n=e.value,t=void 0===n?1e3:n,r=(e.min,e.max),a=void 0===r?2500:r,i=e.width,l=void 0===i?200:i,u=e.background,s=void 0===u?"#007cba":u,f=e.children,d=180*(t<=a?t:a)/a;return o.a.createElement(c,{backgroundColor:s,degrees:d,width:l},o.a.createElement("div",{class:"gauge"},o.a.createElement("div",{class:"mask"},o.a.createElement("div",{class:"semi-circle"}),o.a.createElement("div",{class:"semi-circle--mask"})),o.a.createElement("div",{class:"child-container"},o.a.createElement("div",{class:"child"},o.a.createElement("div",{class:"spacing"}),f))))};u.propTypes={value:i.a.number,min:i.a.number,max:i.a.number,width:i.a.number,background:i.a.string},u.defaultProps={value:1e3,min:0,max:2500,width:200,background:"#007cba"}},function(e,n,t){"use strict";t.d(n,"a",(function(){return g}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(1);function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){f(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function f(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function d(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,n,t,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void t(e)}l.done?n(c):Promise.resolve(c).then(r,o)}function h(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return t}(e,n)||m(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,n){if(e){if("string"==typeof e)return b(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,n):void 0}}function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function v(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n background: #f1f1f1;\n border: 2px dashed rgb(0 0 0 / 30%);\n color: rgb(0 0 0 / 60%);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.25s ease;\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n }\n\n &:hover {\n cursor: pointer;\n }\n\n &.dropping {\n background: #a4d5ff;\n\n div {\n transform: scale(2);\n }\n }\n"]);return v=function(){return e},e}var y=l.a.div(v()),g=function(e){var n=e.width,t=void 0===n?"100%":n,a=e.height,i=void 0===a?"100%":a,l=e.iconSize,u=void 0===l?48:l,f=e.onSuccess,m=void 0===f?function(){}:f,b=e.onFailure,v=void 0===b?function(){}:b,g=e.style,w=void 0===g?{}:g,x=e.apiUrl,O=e.apiConfig,k=h(Object(r.useState)(!1),2),C=k[0],E=k[1],j=h(Object(r.useState)(Math.floor(1e8*Math.random())),2),S=j[0],_=(j[1],Object(r.useRef)(null)),P=h(Object(r.useState)(!1),2),A=P[0],I=P[1],T=function(){var e,n=(e=regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),O.file=n[0],e.next=4,Object(c.J)(x,O);case 4:(t=e.sent).success?m(t):v(t),I(!1);case 7:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,o){var a=e.apply(n,t);function i(e){p(a,r,o,i,l,"next",e)}function l(e){p(a,r,o,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),M=function(e){e.preventDefault(),e.stopPropagation()},z=function(e){e.preventDefault(),e.stopPropagation(),E(!0)},R=function(e,n){n.preventDefault(),n.stopPropagation(),E(!1),console.log(e),T(e)};return o.a.createElement(c.b,{busy:A},o.a.createElement("input",{type:"file",id:S,accept:"image/*",ref:_,onChange:function(e){var n=[e.target.files[0]];R(n,e)},style:{display:"none"}}),o.a.createElement(y,{onClick:function(){_.current.click()},style:s(s({},w),{},{width:t,height:i}),className:C?"dropping":"",onDragOver:M,onDragEnter:z,onDragLeave:function(e){e.preventDefault(),e.stopPropagation(),E(!1)},onDrop:function(e){var n=d(e.dataTransfer.files);R(n,e)}},o.a.createElement(c.j,{width:u,height:u,icon:"upload",spinning:A,onDragOver:M,onDragEnter:z})))};g.propTypes={width:i.a.string,height:i.a.string,onSuccess:i.a.func,onFailure:i.a.func,style:i.a.object,apiUrl:i.a.string,apiConfig:i.a.object},g.defaultProps={width:"100%",height:"100%",onSuccess:function(){},onFailure:function(){},style:{}}},function(e,n,t){"use strict";t.d(n,"a",(function(){return w}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(93),c=t.n(l),u=t(4),s=t(3),f=t(11);function d(){return(d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function p(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function h(){var e=b(["\n width: 518px;\n\n p {\n margin: 0;\n }\n .title {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n }\n .content {\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n margin-top: 15px;\n margin-bottom: 30px;\n }\n .button-group {\n align-items: center;\n display: flex;\n justify-content: flex-end;\n margin-top: 15px;\n }\n"]);return h=function(){return e},e}function m(){var e=b(["\n\n .ReactModal__Overlay {\n z-index: 100;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n background: "," !important;\n }\n .ReactModal__Overlay {\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open {\n opacity: 1;\n }\n .ReactModal__Overlay--before-close {\n opacity: 0;\n }\n .ReactModal__Overlay .neko-modal {\n opacity: 0;\n transform: scale(0.85);\n transition: all 200ms ease-in-out;\n }\n .ReactModal__Overlay--after-open .neko-modal {\n transform: scale(1);\n opacity: 1;\n }\n .ReactModal__Overlay--before-close .neko-modal {\n transform: scale(0.85);\n opacity: 0;\n }\n .neko-modal {\n background: ",";\n position: relative;\n box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.8);\n outline: none;\n padding: 15px;\n max-width: 820px;\n }\n"]);return m=function(){return e},e}function b(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var v=u.a.div(m(),s.a.overlay,s.a.white),y=u.a.div(h(),s.a.fontFamily,s.a.fontFamily),g=function(e){var n=e.children,t=e.className,r=e.style,a=e.ok,i=void 0===a?"OK":a,l=e.cancel,u=void 0===l?"Cancel":l,s=e.customButtons,h=void 0===s?null:s,m=e.title,b=void 0===m?"":m,g=e.content,w=void 0===g?"":g,x=e.onOkClick,O=e.onCancelClick,k=p(e,["children","className","style","ok","cancel","customButtons","title","content","onOkClick","onCancelClick"]),C=r?"custom-modal":"",E=n||o.a.createElement(y,null,b&&o.a.createElement("p",{className:"title"},b),w&&o.a.createElement("p",{className:"content"},w),o.a.createElement("div",{className:"button-group"},O&&o.a.createElement(f.a,{className:"danger",onClick:O},u),x&&o.a.createElement(f.a,{onClick:x},i),h));return o.a.createElement(o.a.Fragment,null,o.a.createElement(v,{id:"neko-modal-parent"}),o.a.createElement(c.a,d({ariaHideApp:!1,parentSelector:function(){return document.getElementById("neko-modal-parent")},closeTimeoutMS:200,className:"neko-modal ".concat(t||""," ").concat(C)},k),E))},w=function(e){return o.a.createElement(g,e)};w.propTypes={className:i.a.string,style:i.a.object,ok:i.a.string,cancel:i.a.string,title:i.a.string,content:i.a.string,onOkClick:i.a.func,onCancelClick:i.a.func,customButtons:i.a.object},w.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(i)};
|
2 |
+
/*!
|
3 |
+
* Adapted from jQuery UI core
|
4 |
+
*
|
5 |
+
* http://jqueryui.com
|
6 |
+
*
|
7 |
+
* Copyright 2014 jQuery Foundation and other contributors
|
8 |
+
* Released under the MIT license.
|
9 |
+
* http://jquery.org/license
|
10 |
+
*
|
11 |
+
* http://api.jqueryui.com/category/ui-core/
|
12 |
+
*/
|
13 |
+
var r=/input|select|textarea|button|object/;function o(e){var n=e.offsetWidth<=0&&e.offsetHeight<=0;if(n&&!e.innerHTML)return!0;var t=window.getComputedStyle(e);return n?"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==t.getPropertyValue("display")}function a(e,n){var t=e.nodeName.toLowerCase();return(r.test(t)&&!e.disabled||"a"===t&&e.href||n)&&function(e){for(var n=e;n&&n!==document.body;){if(o(n))return!1;n=n.parentNode}return!0}(e)}function i(e){var n=e.getAttribute("tabindex");null===n&&(n=void 0);var t=isNaN(n);return(t||n>=0)&&a(e,!t)}e.exports=n.default},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertNodeList=c,n.setElement=function(e){var n=e;if("string"==typeof n&&i.canUseDOM){var t=document.querySelectorAll(n);c(t,n),n="length"in t?t[0]:t}return l=n||l},n.validateElement=u,n.hide=function(e){u(e)&&(e||l).setAttribute("aria-hidden","true")},n.show=function(e){u(e)&&(e||l).removeAttribute("aria-hidden")},n.documentNotReadyOrSSRTesting=function(){l=null},n.resetForTesting=function(){l=null};var r,o=t(111),a=(r=o)&&r.__esModule?r:{default:r},i=t(38);var l=null;function c(e,n){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+n+".")}function u(e){return!(!e&&!l)||((0,a.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,n){(function(n){e.exports=n}).call(this,{})},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=new function e(){var n=this;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===n.openInstances.indexOf(e)&&(n.openInstances.push(e),n.emit("register"))},this.deregister=function(e){var t=n.openInstances.indexOf(e);-1!==t&&(n.openInstances.splice(t,1),n.emit("deregister"))},this.subscribe=function(e){n.subscribers.push(e)},this.emit=function(e){n.subscribers.forEach((function(t){return t(e,n.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]};n.default=r,e.exports=n.default},function(e,n,t){"use strict";t.d(n,"a",(function(){return j}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(5),u=t(9),s=t.n(u),f=t(16),d=t.n(f),p=t(29),h=t.n(p),m=t(30),b=t.n(m),v=t(94),y=t.n(v),g=t(3),w=t(14);function x(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function O(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n background-color: ",";\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n\n th, td {\n margin: 0;\n padding: 5px;\n border-bottom: 1px solid rgba(",", 0.1);\n border-right: 1px solid rgba(",", 0.1);\n\n a {\n text-decoration: none;\n }\n\n :last-child {\n border-right: 0;\n }\n }\n\n th, tfoot td {\n height: 30px;\n background-color: ",";\n color: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 16px;\n text-align: left;\n\n div {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n &.sortable {\n cursor: pointer;\n }\n }\n }\n\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: rgba(",", 0.8);\n color: ",";\n\n a {\n color: #81e8ff;\n }\n }\n }\n img {\n vertical-align: bottom;\n }\n }\n\n tfoot tr:last-child {\n td {\n border-bottom: 0;\n }\n }\n\n .table-checkbox-cell {\n width: 35px;\n text-align: center;\n\n svg {\n padding: 5px;\n cursor: pointer;\n }\n }\n"]);return O=function(){return e},e}var k=l.a.table(O(),g.a.white,g.a.fontFamily,g.a.blackRGB,g.a.blackRGB,g.a.blue,g.a.white,g.a.tableGray,g.a.blueRGB,g.a.white),C=function(e){var n=e.checked,t=e.intermediate,r=void 0!==t&&t,a=e.onSelect,i=void 0===a?function(){}:a,l=e.onUnselect,u=void 0===l?function(){}:l;x(e,["checked","intermediate","onSelect","onUnselect"]);return o.a.createElement(c.Icon,{icon:r?y.a:n?b.a:h.a,width:"24px",height:"24px",onClick:function(){n?u():i()}})},E=function(e){var n=e.columns,t=e.data,r=e.busy,a=void 0!==r&&r,i=e.onSelect,l=e.onUnselect,u=e.selectedItems,f=e.sort,p=e.onSortChange,h=n.length+(i?1:0),m=t.map((function(e){var t=n.map((function(n){return{value:e[n.accessor],style:n.style||{}}}));return{id:e.id,cells:t}})),b=m.map((function(e){return e.id})),v=b.filter((function(e){return u.includes(e)})).length===b.length,y=!v&&u.length>0,x=n.reduce((function(e,n,t){return!1===n.visible&&e.push(t),e}),[]),O=o.a.createElement("tr",null,i&&o.a.createElement("th",{className:"table-checkbox-cell"},o.a.createElement(C,{checked:v,intermediate:y,onSelect:function(){return i(b)},onUnselect:function(){l(y?u:b)}})),n.filter((function(e,n){return!x.includes(n)})).map((function(e){var n=f&&f.accessor===e.accessor,t=f&&"asc"===f.by,r=e.style||{};return o.a.createElement("th",{style:r,key:e.accessor},o.a.createElement("div",{className:e.sortable?"sortable":"",onClick:e.sortable?function(){p(e.accessor,n&&t?"desc":"asc")}:void 0},o.a.createElement("div",null,e.title),o.a.createElement("div",null,e.sortable&&o.a.createElement(c.Icon,{icon:n?t?s.a:d.a:s.a,color:n?g.a.white:"rgba(".concat(g.a.blackRGB,", 0.1)"),width:"1.6rem",height:"1.6rem"}))))})));return o.a.createElement(w.a,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},o.a.createElement(k,null,o.a.createElement("thead",null,O),o.a.createElement("tbody",null,!m.length&&o.a.createElement("tr",null,o.a.createElement("td",{colspan:h,style:{textAlign:"center",height:40,color:"gray"}},"Empty.")),m.map((function(e){return o.a.createElement("tr",{className:u.includes(e.id)?"selected":""},i&&o.a.createElement("td",{className:"table-checkbox-cell"},o.a.createElement(C,{checked:u.includes(e.id),onSelect:function(){return i([e.id])},onUnselect:function(){return l([e.id])}})),e.cells.filter((function(e,n){return!x.includes(n)})).map((function(e){return o.a.createElement("td",{style:e.style},e.value)})))}))),o.a.createElement("tfoot",null,O)))},j=function(e){return o.a.createElement(E,e)};j.propTypes={columns:i.a.arrayOf(i.a.any),data:i.a.arrayOf(i.a.any),busy:i.a.arrayOf(i.a.bool),onSelect:i.a.func,onUnselect:i.a.func,selectedItems:i.a.arrayOf(i.a.object),onSortChange:i.a.func},j.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return d}));var r=t(0),o=t.n(r),a=t(2),i=t.n(a),l=t(4),c=t(3);function u(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n box-sizing: border-box;\n display: flex;\n width: 100%;\n padding: 10px 10px;\n background: ",";\n border-radius: 10px;\n box-shadow: 0px 0px 10px rgba(",", 0.1);\n\n &.neko-align-left {\n justify-content: flex-start;\n }\n\n &.neko-align-right {\n justify-content: flex-end;\n }\n\n > *:not(:last-child) {\n margin-right: 5px;\n }\n"]);return u=function(){return e},e}var s=l.a.div(u(),c.a.white,c.a.blackRGB),f=function(e){var n=e.align,t=void 0===n?"left":n;return o.a.createElement(s,{className:"neko-align-".concat(t)},e.children)},d=function(e){return o.a.createElement(f,e)};d.propTypes={align:i.a.oneOf(["left","right"])},d.defaultProps={align:"left"}},function(e,n,t){"use strict";var r=Array.isArray,o=Object.keys,a=Object.prototype.hasOwnProperty;e.exports=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==typeof n&&"object"==typeof t){var i,l,c,u=r(n),s=r(t);if(u&&s){if((l=n.length)!=t.length)return!1;for(i=l;0!=i--;)if(!e(n[i],t[i]))return!1;return!0}if(u!=s)return!1;var f=n instanceof Date,d=t instanceof Date;if(f!=d)return!1;if(f&&d)return n.getTime()==t.getTime();var p=n instanceof RegExp,h=t instanceof RegExp;if(p!=h)return!1;if(p&&h)return n.toString()==t.toString();var m=o(n);if((l=m.length)!==o(t).length)return!1;for(i=l;0!=i--;)if(!a.call(t,m[i]))return!1;for(i=l;0!=i--;)if(!e(n[c=m[i]],t[c]))return!1;return!0}return n!=n&&t!=t}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M18 8a2 2 0 0 1 2 2v10c0 1.1-.9 2-2 2H6a2 2 0 0 1-2-2V10c0-1.11.89-2 2-2h1V6C7 3.24 9.24.998 12 .998S17 3.24 17 6v2h1m-6-5c-1.66 0-3 1.34-3 3v2h6V6c0-1.66-1.34-3-3-3m-1 16l6.25-6.24l-1.41-1.41L11 16.18L8.41 13.6L7 15l4 4z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M18 1c-2.76 0-5 2.24-5 5v2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12c1.11 0 2-.89 2-2V10a2 2 0 0 0-2-2h-1V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2h2V6c0-2.76-2.24-5-5-5m-8 12a2 2 0 0 1 2 2c0 1.11-.89 2-2 2a2 2 0 1 1 0-4z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m6.16 12.31c-1.56 0-2.97.58-4.05 1.52L6 13.72V19h5.28l-2.13-2.12c.82-.68 1.85-1.1 3.01-1.1c2.07 0 3.84 1.35 4.45 3.22l1.39-.46c-.81-2.45-3.12-4.23-5.84-4.23z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 5V1L7 6l5 5V7a6 6 0 0 1 6 6a6 6 0 0 1-6 6a6 6 0 0 1-6-6H4a8 8 0 0 0 8 8a8 8 0 0 0 8-8a8 8 0 0 0-8-8z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6v12z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 3C7.58 3 4 4.79 4 7s3.58 4 8 4s8-1.79 8-4s-3.58-4-8-4M4 9v3c0 2.21 3.58 4 8 4s8-1.79 8-4V9c0 2.21-3.58 4-8 4s-8-1.79-8-4m0 5v3c0 2.21 3.58 4 8 4s8-1.79 8-4v-3c0 2.21-3.58 4-8 4s-8-1.79-8-4z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M21.71 20.29l-1.42 1.42a1 1 0 0 1-1.41 0L7 9.85A3.81 3.81 0 0 1 6 10a4 4 0 0 1-3.78-5.3l2.54 2.54l.53-.53l1.42-1.42l.53-.53L4.7 2.22A4 4 0 0 1 10 6a3.81 3.81 0 0 1-.15 1l11.86 11.88a1 1 0 0 1 0 1.41M2.29 18.88a1 1 0 0 0 0 1.41l1.42 1.42a1 1 0 0 0 1.41 0l5.47-5.46l-2.83-2.83M20 2l-4 2v2l-2.17 2.17l2 2L18 8h2l2-4z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5a3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97c0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1c0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 8l-1.33.09C9.81 7.07 7.4 4.5 5 4.5c0 0-1.97 2.96-.04 6.91c-.55.83-.89 1.26-.96 2.25l-1.93.29l.21.98l1.76-.26l.14.71l-1.57.94l.47.89l1.45-.89C5.68 18.76 8.59 20 12 20s6.32-1.24 7.47-3.68l1.45.89l.47-.89l-1.57-.94l.14-.71l1.76.26l.21-.98l-1.93-.29c-.07-.99-.41-1.42-.96-2.25C20.97 7.46 19 4.5 19 4.5c-2.4 0-4.81 2.57-5.67 3.59L12 8m-3 3a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m6 0a1 1 0 0 1 1 1a1 1 0 0 1-1 1a1 1 0 0 1-1-1a1 1 0 0 1 1-1m-4 3h2l-.7 1.39c.2.64.76 1.11 1.45 1.11a1.5 1.5 0 0 0 1.5-1.5h.5a2 2 0 0 1-2 2c-.75 0-1.4-.41-1.75-1c-.35.59-1 1-1.75 1a2 2 0 0 1-2-2h.5a1.5 1.5 0 0 0 1.5 1.5c.69 0 1.25-.47 1.45-1.11L11 14z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M9 16v-6H5l7-7l7 7h-4v6H9m-4 4v-2h14v2H5z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3H9m0 5h2v9H9V8m4 0h2v9h-2V8z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M16.84 2.73c-.39 0-.77.15-1.07.44l-2.12 2.12l5.3 5.31l2.12-2.1c.6-.61.6-1.56 0-2.14L17.9 3.17c-.3-.29-.68-.44-1.06-.44M12.94 6l-8.1 8.11l2.56.28l.18 2.29l2.28.17l.29 2.56l8.1-8.11m-14 3.74L2.5 21.73l6.7-1.79l-.24-2.16l-2.31-.17l-.18-2.32" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M13 3v6h8V3m-8 18h8V11h-8M3 21h8v-6H3m0-2h8V3H3v10z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M18.68 12.32a4.49 4.49 0 0 0-6.36.01a4.49 4.49 0 0 0 0 6.36a4.508 4.508 0 0 0 5.57.63L21 22.39L22.39 21l-3.09-3.11c1.13-1.77.87-4.09-.62-5.57m-1.41 4.95c-.98.98-2.56.97-3.54 0c-.97-.98-.97-2.56.01-3.54c.97-.97 2.55-.97 3.53 0c.97.98.97 2.56 0 3.54M10.9 20.1a6.527 6.527 0 0 1-1.48-2.32C6.27 17.25 4 15.76 4 14v3c0 2.21 3.58 4 8 4c-.4-.26-.77-.56-1.1-.9M4 9v3c0 1.68 2.07 3.12 5 3.7v-.2c0-.93.2-1.85.58-2.69C6.34 12.3 4 10.79 4 9m8-6C7.58 3 4 4.79 4 7c0 2 3 3.68 6.85 4h.05c1.2-1.26 2.86-2 4.6-2c.91 0 1.81.19 2.64.56A3.215 3.215 0 0 0 20 7c0-2.21-3.58-4-8-4z" fill="currentColor"/>',width:24,height:24}},function(e,n){e.exports=function(e,n,t,r){var o=t?t.call(r,e,n):void 0;if(void 0!==o)return!!o;if(e===n)return!0;if("object"!=typeof e||!e||"object"!=typeof n||!n)return!1;var a=Object.keys(e),i=Object.keys(n);if(a.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<a.length;c++){var u=a[c];if(!l(u))return!1;var s=e[u],f=n[u];if(!1===(o=t?t.call(r,s,f,u):void 0)||void 0===o&&s!==f)return!1}return!0}},function(e,n,t){"use strict";n.a=function(e){function n(e,n,r){var o=n.trim().split(h);n=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var l=0;for(e=0===i?"":e[0]+" ";l<a;++l)n[l]=t(e,n[l],r).trim();break;default:var c=l=0;for(n=[];l<a;++l)for(var u=0;u<i;++u)n[c++]=t(e[u]+" ",o[l],r).trim()}return n}function t(e,n,t){var r=n.charCodeAt(0);switch(33>r&&(r=(n=n.trim()).charCodeAt(0)),r){case 38:return n.replace(m,"$1"+e.trim());case 58:return e.trim()+n.replace(m,"$1"+e.trim());default:if(0<1*t&&0<n.indexOf("\f"))return n.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+n}function r(e,n,t,a){var i=e+";",l=2*n+3*t+4*a;if(944===l){e=i.indexOf(":",9)+1;var c=i.substring(e,i.length-1).trim();return c=i.substring(0,e).trim()+c+";",1===P||2===P&&o(c,1)?"-webkit-"+c+c:c}if(0===P||2===P&&!o(i,1))return i;switch(l){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(E,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(c=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+c+i;case 1005:return d.test(i)?i.replace(f,":-webkit-")+i.replace(f,":-moz-")+i:i;case 1e3:switch(n=(c=i.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(n)){case 226:c=i.replace(g,"tb");break;case 232:c=i.replace(g,"tb-rl");break;case 220:c=i.replace(g,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+c+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(n=(i=e).length-10,l=(c=(33===i.charCodeAt(n)?i.substring(0,n):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:i=i.replace(c,"-webkit-"+c)+";"+i;break;case 207:case 102:i=i.replace(c,"-webkit-"+(102<l?"inline-":"")+"box")+";"+i.replace(c,"-webkit-"+c)+";"+i.replace(c,"-ms-"+c+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return c=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+c+"-ms-flex-"+c+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(O,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(O,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),n,t,a).replace(":fill-available",":stretch"):i.replace(c,"-webkit-"+c)+i.replace(c,"-moz-"+c.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===t+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+i}return i}function o(e,n){var t=e.indexOf(1===n?":":"{"),r=e.substring(0,3!==n?t:10);return t=e.substring(t+1,e.length-1),M(2!==n?r:r.replace(k,"$1"),t,n)}function a(e,n){var t=r(n,n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2));return t!==n+";"?t.replace(x," or ($1)").substring(4):"("+n+")"}function i(e,n,t,r,o,a,i,l,u,s){for(var f,d=0,p=n;d<T;++d)switch(f=I[d].call(c,e,p,t,r,o,a,i,l,u,s)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==n)return p}function l(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!=typeof e?P=1:(P=2,M=e):P=0),l}function c(e,t){var l=e;if(33>l.charCodeAt(0)&&(l=l.trim()),l=[l],0<T){var c=i(-1,t,l,l,S,j,0,0,0,0);void 0!==c&&"string"==typeof c&&(t=c)}var f=function e(t,l,c,f,d){for(var p,h,m,g,x,O=0,k=0,C=0,E=0,I=0,M=0,R=m=p=0,N=0,F=0,L=0,D=0,q=c.length,U=q-1,H="",B="",$="",W="";N<q;){if(h=c.charCodeAt(N),N===U&&0!==k+E+C+O&&(0!==k&&(h=47===k?10:47),E=C=O=0,q++,U++),0===k+E+C+O){if(N===U&&(0<F&&(H=H.replace(s,"")),0<H.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(N)}h=59}switch(h){case 123:for(p=(H=H.trim()).charCodeAt(0),m=1,D=++N;N<q;){switch(h=c.charCodeAt(N)){case 123:m++;break;case 125:m--;break;case 47:switch(h=c.charCodeAt(N+1)){case 42:case 47:e:{for(R=N+1;R<U;++R)switch(c.charCodeAt(R)){case 47:if(42===h&&42===c.charCodeAt(R-1)&&N+2!==R){N=R+1;break e}break;case 10:if(47===h){N=R+1;break e}}N=R}}break;case 91:h++;case 40:h++;case 34:case 39:for(;N++<U&&c.charCodeAt(N)!==h;);}if(0===m)break;N++}switch(m=c.substring(D,N),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(s,"")),h=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=l;break;default:F=A}if(D=(m=e(l,F,m,h,d+1)).length,0<T&&(x=i(3,m,F=n(A,H,L),l,S,j,D,h,d,f),H=F.join(""),void 0!==x&&0===(D=(m=x.trim()).length)&&(h=0,m="")),0<D)switch(h){case 115:H=H.replace(w,a);case 100:case 109:case 45:m=H+"{"+m+"}";break;case 107:m=(H=H.replace(b,"$1 $2"))+"{"+m+"}",m=1===P||2===P&&o("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=H+m,112===f&&(B+=m,m="")}else m="";break;default:m=e(l,n(l,H,L),m,f,d+1)}$+=m,m=L=F=R=p=0,H="",h=c.charCodeAt(++N);break;case 125:case 59:if(1<(D=(H=(0<F?H.replace(s,""):H).trim()).length))switch(0===R&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(D=(H=H.replace(" ",":")).length),0<T&&void 0!==(x=i(1,H,l,t,S,j,B.length,f,d,f))&&0===(D=(H=x.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),h=H.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){W+=H+c.charAt(N);break}default:58!==H.charCodeAt(D-1)&&(B+=r(H,p,h,H.charCodeAt(2)))}L=F=R=p=0,H="",h=c.charCodeAt(++N)}}switch(h){case 13:case 10:47===k?k=0:0===1+p&&107!==f&&0<H.length&&(F=1,H+="\0"),0<T*z&&i(0,H,l,t,S,j,B.length,f,d,f),j=1,S++;break;case 59:case 125:if(0===k+E+C+O){j++;break}default:switch(j++,g=c.charAt(N),h){case 9:case 32:if(0===E+O+k)switch(I){case 44:case 58:case 9:case 32:g="";break;default:32!==h&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===E+k+O&&(F=L=1,g="\f"+g);break;case 108:if(0===E+k+O+_&&0<R)switch(N-R){case 2:112===I&&58===c.charCodeAt(N-3)&&(_=I);case 8:111===M&&(_=M)}break;case 58:0===E+k+O&&(R=N);break;case 44:0===k+C+E+O&&(F=1,g+="\r");break;case 34:case 39:0===k&&(E=E===h?0:0===E?h:E);break;case 91:0===E+k+C&&O++;break;case 93:0===E+k+C&&O--;break;case 41:0===E+k+O&&C--;break;case 40:if(0===E+k+O){if(0===p)switch(2*I+3*M){case 533:break;default:p=1}C++}break;case 64:0===k+C+E+O+R+m&&(m=1);break;case 42:case 47:if(!(0<E+O+C))switch(k){case 0:switch(2*h+3*c.charCodeAt(N+1)){case 235:k=47;break;case 220:D=N,k=42}break;case 42:47===h&&42===I&&D+2!==N&&(33===c.charCodeAt(D+2)&&(B+=c.substring(D,N+1)),g="",k=0)}}0===k&&(H+=g)}M=I,I=h,N++}if(0<(D=B.length)){if(F=l,0<T&&(void 0!==(x=i(2,B,F,t,S,j,D,f,d,f))&&0===(B=x).length))return W+B+$;if(B=F.join(",")+"{"+B+"}",0!=P*_){switch(2!==P||o(B,2)||(_=0),_){case 111:B=B.replace(y,":-moz-$1")+B;break;case 112:B=B.replace(v,"::-webkit-input-$1")+B.replace(v,"::-moz-$1")+B.replace(v,":-ms-input-$1")+B}_=0}}return W+B+$}(A,l,t,0,0);return 0<T&&(void 0!==(c=i(-2,f,l,l,S,j,f.length,0,0,0))&&(f=c)),"",_=0,j=S=1,f}var u=/^\0+/g,s=/[\0\r\f]/g,f=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,h=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,O=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,j=1,S=1,_=0,P=1,A=[],I=[],T=0,M=null,z=0;return c.use=function e(n){switch(n){case void 0:case null:T=I.length=0;break;default:if("function"==typeof n)I[T++]=n;else if("object"==typeof n)for(var t=0,r=n.length;t<r;++t)e(n[t]);else z=0|!!n}return e},c.set=l,void 0!==e&&l(e),c}},function(e,n,t){"use strict";n.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 20a8 8 0 0 1-8-8a8 8 0 0 1 8-8a8 8 0 0 1 8 8a8 8 0 0 1-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 7a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M19 20H4a2 2 0 0 1-2-2V6c0-1.11.89-2 2-2h6l2 2h7a2 2 0 0 1 2 2H4v10l2.14-8h17.07l-2.28 8.5c-.23.87-1.01 1.5-1.93 1.5z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M21 17H7V3h14m0-2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2M3 5H1v16a2 2 0 0 0 2 2h16v-2H3m12.96-10.71l-2.75 3.54l-1.96-2.36L8.5 15h11l-3.54-4.71z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M5.5 7A1.5 1.5 0 0 1 4 5.5A1.5 1.5 0 0 1 5.5 4A1.5 1.5 0 0 1 7 5.5A1.5 1.5 0 0 1 5.5 7m15.91 4.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.11 0-2 .89-2 2v7c0 .55.22 1.05.59 1.41l8.99 9c.37.36.87.59 1.42.59c.55 0 1.05-.23 1.41-.59l7-7c.37-.36.59-.86.59-1.41c0-.56-.23-1.06-.59-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M15 9H5V5h10m-3 14a3 3 0 0 1-3-3a3 3 0 0 1 3-3a3 3 0 0 1 3 3a3 3 0 0 1-3 3m5-16H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=t(106),a=(r=o)&&r.__esModule?r:{default:r};n.default=a.default,e.exports=n.default},function(e,n){n.__esModule=!0,n.default={body:'<path d="M22 16a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2h12a2 2 0 0 1 2 2v12m-6 4v2H4a2 2 0 0 1-2-2V7h2v13h12m-3-6l7-7l-1.41-1.41L13 11.17L9.91 8.09L8.5 9.5L13 14z" fill="currentColor"/>',width:24,height:24}},function(e,n,t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=Array.isArray,a=Object.keys,i=Object.prototype.hasOwnProperty;e.exports=function e(n,t){if(n===t)return!0;if(n&&t&&"object"==r(n)&&"object"==r(t)){var l,c,u,s=o(n),f=o(t);if(s&&f){if((c=n.length)!=t.length)return!1;for(l=c;0!=l--;)if(!e(n[l],t[l]))return!1;return!0}if(s!=f)return!1;var d=n instanceof Date,p=t instanceof Date;if(d!=p)return!1;if(d&&p)return n.getTime()==t.getTime();var h=n instanceof RegExp,m=t instanceof RegExp;if(h!=m)return!1;if(h&&m)return n.toString()==t.toString();var b=a(n);if((c=b.length)!==a(t).length)return!1;for(l=c;0!=l--;)if(!i.call(t,b[l]))return!1;for(l=c;0!=l--;)if(!e(n[u=b[l]],t[u]))return!1;return!0}return n!=n&&t!=t}},function(e,n,t){"use strict";var r=t(97);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:o};return t.PropTypes=t,t}},function(e,n,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,n){n.__esModule=!0,n.default={body:'<path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z" fill="currentColor"/>',width:24,height:24}},function(e,n){var t,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var c,u=[],s=!1,f=-1;function d(){s&&c&&(s=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!s){var e=l(d);s=!0;for(var n=u.length;n;){for(c=u,u=[];++f<n;)c&&c[f].run();f=-1,n=u.length}c=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function m(){}o.nextTick=function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];u.push(new h(e,n)),1!==u.length||s||l(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,n,t){"use strict";
|
14 |
+
/** @license React v16.13.1
|
15 |
+
* react-is.production.min.js
|
16 |
+
*
|
17 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
18 |
+
*
|
19 |
+
* This source code is licensed under the MIT license found in the
|
20 |
+
* LICENSE file in the root directory of this source tree.
|
21 |
+
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,b=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case o:switch(e=e.type){case f:case d:case i:case c:case l:case h:return e;default:switch(e=e&&e.$$typeof){case s:case p:case v:case b:case u:return e;default:return n}}case a:return n}}}function k(e){return O(e)===d}n.AsyncMode=f,n.ConcurrentMode=d,n.ContextConsumer=s,n.ContextProvider=u,n.Element=o,n.ForwardRef=p,n.Fragment=i,n.Lazy=v,n.Memo=b,n.Portal=a,n.Profiler=c,n.StrictMode=l,n.Suspense=h,n.isAsyncMode=function(e){return k(e)||O(e)===f},n.isConcurrentMode=k,n.isContextConsumer=function(e){return O(e)===s},n.isContextProvider=function(e){return O(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},n.isForwardRef=function(e){return O(e)===p},n.isFragment=function(e){return O(e)===i},n.isLazy=function(e){return O(e)===v},n.isMemo=function(e){return O(e)===b},n.isPortal=function(e){return O(e)===a},n.isProfiler=function(e){return O(e)===c},n.isStrictMode=function(e){return O(e)===l},n.isSuspense=function(e){return O(e)===h},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===c||e===l||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===b||e.$$typeof===u||e.$$typeof===s||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===x||e.$$typeof===y)},n.typeOf=O},function(e,n,t){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function a(){}function i(e,n,t){this.fn=e,this.context=n,this.once=t||!1}function l(e,n,t,r,a){if("function"!=typeof t)throw new TypeError("The listener must be a function");var l=new i(t,r||e,a),c=o?o+n:n;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],l]:e._events[c].push(l):(e._events[c]=l,e._eventsCount++),e}function c(e,n){0==--e._eventsCount?e._events=new a:delete e._events[n]}function u(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(o=!1)),u.prototype.eventNames=function(){var e,n,t=[];if(0===this._eventsCount)return t;for(n in e=this._events)r.call(e,n)&&t.push(o?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t},u.prototype.listeners=function(e){var n=o?o+e:e,t=this._events[n];if(!t)return[];if(t.fn)return[t.fn];for(var r=0,a=t.length,i=new Array(a);r<a;r++)i[r]=t[r].fn;return i},u.prototype.listenerCount=function(e){var n=o?o+e:e,t=this._events[n];return t?t.fn?1:t.length:0},u.prototype.emit=function(e,n,t,r,a,i){var l=o?o+e:e;if(!this._events[l])return!1;var c,u,s=this._events[l],f=arguments.length;if(s.fn){switch(s.once&&this.removeListener(e,s.fn,void 0,!0),f){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,n),!0;case 3:return s.fn.call(s.context,n,t),!0;case 4:return s.fn.call(s.context,n,t,r),!0;case 5:return s.fn.call(s.context,n,t,r,a),!0;case 6:return s.fn.call(s.context,n,t,r,a,i),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];s.fn.apply(s.context,c)}else{var d,p=s.length;for(u=0;u<p;u++)switch(s[u].once&&this.removeListener(e,s[u].fn,void 0,!0),f){case 1:s[u].fn.call(s[u].context);break;case 2:s[u].fn.call(s[u].context,n);break;case 3:s[u].fn.call(s[u].context,n,t);break;case 4:s[u].fn.call(s[u].context,n,t,r);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];s[u].fn.apply(s[u].context,c)}}return!0},u.prototype.on=function(e,n,t){return l(this,e,n,t,!1)},u.prototype.once=function(e,n,t){return l(this,e,n,t,!0)},u.prototype.removeListener=function(e,n,t,r){var a=o?o+e:e;if(!this._events[a])return this;if(!n)return c(this,a),this;var i=this._events[a];if(i.fn)i.fn!==n||r&&!i.once||t&&i.context!==t||c(this,a);else{for(var l=0,u=[],s=i.length;l<s;l++)(i[l].fn!==n||r&&!i[l].once||t&&i[l].context!==t)&&u.push(i[l]);u.length?this._events[a]=1===u.length?u[0]:u:c(this,a)}return this},u.prototype.removeAllListeners=function(e){var n;return e?(n=o?o+e:e,this._events[n]&&c(this,n)):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=o,u.EventEmitter=u,e.exports=u},function(e,n,t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,n){return!n||"object"!==r(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function a(e){var n="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(t=e,-1===Function.toString.call(t).indexOf("[native code]")))return e;var t;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return i(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function i(e,n,t){return(i=l()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&c(o,t.prototype),o}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e,n){return(c=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=t(103),f=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&c(e,n)}(a,e);var n,t,r=(n=a,t=l(),function(){var e,r=u(n);if(t){var a=u(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return o(this,e)});function a(e){var n;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,a),(n=r.call(this,e)).name="TimeoutError",n}return a}(a(Error)),d=function(e,n,t){return new Promise((function(r,o){if("number"!=typeof n||n<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(n!==1/0){var a=setTimeout((function(){if("function"!=typeof t){var a="string"==typeof t?t:"Promise timed out after ".concat(n," milliseconds"),i=t instanceof Error?t:new f(a);"function"==typeof e.cancel&&e.cancel(),o(i)}else try{r(t())}catch(e){o(e)}}),n);s(e.then(r,o),(function(){clearTimeout(a)}))}else r(e)}))};e.exports=d,e.exports.default=d,e.exports.TimeoutError=f},function(e,n,t){"use strict";e.exports=function(e,n){return n=n||function(){},e.then((function(e){return new Promise((function(e){e(n())})).then((function(){return e}))}),(function(e){return new Promise((function(e){e(n())})).then((function(){throw e}))}))}},function(e,n,t){"use strict";function r(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0});var o=t(105),a=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}var n,t,a;return n=e,(t=[{key:"enqueue",value:function(e,n){var t={priority:(n=Object.assign({priority:0},n)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=n.priority)this._queue.push(t);else{var r=o.default(this._queue,t,(function(e,n){return n.priority-e.priority}));this._queue.splice(r,0,t)}}},{key:"dequeue",value:function(){var e=this._queue.shift();return null==e?void 0:e.run}},{key:"filter",value:function(e){return this._queue.filter((function(n){return n.priority===e.priority})).map((function(e){return e.run}))}},{key:"size",get:function(){return this._queue.length}}])&&r(n.prototype,t),a&&r(n,a),e}();n.default=a},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n,t){for(var r=0,o=e.length;o>0;){var a=o/2|0,i=r+a;t(e[i],n)<=0?(r=++i,o-=a+1):o=a}return r}},function(e,n,t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.bodyOpenClassName=n.portalClassName=void 0;var o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),i=t(0),l=m(i),c=m(t(107)),u=m(t(2)),s=m(t(108)),f=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}(t(60)),d=t(38),p=m(d),h=t(115);function m(e){return e&&e.__esModule?e:{default:e}}function b(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==r(n)&&"function"!=typeof n?e:n}var y=n.portalClassName="ReactModalPortal",g=n.bodyOpenClassName="ReactModal__Body--open",w=void 0!==c.default.createPortal,x=function(){return w?c.default.createPortal:c.default.unstable_renderSubtreeIntoContainer};function O(e){return e()}var k=function(e){function n(){var e,t,r;b(this,n);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return t=r=v(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(i))),r.removePortal=function(){!w&&c.default.unmountComponentAtNode(r.node);var e=O(r.props.parentSelector);e?e.removeChild(r.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},r.portalRef=function(e){r.portal=e},r.renderPortal=function(e){var t=x()(r,l.default.createElement(s.default,o({defaultStyles:n.defaultStyles},e)),r.node);r.portalRef(t)},v(r,t)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+r(n));e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),a(n,[{key:"componentDidMount",value:function(){d.canUseDOM&&(w||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName,O(this.props.parentSelector).appendChild(this.node),!w&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:O(e.parentSelector),nextParent:O(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,n,t){if(d.canUseDOM){var r=this.props,o=r.isOpen,a=r.portalClassName;e.portalClassName!==a&&(this.node.className=a);var i=t.prevParent,l=t.nextParent;l!==i&&(i.removeChild(this.node),l.appendChild(this.node)),(e.isOpen||o)&&!w&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,n=Date.now(),t=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||n+this.props.closeTimeoutMS);t?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,t-n)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&w?(!this.node&&w&&(this.node=document.createElement("div")),x()(l.default.createElement(s.default,o({ref:this.portalRef,defaultStyles:n.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){f.setElement(e)}}]),n}(i.Component);k.propTypes={isOpen:u.default.bool.isRequired,style:u.default.shape({content:u.default.object,overlay:u.default.object}),portalClassName:u.default.string,bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,className:u.default.oneOfType([u.default.string,u.default.shape({base:u.default.string.isRequired,afterOpen:u.default.string.isRequired,beforeClose:u.default.string.isRequired})]),overlayClassName:u.default.oneOfType([u.default.string,u.default.shape({base:u.default.string.isRequired,afterOpen:u.default.string.isRequired,beforeClose:u.default.string.isRequired})]),appElement:u.default.instanceOf(p.default),onAfterOpen:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,ariaHideApp:u.default.bool,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,parentSelector:u.default.func,aria:u.default.object,data:u.default.object,role:u.default.string,contentLabel:u.default.string,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func},k.defaultProps={isOpen:!1,portalClassName:y,bodyOpenClassName:g,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,parentSelector:function(){return document.body}},k.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,h.polyfill)(k),n.default=k},,function(e,n,t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(n,"__esModule",{value:!0});var o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},i=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),l=t(0),c=v(l),u=v(t(2)),s=b(t(109)),f=v(t(110)),d=b(t(60)),p=b(t(113)),h=v(t(38)),m=v(t(62));function b(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n}function v(e){return e&&e.__esModule?e:{default:e}}t(114);var y={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},g=0,w=function(e){function n(e){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!==r(n)&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.setOverlayRef=function(e){t.overlay=e,t.props.overlayRef&&t.props.overlayRef(e)},t.setContentRef=function(e){t.content=e,t.props.contentRef&&t.props.contentRef(e)},t.afterClose=function(){var e=t.props,n=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,a=e.bodyOpenClassName;a&&p.remove(document.body,a),o&&p.remove(document.getElementsByTagName("html")[0],o),r&&g>0&&0===(g-=1)&&d.show(n),t.props.shouldFocusAfterRender&&(t.props.shouldReturnFocusAfterClose?(s.returnFocus(),s.teardownScopedFocus()):s.popWithoutFocus()),t.props.onAfterClose&&t.props.onAfterClose(),m.default.deregister(t)},t.open=function(){t.beforeOpen(),t.state.afterOpen&&t.state.beforeClose?(clearTimeout(t.closeTimer),t.setState({beforeClose:!1})):(t.props.shouldFocusAfterRender&&(s.setupScopedFocus(t.node),s.markForFocusLater()),t.setState({isOpen:!0},(function(){t.setState({afterOpen:!0}),t.props.isOpen&&t.props.onAfterOpen&&t.props.onAfterOpen({overlayEl:t.overlay,contentEl:t.content})})))},t.close=function(){t.props.closeTimeoutMS>0?t.closeWithTimeout():t.closeWithoutTimeout()},t.focusContent=function(){return t.content&&!t.contentHasFocus()&&t.content.focus()},t.closeWithTimeout=function(){var e=Date.now()+t.props.closeTimeoutMS;t.setState({beforeClose:!0,closesAt:e},(function(){t.closeTimer=setTimeout(t.closeWithoutTimeout,t.state.closesAt-Date.now())}))},t.closeWithoutTimeout=function(){t.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},t.afterClose)},t.handleKeyDown=function(e){9===e.keyCode&&(0,f.default)(t.content,e),t.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),t.requestClose(e))},t.handleOverlayOnClick=function(e){null===t.shouldClose&&(t.shouldClose=!0),t.shouldClose&&t.props.shouldCloseOnOverlayClick&&(t.ownerHandlesClose()?t.requestClose(e):t.focusContent()),t.shouldClose=null},t.handleContentOnMouseUp=function(){t.shouldClose=!1},t.handleOverlayOnMouseDown=function(e){t.props.shouldCloseOnOverlayClick||e.target!=t.overlay||e.preventDefault()},t.handleContentOnClick=function(){t.shouldClose=!1},t.handleContentOnMouseDown=function(){t.shouldClose=!1},t.requestClose=function(e){return t.ownerHandlesClose()&&t.props.onRequestClose(e)},t.ownerHandlesClose=function(){return t.props.onRequestClose},t.shouldBeClosed=function(){return!t.state.isOpen&&!t.state.beforeClose},t.contentHasFocus=function(){return document.activeElement===t.content||t.content.contains(document.activeElement)},t.buildClassName=function(e,n){var r="object"===(void 0===n?"undefined":a(n))?n:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},o=r.base;return t.state.afterOpen&&(o=o+" "+r.afterOpen),t.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof n&&n?o+" "+n:o},t.attributesFromObject=function(e,n){return Object.keys(n).reduce((function(t,r){return t[e+"-"+r]=n[r],t}),{})},t.state={afterOpen:!1,beforeClose:!1},t.shouldClose=null,t.moveFromContentToOverlay=null,t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+r(n));e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),i(n,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,n){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!n.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,n=e.appElement,t=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&p.add(document.body,o),r&&p.add(document.getElementsByTagName("html")[0],r),t&&(g+=1,d.hide(n)),m.default.register(this)}},{key:"render",value:function(){var e=this.props,n=e.id,t=e.className,r=e.overlayClassName,a=e.defaultStyles,i=t?{}:a.content,l=r?{}:a.overlay;return this.shouldBeClosed()?null:c.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c.default.createElement("div",o({id:n,ref:this.setContentRef,style:o({},i,this.props.style.content),className:this.buildClassName("content",t),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),n}(l.Component);w.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},w.propTypes={isOpen:u.default.bool.isRequired,defaultStyles:u.default.shape({content:u.default.object,overlay:u.default.object}),style:u.default.shape({content:u.default.object,overlay:u.default.object}),className:u.default.oneOfType([u.default.string,u.default.object]),overlayClassName:u.default.oneOfType([u.default.string,u.default.object]),bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,ariaHideApp:u.default.bool,appElement:u.default.instanceOf(h.default),onAfterOpen:u.default.func,onAfterClose:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,role:u.default.string,contentLabel:u.default.string,aria:u.default.object,data:u.default.object,children:u.default.node,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,testId:u.default.string},n.default=w,e.exports=n.default},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handleBlur=u,n.handleFocus=s,n.markForFocusLater=function(){i.push(document.activeElement)},n.returnFocus=function(){var e=null;try{return void(0!==i.length&&(e=i.pop()).focus())}catch(n){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},n.popWithoutFocus=function(){i.length>0&&i.pop()},n.setupScopedFocus=function(e){l=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",s,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",s))},n.teardownScopedFocus=function(){l=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",s)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",s))};var r,o=t(59),a=(r=o)&&r.__esModule?r:{default:r};var i=[],l=null,c=!1;function u(){c=!0}function s(){if(c){if(c=!1,!l)return;setTimeout((function(){l.contains(document.activeElement)||((0,a.default)(l)[0]||l).focus()}),0)}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n){var t=(0,a.default)(e);if(!t.length)return void n.preventDefault();var r=void 0,o=n.shiftKey,i=t[0],l=t[t.length-1];if(e===document.activeElement){if(!o)return;r=l}l!==document.activeElement||o||(r=i);i===document.activeElement&&o&&(r=l);if(r)return n.preventDefault(),void r.focus();var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==c||"Chrome"==c[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=t.indexOf(document.activeElement);u>-1&&(u+=o?-1:1);if(void 0===(r=t[u]))return n.preventDefault(),void(r=o?l:i).focus();n.preventDefault(),r.focus()};var r,o=t(59),a=(r=o)&&r.__esModule?r:{default:r};e.exports=n.default},function(e,n,t){"use strict";var r=function(){};e.exports=r},function(e,n,t){var r;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
|
22 |
+
/*!
|
23 |
+
Copyright (c) 2015 Jed Watson.
|
24 |
+
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
25 |
+
All rights reserved.
|
26 |
+
*/!function(){"use strict";var a=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:a,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:a&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:a&&!!window.screen};"object"===o(t(61))&&t(61)?void 0===(r=function(){return i}.call(n,t,n,e))||(e.exports=r):e.exports?e.exports=i:window.ExecutionEnvironment=i}()},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dumpClassLists=function(){0};var r={},o={};n.add=function(e,n){return t=e.classList,a="html"==e.nodeName.toLowerCase()?r:o,void n.split(" ").forEach((function(e){!function(e,n){e[n]||(e[n]=0),e[n]+=1}(a,e),t.add(e)}));var t,a},n.remove=function(e,n){return t=e.classList,a="html"==e.nodeName.toLowerCase()?r:o,void n.split(" ").forEach((function(e){!function(e,n){e[n]&&(e[n]-=1)}(a,e),0===a[e]&&t.remove(e)}));var t,a}},function(e,n,t){"use strict";var r,o=t(62),a=(r=o)&&r.__esModule?r:{default:r};var i=void 0,l=void 0,c=[];function u(){0!==c.length&&c[c.length-1].focusContent()}a.default.subscribe((function(e,n){i&&l||((i=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),i.style.position="absolute",i.style.opacity="0",i.setAttribute("tabindex","0"),i.addEventListener("focus",u),(l=i.cloneNode()).addEventListener("focus",u)),(c=n).length>0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},function(e,n,t){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(n){var t=this.constructor.getDerivedStateFromProps(e,n);return null!=t?t:null}.bind(this))}function a(e,n){try{var t=this.props,r=this.state;this.props=e,this.state=n,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,r)}finally{this.props=t,this.state=r}}function i(e){var n=e.prototype;if(!n||!n.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof n.getSnapshotBeforeUpdate)return e;var t=null,i=null,l=null;if("function"==typeof n.componentWillMount?t="componentWillMount":"function"==typeof n.UNSAFE_componentWillMount&&(t="UNSAFE_componentWillMount"),"function"==typeof n.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof n.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof n.componentWillUpdate?l="componentWillUpdate":"function"==typeof n.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==t||null!==i||null!==l){var c=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+c+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==t?"\n "+t:"")+(null!==i?"\n "+i:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(n.componentWillMount=r,n.componentWillReceiveProps=o),"function"==typeof n.getSnapshotBeforeUpdate){if("function"!=typeof n.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");n.componentWillUpdate=a;var s=n.componentDidUpdate;n.componentDidUpdate=function(e,n,t){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:t;s.call(this,e,n,r)}}return e}t.r(n),t.d(n,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0}]]);
|
27 |
+
//# sourceMappingURL=vendor.js.map
|
app/vendor.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///../neko-ui/node_modules/prop-types/index.js","webpack:///../neko-ui/src/common/NekoTheme.js","webpack:///./node_modules/styled-components/dist/styled-components.browser.esm.js","webpack:///../neko-ui/node_modules/@iconify/react/dist/icon.js","webpack:///../neko-ui/src/hooks.js","webpack:///../neko-ui/src/label/ProOnly.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/construct.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack:///../neko-ui/node_modules/polished/dist/polished.esm.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack:///../neko-ui/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-down.js","webpack:///./node_modules/swr/esm/libs/is-document-visible.js","webpack:///./node_modules/swr/esm/libs/hash.js","webpack:///./node_modules/swr/esm/cache.js","webpack:///./node_modules/swr/esm/config.js","webpack:///./node_modules/swr/esm/libs/is-online.js","webpack:///./node_modules/swr/esm/swr-config-context.js","webpack:///./node_modules/swr/esm/use-swr.js","webpack:///./node_modules/swr/esm/index.js","webpack:///../neko-ui/src/button/Button.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-right.js","webpack:///../neko-ui/node_modules/swr/esm/libs/is-document-visible.js","webpack:///../neko-ui/node_modules/swr/esm/libs/is-online.js","webpack:///../neko-ui/node_modules/swr/esm/libs/hash.js","webpack:///../neko-ui/node_modules/swr/esm/cache.js","webpack:///../neko-ui/node_modules/swr/esm/config.js","webpack:///../neko-ui/node_modules/swr/esm/swr-config-context.js","webpack:///../neko-ui/node_modules/swr/esm/use-swr.js","webpack:///../neko-ui/node_modules/swr/esm/use-swr-pages.js","webpack:///../neko-ui/node_modules/swr/esm/index.js","webpack:///../neko-ui/src/helpers.js","webpack:///../neko-ui/src/common/NekoBusyOverlay.js","webpack:///../neko-ui/src/misc/Icon.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-up.js","webpack:///../neko-ui/src/misc/Tooltip.js","webpack:///../neko-ui/src/errors.js","webpack:///../neko-ui/src/misc/Typography.js","webpack:///../neko-ui/src/misc/Logo.js","webpack:///../neko-ui/src/common/PresetIcons.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-double-left.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-double-right.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/chevron-left.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/pause.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/play.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/stop.js","webpack:///./node_modules/react-is/index.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-blank-outline.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-marked.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/folder.js","webpack:///../neko-ui/src/button/MenuButton.js","webpack:///../neko-ui/src/container/Wrapper.js","webpack:///../neko-ui/src/form/Select.js","webpack:///../neko-ui/src/misc/Finder.js","webpack:///../neko-ui/src/misc/Links.js","webpack:///../neko-ui/src/misc/Message.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/safeHTMLElement.js","webpack:///../neko-ui/src/tabs/Tabs.js","webpack:///../neko-ui/src/tabs/SideTabs.js","webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack:///../neko-ui/node_modules/p-queue/dist/index.js","webpack:///./node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack:///./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","webpack:///../neko-ui/src/container/Page.js","webpack:///../neko-ui/src/container/Block.js","webpack:///../neko-ui/src/container/Container.js","webpack:///../neko-ui/src/container/Settings.js","webpack:///../neko-ui/src/container/Window.js","webpack:///../neko-ui/src/form/Checkbox.js","webpack:///../neko-ui/src/form/CheckboxGroup.js","webpack:///../neko-ui/src/form/Input.js","webpack:///../neko-ui/src/form/TextArea.js","webpack:///../neko-ui/src/misc/Progress.js","webpack:///../neko-ui/src/misc/Header.js","webpack:///../neko-ui/src/misc/Paging.js","webpack:///../neko-ui/src/misc/Gauge.js","webpack:///../neko-ui/src/misc/Upload.js","webpack:///../neko-ui/src/modal/Modal.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/tabbable.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/ariaAppHider.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/portalOpenInstances.js","webpack:///../neko-ui/src/table/Table.js","webpack:///../neko-ui/src/toolbar/Toolbar.js","webpack:///./node_modules/swr/node_modules/fast-deep-equal/index.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/lock-check.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/lock-open-variant.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/file-undo.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/replay.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/check.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/delete.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/undo.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/alert-circle.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/database.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/tools.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/cog.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/close.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/cat.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/upload.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/trash-can.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/lead-pencil.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/view-dashboard.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/database-search.js","webpack:///./node_modules/shallowequal/index.js","webpack:///./node_modules/@emotion/stylis/dist/stylis.browser.esm.js","webpack:///./node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-blank-circle-outline.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/record-circle.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/folder-open.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/image-multiple-outline.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/tag.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/content-save.js","webpack:///../neko-ui/node_modules/react-modal/lib/index.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/checkbox-multiple-marked.js","webpack:///../neko-ui/node_modules/fast-deep-equal/index.js","webpack:///../neko-ui/node_modules/prop-types/factoryWithThrowingShims.js","webpack:///../neko-ui/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///../neko-ui/node_modules/@iconify/icons-mdi/pencil.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/react-is/cjs/react-is.production.min.js","webpack:///../neko-ui/node_modules/eventemitter3/index.js","webpack:///../neko-ui/node_modules/p-timeout/index.js","webpack:///../neko-ui/node_modules/p-finally/index.js","webpack:///../neko-ui/node_modules/p-queue/dist/priority-queue.js","webpack:///../neko-ui/node_modules/p-queue/dist/lower-bound.js","webpack:///../neko-ui/node_modules/react-modal/lib/components/Modal.js","webpack:///../neko-ui/node_modules/react-modal/lib/components/ModalPortal.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/focusManager.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/scopeTab.js","webpack:///../neko-ui/node_modules/warning/warning.js","webpack:///../neko-ui/node_modules/exenv/index.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/classList.js","webpack:///../neko-ui/node_modules/react-modal/lib/helpers/bodyTrap.js","webpack:///../neko-ui/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js"],"names":["module","exports","require","NekoTheme","black","blackRGB","blue","blueRGB","deepBlue","finderBorder","lightBlue","lightGray","gray","green","darkGray","disabledForm","orange","overlay","red","redHighlight","header","proGray","progress","tableGray","yellow","yellowRGB","white","fontFamily","fontSizeH1","fontSizeH2","fontSizeText","fontSizeSmall","fontSizeSmallButton","lightShadow","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","interleave","strings","interpolations","result","len","push","isPlainObject","x","toString","EMPTY_ARRAY","freeze","EMPTY_OBJECT","isFunction","test","getComponentName","displayName","name","isStyledComponent","styledComponentId","SC_ATTR","process","env","REACT_APP_SC_ATTR","IS_BROWSER","window","DISABLE_SPEEDY","SC_DISABLE_SPEEDY","REACT_APP_SC_DISABLE_SPEEDY","getNonce","throwStyledComponentsError","code","_len","Array","_key","Error","join","makeStyleTag","head","document","parent","style","createElement","prevStyle","childNodes","child","nodeType","hasAttribute","findLastStyleTag","nextSibling","undefined","setAttribute","nonce","insertBefore","CSSOMTag","element","appendChild","createTextNode","sheet","tag","styleSheets","l","ownerNode","getSheet","_proto","insertRule","index","rule","_error","deleteRule","getRule","cssRules","cssText","TextTag","nodes","_proto2","node","refNode","removeChild","textContent","VirtualTag","_target","rules","_proto3","splice","DefaultGroupedTag","groupSizes","Uint32Array","indexOfGroup","group","insertRules","oldBuffer","oldSize","newSize","set","ruleIndex","_i","clearGroup","startIndex","endIndex","getGroup","css","groupIDRegister","Map","reverseRegister","nextFreeGroup","getGroupForId","id","has","get","getIdForGroup","setGroupForId","SELECTOR","MARKER_RE","RegExp","rehydrateNamesFromContent","content","names","split","registerName","rehydrateSheetFromTag","parts","innerHTML","part","trim","marker","match","parseInt","getTag","SHOULD_REHYDRATE","defaultOptions","isServer","useCSSOMInjection","StyleSheet","options","globalStyles","gs","querySelectorAll","getAttribute","parentNode","rehydrateSheet","registerId","reconstructWithOptions","allocateGSInstance","_ref","hasNameForId","add","groupNames","Set","clearNames","clear","clearRules","clearTag","selector","forEach","outputSheet","phash","h","charCodeAt","hash","COMMENT_REGEX","createStylisInstance","_temp","_componentId","_selector","_selectorRegexp","_ref$options","_ref$plugins","plugins","stylis","parsingRules","parseRulesPlugin","toSheet","block","e","context","selectors","parents","line","column","ns","depth","at","delimiter","insertRulePlugin","selfReferenceReplacer","offset","string","slice","indexOf","stringifyRules","prefix","componentId","flatCSS","replace","cssStr","use","concat","_","lastIndexOf","parsedRules","reduce","acc","plugin","StyleSheetContext","createContext","StylisContext","Consumer","masterSheet","masterStylis","useStyleSheet","useStylis","Keyframes","stringifyArgs","_this","inject","styleSheet","String","getName","uppercasePattern","msPattern","hyphenateStyleName","toLowerCase","isFalsish","chunk","objToCssArray","obj","prevKey","keys","value","flatten","executionContext","isArray","ruleSet","isReactComponent","styles","isObject","val","isValidKey","mixin","mixinDeep","rest","_rest","AD_REPLACER_R","getAlphabeticChar","fromCharCode","generateAlphabeticName","Math","abs","isStaticRules","ComponentStyle","staticRulesId","isStatic","baseHash","generateAndInjectStyles","cssStatic","cssStaticFormatted","dynamicHash","partRule","partChunk","partString","_name","cssFormatted","determineTheme","props","providedTheme","defaultProps","theme","escapeRegex","dashesAtEnds","escape","str","isTag","generateComponentId","ThemeContext","identifiers","useStyledComponentImpl","forwardedComponent","forwardedRef","componentAttrs","attrs","componentStyle","foldedComponentIds","shouldForwardProp","_useResolvedAttrs","resolvedAttrs","attrDef","a","b","resolvedAttrDef","useResolvedAttrs","generatedClassName","hasAttrs","warnTooManyClasses","className","useInjectedStyle","refToForward","elementToBeCreated","$as","as","isTargetTag","computedProps","propFilterFn","propsForElement","filter","Boolean","ref","createStyledComponent","isTargetStyledComp","isCompositeComponent","_options$displayName","generateDisplayName","_options$componentId","parentComponentId","generateId","_options$attrs","finalAttrs","prop","filterFn","WrappedStyledComponent","forwardRef","withComponent","previousComponentId","optionsToCopy","excluded","sourceKeys","_objectWithoutPropertiesLoose","newComponentId","defineProperty","_foldedDefaultProps","self","styled","constructWithOptions","componentConstructor","templateFunction","withConfig","config","domElement","InlineIcon","Icon","_react","__esModule","_typeof","Symbol","iterator","constructor","_defineProperties","descriptor","enumerable","configurable","writable","idCounter","unitsSplit","unitsTest","iconAttributes","defaultAttributes","left","top","width","height","rotate","hFlip","vFlip","SVG","icon","instance","Constructor","TypeError","_classCallCheck","_item","protoProps","staticProps","create","size","ratio","precision","ceil","num","results","shift","isNumber","parseFloat","isNaN","body","regex","ids","strReplace","search","subject","pos","exec","Date","now","random","newID","item","align","horizontal","vertical","transform","attributes","inline","box","inlineTop","inlineHeight","flip","units","round","tempValue","transformations","unshift","customWidth","customHeight","calculateDimension","verticalAlign","preserveAspectRatio","getAlignment","viewBox","replaceIDs","color","addExtra","splitAttributes","data","getAttributes","svg","attr","component","iconProps","customAttributes","iconData","normalize","xmlns","focusable","dangerouslySetInnerHTML","__html","_default","useHandleSWR","swrData","defaultData","defaultBusy","useState","setData","error","setError","busy","setBusy","total","setTotal","useEffect","success","useComponentSize","useRef","setSize","current","observer","ResizeObserver","entries","contentRect","right","bottom","observe","unobserve","useOutsideClick","onOutsideClick","componentRef","handleOutsideClick","contains","addEventListener","removeEventListener","GlobalQueue","useNekoGlobalQueue","params","concurrency","PQueue","autoStart","runTask","func","UploadQueue","useNekoTasks","AbortController","controller","setController","refSkip","refErrors","paused","setPaused","max","setMax","setSuccess","setValue","reset","newController","start","tasks","runnerPromise","Promise","resolve","reject","setTasks","onIdle","then","pause","resume","stop","abort","addTask","task","signal","res","console","log","setAlwaysSkip","useCallback","getErrorCount","Tag","Styled","Colors","Theme","StyledProOnly","show","href","ProOnly","propTypes","PropTypes","bool","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","__proto__","_setPrototypeOf","p","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","_construct","Parent","args","Class","isNativeReflectConstruct","Function","bind","_wrapNativeSuper","_cache","fn","Wrapper","PolishedError","_Error","subClass","superClass","ReferenceError","_assertThisInitialized","colorToInt","convertToInt","hslToRgb","hue","saturation","lightness","convert","huePrime","chroma","secondComponent","lightnessModification","namedColorMap","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColor","normalizedColorName","nameToHex","alpha","toFixed","_alpha","rgbMatched","rgbaMatched","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_rgbColorString","_hslRgbMatched","parseToHsl","min","delta","rgbToHsl","reduceHexValue","numberToHex","hex","colorToHex","convertToHex","hslToHex","hsl","hsla","rgb","rgba","firstValue","secondValue","thirdValue","fourthValue","rgbValue","toColorString","isRgba","isRgb","isHsla","isHsl","curry","f","curried","combined","guard","lowerBoundary","upperBoundary","lighten","amount","hslColor","curriedLighten","isDocumentVisible","visibilityState","table","WeakMap","counter","Cache","initialData","__cache","__listeners","serializeKey","notify","from","delete","err","_hash","subscribe","listener","isSubscribed","_a","slowConnection","navigator","effectiveType","onLoadingSlow","onSuccess","onError","onErrorRetry","__","revalidate","opts","errorRetryCount","retryCount","count","timeout","errorRetryInterval","setTimeout","focusThrottleInterval","dedupingInterval","loadingTimeout","refreshInterval","revalidateOnFocus","revalidateOnReconnect","refreshWhenHidden","refreshWhenOffline","shouldRetryOnError","suspense","compare","isOnline","onLine","SWRConfigContext","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","done","__generator","y","t","g","label","sent","trys","ops","verb","n","v","op","pop","IS_SERVER","rIC","useIsomorphicLayoutEffect","CONCURRENT_PROMISES","CONCURRENT_PROMISES_TS","FOCUS_REVALIDATORS","RECONNECT_REVALIDATORS","CACHE_REVALIDATORS","MUTATION_TS","MUTATION_END_TS","revalidate_1","revalidators","trigger","shouldRevalidate","keyErr","updaters","currentData","currentError","promises","all","broadcastState","_data","beforeMutationTs","beforeConcurrentPromisesTs","err_1","err_2","_b","SWRConfig","Provider","fnArgs","configRef","fetcher","initialError","stateDependencies","isValidating","stateRef","rerender","dispatch","payload","shouldUpdateState","k","unmountedRef","keyRef","eventsRef","emit","event","boundMutate","addRevalidator","callback","removeRevalidator","revlidators","revalidateOpts","loading","shouldDeduping","newData","startAt","newState","err_3","dedupe","currentHookData","latestKeyedData","softRevalidate","revalidateOnMount","pending","onFocus","onReconnect","onUpdate","updatedData","updatedError","needUpdate","timer","tick","clearTimeout","latestData","latestError","mutate","state","defineProperties","StyledButton","onClick","disabled","small","children","hasIcon","classNames","type","PresetIcons","marginRight","additionalColor","NekoButton","oneOf","oneOfType","instanceOf","IconifyIcon","isRequired","cache","shouldNotify","eventsBinded","deepEqual","useLayoutEffect","useSWR","consolidateJsonResult","json","meta","JSON","parse","jsonFetcher","url","nekoError","rawBody","headers","fetch","text","message","NekoError","status","postFetch","file","formData","FormData","append","method","stringify","buildUrlWithParams","apiUrl","isPlainPermalink","includes","URLSearchParams","NekoBusyOverlay","spinner","overlayStyle","showLoader","setShowLoader","loader","Fragment","jsx","position","arrayOf","StyledIconContainer","div","StyledIcon","hoverColor","StyledNekoIcon","spinning","title","tooltip","containerStyle","getIcon","iconClassName","NekoIcon","TooltipContainer","Tooltip","visible","StyledNekoTooltip","setShow","tooltipRef","tooltipWidth","tooltipHeight","childRef","childWidth","childHeight","transformStyle","useMemo","transY","transX","onMouseEnter","onMouseLeave","NekoTooltip","debug","NekoH1","h1","NekoH2","h2","NekoP","NekoSpan","span","StyledNekoTypo","NekoTypo","any","Logo","StyledNekoLogo","fill","d","stroke","strokeWidth","NekoLogo","presetIcons","lockCheck","lockOpenVariant","fileUndo","chevronDoubleLeft","chevronDoubleRight","chevronLeft","chevronRight","chevronDown","chevronUp","pauseIcon","playIcon","replayIcon","checkIcon","stopIcon","deleteIcon","undoIcon","alertCircle","databaseIcon","toolsIcon","cogIcon","closeIcon","catIcon","uploadIcon","trashCan","leadPencil","viewDashboard","databaseSearch","MenuButtonWrapper","MenuButton","button","MenuItemContainer","StyledMenuButton","isPro","React","isOpen","setIsOpen","wrapperRef","buttonRef","buttonWidth","Children","map","cloneElement","marginLeft","MenuItem","StyledNekoMenuItem","requirePro","needsProUser","NekoMenuButton","NekoMenuItem","Column","StyledNekoWrapper","StyledNekoColumn","full","minimal","NekoWrapper","NekoColumn","Select","SelectedOption","Description","Options","OptionsContainer","StyledNekoSelect","scrolldown","onChange","currentOption","toArray","find","checked","description","showOptions","toggleOptions","showUpProOnly","onOptionClick","newValue","childrenLength","RadioOption","SelectOption","StyledNekoOption","disabledClass","radioOption","defaultChecked","htmlFor","recordCircle","checkboxBlankCircleOutline","selectOption","NekoSelect","NekoOption","StyledNekoFinder","chevron","FinderTitle","ChevronSpace","ItemContainer","RightElementContainer","StyledNekoFinderItem","defaultIcons","gallery","imageMultipleOutline","tagIcon","rightElement","showRightElement","isFolder","isCustomizedIcon","hasChild","expanded","setExpanded","folderIcon","setIcon","folderOpen","NekoFinder","NekoFinderItem","LinkContainer","Link","StyledNekoQuickLinks","isActive","StyledNekoLink","display","NekoQuickLinks","NekoLink","number","NekoMessageDanger","NekoMessageSuccess","canUseDOM","_exenv","EE","default","SafeHTMLElement","HTMLElement","TabContainer","TabGroup","Tab","TabContent","StyledNekoTabs","isActiveTabIndex","setIsActiveTabIndex","tabAttributes","ev","tabIndex","tabAttr","onTabClick","StyledNekoTab","NekoTabs","NekoTab","StyledNekoSideTabs","activeTabIndex","newTabIndex","StyledNekoSideTab","NekoSideTabs","NekoSideTab","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","TYPE_STATICS","getStatics","isMemo","ForwardRef","render","Memo","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","EventEmitter","p_timeout_1","priority_queue_1","empty","timeoutError","TimeoutError","_c","_d","carryoverConcurrencyCount","intervalCap","Infinity","interval","queueClass","Number","isFinite","_carryoverConcurrencyCount","_isIntervalIgnored","_intervalCap","_interval","_queue","_queueClass","_timeout","_throwOnTimeout","throwOnTimeout","_isPaused","_pendingCount","_tryToStartAnother","_resolveEmpty","_resolveIdle","_onInterval","_initializeIntervalIfNeeded","_timeoutId","_intervalId","delay","_intervalEnd","_onResumeInterval","_intervalCount","clearInterval","_resolvePromises","canInitializeInterval","_isIntervalPaused","_doesIntervalAllowAnother","_doesConcurrentAllowAnother","dequeue","setInterval","_processQueue","run","operation","_next","enqueue","functions","function_","existingResolve","_concurrency","newConcurrency","milliseconds","reactPropsRegex","arg","Page","StyledNekoPage","nekoErrors","fatalError","setFatalError","showBody","setShowBody","open","NekoPage","object","Block","StyledNekoBlock","NekoBlock","Container","Bar","StyledNekoContainer","headerAlign","footer","footerAlign","NekoContainer","StyledNekoSettings","contentAlign","NekoSettings","WindowBase","TitleBar","StyledNekoWindow","NekoWindow","StyledNekoCheckbox","isDisabled","checkboxMarked","checkboxBlankOutline","NekoCheckbox","StyledNekoCheckboxGroup","NekoCheckboxGroup","mas","StyledNekoInput","placeholder","onEnter","readOnly","maxLength","natural","setNewValue","isControlled","onKeyPress","preventDefault","onBlur","maxlength","spellcheck","NekoInput","StyledNekoTextArea","spellCheck","NekoTextArea","StyledNekoProgress","ProgressCurrent","onPauseClick","onStopClick","percent","typeOfStatus","minWidth","NekoProgress","HeaderBase","StyledNekoHeader","subtitle","saving","textDecoration","contentSave","NekoHeader","PagingContainer","StyledNekoPaging","currentPage","limit","onCurrentPageChanged","maxPage","prevIconClassName","nextIconClassName","showCurrentPageInput","setShowCurrentPageInput","onClickHandle","page","getValidPage","numberPage","currentPageJsx","defaultValue","onControllerClick","currentTarget","NekoPaging","StyledSection","section","backgroundColor","degrees","NekoGauge","background","class","StyledUpload","NekoUpload","iconSize","onFailure","apiConfig","inDropZone","setInDropZone","floor","inputId","inputEl","uploadFile","files","onDragOver","stopPropagation","onDragEnter","uploadFiles","accept","click","onDragLeave","onDrop","dataTransfer","NekoModalParent","NekoModalContent","StyledNekoModal","ok","cancel","customButtons","onOkClick","onCancelClick","customClassName","modalContent","ariaHideApp","parentSelector","getElementById","closeTimeoutMS","NekoModal","tabbable","tabbableNode","hidesContents","zeroSize","offsetWidth","offsetHeight","getComputedStyle","getPropertyValue","scrollWidth","scrollHeight","isTabIndexNotNaN","nodeName","parentElement","isTabIndexNaN","assertNodeList","setElement","useElement","_safeHTMLElement","el","globalElement","validateElement","hide","appElement","removeAttribute","documentNotReadyOrSSRTesting","resetForTesting","_warning","_warning2","nodeList","__webpack_amd_options__","portalOpenInstances","PortalOpenInstances","register","openInstance","openInstances","deregister","subscribers","eventType","subscriber","Table","TableCheckBox","intermediate","onSelect","onUnselect","checkboxMultipleMarked","StyledNekoTable","columns","selectedItems","sort","onSortChange","columnsCount","rows","cells","c","accessor","currentRowsIds","areAllRowsSelected","isIntermediate","hiddenColumnIndexes","headersFooters","beingSorted","beingSortedAsc","by","thStyle","sortable","colspan","textAlign","row","cell","NekoTable","ToolbarBase","StyledNekoToolbar","NekoToolbar","keyList","hasProp","equal","arrA","arrB","dateA","dateB","getTime","regexpA","regexpB","objA","objB","compareContext","ret","keysA","keysB","bHasOwnProperty","idx","valueA","valueB","W","X","ia","m","Z","F","substring","w","L","ja","ka","aa","G","ba","la","ma","R","na","ea","oa","H","q","A","S","B","U","D","z","M","C","K","u","r","I","J","N","charAt","ca","O","da","fa","Y","E","ha","Q","T","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","_Modal","_Modal2","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","getShim","ReactPropTypes","array","symbol","elementType","objectOf","shape","exact","checkPropTypes","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","noop","nextTick","browser","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","for","$$typeof","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","Events","emitter","evt","_events","_eventsCount","clearEvent","eventNames","events","handlers","ee","listenerCount","a1","a2","a3","a4","a5","j","prefixed","pFinally","pTimeout","promise","fallback","onFinally","lower_bound_1","PriorityQueue","priority","comparator","first","it","bodyOpenClassName","portalClassName","_createClass","_react2","_interopRequireDefault","_reactDom2","_propTypes2","_ModalPortal2","ariaAppHider","newObj","_interopRequireWildcard","_safeHTMLElement2","_reactLifecyclesCompat","_possibleConstructorReturn","isReact16","createPortal","getCreatePortal","unstable_renderSubtreeIntoContainer","getParentElement","Modal","_Component","removePortal","unmountComponentAtNode","warn","portalRef","portal","renderPortal","defaultStyles","_inherits","prevProps","prevParent","nextParent","snapshot","_props","closesAt","beforeClose","closeWithTimeout","Component","htmlOpenClassName","base","afterOpen","overlayClassName","onAfterOpen","onRequestClose","shouldFocusAfterRender","shouldCloseOnOverlayClick","shouldReturnFocusAfterClose","aria","role","contentLabel","shouldCloseOnEsc","overlayRef","contentRef","border","overflow","WebkitOverflowScrolling","borderRadius","outline","padding","polyfill","focusManager","_scopeTab2","classList","_portalOpenInstances2","CLASS_NAMES","ariaHiddenInstances","ModalPortal","setOverlayRef","setContentRef","afterClose","_this$props","remove","getElementsByTagName","returnFocus","teardownScopedFocus","popWithoutFocus","onAfterClose","beforeOpen","closeTimer","setState","setupScopedFocus","markForFocusLater","overlayEl","contentEl","close","closeWithoutTimeout","focusContent","contentHasFocus","focus","handleKeyDown","keyCode","requestClose","handleOverlayOnClick","shouldClose","ownerHandlesClose","handleContentOnMouseUp","handleOverlayOnMouseDown","handleContentOnClick","handleContentOnMouseDown","shouldBeClosed","activeElement","buildClassName","which","additional","attributesFromObject","items","moveFromContentToOverlay","prevState","_props2","contentStyles","overlayStyles","onMouseDown","onKeyDown","onMouseUp","testId","handleBlur","handleFocus","focusLaterElements","toFocus","modalElement","attachEvent","detachEvent","_tabbable","_tabbable2","needToFocus","shiftKey","tail","checkSafari","userAgent","warning","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","canUseViewport","screen","define","dumpClassLists","htmlClassList","docBodyClassList","classString","classListRef","poll","incrementReference","decrementReference","_portalOpenInstances","before","after","instances","cloneNode","firstChild","lastChild","componentWillMount","componentWillReceiveProps","nextProps","componentWillUpdate","nextState","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","newApiName","componentDidUpdate","maybeSnapshot","__suppressDeprecationWarning"],"mappings":"uEAiBEA,EAAOC,QAAUC,EAAQ,GAARA,I,6BCyBJC,IA1CG,CAIhBC,MAAO,QACPC,SAAU,UACVC,KAAM,UACNC,QAAS,cACTC,SAAU,UACVC,aAAc,UACdC,UAAW,UACXC,UAAW,UACXC,KAAM,UACNC,MAAO,UACPC,SAAU,UACVC,aAAc,UACdC,OAAQ,UACRC,QAAS,yBACTC,IAAK,UACLC,aAAc,UACdC,OAAQ,UACRC,QAAS,UACTC,SAAU,UACVC,UAAW,UACXC,OAAQ,UACRC,UAAW,eACXC,MAAO,QAIPC,WAAY,OACZC,WAAY,OACZC,WAAY,OACZC,aAAc,OAC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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
register_deactivation_hook( 'Meow_WR2X_Admin', 'wr2x_deactivate' );
|
4 |
+
register_activation_hook( 'Meow_WR2X_Admin', 'wr2x_activate' );
|
5 |
+
|
6 |
+
class Meow_WR2X_Admin extends MeowCommon_Admin {
|
7 |
+
|
8 |
+
public $core = null;
|
9 |
+
|
10 |
+
public function __construct( $core ) {
|
11 |
+
$this->core = $core;
|
12 |
+
parent::__construct( WR2X_PREFIX, WR2X_ENTRY, WR2X_DOMAIN, class_exists( 'MeowPro_WR2X_Core' ) );
|
13 |
+
if ( is_admin() ) {
|
14 |
+
add_action( 'admin_menu', array( $this, 'app_menu' ) );
|
15 |
+
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
16 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
function enqueue_scripts() {
|
21 |
+
|
22 |
+
$physical_file = WR2X_PATH . '/app/vendor.js';
|
23 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
24 |
+
wp_register_script( 'wr2x_perfect_images-vendor', WR2X_URL . 'app/vendor.js',
|
25 |
+
['wp-element', 'wp-i18n'], $cache_buster
|
26 |
+
);
|
27 |
+
|
28 |
+
// Load the "admin" scripts
|
29 |
+
$physical_file = WR2X_PATH . '/app/index.js';
|
30 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
31 |
+
wp_register_script( 'wr2x_perfect_images-index', WR2X_URL . 'app/index.js',
|
32 |
+
['wr2x_perfect_images-vendor'], $cache_buster
|
33 |
+
);
|
34 |
+
|
35 |
+
// Load the fonts
|
36 |
+
wp_register_style( 'meow-neko-ui-lato-font',
|
37 |
+
'//fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&display=swap');
|
38 |
+
wp_enqueue_style( 'meow-neko-ui-lato-font' );
|
39 |
+
|
40 |
+
// Localize and options
|
41 |
+
global $wplr;
|
42 |
+
wp_localize_script( 'wr2x_perfect_images-index', 'wr2x_retina', array_merge( [
|
43 |
+
//'api_nonce' => wp_create_nonce( 'mfrh_media_file_renamer' ),
|
44 |
+
'home_url' => get_home_url(),
|
45 |
+
'site_url' => get_site_url(),
|
46 |
+
'api_url' => get_rest_url( null, '/wp-retina-2x/v1/' ),
|
47 |
+
'upload_url' => $this->core->get_upload_root_url(),
|
48 |
+
'rest_url' => get_rest_url(),
|
49 |
+
'plugin_url' => WR2X_URL,
|
50 |
+
'prefix' => WR2X_PREFIX,
|
51 |
+
'domain' => WR2X_DOMAIN,
|
52 |
+
'is_pro' => class_exists( 'MeowPro_WR2X_Core' ),
|
53 |
+
'is_registered' => !!$this->is_registered(),
|
54 |
+
'rest_nonce' => wp_create_nonce( 'wp_rest' ),
|
55 |
+
//'image_sizes' => $this->core->get_image_sizes( ARRAY_A ),
|
56 |
+
|
57 |
+
// Specific to Retina
|
58 |
+
'retina_sizes' => array_values( get_option( 'wr2x_retina_sizes', array() ) ),
|
59 |
+
'full_size' => get_option( 'wr2x_full_size', false )
|
60 |
+
|
61 |
+
] ) );
|
62 |
+
|
63 |
+
wp_enqueue_script( 'wr2x_perfect_images-index' );
|
64 |
+
}
|
65 |
+
|
66 |
+
function admin_notices() {
|
67 |
+
if ( current_user_can( 'activate_plugins' ) ) {
|
68 |
+
if ( delete_transient( 'wr2x_flush_rules' ) ) {
|
69 |
+
global $wp_rewrite;
|
70 |
+
Meow_WR2X_Admin::generate_rewrite_rules( $wp_rewrite, true );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
|
74 |
+
echo "<div class='error' style='margin-top: 20px;'><p>";
|
75 |
+
_e( "JetPack's <b>Photon</b> module breaks features built in WP Retina 2x (as Photos moves the files away). A common and better alternative to Photon is to use <a href='http://tracking.maxcdn.com/c/97349/3982/378'>MaxCDN</a> (very popular), CloudFlare or Fastly.", 'wp-retina-2x' );
|
76 |
+
echo "</p></div>";
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
static function activate() {
|
81 |
+
global $wp_rewrite;
|
82 |
+
$wp_rewrite->flush_rules();
|
83 |
+
}
|
84 |
+
|
85 |
+
static function deactivate() {
|
86 |
+
remove_filter( 'generate_rewrite_rules', array( 'Meow_WR2X_Admin', 'generate_rewrite_rules' ) );
|
87 |
+
global $wp_rewrite;
|
88 |
+
$wp_rewrite->flush_rules();
|
89 |
+
}
|
90 |
+
|
91 |
+
static function generate_rewrite_rules( $wp_rewrite, $flush = false ) {
|
92 |
+
global $wp_rewrite;
|
93 |
+
$method = get_option( "wr2x_method" );
|
94 |
+
if ( $method == "Retina-Images" ) {
|
95 |
+
|
96 |
+
// MODIFICATION: docwhat
|
97 |
+
// get_home_url() -> trailingslashit(site_url())
|
98 |
+
// REFERENCE: http://wordpress.org/support/topic/plugin-wp-retina-2x-htaccess-generated-with-incorrect-rewriterule
|
99 |
+
|
100 |
+
// MODIFICATION BY h4ir9
|
101 |
+
// .*\.(jpg|jpeg|gif|png|bmp) -> (.+.(?:jpe?g|gif|png))
|
102 |
+
// REFERENCE: http://wordpress.org/support/topic/great-but-needs-a-little-update
|
103 |
+
|
104 |
+
$handlerurl = str_replace( trailingslashit( site_url()), '', plugins_url( 'wr2x_image.php', __FILE__ ) );
|
105 |
+
add_rewrite_rule( '(.+.(?:jpe?g|gif|png))', $handlerurl, 'top' );
|
106 |
+
}
|
107 |
+
if ( $flush == true ) {
|
108 |
+
$wp_rewrite->flush_rules();
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
// function common_url( $file ) {
|
113 |
+
// return trailingslashit( plugin_dir_url( __FILE__ ) ) . 'common/' . $file;
|
114 |
+
// }
|
115 |
+
|
116 |
+
public function wr2x_settings() {
|
117 |
+
echo '<div id="wr2x-admin-settings"></div>';
|
118 |
+
}
|
119 |
+
|
120 |
+
function app_menu() {
|
121 |
+
add_submenu_page( 'meowapps-main-menu', __( 'Perfect Images', WR2X_DOMAIN ), __( 'Perfect Images', WR2X_DOMAIN ),
|
122 |
+
'manage_options', 'wr2x_settings', array( $this, 'wr2x_settings' )
|
123 |
+
);
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
?>
|
api.php → classes/api.php
RENAMED
File without changes
|
core.php → classes/core.php
RENAMED
@@ -1,39 +1,122 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
require
|
4 |
|
5 |
class Meow_WR2X_Core {
|
6 |
|
7 |
-
public $
|
|
|
|
|
|
|
8 |
|
9 |
-
public function __construct(
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
12 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
13 |
add_filter( 'wp_generate_attachment_metadata', array( $this, 'wp_generate_attachment_metadata' ) );
|
14 |
add_action( 'delete_attachment', array( $this, 'delete_attachment' ) );
|
15 |
add_filter( 'generate_rewrite_rules', array( 'Meow_WR2X_Admin', 'generate_rewrite_rules' ) );
|
16 |
add_filter( 'retina_validate_src', array( $this, 'validate_src' ) );
|
17 |
-
add_filter( 'wp_calculate_image_srcset', array( $this, 'calculate_image_srcset' ), 1000,
|
18 |
-
add_action( 'init', array( $this, 'init' ) );
|
19 |
-
include( __DIR__ . '/api.php' );
|
20 |
-
|
21 |
if ( get_option( 'wr2x_big_image_size_threshold', false ) ) {
|
22 |
add_filter( 'big_image_size_threshold', array( $this, 'big_image_size_threshold' ) );
|
23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
if ( is_admin() ) {
|
27 |
-
|
28 |
-
new Meow_WR2X_Ajax( $this );
|
29 |
if ( !get_option( "wr2x_hide_retina_dashboard" ) ) {
|
30 |
-
include( __DIR__ . '/dashboard.php' );
|
31 |
new Meow_WR2X_Dashboard( $this );
|
32 |
}
|
33 |
if ( !get_option( "wr2x_hide_retina_column" ) ) {
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
}
|
39 |
|
@@ -48,46 +131,26 @@ class Meow_WR2X_Core {
|
|
48 |
return strpos( $_SERVER[ 'REQUEST_URI' ], $rest_prefix ) !== false ? true : false;
|
49 |
}
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
add_filter( 'image_size_names_choose', array( $this, 'unset_medium_large' ) );
|
57 |
-
add_filter( 'intermediate_image_sizes_advanced', array( $this, 'unset_medium_large' ) );
|
58 |
-
}
|
59 |
-
|
60 |
-
if ( $this->is_rest() ) {
|
61 |
-
return;
|
62 |
-
}
|
63 |
-
|
64 |
-
if ( is_admin() ) {
|
65 |
-
wp_register_style( 'wr2x-admin-css', plugins_url( '/wr2x_admin.css', __FILE__ ) );
|
66 |
-
wp_enqueue_style( 'wr2x-admin-css' );
|
67 |
-
if ( !get_option( "wr2x_retina_admin" ) )
|
68 |
-
return;
|
69 |
-
}
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
$is_retina = false;
|
78 |
-
if ( isset( $_COOKIE['devicePixelRatio'] ) ) {
|
79 |
-
$is_retina = ceil( floatval( $_COOKIE['devicePixelRatio'] ) ) > 1;
|
80 |
-
}
|
81 |
-
if ( $is_retina || $this->is_debug() ) {
|
82 |
-
add_action( 'wp_head', array( $this, 'buffer_start' ) );
|
83 |
-
add_action( 'wp_footer', array( $this, 'buffer_end' ) );
|
84 |
-
}
|
85 |
}
|
86 |
-
|
87 |
}
|
88 |
|
89 |
-
function
|
90 |
-
|
|
|
|
|
|
|
91 |
return $sizes;
|
92 |
}
|
93 |
|
@@ -121,7 +184,7 @@ class Meow_WR2X_Core {
|
|
121 |
if ( !isset( $buffer ) || trim( $buffer ) === '' )
|
122 |
return $buffer;
|
123 |
$html = new KubAT\PhpSimple\HtmlDomParser();
|
124 |
-
$lazysize = get_option( "wr2x_picturefill_lazysizes" ) &&
|
125 |
$killSrc = !get_option( "wr2x_picturefill_keep_src" );
|
126 |
$nodes_count = 0;
|
127 |
$nodes_replaced = 0;
|
@@ -209,7 +272,7 @@ class Meow_WR2X_Core {
|
|
209 |
$this->log( "$nodes_replaced/$nodes_count img tags were replaced." );
|
210 |
|
211 |
// INLINE CSS BACKGROUND
|
212 |
-
if ( get_option( 'wr2x_picturefill_css_background', false ) &&
|
213 |
// Standard CSS background
|
214 |
preg_match_all( "/url(?:\(['\"]?)(.*?)(?:['\"]?\))/", $buffer, $matches );
|
215 |
//error_log( print_r( $matches, 1 ) );
|
@@ -331,26 +394,24 @@ class Meow_WR2X_Core {
|
|
331 |
*
|
332 |
*/
|
333 |
|
334 |
-
function calculate_image_srcset( $srcset, $size ) {
|
335 |
if ( get_option( "wr2x_disable_responsive" ) )
|
336 |
return null;
|
337 |
-
|
338 |
-
if ( $method == "none" )
|
339 |
return $srcset;
|
|
|
|
|
340 |
$count = 0;
|
341 |
$total = 0;
|
342 |
-
$retinized_srcset = $srcset;
|
343 |
-
if ( empty( $srcset ) )
|
344 |
-
return $srcset;
|
345 |
foreach ( $srcset as $s => $cfg ) {
|
346 |
$total++;
|
347 |
-
$
|
348 |
-
if (
|
349 |
-
$
|
350 |
-
|
351 |
-
|
352 |
-
'descriptor' => 'w',
|
353 |
-
|
354 |
}
|
355 |
}
|
356 |
$this->log( "WP's srcset: " . $count . " retina files added out of " . $total . " image sizes" );
|
@@ -459,7 +520,7 @@ class Meow_WR2X_Core {
|
|
459 |
|
460 |
function is_ignore( $attachmentId ) {
|
461 |
$ignores = $this->get_ignores();
|
462 |
-
return in_array( $attachmentId, $
|
463 |
}
|
464 |
|
465 |
function remove_ignore( $attachmentId ) {
|
@@ -481,10 +542,26 @@ class Meow_WR2X_Core {
|
|
481 |
|
482 |
/**
|
483 |
*
|
484 |
-
*
|
485 |
*
|
486 |
*/
|
487 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
function html_get_basic_retina_info_full( $attachmentId, $retina_info ) {
|
489 |
$status = ( isset( $retina_info ) && isset( $retina_info['full-size'] ) ) ? $retina_info['full-size'] : 'IGNORED';
|
490 |
if ( $status == 'EXISTS' ) {
|
@@ -503,6 +580,36 @@ class Meow_WR2X_Core {
|
|
503 |
return $i . ' (' . ( $size['width'] * 2 ) . 'x' . ( $size['height'] * 2 ) . ')';
|
504 |
}
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
// Information for the 'Media Sizes Retina-ized' Column in the Retina Dashboard
|
507 |
function html_get_basic_retina_info( $attachmentId, $retina_info ) {
|
508 |
$sizes = $this->get_active_image_sizes();
|
@@ -511,19 +618,19 @@ class Meow_WR2X_Core {
|
|
511 |
$status = ( isset( $retina_info ) && isset( $retina_info[$i] ) ) ? $retina_info[$i] : null;
|
512 |
if ( is_array( $status ) )
|
513 |
$result .= '<li class="meow-bk-red" title="' . $this->format_title( $i, $size ) . '">'
|
514 |
-
.
|
515 |
else if ( $status == 'EXISTS' )
|
516 |
$result .= '<li class="meow-bk-blue" title="' . $this->format_title( $i, $size ) . '">'
|
517 |
-
.
|
518 |
else if ( $status == 'PENDING' )
|
519 |
$result .= '<li class="meow-bk-orange" title="' . $this->format_title( $i, $size ) . '">'
|
520 |
-
.
|
521 |
else if ( $status == 'MISSING' )
|
522 |
$result .= '<li class="meow-bk-red" title="' . $this->format_title( $i, $size ) . '">'
|
523 |
-
.
|
524 |
else if ( $status == 'IGNORED' )
|
525 |
$result .= '<li class="meow-bk-gray" title="' . $this->format_title( $i, $size ) . '">'
|
526 |
-
.
|
527 |
else {
|
528 |
error_log( "Retina: This status is not recognized: " . $status );
|
529 |
}
|
@@ -534,7 +641,7 @@ class Meow_WR2X_Core {
|
|
534 |
|
535 |
// Information for Details in the Retina Dashboard
|
536 |
function html_get_details_retina_info( $post, $retina_info ) {
|
537 |
-
if (
|
538 |
return __( "PRO VERSION ONLY", 'wp-retina-2x' );
|
539 |
}
|
540 |
|
@@ -738,7 +845,7 @@ class Meow_WR2X_Core {
|
|
738 |
}
|
739 |
|
740 |
function get_retina_from_remote_url( $url ) {
|
741 |
-
$over_http = get_option( 'wr2x_over_http_check', false ) &&
|
742 |
if ( !$over_http )
|
743 |
return null;
|
744 |
$potential_retina_url = $this->rewrite_url_to_retina( $url );
|
@@ -761,7 +868,7 @@ class Meow_WR2X_Core {
|
|
761 |
// Return retina URL from the image URL
|
762 |
function get_retina_from_url( $url ) {
|
763 |
$this->log( "Standard URL: " . $url, true);
|
764 |
-
$over_http = get_option( 'wr2x_over_http_check', false ) &&
|
765 |
$filepath = $this->from_url_to_system( $url );
|
766 |
if ( empty ( $filepath ) )
|
767 |
return $this->get_retina_from_remote_url( $url );
|
@@ -809,24 +916,48 @@ class Meow_WR2X_Core {
|
|
809 |
}
|
810 |
|
811 |
// Rename this filename with CDN
|
812 |
-
function cdn_this( $url ) {
|
|
|
813 |
$cdn_domain = "";
|
814 |
-
|
815 |
-
|
816 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
return $url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
818 |
|
819 |
$home_url = parse_url( home_url() );
|
820 |
$uploads_url = trailingslashit( $this->get_upload_root_url() );
|
821 |
$uploads_url_cdn = str_replace( $home_url['host'], $cdn_domain, $uploads_url );
|
|
|
822 |
// Perform additional CDN check (Issue #1631 by Martin)
|
823 |
if ( strpos( $url, $uploads_url_cdn ) === 0 ) {
|
824 |
$this->log( "URL already has CDN: $url" );
|
825 |
return $url;
|
826 |
}
|
827 |
$this->log( "URL before CDN: $url" );
|
|
|
828 |
$site_url = preg_replace( '#^https?://#', '', rtrim( get_site_url(), '/' ) );
|
829 |
-
$new_url = str_replace( $site_url, $cdn_domain, $url );
|
830 |
$this->log( "URL with CDN: $new_url" );
|
831 |
return $new_url;
|
832 |
}
|
@@ -835,37 +966,89 @@ class Meow_WR2X_Core {
|
|
835 |
// add_options_page( 'Retina', 'Retina', 'manage_options', 'wr2x_settings', 'wr2x_settings_page' );
|
836 |
// }
|
837 |
|
838 |
-
function get_image_sizes() {
|
839 |
$sizes = array();
|
|
|
840 |
global $_wp_additional_image_sizes;
|
841 |
foreach ( get_intermediate_image_sizes() as $s ) {
|
|
|
|
|
842 |
$crop = false;
|
843 |
if ( isset( $_wp_additional_image_sizes[$s] ) ) {
|
844 |
-
$width = intval($_wp_additional_image_sizes[$s]['width']);
|
845 |
-
$height = intval($_wp_additional_image_sizes[$s]['height']);
|
846 |
$crop = $_wp_additional_image_sizes[$s]['crop'];
|
847 |
-
}
|
848 |
-
|
849 |
-
$
|
850 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
}
|
852 |
-
$sizes[$s] = array( 'width' => $width, 'height' => $height, 'crop' => $crop );
|
853 |
}
|
854 |
-
|
855 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
856 |
return $sizes;
|
857 |
}
|
858 |
|
|
|
|
|
|
|
|
|
859 |
function get_active_image_sizes() {
|
860 |
$sizes = $this->get_image_sizes();
|
861 |
$active_sizes = array();
|
862 |
-
$ignore = get_option( "wr2x_ignore_sizes", array() );
|
863 |
-
if ( empty( $ignore ) )
|
864 |
-
|
865 |
-
$ignore = array_keys( $ignore );
|
866 |
foreach ( $sizes as $name => $attr ) {
|
867 |
$validSize = !empty( $attr['width'] ) || !empty( $attr['height'] );
|
868 |
-
if ( $validSize &&
|
869 |
$active_sizes[$name] = $attr;
|
870 |
}
|
871 |
}
|
@@ -890,6 +1073,13 @@ class Meow_WR2X_Core {
|
|
890 |
return $whereIsOriginal;
|
891 |
}
|
892 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
893 |
function is_debug() {
|
894 |
static $debug = -1;
|
895 |
if ( $debug == -1 ) {
|
@@ -939,7 +1129,17 @@ class Meow_WR2X_Core {
|
|
939 |
return true;
|
940 |
}
|
941 |
|
942 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
943 |
$result = array();
|
944 |
$meta = wp_get_attachment_metadata( $id );
|
945 |
if ( !$this->is_image_meta( $meta ) )
|
@@ -947,28 +1147,15 @@ class Meow_WR2X_Core {
|
|
947 |
$original_width = $meta['width'];
|
948 |
$original_height = $meta['height'];
|
949 |
$sizes = $this->get_image_sizes();
|
950 |
-
$required_files = true;
|
951 |
$originalfile = get_attached_file( $id );
|
952 |
-
$
|
953 |
-
$basepath = $
|
954 |
-
$ignore = get_option( "wr2x_ignore_sizes", array() );
|
955 |
-
if ( empty( $ignore ) )
|
956 |
-
$ignore = array();
|
957 |
-
$ignore = array_keys( $ignore );
|
958 |
-
|
959 |
-
// Full-Size (if required in the settings)
|
960 |
-
$fullsize_required = get_option( "wr2x_full_size" ) && $this->admin->is_registered();
|
961 |
-
$retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->retina_extension() . $pathinfo['extension'];
|
962 |
-
if ( $retina_file && file_exists( $retina_file ) )
|
963 |
-
$result['full-size'] = 'EXISTS';
|
964 |
-
else if ( $fullsize_required && $retina_file )
|
965 |
-
$result['full-size'] = array( 'width' => $original_width * 2, 'height' => $original_height * 2 );
|
966 |
-
//}
|
967 |
|
|
|
968 |
if ( $sizes ) {
|
969 |
foreach ( $sizes as $name => $attr ) {
|
970 |
$validSize = !empty( $attr['width'] ) || !empty( $attr['height'] );
|
971 |
-
if ( !$validSize ||
|
972 |
$result[$name] = 'IGNORED';
|
973 |
continue;
|
974 |
}
|
@@ -984,7 +1171,6 @@ class Meow_WR2X_Core {
|
|
984 |
// None of the file exist
|
985 |
else {
|
986 |
$result[$name] = 'MISSING';
|
987 |
-
$required_files = false;
|
988 |
continue;
|
989 |
}
|
990 |
|
@@ -1005,6 +1191,30 @@ class Meow_WR2X_Core {
|
|
1005 |
}
|
1006 |
}
|
1007 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1008 |
return $result;
|
1009 |
}
|
1010 |
|
@@ -1049,10 +1259,10 @@ class Meow_WR2X_Core {
|
|
1049 |
$original_basename = $pathinfo['basename'];
|
1050 |
$basepath = trailingslashit( $uploads['basedir'] ) . $pathinfo['dirname'];
|
1051 |
|
1052 |
-
$ignore = get_option( "wr2x_ignore_sizes" );
|
1053 |
-
if ( empty( $ignore ) )
|
1054 |
-
|
1055 |
-
$ignore = array_keys( $ignore );
|
1056 |
$issue = false;
|
1057 |
$id = $this->get_attachment_id( $meta['file'] );
|
1058 |
|
@@ -1066,7 +1276,7 @@ class Meow_WR2X_Core {
|
|
1066 |
|
1067 |
foreach ( $sizes as $name => $attr ) {
|
1068 |
$normal_file = "";
|
1069 |
-
if (
|
1070 |
$this->log( "Retina for {$name} ignored (settings)." );
|
1071 |
continue;
|
1072 |
}
|
@@ -1187,6 +1397,19 @@ class Meow_WR2X_Core {
|
|
1187 |
return $meta;
|
1188 |
}
|
1189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1190 |
/**
|
1191 |
*
|
1192 |
* FILTERS
|
@@ -1206,66 +1429,53 @@ class Meow_WR2X_Core {
|
|
1206 |
*/
|
1207 |
|
1208 |
function wp_enqueue_scripts () {
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
'maxFileSize' => $this->get_max_filesize(),
|
1230 |
-
'nonce' => $nonce,
|
1231 |
-
'i18n' => array (
|
1232 |
-
'Refresh' => __( "<a href='?page=wp-retina-2x&view=issues&refresh=true'>Refresh</a> this page.", 'wp-retina-2x' ),
|
1233 |
-
'Wait' => __( "Wait...", 'wp-retina-2x' ),
|
1234 |
-
'Nothing_to_do' => __( "Nothing to do ;)", 'wp-retina-2x' ),
|
1235 |
-
'Generate' => __( "GENERATE", 'wp-retina-2x' )
|
1236 |
-
)
|
1237 |
-
) );
|
1238 |
-
}
|
1239 |
-
|
1240 |
-
// Picturefill
|
1241 |
-
if ( $method == "Picturefill" ) {
|
1242 |
-
if ( $this->is_debug() )
|
1243 |
-
wp_enqueue_script( 'wr2x-debug', plugins_url( '/js/debug.js', __FILE__ ), array(), $wr2x_version, false );
|
1244 |
-
// Picturefill
|
1245 |
-
if ( !get_option( "wr2x_picturefill_noscript" ) )
|
1246 |
-
wp_enqueue_script( 'picturefill', plugins_url( '/js/picturefill.min.js', __FILE__ ), array(), $wr2x_picturefill, false );
|
1247 |
-
// Lazysizes
|
1248 |
-
if ( get_option( "wr2x_picturefill_lazysizes" ) && $this->admin->is_registered() )
|
1249 |
-
wp_enqueue_script( 'lazysizes', plugins_url( '/js/lazysizes.min.js', __FILE__ ), array(), $wr2x_lazysizes, false );
|
1250 |
-
return;
|
1251 |
}
|
1252 |
|
1253 |
// Debug + HTML Rewrite = No JS!
|
1254 |
-
if ( $this->is_debug() && $method == "HTML Rewrite" ) {
|
1255 |
return;
|
1256 |
}
|
1257 |
|
1258 |
// Debug mode, we force the devicePixelRatio to be Retina
|
1259 |
-
if ( $this->is_debug() )
|
1260 |
-
|
|
|
|
|
|
|
1261 |
|
1262 |
// Retina-Images and HTML Rewrite both need the devicePixelRatio cookie on the server-side
|
1263 |
-
if ( $method == "Retina-Images" || $method == "HTML Rewrite" )
|
1264 |
-
|
|
|
|
|
|
|
1265 |
|
1266 |
// Retina.js only needs itself
|
1267 |
-
if ($method == "retina.js")
|
1268 |
-
|
|
|
|
|
|
|
1269 |
}
|
1270 |
|
1271 |
}
|
1 |
<?php
|
2 |
|
3 |
+
require WR2X_PATH . '/vendor/autoload.php';
|
4 |
|
5 |
class Meow_WR2X_Core {
|
6 |
|
7 |
+
public $method = false;
|
8 |
+
public $retina_sizes = array();
|
9 |
+
public $disabled_sizes = array();
|
10 |
+
public $lazy = false;
|
11 |
|
12 |
+
public function __construct() {
|
13 |
+
global $wr2x_core;
|
14 |
+
if ( !empty( $wr2x_core ) ) {
|
15 |
+
return $wr2x_core;
|
16 |
+
}
|
17 |
+
$wr2x_core = $this;
|
18 |
+
$this->set_defaults();
|
19 |
+
$this->init();
|
20 |
+
//add_action( 'plugins_loaded', array( $this, 'init' ) );
|
21 |
+
include( WR2X_PATH . '/classes/api.php' );
|
22 |
+
if ( class_exists( 'MeowPro_WR2X_Core' ) ) {
|
23 |
+
new MeowPro_WR2X_Core( $this );
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
function init() {
|
28 |
+
$this->method = get_option( "wr2x_method" );
|
29 |
+
$this->retina_sizes = get_option( 'wr2x_retina_sizes', array() );
|
30 |
+
$this->disabled_sizes = get_option( 'wr2x_disabled_sizes', array() );
|
31 |
+
$this->lazy = get_option( "wr2x_picturefill_lazysizes" ) && class_exists( 'MeowPro_WR2X_Core' );
|
32 |
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
|
|
|
33 |
add_filter( 'wp_generate_attachment_metadata', array( $this, 'wp_generate_attachment_metadata' ) );
|
34 |
add_action( 'delete_attachment', array( $this, 'delete_attachment' ) );
|
35 |
add_filter( 'generate_rewrite_rules', array( 'Meow_WR2X_Admin', 'generate_rewrite_rules' ) );
|
36 |
add_filter( 'retina_validate_src', array( $this, 'validate_src' ) );
|
37 |
+
add_filter( 'wp_calculate_image_srcset', array( $this, 'calculate_image_srcset' ), 1000, 5 );
|
|
|
|
|
|
|
38 |
if ( get_option( 'wr2x_big_image_size_threshold', false ) ) {
|
39 |
add_filter( 'big_image_size_threshold', array( $this, 'big_image_size_threshold' ) );
|
40 |
}
|
41 |
+
|
42 |
+
// Disable Image-Sizes based on Settings.
|
43 |
+
if ( !empty( $this->disabled_sizes ) ) {
|
44 |
+
$this->disable_image_sizes();
|
45 |
+
}
|
46 |
+
// Disable WordPress Lazy if the Retina Lazy is enabled.
|
47 |
+
if ( $this->lazy ) {
|
48 |
+
add_filter( 'lazy_loader_disabled', '__return_true' );
|
49 |
+
}
|
50 |
|
51 |
+
if ( MeowCommon_Helpers::is_rest() ) {
|
52 |
+
new Meow_WR2X_Rest( $this );
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( $this->method == "Picturefill" ) {
|
57 |
+
add_action( 'wp_head', array( $this, 'picture_buffer_start' ) );
|
58 |
+
add_action( 'wp_footer', array( $this, 'picture_buffer_end' ) );
|
59 |
+
}
|
60 |
+
else if ( $this->method == 'HTML Rewrite' ) {
|
61 |
+
$is_retina = false;
|
62 |
+
if ( isset( $_COOKIE['devicePixelRatio'] ) ) {
|
63 |
+
$is_retina = ceil( floatval( $_COOKIE['devicePixelRatio'] ) ) > 1;
|
64 |
+
}
|
65 |
+
if ( $is_retina || $this->is_debug() ) {
|
66 |
+
add_action( 'wp_head', array( $this, 'buffer_start' ) );
|
67 |
+
add_action( 'wp_footer', array( $this, 'buffer_end' ) );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
// Admin Screens
|
72 |
if ( is_admin() ) {
|
73 |
+
$this->admin = new Meow_WR2X_Admin( $this );
|
|
|
74 |
if ( !get_option( "wr2x_hide_retina_dashboard" ) ) {
|
|
|
75 |
new Meow_WR2X_Dashboard( $this );
|
76 |
}
|
77 |
if ( !get_option( "wr2x_hide_retina_column" ) ) {
|
78 |
+
new Meow_WR2X_Library( $this );
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
function set_defaults() {
|
84 |
+
$wr2x_retina_sizes = get_option( 'wr2x_retina_sizes', null );
|
85 |
+
$wr2x_disabled_sizes = get_option( 'wr2x_disabled_sizes', null );
|
86 |
+
$wr2x_auto_generate = get_option( 'wr2x_auto_generate', null );
|
87 |
+
if ( is_null( $this->method ) ) {
|
88 |
+
update_option( 'wr2x_method', 'Responsive' );
|
89 |
+
}
|
90 |
+
if ( is_null( $this->method ) ) {
|
91 |
+
update_option( 'wr2x_auto_generate', '1' );
|
92 |
+
}
|
93 |
+
if ( is_null( $wr2x_auto_generate ) ) {
|
94 |
+
update_option( 'wr2x_auto_generate', '1' );
|
95 |
+
}
|
96 |
+
if ( is_null( $wr2x_retina_sizes ) ) {
|
97 |
+
$wr2x_retina_sizes = array();
|
98 |
+
// Let's try to get this data from the old option first
|
99 |
+
$wr2x_ignore_sizes = get_option( 'wr2x_ignore_sizes' );
|
100 |
+
$sizes = $this->get_image_sizes();
|
101 |
+
$large_w = 1024;
|
102 |
+
$large_h = 1024;
|
103 |
+
foreach ( $sizes as $name => $details ) {
|
104 |
+
$w = isset( $details['width'] ) ? $details['width'] : 0;
|
105 |
+
$h = isset( $details['height'] ) ? $details['height'] : 0;
|
106 |
+
if ( ( $w <= $large_w || $w === 9999 ) && ( $h <= $large_h || $h === 9999 ) ) {
|
107 |
+
array_push( $wr2x_retina_sizes, $name );
|
108 |
+
}
|
109 |
+
}
|
110 |
+
if ( !empty( $wr2x_ignore_sizes ) ) {
|
111 |
+
$wr2x_retina_sizes = array_diff( $wr2x_retina_sizes, array_keys( $wr2x_ignore_sizes ) );
|
112 |
+
delete_option( 'wr2x_ignore_sizes' );
|
113 |
}
|
114 |
+
update_option( 'wr2x_retina_sizes', $wr2x_retina_sizes );
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( is_null( $wr2x_disabled_sizes ) ) {
|
118 |
+
update_option( 'wr2x_disabled_sizes', [ 'medium_large' ] );
|
119 |
+
delete_option( 'wr2x_disable_medium_large' );
|
120 |
}
|
121 |
}
|
122 |
|
131 |
return strpos( $_SERVER[ 'REQUEST_URI' ], $rest_prefix ) !== false ? true : false;
|
132 |
}
|
133 |
|
134 |
+
/**
|
135 |
+
*
|
136 |
+
* REMOVE (DISABLE) IMAGE SIZES
|
137 |
+
*
|
138 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
+
function disable_image_sizes() {
|
141 |
+
$wr2x_disabled_sizes = get_option( 'wr2x_disabled_sizes', array() );
|
142 |
+
foreach ( $wr2x_disabled_sizes as $size ) {
|
143 |
+
remove_image_size( $size );
|
144 |
+
add_filter( 'image_size_names_choose', array( $this, 'unset_image_sizes' ) );
|
145 |
+
add_filter( 'intermediate_image_sizes_advanced', array( $this, 'unset_image_sizes' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
}
|
|
|
147 |
}
|
148 |
|
149 |
+
function unset_image_sizes( $sizes ) {
|
150 |
+
$wr2x_disabled_sizes = get_option( 'wr2x_disabled_sizes', array() );
|
151 |
+
foreach ( $wr2x_disabled_sizes as $size ) {
|
152 |
+
unset( $sizes[$size] );
|
153 |
+
}
|
154 |
return $sizes;
|
155 |
}
|
156 |
|
184 |
if ( !isset( $buffer ) || trim( $buffer ) === '' )
|
185 |
return $buffer;
|
186 |
$html = new KubAT\PhpSimple\HtmlDomParser();
|
187 |
+
$lazysize = get_option( "wr2x_picturefill_lazysizes" ) && class_exists( 'MeowPro_WR2X_Core' );
|
188 |
$killSrc = !get_option( "wr2x_picturefill_keep_src" );
|
189 |
$nodes_count = 0;
|
190 |
$nodes_replaced = 0;
|
272 |
$this->log( "$nodes_replaced/$nodes_count img tags were replaced." );
|
273 |
|
274 |
// INLINE CSS BACKGROUND
|
275 |
+
if ( get_option( 'wr2x_picturefill_css_background', false ) && class_exists( 'MeowPro_WR2X_Core' ) ) {
|
276 |
// Standard CSS background
|
277 |
preg_match_all( "/url(?:\(['\"]?)(.*?)(?:['\"]?\))/", $buffer, $matches );
|
278 |
//error_log( print_r( $matches, 1 ) );
|
394 |
*
|
395 |
*/
|
396 |
|
397 |
+
function calculate_image_srcset( $srcset, $size, $image_src, $image_meta, $attachment_id ) {
|
398 |
if ( get_option( "wr2x_disable_responsive" ) )
|
399 |
return null;
|
400 |
+
if ( empty( $srcset ) ) {
|
|
|
401 |
return $srcset;
|
402 |
+
}
|
403 |
+
$retinized_srcset = $srcset;
|
404 |
$count = 0;
|
405 |
$total = 0;
|
|
|
|
|
|
|
406 |
foreach ( $srcset as $s => $cfg ) {
|
407 |
$total++;
|
408 |
+
$retinized_srcset[$s]['url'] = $this->cdn_this( $cfg['url'], $attachment_id );
|
409 |
+
if ( $this->method !== "none" ) {
|
410 |
+
$retina = $this->cdn_this( $this->get_retina_from_url( $cfg['url'] ), $attachment_id );
|
411 |
+
if ( !empty( $retina ) ) {
|
412 |
+
$count++;
|
413 |
+
$retinized_srcset[(int)$s * 2] = array( 'url' => $retina, 'descriptor' => 'w', 'value' => (int)$s * 2 );
|
414 |
+
}
|
415 |
}
|
416 |
}
|
417 |
$this->log( "WP's srcset: " . $count . " retina files added out of " . $total . " image sizes" );
|
520 |
|
521 |
function is_ignore( $attachmentId ) {
|
522 |
$ignores = $this->get_ignores();
|
523 |
+
return in_array( $attachmentId, $ignores );
|
524 |
}
|
525 |
|
526 |
function remove_ignore( $attachmentId ) {
|
542 |
|
543 |
/**
|
544 |
*
|
545 |
+
* GET DETAILS / INFO
|
546 |
*
|
547 |
*/
|
548 |
|
549 |
+
// Get the information about a specific Media (usually for the Retina Dashboard)
|
550 |
+
function get_media_status_one( $mediaId ) {
|
551 |
+
$mediaId = (int)$mediaId;
|
552 |
+
$entry = new stdClass();
|
553 |
+
$entry->ID = $mediaId;
|
554 |
+
$entry->post_title = get_the_title( $mediaId );
|
555 |
+
$entry->metadata = wp_get_attachment_metadata( $mediaId, true );
|
556 |
+
$entry->info = $this->retina_info( $mediaId, ARRAY_A );
|
557 |
+
$entry->thumbnail_url = wp_get_attachment_thumb_url( $mediaId );
|
558 |
+
$attached_file = get_attached_file( $mediaId );
|
559 |
+
$entry->filesize = $attached_file ? size_format( filesize( $attached_file ), 2 ) : 0;
|
560 |
+
$version = get_post_meta( $mediaId, '_media_version', true );
|
561 |
+
$entry->version = (int)$version;
|
562 |
+
return $entry;
|
563 |
+
}
|
564 |
+
|
565 |
function html_get_basic_retina_info_full( $attachmentId, $retina_info ) {
|
566 |
$status = ( isset( $retina_info ) && isset( $retina_info['full-size'] ) ) ? $retina_info['full-size'] : 'IGNORED';
|
567 |
if ( $status == 'EXISTS' ) {
|
580 |
return $i . ' (' . ( $size['width'] * 2 ) . 'x' . ( $size['height'] * 2 ) . ')';
|
581 |
}
|
582 |
|
583 |
+
static function size_shortname( $name ) {
|
584 |
+
if ( $name === 'thumbnail' ) {
|
585 |
+
return 'T';
|
586 |
+
}
|
587 |
+
else if ( $name === 'medium' ) {
|
588 |
+
return 'M';
|
589 |
+
}
|
590 |
+
else if ( $name === 'medium_large' ) {
|
591 |
+
return 'ML';
|
592 |
+
}
|
593 |
+
else if ( $name === 'large' ) {
|
594 |
+
return 'L';
|
595 |
+
}
|
596 |
+
else if ( $name === '1536x1536' ) {
|
597 |
+
return 'W1';
|
598 |
+
}
|
599 |
+
else if ( $name === '2048x2048' ) {
|
600 |
+
return 'W2';
|
601 |
+
}
|
602 |
+
else if ( $name === 'post-thumbnail' ) {
|
603 |
+
return 'PT';
|
604 |
+
}
|
605 |
+
$name = preg_split( '[_-]', $name );
|
606 |
+
$short = strtoupper( substr( $name[0], 0, 2 ) );
|
607 |
+
if ( count( $name ) > 1 )
|
608 |
+
$short .= strtoupper( substr( $name[1], 0, 2 ) );
|
609 |
+
|
610 |
+
return $short;
|
611 |
+
}
|
612 |
+
|
613 |
// Information for the 'Media Sizes Retina-ized' Column in the Retina Dashboard
|
614 |
function html_get_basic_retina_info( $attachmentId, $retina_info ) {
|
615 |
$sizes = $this->get_active_image_sizes();
|
618 |
$status = ( isset( $retina_info ) && isset( $retina_info[$i] ) ) ? $retina_info[$i] : null;
|
619 |
if ( is_array( $status ) )
|
620 |
$result .= '<li class="meow-bk-red" title="' . $this->format_title( $i, $size ) . '">'
|
621 |
+
. self::size_shortname( $i ) . '</li>';
|
622 |
else if ( $status == 'EXISTS' )
|
623 |
$result .= '<li class="meow-bk-blue" title="' . $this->format_title( $i, $size ) . '">'
|
624 |
+
. self::size_shortname( $i ) . '</li>';
|
625 |
else if ( $status == 'PENDING' )
|
626 |
$result .= '<li class="meow-bk-orange" title="' . $this->format_title( $i, $size ) . '">'
|
627 |
+
. self::size_shortname( $i ) . '</li>';
|
628 |
else if ( $status == 'MISSING' )
|
629 |
$result .= '<li class="meow-bk-red" title="' . $this->format_title( $i, $size ) . '">'
|
630 |
+
. self::size_shortname( $i ) . '</li>';
|
631 |
else if ( $status == 'IGNORED' )
|
632 |
$result .= '<li class="meow-bk-gray" title="' . $this->format_title( $i, $size ) . '">'
|
633 |
+
. self::size_shortname( $i ) . '</li>';
|
634 |
else {
|
635 |
error_log( "Retina: This status is not recognized: " . $status );
|
636 |
}
|
641 |
|
642 |
// Information for Details in the Retina Dashboard
|
643 |
function html_get_details_retina_info( $post, $retina_info ) {
|
644 |
+
if ( !class_exists( 'MeowPro_WR2X_Core' ) ) {
|
645 |
return __( "PRO VERSION ONLY", 'wp-retina-2x' );
|
646 |
}
|
647 |
|
845 |
}
|
846 |
|
847 |
function get_retina_from_remote_url( $url ) {
|
848 |
+
$over_http = get_option( 'wr2x_over_http_check', false ) && class_exists( 'MeowPro_WR2X_Core' );
|
849 |
if ( !$over_http )
|
850 |
return null;
|
851 |
$potential_retina_url = $this->rewrite_url_to_retina( $url );
|
868 |
// Return retina URL from the image URL
|
869 |
function get_retina_from_url( $url ) {
|
870 |
$this->log( "Standard URL: " . $url, true);
|
871 |
+
$over_http = get_option( 'wr2x_over_http_check', false ) && class_exists( 'MeowPro_WR2X_Core' );
|
872 |
$filepath = $this->from_url_to_system( $url );
|
873 |
if ( empty ( $filepath ) )
|
874 |
return $this->get_retina_from_remote_url( $url );
|
916 |
}
|
917 |
|
918 |
// Rename this filename with CDN
|
919 |
+
function cdn_this( $url, $mediaId = null ) {
|
920 |
+
|
921 |
$cdn_domain = "";
|
922 |
+
$cdn_params = array();
|
923 |
+
$wr2x_easyio_domain = get_option( 'wr2x_easyio_domain', '' );
|
924 |
+
$wr2x_cdn_domain = get_option( 'wr2x_cdn_domain', '' );
|
925 |
+
|
926 |
+
// CDN Domain
|
927 |
+
if ( !empty( $wr2x_easyio_domain ) ) {
|
928 |
+
$cdn_domain = "${wr2x_easyio_domain}";
|
929 |
+
if ( get_option( 'wr2x_easyio_lossless', false ) ) {
|
930 |
+
$cdn_params['lossy'] = 0;
|
931 |
+
}
|
932 |
+
}
|
933 |
+
else if ( !empty( $wr2x_cdn_domain ) ) {
|
934 |
+
$cdn_domain = $wr2x_cdn_domain;
|
935 |
+
}
|
936 |
+
else {
|
937 |
return $url;
|
938 |
+
}
|
939 |
+
|
940 |
+
// Version
|
941 |
+
if ( !empty( $mediaId ) ) {
|
942 |
+
$version = get_post_meta( $mediaId, '_media_version', true );
|
943 |
+
if ( $version ) {
|
944 |
+
$cdn_params['version'] = $version;
|
945 |
+
}
|
946 |
+
}
|
947 |
|
948 |
$home_url = parse_url( home_url() );
|
949 |
$uploads_url = trailingslashit( $this->get_upload_root_url() );
|
950 |
$uploads_url_cdn = str_replace( $home_url['host'], $cdn_domain, $uploads_url );
|
951 |
+
|
952 |
// Perform additional CDN check (Issue #1631 by Martin)
|
953 |
if ( strpos( $url, $uploads_url_cdn ) === 0 ) {
|
954 |
$this->log( "URL already has CDN: $url" );
|
955 |
return $url;
|
956 |
}
|
957 |
$this->log( "URL before CDN: $url" );
|
958 |
+
$queryUrl = !empty( $cdn_params ) ? ( '?' . http_build_query( $cdn_params ) ) : '';
|
959 |
$site_url = preg_replace( '#^https?://#', '', rtrim( get_site_url(), '/' ) );
|
960 |
+
$new_url = str_replace( $site_url, $cdn_domain, $url ) . $queryUrl;
|
961 |
$this->log( "URL with CDN: $new_url" );
|
962 |
return $new_url;
|
963 |
}
|
966 |
// add_options_page( 'Retina', 'Retina', 'manage_options', 'wr2x_settings', 'wr2x_settings_page' );
|
967 |
// }
|
968 |
|
969 |
+
function get_image_sizes( $output_type = OBJECT ) {
|
970 |
$sizes = array();
|
971 |
+
|
972 |
global $_wp_additional_image_sizes;
|
973 |
foreach ( get_intermediate_image_sizes() as $s ) {
|
974 |
+
|
975 |
+
// Get the information
|
976 |
$crop = false;
|
977 |
if ( isset( $_wp_additional_image_sizes[$s] ) ) {
|
978 |
+
$width = intval( $_wp_additional_image_sizes[$s]['width'] );
|
979 |
+
$height = intval( $_wp_additional_image_sizes[$s]['height'] );
|
980 |
$crop = $_wp_additional_image_sizes[$s]['crop'];
|
981 |
+
}
|
982 |
+
else {
|
983 |
+
$width = intval( get_option( $s . '_size_w' ) );
|
984 |
+
$height = intval( get_option( $s . '_size_h' ) );
|
985 |
+
$crop = intval( get_option( $s . '_crop' ) );
|
986 |
+
}
|
987 |
+
|
988 |
+
// Retina shouldn't be active if the size is disabled
|
989 |
+
$enabled = !in_array( $s, $this->disabled_sizes );
|
990 |
+
$retina = in_array( $s, $this->retina_sizes );
|
991 |
+
if ( !$enabled && $retina ) {
|
992 |
+
$this->retina_sizes = array_diff( $this->retina_sizes, array( $s ) );
|
993 |
+
update_option( 'wr2x_retina_sizes', $this->retina_sizes );
|
994 |
+
$retina = false;
|
995 |
+
}
|
996 |
+
|
997 |
+
$sizes[$s] = array(
|
998 |
+
'width' => $width,
|
999 |
+
'height' => $height,
|
1000 |
+
'crop' => $crop,
|
1001 |
+
'enabled' => $enabled,
|
1002 |
+
'retina' => $retina,
|
1003 |
+
'name' => $s,
|
1004 |
+
'shortname' => Meow_WR2X_Core::size_shortname( $s )
|
1005 |
+
);
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
// Let's re-add the disabled sizes
|
1009 |
+
$disabled_to_add = array();
|
1010 |
+
foreach ( $this->disabled_sizes as $size ) {
|
1011 |
+
$retina = in_array( $size, $this->retina_sizes );
|
1012 |
+
if ( $retina ) {
|
1013 |
+
$retina_sizes = array_diff( $this->retina_sizes, array( $size ) );
|
1014 |
+
update_option( 'wr2x_retina_sizes', $retina_sizes );
|
1015 |
+
}
|
1016 |
+
if ( !array_key_exists( $size, $sizes ) ) {
|
1017 |
+
$disabled_to_add[$size] = array(
|
1018 |
+
'enabled' => false,
|
1019 |
+
'retina' => false,
|
1020 |
+
'name' => $size,
|
1021 |
+
'shortname' => Meow_WR2X_Core::size_shortname( $size )
|
1022 |
+
);
|
1023 |
}
|
|
|
1024 |
}
|
1025 |
+
|
1026 |
+
usort( $disabled_to_add, array( $this, 'sizes_sort_func' ) );
|
1027 |
+
$sizes = array_merge( $sizes, $disabled_to_add );
|
1028 |
+
|
1029 |
+
// if ( get_option( 'wr2x_disable_medium_large' ) )
|
1030 |
+
// unset( $sizes['medium_large'] );
|
1031 |
+
if ( $output_type === ARRAY_A ) {
|
1032 |
+
return array_values( $sizes );
|
1033 |
+
}
|
1034 |
+
|
1035 |
return $sizes;
|
1036 |
}
|
1037 |
|
1038 |
+
function sizes_sort_func( $a, $b ) {
|
1039 |
+
return strncmp( $a['shortname'], $b['shortname'], 10 );
|
1040 |
+
}
|
1041 |
+
|
1042 |
function get_active_image_sizes() {
|
1043 |
$sizes = $this->get_image_sizes();
|
1044 |
$active_sizes = array();
|
1045 |
+
// $ignore = get_option( "wr2x_ignore_sizes", array() );
|
1046 |
+
// if ( empty( $ignore ) )
|
1047 |
+
// $ignore = array();
|
1048 |
+
// $ignore = array_keys( $ignore );
|
1049 |
foreach ( $sizes as $name => $attr ) {
|
1050 |
$validSize = !empty( $attr['width'] ) || !empty( $attr['height'] );
|
1051 |
+
if ( $validSize && $attr['retina'] ) {
|
1052 |
$active_sizes[$name] = $attr;
|
1053 |
}
|
1054 |
}
|
1073 |
return $whereIsOriginal;
|
1074 |
}
|
1075 |
|
1076 |
+
function increase_media_version( $mediaId ) {
|
1077 |
+
$version = get_post_meta( $mediaId, '_media_version', true );
|
1078 |
+
$version = $version ? intval( $version ) + 1 : 2;
|
1079 |
+
update_post_meta( $mediaId, '_media_version', $version );
|
1080 |
+
return $version;
|
1081 |
+
}
|
1082 |
+
|
1083 |
function is_debug() {
|
1084 |
static $debug = -1;
|
1085 |
if ( $debug == -1 ) {
|
1129 |
return true;
|
1130 |
}
|
1131 |
|
1132 |
+
// Adds the shortname to the metadata
|
1133 |
+
function postprocess_metadata( $metadata ) {
|
1134 |
+
if ( !empty( $metadata['sizes'] ) ) {
|
1135 |
+
foreach ( $metadata['sizes'] as $key => $value ) {
|
1136 |
+
$metadata['sizes'][$key]['shortname'] = self::size_shortname( $key );
|
1137 |
+
}
|
1138 |
+
}
|
1139 |
+
return $metadata;
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
function retina_info( $id, $output_type = OBJECT ) {
|
1143 |
$result = array();
|
1144 |
$meta = wp_get_attachment_metadata( $id );
|
1145 |
if ( !$this->is_image_meta( $meta ) )
|
1147 |
$original_width = $meta['width'];
|
1148 |
$original_height = $meta['height'];
|
1149 |
$sizes = $this->get_image_sizes();
|
|
|
1150 |
$originalfile = get_attached_file( $id );
|
1151 |
+
$pathinfo_fullsize = pathinfo( $originalfile );
|
1152 |
+
$basepath = $pathinfo_fullsize['dirname'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1153 |
|
1154 |
+
// Image Sizes
|
1155 |
if ( $sizes ) {
|
1156 |
foreach ( $sizes as $name => $attr ) {
|
1157 |
$validSize = !empty( $attr['width'] ) || !empty( $attr['height'] );
|
1158 |
+
if ( !$validSize || !$attr['retina'] ) {
|
1159 |
$result[$name] = 'IGNORED';
|
1160 |
continue;
|
1161 |
}
|
1171 |
// None of the file exist
|
1172 |
else {
|
1173 |
$result[$name] = 'MISSING';
|
|
|
1174 |
continue;
|
1175 |
}
|
1176 |
|
1191 |
}
|
1192 |
}
|
1193 |
}
|
1194 |
+
|
1195 |
+
// Full-Size (if required in the settings)
|
1196 |
+
$fullsize_required = get_option( "wr2x_full_size" ) && class_exists( 'MeowPro_WR2X_Core' );
|
1197 |
+
$retina_file = trailingslashit( $pathinfo_fullsize['dirname'] ) . $pathinfo_fullsize['filename'] .
|
1198 |
+
$this->retina_extension() . $pathinfo_fullsize['extension'];
|
1199 |
+
if ( $retina_file && file_exists( $retina_file ) )
|
1200 |
+
$result['full-size'] = 'EXISTS';
|
1201 |
+
else if ( $fullsize_required && $retina_file )
|
1202 |
+
$result['full-size'] = array( 'width' => $original_width * 2, 'height' => $original_height * 2 );
|
1203 |
+
|
1204 |
+
if ( $output_type === ARRAY_A ) {
|
1205 |
+
$new_results = array();
|
1206 |
+
foreach ( $result as $key => $value ) {
|
1207 |
+
array_push( $new_results, array(
|
1208 |
+
'name' => $key,
|
1209 |
+
'shortname' => self::size_shortname( $key ),
|
1210 |
+
'status' => is_array( $value ) ? 'CANNOT' : $value,
|
1211 |
+
'required' => is_array( $value ) ? $value : null
|
1212 |
+
)
|
1213 |
+
);
|
1214 |
+
}
|
1215 |
+
return $new_results;
|
1216 |
+
}
|
1217 |
+
|
1218 |
return $result;
|
1219 |
}
|
1220 |
|
1259 |
$original_basename = $pathinfo['basename'];
|
1260 |
$basepath = trailingslashit( $uploads['basedir'] ) . $pathinfo['dirname'];
|
1261 |
|
1262 |
+
// $ignore = get_option( "wr2x_ignore_sizes" );
|
1263 |
+
// if ( empty( $ignore ) )
|
1264 |
+
// $ignore = array();
|
1265 |
+
// $ignore = array_keys( $ignore );
|
1266 |
$issue = false;
|
1267 |
$id = $this->get_attachment_id( $meta['file'] );
|
1268 |
|
1276 |
|
1277 |
foreach ( $sizes as $name => $attr ) {
|
1278 |
$normal_file = "";
|
1279 |
+
if ( !$attr['retina'] ) {
|
1280 |
$this->log( "Retina for {$name} ignored (settings)." );
|
1281 |
continue;
|
1282 |
}
|
1397 |
return $meta;
|
1398 |
}
|
1399 |
|
1400 |
+
// This is called by functions in the REST API
|
1401 |
+
// TODO: However, this function seems to be what delete_images does above,
|
1402 |
+
// so maybe we could optimize and avoid code redundancy.
|
1403 |
+
function delete_retina_fullsize( $mediaId ) {
|
1404 |
+
$originalfile = get_attached_file( $mediaId );
|
1405 |
+
$pathinfo = pathinfo( $originalfile );
|
1406 |
+
$retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->retina_extension() . $pathinfo['extension'];
|
1407 |
+
if ( $retina_file && file_exists( $retina_file ) ) {
|
1408 |
+
return unlink( $retina_file );
|
1409 |
+
}
|
1410 |
+
return false;
|
1411 |
+
}
|
1412 |
+
|
1413 |
/**
|
1414 |
*
|
1415 |
* FILTERS
|
1429 |
*/
|
1430 |
|
1431 |
function wp_enqueue_scripts () {
|
1432 |
+
|
1433 |
+
// Picturefill Debug
|
1434 |
+
if ( $this->method == "Picturefill" && $this->is_debug() ) {
|
1435 |
+
$physical_file = WR2X_PATH . '/app/debug.js';
|
1436 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
1437 |
+
wp_enqueue_script( 'wr2x-debug-js', WR2X_URL . '/app/debug.js', array(), $cache_buster, false );
|
1438 |
+
}
|
1439 |
+
|
1440 |
+
// No Picturefill Script
|
1441 |
+
if ( $this->method == "Picturefill" && !get_option( "wr2x_picturefill_noscript" ) ) {
|
1442 |
+
$physical_file = WR2X_PATH . '/app/picturefill.min.js';
|
1443 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
1444 |
+
wp_enqueue_script( 'wr2x-picturefill-js', WR2X_URL . '/app/picturefill.min.js', array(), $cache_buster, false );
|
1445 |
+
}
|
1446 |
+
|
1447 |
+
// Lazysizes
|
1448 |
+
if ( get_option( "wr2x_picturefill_lazysizes" ) && class_exists( 'MeowPro_WR2X_Core' ) ) {
|
1449 |
+
$physical_file = WR2X_PATH . '/app/lazysizes.min.js';
|
1450 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
1451 |
+
wp_enqueue_script( 'wr2x-picturefill-js', WR2X_URL . '/app/lazysizes.min.js', array(), $cache_buster, false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1452 |
}
|
1453 |
|
1454 |
// Debug + HTML Rewrite = No JS!
|
1455 |
+
if ( $this->is_debug() && $this->method == "HTML Rewrite" ) {
|
1456 |
return;
|
1457 |
}
|
1458 |
|
1459 |
// Debug mode, we force the devicePixelRatio to be Retina
|
1460 |
+
if ( $this->is_debug() ) {
|
1461 |
+
$physical_file = WR2X_PATH . '/app/debug.js';
|
1462 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
1463 |
+
wp_enqueue_script( 'wr2x-debug-js', WR2X_URL . '/app/debug.js', array(), $cache_buster, false );
|
1464 |
+
}
|
1465 |
|
1466 |
// Retina-Images and HTML Rewrite both need the devicePixelRatio cookie on the server-side
|
1467 |
+
if ( $this->method == "Retina-Images" || $this->method == "HTML Rewrite" ) {
|
1468 |
+
$physical_file = WR2X_PATH . '/app/retina-cookie.js';
|
1469 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
1470 |
+
wp_enqueue_script( 'wr2x-debug-js', WR2X_URL . '/app/retina-cookie.js', array(), $cache_buster, false );
|
1471 |
+
}
|
1472 |
|
1473 |
// Retina.js only needs itself
|
1474 |
+
if ( $this->method == "retina.js" ) {
|
1475 |
+
$physical_file = WR2X_PATH . '/app/retina.min.js';
|
1476 |
+
$cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
|
1477 |
+
wp_enqueue_script( 'wr2x-retinajs-js', WR2X_URL . '/app/retina.min.js', array(), $cache_buster, false );
|
1478 |
+
}
|
1479 |
}
|
1480 |
|
1481 |
}
|
classes/dashboard.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Meow_WR2X_Dashboard {
|
4 |
+
|
5 |
+
public $core = null;
|
6 |
+
|
7 |
+
public function __construct( $core ) {
|
8 |
+
$this->core = $core;
|
9 |
+
add_action( 'admin_menu', array( $this, 'admin_menu_dashboard' ) );
|
10 |
+
}
|
11 |
+
|
12 |
+
function admin_menu_dashboard () {
|
13 |
+
$flagged = count( $this->core->get_issues() );
|
14 |
+
$warning_title = __( "Perfect Images", 'wp-retina-2x' );
|
15 |
+
$menu_label_nui = sprintf( __( 'Perfect Images %s' ), "<span class='update-plugins count-$flagged' title='$warning_title'><span class='update-count'>" . number_format_i18n( $flagged ) . "</span></span>" );
|
16 |
+
add_media_page( 'Perfect Images', $menu_label_nui, 'manage_options', 'wr2x_dashboard', array( $this, 'wr2x_dashboard' ) );
|
17 |
+
}
|
18 |
+
|
19 |
+
public function wr2x_dashboard() {
|
20 |
+
echo '<div id="wr2x-dashboard"></div>';
|
21 |
+
}
|
22 |
+
}
|
23 |
+
?>
|
classes/init.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( class_exists( 'MeowPro_WR2X_Core' ) && class_exists( 'Meow_WR2X_Core' ) ) {
|
4 |
+
function wr2x_admin_notices() {
|
5 |
+
echo '<div class="error"><p>Thanks for installing the Pro version of Perfect Images (WP Retina 2x) :) However, the free version is still enabled. Please disable or uninstall it.</p></div>';
|
6 |
+
}
|
7 |
+
add_action( 'admin_notices', 'wr2x_admin_notices' );
|
8 |
+
return;
|
9 |
+
}
|
10 |
+
|
11 |
+
spl_autoload_register(function ( $class ) {
|
12 |
+
$necessary = true;
|
13 |
+
$file = null;
|
14 |
+
if ( strpos( $class, 'Meow_WR2X' ) !== false ) {
|
15 |
+
$file = WR2X_PATH . '/classes/' . str_replace( 'meow_wr2x_', '', strtolower( $class ) ) . '.php';
|
16 |
+
}
|
17 |
+
else if ( strpos( $class, 'MeowCommon_Classes_' ) !== false ) {
|
18 |
+
$file = WR2X_PATH . '/common/classes/' . str_replace( 'meowcommon_classes_', '', strtolower( $class ) ) . '.php';
|
19 |
+
}
|
20 |
+
else if ( strpos( $class, 'MeowCommon_' ) !== false ) {
|
21 |
+
$file = WR2X_PATH . '/common/' . str_replace( 'meowcommon_', '', strtolower( $class ) ) . '.php';
|
22 |
+
}
|
23 |
+
else if ( strpos( $class, 'MeowPro_WR2X' ) !== false ) {
|
24 |
+
$necessary = false;
|
25 |
+
$file = WR2X_PATH . '/premium/' . str_replace( 'meowpro_wr2x_', '', strtolower( $class ) ) . '.php';
|
26 |
+
}
|
27 |
+
if ( $file ) {
|
28 |
+
if ( !$necessary && !file_exists( $file ) ) {
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
require( $file );
|
32 |
+
}
|
33 |
+
});
|
34 |
+
|
35 |
+
new Meow_WR2X_Core();
|
36 |
+
|
37 |
+
?>
|
classes/library.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Meow_WR2X_Library {
|
4 |
+
|
5 |
+
public $core = null;
|
6 |
+
|
7 |
+
public function __construct( $core ) {
|
8 |
+
$this->core = $core;
|
9 |
+
add_filter( 'manage_media_columns', array( $this, 'manage_media_columns' ) );
|
10 |
+
add_action( 'manage_media_custom_column', array( $this, 'manage_media_custom_column' ), 10, 2 );
|
11 |
+
}
|
12 |
+
|
13 |
+
function manage_media_columns( $cols ) {
|
14 |
+
$cols["wr2x_column"] = "Retina";
|
15 |
+
return $cols;
|
16 |
+
}
|
17 |
+
|
18 |
+
function manage_media_custom_column( $column_name, $id ) {
|
19 |
+
if ( $column_name == 'wr2x_column' ) {
|
20 |
+
echo '<div class="wr2x-retina-field" data-id="' . $id . '"></div>';
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
?>
|
classes/rest.php
ADDED
@@ -0,0 +1,508 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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$core;
|
6 |
+
private $namespace = 'wp-retina-2x/v1';
|
7 |
+
|
8 |
+
public function __construct( $core ) {
|
9 |
+
$this->core = $core;
|
10 |
+
|
11 |
+
// FOR DEBUG
|
12 |
+
// For experiencing the UI behavior on a slower install.
|
13 |
+
// sleep(1);
|
14 |
+
// For experiencing the UI behavior on a buggy install.
|
15 |
+
// trigger_error( "Error", E_USER_ERROR);
|
16 |
+
// trigger_error( "Warning", E_USER_WARNING);
|
17 |
+
// trigger_error( "Notice", E_USER_NOTICE);
|
18 |
+
// trigger_error( "Deprecated", E_USER_DEPRECATED);
|
19 |
+
|
20 |
+
add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
|
21 |
+
}
|
22 |
+
|
23 |
+
function rest_api_init() {
|
24 |
+
if ( !current_user_can( 'administrator' ) ) {
|
25 |
+
return;
|
26 |
+
}
|
27 |
+
|
28 |
+
// SETTINGS
|
29 |
+
register_rest_route( $this->namespace, '/update_option/', array(
|
30 |
+
'methods' => 'POST',
|
31 |
+
'permission_callback' => '__return_true',
|
32 |
+
'callback' => array( $this, 'rest_update_option' )
|
33 |
+
) );
|
34 |
+
register_rest_route( $this->namespace, '/all_settings/', array(
|
35 |
+
'methods' => 'GET',
|
36 |
+
'permission_callback' => '__return_true',
|
37 |
+
'callback' => array( $this, 'rest_all_settings' )
|
38 |
+
) );
|
39 |
+
register_rest_route( $this->namespace, '/easy_io_link/', array(
|
40 |
+
'methods' => 'POST',
|
41 |
+
'permission_callback' => '__return_true',
|
42 |
+
'callback' => array( $this, 'rest_easy_io_link' )
|
43 |
+
) );
|
44 |
+
register_rest_route( $this->namespace, '/easy_io_unlink/', array(
|
45 |
+
'methods' => 'POST',
|
46 |
+
'permission_callback' => '__return_true',
|
47 |
+
'callback' => array( $this, 'rest_easy_io_unlink' )
|
48 |
+
) );
|
49 |
+
register_rest_route( $this->namespace, '/easy_io_stats/', array(
|
50 |
+
'methods' => 'POST',
|
51 |
+
'permission_callback' => '__return_true',
|
52 |
+
'callback' => array( $this, 'rest_easy_io_stats' )
|
53 |
+
) );
|
54 |
+
|
55 |
+
// STATS & LISTING
|
56 |
+
register_rest_route( $this->namespace, '/stats', array(
|
57 |
+
'methods' => 'GET',
|
58 |
+
'permission_callback' => '__return_true',
|
59 |
+
'callback' => array( $this, 'rest_get_stats' )
|
60 |
+
) );
|
61 |
+
register_rest_route( $this->namespace, '/media', array(
|
62 |
+
'methods' => 'GET',
|
63 |
+
'permission_callback' => '__return_true',
|
64 |
+
'callback' => array( $this, 'rest_media' ),
|
65 |
+
'args' => array(
|
66 |
+
'limit' => array( 'required' => false, 'default' => 10 ),
|
67 |
+
'skip' => array( 'required' => false, 'default' => 20 ),
|
68 |
+
'filterBy' => array( 'required' => false, 'default' => 'all' ),
|
69 |
+
'orderBy' => array( 'required' => false, 'default' => 'id' ),
|
70 |
+
'order' => array( 'required' => false, 'default' => 'desc' ),
|
71 |
+
'search' => array( 'required' => false ),
|
72 |
+
'offset' => array( 'required' => false ),
|
73 |
+
'order' => array( 'required' => false ),
|
74 |
+
'search' => array( 'required' => false )
|
75 |
+
)
|
76 |
+
) );
|
77 |
+
register_rest_route( $this->namespace, '/get_all_ids', array(
|
78 |
+
'methods' => 'POST',
|
79 |
+
'permission_callback' => '__return_true',
|
80 |
+
'callback' => array( $this, 'rest_get_all_ids' )
|
81 |
+
) );
|
82 |
+
|
83 |
+
// ACTIONS
|
84 |
+
register_rest_route( $this->namespace, '/refresh', array(
|
85 |
+
'methods' => 'POST',
|
86 |
+
'permission_callback' => '__return_true',
|
87 |
+
'callback' => array( $this, 'rest_refresh' )
|
88 |
+
) );
|
89 |
+
register_rest_route( $this->namespace, '/details', array(
|
90 |
+
'methods' => 'POST',
|
91 |
+
'permission_callback' => '__return_true',
|
92 |
+
'callback' => array( $this, 'rest_get_details' )
|
93 |
+
) );
|
94 |
+
register_rest_route( $this->namespace, '/build_retina', array(
|
95 |
+
'methods' => 'POST',
|
96 |
+
'permission_callback' => '__return_true',
|
97 |
+
'callback' => array( $this, 'rest_build_retina' )
|
98 |
+
) );
|
99 |
+
register_rest_route( $this->namespace, '/regenerate', array(
|
100 |
+
'methods' => 'POST',
|
101 |
+
'permission_callback' => '__return_true',
|
102 |
+
'callback' => array( $this, 'rest_regenerate' )
|
103 |
+
) );
|
104 |
+
register_rest_route( $this->namespace, '/delete_retina', array(
|
105 |
+
'methods' => 'POST',
|
106 |
+
'permission_callback' => '__return_true',
|
107 |
+
'callback' => array( $this, 'rest_delete_retina' )
|
108 |
+
) );
|
109 |
+
register_rest_route( $this->namespace, '/ignore', array(
|
110 |
+
'methods' => 'POST',
|
111 |
+
'permission_callback' => '__return_true',
|
112 |
+
'callback' => array( $this, 'rest_ignore' )
|
113 |
+
) );
|
114 |
+
}
|
115 |
+
|
116 |
+
function rest_all_settings() {
|
117 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $this->get_all_options() ], 200 );
|
118 |
+
}
|
119 |
+
|
120 |
+
function count_issues() {
|
121 |
+
return count( $this->core->get_issues() );
|
122 |
+
}
|
123 |
+
|
124 |
+
function count_ignored() {
|
125 |
+
return count( $this->core->get_ignores() );
|
126 |
+
}
|
127 |
+
|
128 |
+
function count_all() {
|
129 |
+
global $wpdb;
|
130 |
+
$wpml = $this->core->create_sql_if_wpml_original();
|
131 |
+
return (int)$wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts p
|
132 |
+
WHERE post_type='attachment'
|
133 |
+
AND post_type = 'attachment' ${wpml}
|
134 |
+
AND post_status='inherit'
|
135 |
+
AND ( post_mime_type = 'image/jpeg' OR
|
136 |
+
post_mime_type = 'image/png' OR
|
137 |
+
post_mime_type = 'image/gif' )"
|
138 |
+
);
|
139 |
+
}
|
140 |
+
|
141 |
+
function rest_get_stats() {
|
142 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => array(
|
143 |
+
'issues' => $this->count_issues(),
|
144 |
+
'ignored' => $this->count_ignored(),
|
145 |
+
'all' => $this->count_all()
|
146 |
+
) ], 200 );
|
147 |
+
}
|
148 |
+
|
149 |
+
function rest_get_all_ids( $request ) {
|
150 |
+
global $wpdb;
|
151 |
+
$params = $request->get_json_params();
|
152 |
+
$issuesOnly = isset( $params['issuesOnly'] ) ? (bool)$params['issuesOnly'] : false;
|
153 |
+
if ( $issuesOnly ) {
|
154 |
+
$ids = array_values( $this->core->get_issues() );
|
155 |
+
}
|
156 |
+
else {
|
157 |
+
$wpml = $this->core->create_sql_if_wpml_original();
|
158 |
+
$ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts p
|
159 |
+
WHERE post_type='attachment'
|
160 |
+
AND post_type = 'attachment' ${wpml}
|
161 |
+
AND post_status='inherit'
|
162 |
+
AND ( post_mime_type = 'image/jpeg' OR
|
163 |
+
post_mime_type = 'image/png' OR
|
164 |
+
post_mime_type = 'image/gif' )"
|
165 |
+
);
|
166 |
+
}
|
167 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $ids ], 200 );
|
168 |
+
}
|
169 |
+
|
170 |
+
function rest_refresh() {
|
171 |
+
$this->core->calculate_issues();
|
172 |
+
return new WP_REST_Response( [ 'success' => true ], 200 );
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Get the status for many Media IDs.
|
177 |
+
*
|
178 |
+
* @param integer $skip
|
179 |
+
* @param integer $limit
|
180 |
+
* @return void
|
181 |
+
*/
|
182 |
+
function get_media_status( $skip = 0, $limit = 10, $filterBy, $orderBy, $order, $search ) {
|
183 |
+
global $wpdb;
|
184 |
+
$whereIsIn = '';
|
185 |
+
if ( $filterBy === 'issues' ) {
|
186 |
+
$in = $this->core->get_issues();
|
187 |
+
if ( empty( $in ) ) {
|
188 |
+
return array();
|
189 |
+
}
|
190 |
+
$whereIsIn = 'AND p.ID IN (' . implode( ',', $in ) . ')';
|
191 |
+
}
|
192 |
+
else if ( $filterBy === 'ignored' ) {
|
193 |
+
$in = $this->core->get_ignores();
|
194 |
+
if ( empty( $in ) ) {
|
195 |
+
return array();
|
196 |
+
}
|
197 |
+
$whereIsIn = 'AND p.ID IN (' . implode( ',', $in ) . ')';
|
198 |
+
}
|
199 |
+
$orderSql = 'ORDER BY p.ID DESC';
|
200 |
+
if ($orderBy === 'post_title') {
|
201 |
+
$orderSql = 'ORDER BY post_title ' . ( $order === 'asc' ? 'ASC' : 'DESC' );
|
202 |
+
}
|
203 |
+
else if ($orderBy === 'current_filename') {
|
204 |
+
$orderSql = 'ORDER BY current_filename ' . ( $order === 'asc' ? 'ASC' : 'DESC' );
|
205 |
+
}
|
206 |
+
$entries = [];
|
207 |
+
if ( empty( $search ) ) {
|
208 |
+
$entries = $wpdb->get_results(
|
209 |
+
$wpdb->prepare( "SELECT p.ID, p.post_title,
|
210 |
+
MAX(CASE WHEN pm.meta_key = '_wp_attachment_metadata' THEN pm.meta_value END) AS metadata
|
211 |
+
FROM $wpdb->posts p
|
212 |
+
INNER JOIN $wpdb->postmeta pm ON pm.post_id = p.ID
|
213 |
+
WHERE post_type='attachment'
|
214 |
+
AND pm.meta_key = '_wp_attachment_metadata'
|
215 |
+
$whereIsIn
|
216 |
+
GROUP BY p.ID
|
217 |
+
$orderSql
|
218 |
+
LIMIT %d, %d", $skip, $limit
|
219 |
+
)
|
220 |
+
);
|
221 |
+
}
|
222 |
+
else {
|
223 |
+
$entries = $wpdb->get_results(
|
224 |
+
$wpdb->prepare( "SELECT p.ID, p.post_title,
|
225 |
+
MAX(CASE WHEN pm.meta_key = '_wp_attachment_metadata' THEN pm.meta_value END) AS metadata
|
226 |
+
FROM $wpdb->posts p
|
227 |
+
INNER JOIN $wpdb->postmeta pm ON pm.post_id = p.ID
|
228 |
+
WHERE post_type='attachment'
|
229 |
+
AND pm.meta_key = '_wp_attachment_metadata'
|
230 |
+
$whereIsIn
|
231 |
+
AND p.post_title LIKE %s
|
232 |
+
GROUP BY p.ID
|
233 |
+
$orderSql
|
234 |
+
LIMIT %d, %d", ( '%' . $search . '%' ), $skip, $limit
|
235 |
+
)
|
236 |
+
);
|
237 |
+
}
|
238 |
+
foreach ( $entries as $entry ) {
|
239 |
+
$entry->ID = (int)$entry->ID;
|
240 |
+
$entry->info = $this->core->retina_info( $entry->ID, ARRAY_A );
|
241 |
+
$entry->thumbnail_url = wp_get_attachment_thumb_url( $entry->ID );
|
242 |
+
$entry->metadata = unserialize( $entry->metadata );
|
243 |
+
$entry->metadata = $this->core->postprocess_metadata( $entry->metadata );
|
244 |
+
$attached_file = get_attached_file( $entry->ID );
|
245 |
+
$entry->filesize = $attached_file ? size_format( filesize( $attached_file ), 2 ) : 0;
|
246 |
+
$version = get_post_meta( $entry->ID, '_media_version', true );
|
247 |
+
$entry->version = (int)$version;
|
248 |
+
}
|
249 |
+
return $entries;
|
250 |
+
}
|
251 |
+
|
252 |
+
function rest_media( $request ) {
|
253 |
+
$limit = trim( $request->get_param('limit') );
|
254 |
+
$skip = trim( $request->get_param('skip') );
|
255 |
+
$filterBy = trim( $request->get_param('filterBy') );
|
256 |
+
$orderBy = trim( $request->get_param('orderBy') );
|
257 |
+
$order = trim( $request->get_param('order') );
|
258 |
+
$search = sanitize_text_field( $request->get_param('search') );
|
259 |
+
$entries = $this->get_media_status( $skip, $limit, $filterBy, $orderBy, $order, $search );
|
260 |
+
$total = 0;
|
261 |
+
if ( $filterBy == 'issues' ) {
|
262 |
+
$total = $this->count_issues();
|
263 |
+
}
|
264 |
+
else if ( $filterBy == 'ignored' ) {
|
265 |
+
$total = $this->count_ignored();
|
266 |
+
}
|
267 |
+
else if ( $filterBy == 'all' ) {
|
268 |
+
$total = $this->count_all();
|
269 |
+
}
|
270 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $entries, 'total' => $total ], 200 );
|
271 |
+
}
|
272 |
+
|
273 |
+
function rest_get_details( $request ) {
|
274 |
+
// Check errors
|
275 |
+
$params = $request->get_json_params();
|
276 |
+
$mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
|
277 |
+
if ( empty( $mediaId ) ) {
|
278 |
+
return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
|
279 |
+
}
|
280 |
+
|
281 |
+
// Prepare result
|
282 |
+
$info = $this->core->retina_info( $mediaId, ARRAY_A );
|
283 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
|
284 |
+
}
|
285 |
+
|
286 |
+
// Regenerate the Thumbnails
|
287 |
+
function regenerate_thumbnails( $mediaId ) {
|
288 |
+
require_once ABSPATH . 'wp-admin/includes/image.php';
|
289 |
+
do_action( 'wr2x_before_generate_thumbnails', $mediaId );
|
290 |
+
$file = get_attached_file( $mediaId );
|
291 |
+
$meta = wp_generate_attachment_metadata( $mediaId, $file );
|
292 |
+
wp_update_attachment_metadata( $mediaId, $meta );
|
293 |
+
do_action( 'wr2x_generate_thumbnails', $mediaId );
|
294 |
+
}
|
295 |
+
|
296 |
+
function rest_build_retina( $request ) {
|
297 |
+
// Check errors
|
298 |
+
$params = $request->get_json_params();
|
299 |
+
$mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
|
300 |
+
if ( empty( $mediaId ) ) {
|
301 |
+
return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
|
302 |
+
}
|
303 |
+
|
304 |
+
// Build retina
|
305 |
+
do_action( 'wr2x_before_regenerate', $mediaId );
|
306 |
+
$this->core->delete_attachment( $mediaId, false );
|
307 |
+
$meta = wp_get_attachment_metadata( $mediaId );
|
308 |
+
$this->core->generate_images( $meta );
|
309 |
+
do_action( 'wr2x_regenerate', $mediaId );
|
310 |
+
|
311 |
+
// Prepare result
|
312 |
+
$info = $this->core->get_media_status_one( $mediaId );
|
313 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
|
314 |
+
}
|
315 |
+
|
316 |
+
function rest_delete_retina( $request ) {
|
317 |
+
if ( !current_user_can( 'upload_files' ) ) {
|
318 |
+
$this->core->log( "You do not have permission to upload files." );
|
319 |
+
return __( "You do not have permission to upload files.", 'wp-retina-2x' );
|
320 |
+
}
|
321 |
+
$params = $request->get_json_params();
|
322 |
+
|
323 |
+
// Check errors
|
324 |
+
$mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
|
325 |
+
if ( empty( $mediaId ) ) {
|
326 |
+
return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
|
327 |
+
}
|
328 |
+
|
329 |
+
// Delete Retina
|
330 |
+
$this->core->delete_retina_fullsize( $mediaId );
|
331 |
+
$this->core->delete_attachment( $mediaId, true );
|
332 |
+
$meta = wp_get_attachment_metadata( $mediaId );
|
333 |
+
$info = $this->core->get_media_status_one( $mediaId );
|
334 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
|
335 |
+
}
|
336 |
+
|
337 |
+
function rest_ignore( $request ) {
|
338 |
+
$params = $request->get_json_params();
|
339 |
+
$mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
|
340 |
+
|
341 |
+
// Check errors
|
342 |
+
if ( empty( $mediaId ) ) {
|
343 |
+
return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
|
344 |
+
}
|
345 |
+
|
346 |
+
// Ignore
|
347 |
+
if ( $this->core->is_ignore( $mediaId ) ) {
|
348 |
+
$info = $this->core->remove_ignore( $mediaId );
|
349 |
+
}
|
350 |
+
else {
|
351 |
+
$info = $this->core->add_ignore( $mediaId );
|
352 |
+
}
|
353 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
|
354 |
+
}
|
355 |
+
|
356 |
+
function rest_regenerate( $request ) {
|
357 |
+
require_once ABSPATH . 'wp-admin/includes/image.php';
|
358 |
+
$params = $request->get_json_params();
|
359 |
+
$mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
|
360 |
+
|
361 |
+
// Check errors
|
362 |
+
if ( empty( $mediaId ) ) {
|
363 |
+
return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
|
364 |
+
}
|
365 |
+
|
366 |
+
// Regenerate
|
367 |
+
$this->regenerate_thumbnails( $mediaId );
|
368 |
+
$info = $this->core->get_media_status_one( $mediaId );
|
369 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
|
370 |
+
}
|
371 |
+
|
372 |
+
function get_all_options() {
|
373 |
+
|
374 |
+
return array(
|
375 |
+
|
376 |
+
// OPTIONS
|
377 |
+
'wr2x_sizes' => $this->core->get_image_sizes( ARRAY_A ),
|
378 |
+
'wr2x_retina_sizes' => array_values( get_option( 'wr2x_retina_sizes' ) ),
|
379 |
+
'wr2x_disabled_sizes' => array_values( get_option( 'wr2x_disabled_sizes' ) ),
|
380 |
+
'wr2x_method' => get_option( "wr2x_method" ),
|
381 |
+
'wr2x_full_size' => get_option( 'wr2x_full_size', false ),
|
382 |
+
'wr2x_picturefill_keep_src' => get_option( 'wr2x_picturefill_keep_src', false ),
|
383 |
+
'wr2x_picturefill_lazysizes' => get_option( 'wr2x_picturefill_lazysizes', false ),
|
384 |
+
'wr2x_picturefill_css_background' => get_option( 'wr2x_picturefill_css_background', false ),
|
385 |
+
'wr2x_picturefill_noscript' => get_option( 'wr2x_picturefill_noscript', false ),
|
386 |
+
'wr2x_auto_generate' => get_option( 'wr2x_auto_generate', false ),
|
387 |
+
'wr2x_over_http_check' => get_option( 'wr2x_over_http_check', false ),
|
388 |
+
'wr2x_debug' => get_option( 'wr2x_debug', false ),
|
389 |
+
'wr2x_disable_responsive' => get_option( 'wr2x_disable_responsive', false ),
|
390 |
+
'wr2x_image_replace' => get_option( 'wr2x_image_replace', false ),
|
391 |
+
'wr2x_cdn_domain' => get_option( 'wr2x_cdn_domain', '' ),
|
392 |
+
'wr2x_easyio_domain' => get_option( 'wr2x_easyio_domain', '' ),
|
393 |
+
'wr2x_easyio_lossless' => get_option( 'wr2x_easyio_lossless', '' ),
|
394 |
+
'wr2x_big_image_size_threshold' => get_option( 'wr2x_big_image_size_threshold', false ),
|
395 |
+
'wr2x_hide_retina_column' => get_option( 'wr2x_hide_retina_column', false ),
|
396 |
+
'wr2x_hide_retina_dashboard' => get_option( 'wr2x_hide_retina_dashboard', false )
|
397 |
+
);
|
398 |
+
}
|
399 |
+
|
400 |
+
function rest_update_option( $request ) {
|
401 |
+
$params = $request->get_json_params();
|
402 |
+
try {
|
403 |
+
$name = $params['name'];
|
404 |
+
$value = is_bool( $params['value'] ) ? ( $params['value'] ? '1' : '' ) : $params['value'];
|
405 |
+
$success = update_option( $name, $value );
|
406 |
+
if ( !$success ) {
|
407 |
+
return new WP_REST_Response([ 'success' => false, 'message' => 'Could not update option.' ], 200 );
|
408 |
+
}
|
409 |
+
return new WP_REST_Response([ 'success' => true, 'data' => $value ], 200 );
|
410 |
+
}
|
411 |
+
catch (Exception $e) {
|
412 |
+
return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
function rest_easy_io_unlink( $request ) {
|
417 |
+
delete_option( 'wr2x_easyio_domain' );
|
418 |
+
delete_option( 'wr2x_easyio_plan' );
|
419 |
+
return new WP_REST_Response([ 'success' => true ], 200 );
|
420 |
+
}
|
421 |
+
|
422 |
+
function rest_easy_io_link( $request ) {
|
423 |
+
try {
|
424 |
+
$error_message = null;
|
425 |
+
$site_url = get_site_url();
|
426 |
+
$home_url = get_home_url();
|
427 |
+
$url = 'http://optimize.exactlywww.com/exactdn/activate.php';
|
428 |
+
$ssl = wp_http_supports( array( 'ssl' ) );
|
429 |
+
if ( $ssl ) {
|
430 |
+
$url = set_url_scheme( $url, 'https' );
|
431 |
+
}
|
432 |
+
//add_filter( 'http_headers_useragent', 'perfect_images', PHP_INT_MAX );
|
433 |
+
$result = wp_remote_post( $url, array( 'timeout' => 10, 'body' => array( 'site_url' => $site_url, 'home_url' => $home_url ) ) );
|
434 |
+
|
435 |
+
if ( is_wp_error( $result ) ) {
|
436 |
+
$error_message = $result->get_error_message();
|
437 |
+
}
|
438 |
+
else if ( !empty( $result['body'] ) && strpos( $result['body'], 'domain' ) !== false ) {
|
439 |
+
$response = json_decode( $result['body'], true );
|
440 |
+
if ( !empty( $response['domain'] ) ) {
|
441 |
+
update_option( 'wr2x_easyio_domain', $response['domain'] );
|
442 |
+
if ( !empty( $response['plan_id'] ) ) {
|
443 |
+
update_option( 'wr2x_easyio_plan', (int)$response['plan_id'] );
|
444 |
+
}
|
445 |
+
|
446 |
+
// Clear cache
|
447 |
+
// From https://github.com/nosilver4u/ewww-image-optimizer/blob/master/classes/class-exactdn.php#L298
|
448 |
+
if ( 'external' === get_option( 'elementor_css_print_method' ) ) {
|
449 |
+
update_option( 'elementor_css_print_method', 'internal' );
|
450 |
+
}
|
451 |
+
if ( function_exists( 'et_get_option' ) && function_exists( 'et_update_option' ) &&
|
452 |
+
'on' === et_get_option( 'et_pb_static_css_file', 'on' ) ) {
|
453 |
+
et_update_option( 'et_pb_static_css_file', 'off' );
|
454 |
+
et_update_option( 'et_pb_css_in_footer', 'off' );
|
455 |
+
}
|
456 |
+
if ( function_exists( 'envira_flush_all_cache' ) ) {
|
457 |
+
envira_flush_all_cache();
|
458 |
+
}
|
459 |
+
}
|
460 |
+
}
|
461 |
+
else if ( !empty( $result['body'] ) && false !== strpos( $result['body'], 'error' ) ) {
|
462 |
+
$response = json_decode( $result['body'], true );
|
463 |
+
$error_message = $response['error'];
|
464 |
+
}
|
465 |
+
if ( $error_message ) {
|
466 |
+
return new WP_REST_Response([ 'success' => false, 'message' => $error_message ], 200 );
|
467 |
+
}
|
468 |
+
return new WP_REST_Response([ 'success' => true, 'logs' => json_decode( $result['body'] ) ], 200 );
|
469 |
+
}
|
470 |
+
catch ( Exception $e ) {
|
471 |
+
return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
function rest_easy_io_stats( $request ) {
|
476 |
+
try {
|
477 |
+
$error_message = null;
|
478 |
+
$stats = null;
|
479 |
+
$url = 'http://optimize.exactlywww.com/exactdn/savings.php';
|
480 |
+
$ssl = wp_http_supports( array( 'ssl' ) );
|
481 |
+
if ( $ssl ) {
|
482 |
+
$url = set_url_scheme( $url, 'https' );
|
483 |
+
}
|
484 |
+
$easyio_domain = get_option( 'wr2x_easyio_domain' );
|
485 |
+
$result = wp_remote_post( $url, array( 'timeout' => 10, 'body' => array( 'alias' => $easyio_domain ) ) );
|
486 |
+
if ( is_wp_error( $result ) ) {
|
487 |
+
$error_message = $result->get_error_message();
|
488 |
+
}
|
489 |
+
else if ( !empty( $result['body'] ) ) {
|
490 |
+
$stats = json_decode( $result['body'], true );
|
491 |
+
}
|
492 |
+
else if ( !empty( $result['body'] ) && false !== strpos( $result['body'], 'error' ) ) {
|
493 |
+
$response = json_decode( $result['body'], true );
|
494 |
+
$error_message = $response['error'];
|
495 |
+
}
|
496 |
+
if ( $error_message ) {
|
497 |
+
return new WP_REST_Response([ 'success' => false, 'message' => $error_message ], 200 );
|
498 |
+
}
|
499 |
+
return new WP_REST_Response([ 'success' => true, 'stats' => $stats ], 200 );
|
500 |
+
}
|
501 |
+
catch ( Exception $e ) {
|
502 |
+
return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
|
503 |
+
}
|
504 |
+
}
|
505 |
+
|
506 |
+
}
|
507 |
+
|
508 |
+
?>
|
common/admin.css
DELETED
@@ -1,404 +0,0 @@
|
|
1 |
-
/* MEOW-TABS */
|
2 |
-
|
3 |
-
.meow-tabs {
|
4 |
-
display: flex;
|
5 |
-
flex-wrap: wrap;
|
6 |
-
box-sizing: border-box;
|
7 |
-
}
|
8 |
-
|
9 |
-
.meow-tabs * {
|
10 |
-
box-sizing: border-box;
|
11 |
-
}
|
12 |
-
|
13 |
-
.meow-tabs .meow-tabs-input {
|
14 |
-
position: absolute;
|
15 |
-
opacity: 0;
|
16 |
-
}
|
17 |
-
|
18 |
-
.meow-tabs .meow-tabs-label {
|
19 |
-
width: auto;
|
20 |
-
padding: 4px 12px;
|
21 |
-
background: #3c3c3c;
|
22 |
-
cursor: pointer;
|
23 |
-
font-weight: bold;
|
24 |
-
font-size: 13px;
|
25 |
-
text-transform: uppercase;
|
26 |
-
color: white;
|
27 |
-
transition: background 0.1s, color 0.1s;
|
28 |
-
}
|
29 |
-
|
30 |
-
.meow-tabs .inside {
|
31 |
-
display: none;
|
32 |
-
width: 100%;
|
33 |
-
}
|
34 |
-
|
35 |
-
.meow-tabs .meow-tabs-label:hover {
|
36 |
-
background: #36495f;
|
37 |
-
}
|
38 |
-
|
39 |
-
.meow-tabs .meow-tabs-label:active {
|
40 |
-
background: #3C82C7;
|
41 |
-
}
|
42 |
-
|
43 |
-
.meow-tabs .meow-tabs-input:focus + .meow-tabs-label {
|
44 |
-
box-shadow: inset 0px 0px 0px 3px #2aa1c0;
|
45 |
-
z-index: 1;
|
46 |
-
}
|
47 |
-
|
48 |
-
.meow-tabs .meow-tabs-input:checked + .meow-tabs-label {
|
49 |
-
background: #3C82C7 !important;
|
50 |
-
}
|
51 |
-
|
52 |
-
.meow-tabs-input:checked + .meow-tabs-label + .inside {
|
53 |
-
display: block;
|
54 |
-
order: 99;
|
55 |
-
}
|
56 |
-
|
57 |
-
.meow-tabs .inside {
|
58 |
-
background: #fff;
|
59 |
-
}
|
60 |
-
|
61 |
-
/* MEOW-BOX */
|
62 |
-
|
63 |
-
.meow-box {
|
64 |
-
box-sizing: border-box;
|
65 |
-
border: 1px solid #e5e5e5;
|
66 |
-
box-shadow: 0px 3px 5px rgba(0, 0, 0, .1);
|
67 |
-
background: #fff;
|
68 |
-
color: #444;
|
69 |
-
margin-bottom: 15px;
|
70 |
-
font-size: 13px !important;
|
71 |
-
border-top-right-radius: 8px;
|
72 |
-
}
|
73 |
-
|
74 |
-
.meow-box input, .meow-box th, .meow-box label, .meow-box select {
|
75 |
-
font-size: 13px !important;
|
76 |
-
}
|
77 |
-
|
78 |
-
.meow-box small {
|
79 |
-
font-size: 12px !important;
|
80 |
-
}
|
81 |
-
|
82 |
-
.meow-box h3 {
|
83 |
-
font-size: 14px;
|
84 |
-
padding: 10px 12px;
|
85 |
-
margin: 0;
|
86 |
-
background: #3c3c3c;
|
87 |
-
color: #ffffff;
|
88 |
-
text-transform: uppercase;
|
89 |
-
/*border-bottom: 1px solid #eee;*/
|
90 |
-
}
|
91 |
-
|
92 |
-
.meow-box h3 .dashicons {
|
93 |
-
position: relative;
|
94 |
-
top: 0px;
|
95 |
-
margin-right: 5px;
|
96 |
-
}
|
97 |
-
|
98 |
-
.meow-box .pro_info {
|
99 |
-
padding: 5px;
|
100 |
-
margin: 10px -10px 5px -10px;
|
101 |
-
font-size: 11px;
|
102 |
-
line-height: 13px;
|
103 |
-
}
|
104 |
-
|
105 |
-
.meow-box .pro_info.enabled {
|
106 |
-
background: #4482d2;
|
107 |
-
border-left: 5px solid #4482d2;
|
108 |
-
color: white;
|
109 |
-
}
|
110 |
-
|
111 |
-
.meow-box .pro_info.disabled {
|
112 |
-
background: #96555b;
|
113 |
-
border-left: 5px solid #632329;
|
114 |
-
color: white;
|
115 |
-
}
|
116 |
-
|
117 |
-
.meow-box .pro_info.disabled a {
|
118 |
-
background: #96555b;
|
119 |
-
color: red;
|
120 |
-
text-decoration: none;
|
121 |
-
}
|
122 |
-
|
123 |
-
.meow-box .inside {
|
124 |
-
margin: 10px;
|
125 |
-
}
|
126 |
-
|
127 |
-
.meow-box th {
|
128 |
-
padding: 10px 10px 10px 0px;
|
129 |
-
width: 22%;
|
130 |
-
}
|
131 |
-
|
132 |
-
.meow-box td {
|
133 |
-
padding: 10px 10px;
|
134 |
-
}
|
135 |
-
|
136 |
-
.meow-box p.submit, .meow-box div.submit {
|
137 |
-
text-align: right;
|
138 |
-
margin: 10px -10px -10px -10px;
|
139 |
-
padding: 7px 10px 10px 0px !important;
|
140 |
-
border-top: 1px solid #eee !important;
|
141 |
-
max-width: inherit;
|
142 |
-
background: rgba(125, 125, 125, 0.04);
|
143 |
-
border-radius: 0px;
|
144 |
-
}
|
145 |
-
|
146 |
-
.meow-box [type="text"], .meow-box select {
|
147 |
-
width: 100%;
|
148 |
-
}
|
149 |
-
|
150 |
-
/* CONTROLS INSIDE A COLUMN (LABEL ON THE LEFT, VALUE ON THE RIGHT) */
|
151 |
-
.meow-box td [type="text"], .meow-box td [type="checkbox"], .meow-box td select {
|
152 |
-
margin-top: -3px;
|
153 |
-
}
|
154 |
-
|
155 |
-
.meow-header-ad {
|
156 |
-
float: right;
|
157 |
-
}
|
158 |
-
|
159 |
-
/* BUTTONS */
|
160 |
-
|
161 |
-
.meow-button-xs {
|
162 |
-
font-size: 10px !important;
|
163 |
-
height: 20px !important;
|
164 |
-
line-height: 18px !important;
|
165 |
-
position: relative !important;
|
166 |
-
top: 1px !important;
|
167 |
-
text-align: center !important
|
168 |
-
}
|
169 |
-
|
170 |
-
/* MODAL */
|
171 |
-
|
172 |
-
#meow-modal-info-backdrop {
|
173 |
-
background: rgba(0, 0, 0, 0.75);
|
174 |
-
position: fixed;
|
175 |
-
top: 0px;
|
176 |
-
bottom: 0px;
|
177 |
-
right: 0px;
|
178 |
-
left: 0px;
|
179 |
-
z-index: 10000;
|
180 |
-
}
|
181 |
-
|
182 |
-
#meow-modal-info {
|
183 |
-
background: white;
|
184 |
-
box-shadow: 0px 0px 5px black;
|
185 |
-
padding: 15px;
|
186 |
-
overflow-y: scroll;
|
187 |
-
position: fixed;
|
188 |
-
z-index: 10000;
|
189 |
-
left: 100px;
|
190 |
-
right: 100px;
|
191 |
-
top: 50px;
|
192 |
-
bottom: 50px;
|
193 |
-
}
|
194 |
-
|
195 |
-
#meow-modal-info h3 {
|
196 |
-
height: 25px;
|
197 |
-
border-bottom: 2px solid #808080;
|
198 |
-
}
|
199 |
-
|
200 |
-
#meow-modal-info td {
|
201 |
-
text-align: center;
|
202 |
-
font-size: 11px;
|
203 |
-
border: 1px solid #D3DCFF;
|
204 |
-
padding: 10px 15px;
|
205 |
-
background: #EFF8FF;
|
206 |
-
}
|
207 |
-
|
208 |
-
#meow-modal-info .close {
|
209 |
-
float: right;
|
210 |
-
font-size: 18px;
|
211 |
-
font-weight: bold;
|
212 |
-
font-family: Verdana;
|
213 |
-
cursor: pointer;
|
214 |
-
}
|
215 |
-
|
216 |
-
#meow-modal-info .loading {
|
217 |
-
background-color: #F2F2F2;
|
218 |
-
text-align: center;
|
219 |
-
padding-top: 10px;
|
220 |
-
background-size: 32px 32px;
|
221 |
-
}
|
222 |
-
|
223 |
-
#meow-modal-info .meow-sized-image {
|
224 |
-
width: 19px;
|
225 |
-
height: 19px;
|
226 |
-
margin-right: 10px;
|
227 |
-
}
|
228 |
-
|
229 |
-
/* IMAGE SIZES RELATED INFO */
|
230 |
-
|
231 |
-
.meow-sized-images {
|
232 |
-
margin-top: 0px;
|
233 |
-
cursor: pointer;
|
234 |
-
}
|
235 |
-
|
236 |
-
.meow-sized-images li, #meow-modal-info .meow-sized-image {
|
237 |
-
display: block;
|
238 |
-
color: white;
|
239 |
-
padding: 5px 0px;
|
240 |
-
font-size: 10px;
|
241 |
-
text-align: center;
|
242 |
-
width: 18px;
|
243 |
-
height: 18px;
|
244 |
-
line-height: 8px;
|
245 |
-
background: black;
|
246 |
-
float: left;
|
247 |
-
margin-right: 1px;
|
248 |
-
box-sizing: border-box;
|
249 |
-
margin-bottom: 2px;
|
250 |
-
}
|
251 |
-
|
252 |
-
.meow-sized-images:after {
|
253 |
-
clear: both;
|
254 |
-
content:""; display:table;
|
255 |
-
}
|
256 |
-
|
257 |
-
.meow-sized-images + span {
|
258 |
-
position: relative;
|
259 |
-
top: -12px;
|
260 |
-
}
|
261 |
-
|
262 |
-
/* MEOW COLORS */
|
263 |
-
|
264 |
-
.meow-bk-blue {
|
265 |
-
background: #3C82C7 !important;
|
266 |
-
color: white;
|
267 |
-
}
|
268 |
-
|
269 |
-
.meow-bk-orange {
|
270 |
-
background: #f1900e !important;
|
271 |
-
color: white;
|
272 |
-
}
|
273 |
-
|
274 |
-
.meow-bk-red {
|
275 |
-
background: #c53a47 !important;
|
276 |
-
color: white;
|
277 |
-
}
|
278 |
-
|
279 |
-
.meow-bk-gray {
|
280 |
-
background: gray !important;
|
281 |
-
color: white;
|
282 |
-
}
|
283 |
-
|
284 |
-
.meow-bk-green {
|
285 |
-
background: #2b9463 !important;
|
286 |
-
color: white;
|
287 |
-
}
|
288 |
-
|
289 |
-
.meow-bk-black {
|
290 |
-
background: #3c3c3c !important;
|
291 |
-
color: white;
|
292 |
-
}
|
293 |
-
|
294 |
-
.meow-bk-purple {
|
295 |
-
background: #984c96 !important;
|
296 |
-
color: white;
|
297 |
-
}
|
298 |
-
|
299 |
-
/* DASHBOARD */
|
300 |
-
|
301 |
-
.meow-dashboard {
|
302 |
-
box-sizing: border-box;
|
303 |
-
}
|
304 |
-
|
305 |
-
.meow-dashboard .meow-box ul {
|
306 |
-
padding: 0px;
|
307 |
-
margin: 0px;
|
308 |
-
}
|
309 |
-
|
310 |
-
.meow-featured-plugins .meow-box li {
|
311 |
-
min-height: 80px;
|
312 |
-
}
|
313 |
-
|
314 |
-
.meow-dashboard .meow-box li {
|
315 |
-
border-bottom: 1px solid #eee;
|
316 |
-
margin: 0px;
|
317 |
-
padding: 10px;
|
318 |
-
box-sizing: border-box;
|
319 |
-
}
|
320 |
-
|
321 |
-
.meow-dashboard .meow-box li img {
|
322 |
-
width: 80px;
|
323 |
-
height: 80px;
|
324 |
-
float: left;
|
325 |
-
margin: -10px 10px -10px -10px;
|
326 |
-
|
327 |
-
}
|
328 |
-
|
329 |
-
.meow-dashboard .meow-box li:last-child {
|
330 |
-
border: none;
|
331 |
-
padding-bottom: 0px;
|
332 |
-
}
|
333 |
-
|
334 |
-
.meow-button-xs .dashicons {
|
335 |
-
font-size: 18px !important;
|
336 |
-
}
|
337 |
-
|
338 |
-
.meow-button-xs.updating-message:before {
|
339 |
-
margin-top: 0px !important;
|
340 |
-
}
|
341 |
-
|
342 |
-
.meow-button-xs.updating-message * {
|
343 |
-
display: none;
|
344 |
-
}
|
345 |
-
|
346 |
-
#phpinfo {
|
347 |
-
font-size: 11px;
|
348 |
-
}
|
349 |
-
|
350 |
-
#phpinfo .e {
|
351 |
-
padding: 5px;
|
352 |
-
background: lightgray;
|
353 |
-
}
|
354 |
-
|
355 |
-
#phpinfo .h th {
|
356 |
-
padding: 5px;
|
357 |
-
color: white;
|
358 |
-
background: gray;
|
359 |
-
text-align: left;
|
360 |
-
font-size: 14px !important;
|
361 |
-
}
|
362 |
-
|
363 |
-
#phpinfo h1 {
|
364 |
-
padding: 10px 0px;
|
365 |
-
font-weight: bold;
|
366 |
-
}
|
367 |
-
|
368 |
-
#phpinfo h2 {
|
369 |
-
padding: 10px 0px;
|
370 |
-
font-weight: bold;
|
371 |
-
font-size: 20px;
|
372 |
-
}
|
373 |
-
|
374 |
-
#error_log {
|
375 |
-
font-size: 12px;
|
376 |
-
}
|
377 |
-
|
378 |
-
/* ROWS AND COLUMNS */
|
379 |
-
.meow-col { display: block; float:left; margin: 1% 0 1% 1.6%; }
|
380 |
-
.meow-col:first-child { margin-left: 0; }
|
381 |
-
|
382 |
-
/* GROUPING */
|
383 |
-
.meow-row { clear: both; padding: 0px; margin: 0px; }
|
384 |
-
.meow-row:before,
|
385 |
-
.meow-row:after { content:""; display:table; }
|
386 |
-
.meow-row:after { clear:both; }
|
387 |
-
.meow-row { zoom:1; /* For IE 6/7 */ }
|
388 |
-
|
389 |
-
/* GRID OF THREE */
|
390 |
-
.meow-span_3_of_3 { width: 100%; }
|
391 |
-
.meow-span_2_of_3 { width: 66.1%; }
|
392 |
-
.meow-span_1_of_3 { width: 32.2%; }
|
393 |
-
|
394 |
-
/* GRID OF TWO */
|
395 |
-
.meow-span_2_of_2 { width: 100%; }
|
396 |
-
.meow-span_1_of_2 { width: 49.2%; }
|
397 |
-
|
398 |
-
@media only screen and (max-width: 480px) {
|
399 |
-
.meow-col { margin: 0 0 0px 0;}
|
400 |
-
.meow-span_3_of_3, .meow-span_2_of_3, .meow-span_1_of_3 { width: 100%; }
|
401 |
-
.meow-span_2_of_2, .meow-span_1_of_2 { width: 100%; }
|
402 |
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D0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
|
8 |
|
9 |
public static $loaded = false;
|
10 |
-
public static $admin_version = "2
|
11 |
|
12 |
public $prefix; // prefix used for actions, filters (mfrh)
|
13 |
public $mainfile; // plugin main file (media-file-renamer.php)
|
14 |
public $domain; // domain used for translation (media-file-renamer)
|
|
|
|
|
|
|
15 |
|
16 |
-
public function __construct( $prefix, $mainfile, $domain, $disableReview = false ) {
|
17 |
|
18 |
-
|
19 |
-
if ( !MeowApps_Admin::$loaded ) {
|
20 |
if ( is_admin() ) {
|
|
|
|
|
|
|
|
|
|
|
21 |
add_action( 'admin_menu', array( $this, 'admin_menu_start' ) );
|
22 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
23 |
-
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
|
24 |
-
add_action( 'wp_ajax_meow_perf_load', array( $this, 'wp_ajax_meow_perf_load' ) );
|
25 |
-
add_action( 'wp_ajax_meow_file_check', array( $this, 'wp_ajax_meow_file_check' ) );
|
26 |
if ( isset( $_GET['page'] ) && $_GET['page'] === 'meowapps-main-menu' ) {
|
27 |
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
|
28 |
}
|
29 |
}
|
30 |
-
|
31 |
}
|
32 |
|
33 |
// Variables for this plugin
|
34 |
$this->prefix = $prefix;
|
35 |
$this->mainfile = $mainfile;
|
36 |
$this->domain = $domain;
|
37 |
-
$this->
|
38 |
|
39 |
// If there is no mainfile, it's either a Pro only Plugin (with no Free version available) or a Theme.
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
add_action( 'admin_notices', array( $this, 'admin_notices_rating' ) );
|
51 |
-
}
|
52 |
-
}
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
add_filter( 'edd_sl_api_request_verify_ssl', array( $this, 'request_verify_ssl' ), 10, 0 );
|
57 |
}
|
58 |
|
59 |
-
function
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
$
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
function request_verify_ssl() {
|
71 |
return get_option( 'force_sslverify', false );
|
72 |
}
|
73 |
|
74 |
-
function show_meowapps_create_rating_date() {
|
75 |
-
delete_option( 'meowapps_hide_meowapps' );
|
76 |
-
$this->create_rating_date();
|
77 |
-
}
|
78 |
-
|
79 |
-
function create_rating_date() {
|
80 |
-
$rating_date = get_option( $this->prefix . '_rating_date' );
|
81 |
-
if ( empty( $rating_date ) ) {
|
82 |
-
$two_months = strtotime( '+2 months' );
|
83 |
-
$six_months = strtotime( '+4 months' );
|
84 |
-
$rating_date = mt_rand( $two_months, $six_months );
|
85 |
-
update_option( $this->prefix . '_rating_date', $rating_date, false );
|
86 |
-
}
|
87 |
-
return $rating_date;
|
88 |
-
}
|
89 |
-
|
90 |
-
function admin_notices_rating() {
|
91 |
-
if ( isset( $_POST[$this->prefix . '_remind_me'] ) ) {
|
92 |
-
$two_weeks = strtotime( '+2 weeks' );
|
93 |
-
$six_weeks = strtotime( '+6 weeks' );
|
94 |
-
$future_date = mt_rand( $two_weeks, $six_weeks );
|
95 |
-
update_option( $this->prefix . '_rating_date', $future_date, false );
|
96 |
-
return;
|
97 |
-
}
|
98 |
-
else if ( isset( $_POST[$this->prefix . '_never_remind_me'] ) ) {
|
99 |
-
$twenty_years = strtotime( '+5 years' );
|
100 |
-
update_option( $this->prefix . '_rating_date', $twenty_years, false );
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
else if ( isset( $_POST[$this->prefix . '_did_it'] ) ) {
|
104 |
-
$twenty_years = strtotime( '+10 years' );
|
105 |
-
update_option( $this->prefix . '_rating_date', $twenty_years, false );
|
106 |
-
return;
|
107 |
-
}
|
108 |
-
$rating_date = get_option( $this->prefix . '_rating_date' );
|
109 |
-
echo '<div class="notice notice-success" data-rating-date="' . date( 'Y-m-d', $rating_date ) . '">';
|
110 |
-
echo '<p style="font-size: 100%;">';
|
111 |
-
printf(
|
112 |
-
// translators: %1$s is a plugin nicename, %2$s is a short url (slug)
|
113 |
-
__( 'You have been using <b>%1$s</b> for some time now. Thank you! Could you kindly share your opinion with me, along with, maybe, features you would like to see implemented? Then, please <a style="font-weight: bold; color: #b926ff;" target="_blank" href="https://wordpress.org/support/plugin/%2$s/reviews/?rate=5#new-post">write a little review</a>. That will also bring me joy and motivation, and I will get back to you :) <u>In the case you already have written a review</u>, please check again. Many reviews got removed from WordPress recently.', $this->domain ),
|
114 |
-
$this->nice_name_from_file( $this->mainfile ),
|
115 |
-
$this->nice_short_url_from_file( $this->mainfile )
|
116 |
-
);
|
117 |
-
echo '<p>
|
118 |
-
<form method="post" action="" style="float: right;">
|
119 |
-
<input type="hidden" name="' . $this->prefix . '_never_remind_me" value="true">
|
120 |
-
<input type="submit" name="submit" id="submit" class="button button-red" value="'
|
121 |
-
. __( 'Never remind me!', $this->domain ) . '">
|
122 |
-
</form>
|
123 |
-
<form method="post" action="" style="float: right; margin-right: 10px;">
|
124 |
-
<input type="hidden" name="' . $this->prefix . '_remind_me" value="true">
|
125 |
-
<input type="submit" name="submit" id="submit" class="button button-primary" value="'
|
126 |
-
. __( 'Remind me in a few weeks...', $this->domain ) . '">
|
127 |
-
</form>
|
128 |
-
<form method="post" action="" style="float: right; margin-right: 10px;">
|
129 |
-
<input type="hidden" name="' . $this->prefix . '_did_it" value="true">
|
130 |
-
<input type="submit" name="submit" id="submit" class="button button-primary" value="'
|
131 |
-
. __( 'Yes, I did it!', $this->domain ) . '">
|
132 |
-
</form>
|
133 |
-
<div style="clear: both;"></div>
|
134 |
-
</p>
|
135 |
-
';
|
136 |
-
echo '</div>';
|
137 |
-
}
|
138 |
-
|
139 |
-
function nice_short_url_from_file( $file ) {
|
140 |
-
$info = pathinfo( $file );
|
141 |
-
if ( !empty( $info ) ) {
|
142 |
-
$info['filename'] = str_replace( '-pro', '', $info['filename'] );
|
143 |
-
return $info['filename'];
|
144 |
-
}
|
145 |
-
return "";
|
146 |
-
}
|
147 |
-
|
148 |
function nice_name_from_file( $file ) {
|
149 |
$info = pathinfo( $file );
|
150 |
if ( !empty( $info ) ) {
|
@@ -163,9 +97,8 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
163 |
delete_option( $this->prefix . '_license' );
|
164 |
return;
|
165 |
}
|
166 |
-
echo '<div class="error">';
|
167 |
printf(
|
168 |
-
// translators: %s is a plugin nicename
|
169 |
__( '<p>It looks like you are using the free version of the plugin (<b>%s</b>) but a license for the Pro version was also found. The Pro version might have been replaced by the Free version during an update (might be caused by a temporarily issue). If it is the case, <b>please download it again</b> from the <a target="_blank" href="https://store.meowapps.com">Meow Store</a>. If you wish to continue using the free version and clear this message, click on this button.', $this->domain ),
|
170 |
$this->nice_name_from_file( $this->mainfile ) );
|
171 |
echo '<p>
|
@@ -179,103 +112,29 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
179 |
echo '</div>';
|
180 |
}
|
181 |
|
182 |
-
function display_ads() {
|
183 |
-
return !get_option( 'meowapps_hide_ads', false );
|
184 |
-
}
|
185 |
-
|
186 |
-
function display_title( $title = "Meow Apps",
|
187 |
-
$author = "By <a style='text-decoration: none;' href='https://meowapps.com' target='_blank'>Jordy Meow</a>" ) {
|
188 |
-
if ( !empty( $this->prefix ) && $title !== "Meow Apps" )
|
189 |
-
$title = apply_filters( $this->prefix . '_plugin_title', $title );
|
190 |
-
if ( $this->display_ads() ) {
|
191 |
-
}
|
192 |
-
?>
|
193 |
-
<h1 style="line-height: 16px;">
|
194 |
-
<img width="42" style="margin-right: 10px; float: left; position: relative; top: -5px;"
|
195 |
-
src="<?php echo MeowApps_Admin::$logo ?>"><?php echo $title; ?><br />
|
196 |
-
<span style="font-size: 12px"><?php echo $author; ?></span>
|
197 |
-
</h1>
|
198 |
-
<div style="clear: both;"></div>
|
199 |
-
<?php
|
200 |
-
}
|
201 |
-
|
202 |
-
function admin_enqueue_scripts() {
|
203 |
-
wp_register_style( 'meowapps-core-css', $this->common_url( 'admin.css' ) );
|
204 |
-
wp_enqueue_style( 'meowapps-core-css' );
|
205 |
-
}
|
206 |
-
|
207 |
function admin_menu_start() {
|
|
|
208 |
if ( get_option( 'meowapps_hide_meowapps', false ) ) {
|
209 |
register_setting( 'general', 'meowapps_hide_meowapps' );
|
210 |
add_settings_field( 'meowapps_hide_ads', 'Meow Apps Menu', array( $this, 'meowapps_hide_dashboard_callback' ), 'general' );
|
211 |
return;
|
212 |
}
|
213 |
|
214 |
-
//
|
215 |
global $submenu;
|
216 |
if ( !isset( $submenu[ 'meowapps-main-menu' ] ) ) {
|
217 |
-
add_menu_page( 'Meow Apps', '<img alt="Meow Apps" style="width: 24px; margin-left: -30px; position: absolute; margin-top: -3px;" src="' .
|
218 |
array( $this, 'admin_meow_apps' ), '', 82 );
|
219 |
add_submenu_page( 'meowapps-main-menu', __( 'Dashboard', $this->domain ),
|
220 |
__( 'Dashboard', $this->domain ), 'manage_options',
|
221 |
'meowapps-main-menu', array( $this, 'admin_meow_apps' ) );
|
222 |
}
|
223 |
-
|
224 |
-
add_settings_section( 'meowapps_common_settings', null, null, 'meowapps_common_settings-menu' );
|
225 |
-
add_settings_field( 'meowapps_hide_meowapps', __( 'Main Menu', $this->domain ),
|
226 |
-
array( $this, 'meowapps_hide_dashboard_callback' ),
|
227 |
-
'meowapps_common_settings-menu', 'meowapps_common_settings' );
|
228 |
-
add_settings_field( 'meowapps_force_sslverify', __( 'SSL Verify', $this->domain ),
|
229 |
-
array( $this, 'meowapps_force_sslverify_callback' ),
|
230 |
-
'meowapps_common_settings-menu', 'meowapps_common_settings' );
|
231 |
-
// add_settings_field( 'meowapps_hide_ads', __( 'Ads', $this->domain ),
|
232 |
-
// array( $this, 'meowapps_hide_ads_callback' ),
|
233 |
-
// 'meowapps_common_settings-menu', 'meowapps_common_settings' );
|
234 |
-
register_setting( 'meowapps_common_settings', 'force_sslverify' );
|
235 |
-
register_setting( 'meowapps_common_settings', 'meowapps_hide_meowapps' );
|
236 |
-
register_setting( 'meowapps_common_settings', 'meowapps_hide_ads' );
|
237 |
-
}
|
238 |
-
|
239 |
-
function meowapps_hide_ads_callback() {
|
240 |
-
$value = get_option( 'meowapps_hide_ads', null );
|
241 |
-
$html = '<input type="checkbox" id="meowapps_hide_ads" name="meowapps_hide_ads" value="1" ' .
|
242 |
-
checked( 1, get_option( 'meowapps_hide_ads' ), false ) . '/>';
|
243 |
-
$html .= __( '<label>Hide</label><br /><small>Doesn\'t display the ads.</small>', $this->domain );
|
244 |
-
echo $html;
|
245 |
}
|
246 |
|
247 |
function meowapps_hide_dashboard_callback() {
|
248 |
-
$value = get_option( 'meowapps_hide_meowapps', null );
|
249 |
$html = '<input type="checkbox" id="meowapps_hide_meowapps" name="meowapps_hide_meowapps" value="1" ' .
|
250 |
checked( 1, get_option( 'meowapps_hide_meowapps' ), false ) . '/>';
|
251 |
$html .= __( '<label>Hide <b>Meow Apps</b> Menu</label><br /><small>Hide Meow Apps menu and all its components, for a cleaner admin. This option will be reset if a new Meow Apps plugin is installed. <b>Once activated, an option will be added in your General settings to display it again.</b></small>', $this->domain );
|
252 |
-
echo $html;
|
253 |
-
}
|
254 |
-
|
255 |
-
function meowapps_force_sslverify_callback() {
|
256 |
-
$value = get_option( 'force_sslverify', null );
|
257 |
-
$html = '<input type="checkbox" id="force_sslverify" name="force_sslverify" value="1" ' .
|
258 |
-
checked( 1, get_option( 'force_sslverify' ), false ) . '/>';
|
259 |
-
$html .= __( '<label>Force</label><br /><small>Updates and licenses checks are usually made without checking SSL certificates and it is actually fine this way. But if you are intransigent when it comes to SSL matters, this option will force it.</small>', $this->domain );
|
260 |
-
echo $html;
|
261 |
-
}
|
262 |
-
|
263 |
-
function display_serialkey_box( $url = "https://meowapps.com/" ) {
|
264 |
-
$html = '<div class="meow-box">';
|
265 |
-
$html .= '<h3 class="' . ( $this->is_registered( $this->prefix ) ? 'meow-bk-blue' : 'meow-bk-red' ) . '">'
|
266 |
-
. __( 'Pro Version', $this->domain ) . ' '
|
267 |
-
. ( $this->is_registered( $this->prefix ) ? __( '(enabled)', $this->domain ) : __( '(disabled)', $this->domain ) )
|
268 |
-
. '</h3>';
|
269 |
-
$html .= '<div class="inside">';
|
270 |
-
echo $html;
|
271 |
-
$html = apply_filters(
|
272 |
-
$this->prefix . '_meowapps_license_input',
|
273 |
-
sprintf(
|
274 |
-
// translators: %1$s is a url attribute, %2$s is a url visible for user
|
275 |
-
__( 'More information about the Pro version here: <a target="_blank" href="%1$s">%2$s</a>. If you actually bought the Pro version already, please remove the current plugin and download the Pro version from your account at the <a target="_blank" href="https://store.meowapps.com/account/downloads/">Meow Apps Store</a>.', $this->domain ), $url, $url ),
|
276 |
-
$url );
|
277 |
-
$html .= '</div>';
|
278 |
-
$html .= '</div>';
|
279 |
echo $html;
|
280 |
}
|
281 |
|
@@ -283,342 +142,86 @@ if ( !class_exists( 'MeowApps_Admin' ) ) {
|
|
283 |
return apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
|
284 |
}
|
285 |
|
286 |
-
function
|
287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
}
|
297 |
-
|
298 |
-
|
299 |
-
$plugin = $plugin . "-pro";
|
300 |
-
}
|
301 |
-
|
302 |
-
$plugin_file = $plugin . '/' . $plugin . '.php';
|
303 |
-
if ( is_plugin_active( $plugin_file ) ) {
|
304 |
-
if ( $plugin == 'wplr-sync' )
|
305 |
-
$pro = true;
|
306 |
-
if ( $pro )
|
307 |
-
return "<small><span style='float: right;'><span class='dashicons dashicons-heart' style='color: rgba(255, 63, 0, 1); font-size: 30px !important; margin-right: 10px;'></span></span></small>";
|
308 |
-
else
|
309 |
-
return "<small><span style='float: right;'><span class='dashicons dashicons-yes' style='color: #00b4ff; font-size: 30px !important; margin-right: 10px;'></span></span></small>";
|
310 |
}
|
311 |
else {
|
312 |
-
$
|
313 |
-
|
314 |
-
|
315 |
-
(
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
}
|
325 |
-
|
326 |
-
function meowapps_logo_url() {
|
327 |
-
return $this->common_url( 'img/meowapps.png' );
|
328 |
-
}
|
329 |
-
|
330 |
-
function plugins_loaded() {
|
331 |
-
if ( isset( $_GET[ 'tool' ] ) && $_GET[ 'tool' ] == 'error_log' ) {
|
332 |
-
$sec = "5";
|
333 |
-
header( "Refresh: $sec;" );
|
334 |
}
|
335 |
}
|
336 |
|
337 |
function admin_meow_apps() {
|
|
|
|
|
|
|
|
|
|
|
338 |
|
339 |
-
echo
|
340 |
-
|
341 |
-
|
342 |
-
echo '<div id="phpinfo">';
|
343 |
-
ob_start();
|
344 |
-
phpinfo();
|
345 |
-
$pinfo = ob_get_contents();
|
346 |
-
ob_end_clean();
|
347 |
-
$pinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $pinfo );
|
348 |
-
echo $pinfo;
|
349 |
-
echo "</div>";
|
350 |
-
}
|
351 |
-
else if ( isset( $_GET['tool'] ) && $_GET['tool'] == 'error_log' ) {
|
352 |
-
$log_msg = __( '=== MEOW APPS DEBUG (This is not an error) ===', $this->domain );
|
353 |
-
if ( isset( $_POST['write_logs'] ) ) {
|
354 |
-
error_log( $log_msg );
|
355 |
-
}
|
356 |
-
$errorpath = ini_get( 'error_log' );
|
357 |
-
echo "<a href=\"javascript:history.go(-1)\">< ". __( 'Go back', $this->domain ) . "</a><br /><br />";
|
358 |
-
echo '
|
359 |
-
<form method="post">
|
360 |
-
<input type="hidden" name="write_logs" value="true">
|
361 |
-
<input class="button button-primary" type="submit" value=" ' . __( 'Write in the Error Logs', $this->domain ) . '">
|
362 |
-
</form><br />';
|
363 |
-
echo '<div id="error_log">';
|
364 |
-
if ( file_exists( $errorpath ) ) {
|
365 |
-
printf(
|
366 |
-
// translators: %s is a preformatted timestamp
|
367 |
-
__( "Now (auto-reload every 5 seconds): [%s UTC]", $this->domain ),
|
368 |
-
date( "d-M-Y H:i:s", time() )
|
369 |
-
);
|
370 |
-
echo "<br /><br /><h2 style='margin: 0px;'>" . __( 'Errors (order by latest)', $this->domain ) . "</h2>";
|
371 |
-
$errors = file_get_contents( $errorpath );
|
372 |
-
$errors = explode( "\n", $errors );
|
373 |
-
$errors = array_reverse( $errors );
|
374 |
-
$errors = implode( "<br />", $errors );
|
375 |
-
echo $errors;
|
376 |
-
}
|
377 |
-
else {
|
378 |
-
_e( "The PHP Error Logs cannot be found. Please ask your hosting service for it.", $this->domain );
|
379 |
-
}
|
380 |
-
echo "</div>";
|
381 |
-
|
382 |
-
}
|
383 |
-
else {
|
384 |
-
|
385 |
-
?>
|
386 |
-
<?php $this->display_title( 'Meow Apps' ); ?>
|
387 |
-
<p>
|
388 |
-
<?php _e( 'Meow Apps is run by Jordy Meow, a photographer and software developer living in Japan (and taking <a target="_blank" href="http://offbeatjapan.org">a lot of photos</a>). Meow Apps is a suite of plugins focusing on photography, imaging, optimization and it teams up with the best players in the community (other themes and plugins developers). For more information, please check <a href="http://meowapps.com" target="_blank">Meow Apps</a>.', $this->domain )
|
389 |
-
?>
|
390 |
-
</p>
|
391 |
-
|
392 |
-
<h2 style="margin-bottom: 0px; margin-top: 25px;"><?php _e( 'Recommended Meow Apps Plugins', $this->domain ); ?></h2>
|
393 |
-
<div class="meow-row meow-featured-plugins">
|
394 |
-
<div class="meow-box meow-col meow-span_1_of_2">
|
395 |
-
<ul class="">
|
396 |
-
<li><img src='<?= $this->common_url( 'img/media-cleaner.jpg' ) ?>' />
|
397 |
-
<a href='https://meowapps.com/plugin/media-cleaner/'><b>Media Cleaner</b></a>
|
398 |
-
<?php echo $this->check_install( 'media-cleaner' ) ?><br />
|
399 |
-
<?php _e( 'Very complex plugin which analyzes your WordPress deeply to find out which files are in use, or not. Then you can trash them, before deleting them permanently.', $this->domain ); ?></li>
|
400 |
-
<li><img src='<?= $this->common_url( 'img/media-file-renamer.jpg' ) ?>' />
|
401 |
-
<a href='https://meowapps.com/plugin/media-file-renamer/'><b>Media File Renamer</b></a>
|
402 |
-
<?php echo $this->check_install( 'media-file-renamer' ) ?><br />
|
403 |
-
<?php _e( 'The Renamer will help you in getting nicer filenames, a better SEO and well-organized files. Extremely popular.', $this->domain ); ?></li>
|
404 |
-
<li><img src='<?= $this->common_url( 'img/default.png' ) ?>' />
|
405 |
-
<a href='https://meowapps.com/plugin/contact-form-block/'><b>Contact Form Block</b></a>
|
406 |
-
<?php echo $this->check_install( 'contact-form-block' ) ?><br />
|
407 |
-
<?php _e( 'A simpler, nicer, prettier contact form. If you simply want your visitors to get in touch with you, this very light plugin will make your life easier.', $this->domain ); ?></li>
|
408 |
-
<li><img src='<?= $this->common_url( 'img/default.png' ) ?>' />
|
409 |
-
<a href='https://meowapps.com/plugin/meow-analytics/'><b>Meow Analytics</b></a>
|
410 |
-
<?php echo $this->check_install( 'meow-analytics' ) ?><br />
|
411 |
-
<?php _e( 'Tired of those fat plugins which are messing-up with your install? Switch to Meow Analytics, it\'s extremely light and features a cute dashboard.', $this->domain ); ?></li>
|
412 |
-
</ul>
|
413 |
-
</div>
|
414 |
-
<div class="meow-box meow-col meow-span_1_of_2 ">
|
415 |
-
<ul class="">
|
416 |
-
<li><img src='<?= $this->common_url( 'img/meow-gallery.jpg' ) ?>' />
|
417 |
-
<a href='https://meowapps.com/plugin/meow-gallery/'><b>Meow Gallery</b></a>
|
418 |
-
<?php echo $this->check_install( 'meow-gallery' ) ?><br />
|
419 |
-
<?php _e( 'Beautiful but lightweight gallery with many layouts. The only one that allows you to uninstall it without losing anything.', $this->domain ); ?></li>
|
420 |
-
<li><img src='<?= $this->common_url( 'img/meow-lightbox.jpg' ) ?>' />
|
421 |
-
<a href='https://meowapps.com/plugin/meow-lightbox/'><b>Meow Lightbox</b></a>
|
422 |
-
<?php echo $this->check_install( 'meow-lightbox' ) ?><br />
|
423 |
-
<?php _e( 'A very smooth and fast Lightbox which will also display your EXIF data (camera, lens, etc). Try it, you will love it.', $this->domain ); ?></li>
|
424 |
-
<li><img src='<?= $this->common_url( 'img/wplr-sync.jpg' ) ?>' />
|
425 |
-
<a href='https://meowapps.com/plugin/wplr-sync/'><b>WP/LR Sync</b></a>
|
426 |
-
<?php echo $this->check_install( 'wplr-sync' ) ?><br />
|
427 |
-
<?php _e( 'Synchronize your Lightroom to your WordPress. This plugin is loved by a huge community of photographers.', $this->domain ); ?></li>
|
428 |
-
<li><img src='<?= $this->common_url( 'img/wp-retina-2x.jpg' ) ?>' />
|
429 |
-
<a href='https://meowapps.com/plugin/wp-retina-2x/'><b>WP Retina 2x</b></a>
|
430 |
-
<?php echo $this->check_install( 'wp-retina-2x' ) ?><br />
|
431 |
-
<?php _e( 'Here is the very famous plugin that adds Retina support to any website.', $this->domain ); ?></li>
|
432 |
-
</ul>
|
433 |
-
</div>
|
434 |
-
</div>
|
435 |
-
|
436 |
-
<h2><?php _e( 'WordPress Performance', $this->domain ); ?></h2>
|
437 |
-
<div style="background: white; padding: 5px 15px 5px 15px; box-shadow: 2px 2px 1px rgba(0,0,0,.02); margin-bottom: 15px;">
|
438 |
-
<p><?php _e( 'The <b>Empty Request Time</b> helps you analyzing the raw performance of your install by giving you the average time it takes to run an empty request to your server. You can try to disable some plugins (or change their options) then and click on Reset to see how it influences the results. With <b>File Operation Time</b>, you will find out if your server is slow with files. An excellent install would have an Empty Request Time of less than 500 ms. Keep it absolutely under 2,000 ms. File Operation Time should take only a few milliseconds more than the Empty Request Time. For more information about this, <a href="https://meowapps.com/clean-optimize-wordpress/#Optimize_your_Empty_Request_Time" target="_blank">click here</a>.', $this->domain ); ?></p>
|
439 |
-
</div>
|
440 |
-
|
441 |
-
<div>
|
442 |
-
|
443 |
-
<div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
|
444 |
-
<div style='font-size: 14px; line-height: 14px; margin-bottom: 20px;'><?php _e( 'Empty Request Time', $this->domain ); ?></div>
|
445 |
-
<div style='font-size: 32px; line-height: 32px; margin-bottom: 10px;' id='meow-perf-load-average'><?php _e( 'N/A', $this->domain ); ?></div>
|
446 |
-
<div style='font-size: 12px; line-height: 12px; margin-bottom: 20px;'><?php _e( 'Based on', $this->domain ); ?>
|
447 |
-
<span id='meow-perf-load-count'>0</span> <?php _e( 'request(s)', $this->domain ); ?>
|
448 |
-
</div>
|
449 |
-
<input type='submit' style='text-align: center; width: 100%;' id="meow-perf-reset" value="Reset" class="button button-primary">
|
450 |
-
</div>
|
451 |
-
|
452 |
-
<div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
|
453 |
-
<div style='font-size: 14px; line-height: 14px; margin-bottom: 20px;'><?php _e( 'File Operation Time', $this->domain ); ?></div>
|
454 |
-
<div style='font-size: 32px; line-height: 32px; margin-bottom: 10px;' id='meow-file-check-time'><?php _e( 'N/A', $this->domain ); ?></div>
|
455 |
-
<div style='font-size: 12px; line-height: 12px; margin-bottom: 20px;'><?php _e( 'Create temporary file and delete it.', $this->domain ); ?></div>
|
456 |
-
<input type='submit' style='text-align: center; width: 100%;' id="meow-file-check-start" value="<?php _e( 'Check', $this->domain ); ?>" class="button button-primary">
|
457 |
-
</div>
|
458 |
-
|
459 |
-
<div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
|
460 |
-
<a target='_blank' href='https://kinsta.com/?kaid=MFROFDOOINML'>
|
461 |
-
<img style='height: 116px;' src='<?= $this->common_url( 'img/kinsta.png' ) ?>'>
|
462 |
-
<div>Meow's 2020 Favorite Hosting</div>
|
463 |
-
</a>
|
464 |
-
</div>
|
465 |
-
|
466 |
-
<div style="float: left; margin-right: 10px; text-align: center; padding: 10px; background: white; width: 200px; border: 1px solid #e2e2e2;">
|
467 |
-
<a target='_blank' href='https://tracking.maxcdn.com/rPK13'>
|
468 |
-
<img style='height: 116px;' src='<?= $this->common_url( 'img/stackpath.png' ) ?>'>
|
469 |
-
<div>Meow's 2020 Favorite CDN</div>
|
470 |
-
</a>
|
471 |
-
</div>
|
472 |
-
|
473 |
-
<div style="clear: both;"></div>
|
474 |
-
|
475 |
-
</div>
|
476 |
-
|
477 |
-
<script>
|
478 |
-
(function ($) {
|
479 |
-
var calls = 0;
|
480 |
-
var times = [];
|
481 |
-
|
482 |
-
$('#meow-perf-reset').on('click', function () {
|
483 |
-
calls = 0;
|
484 |
-
times = [];
|
485 |
-
$('#meow-perf-load-average').text('<?php _e( "N/A", $this->domain ); ?>');
|
486 |
-
$('#meow-perf-load-count').text('0');
|
487 |
-
});
|
488 |
-
|
489 |
-
function perfLoad() {
|
490 |
-
var start = new Date().getTime();
|
491 |
-
$.ajax(ajaxurl, {
|
492 |
-
method: 'post',
|
493 |
-
dataType: 'json',
|
494 |
-
data: {
|
495 |
-
action: 'meow_perf_load',
|
496 |
-
}
|
497 |
-
}).done(function (response) {
|
498 |
-
var end = new Date().getTime();
|
499 |
-
var time = end - start;
|
500 |
-
calls++;
|
501 |
-
times.push(time);
|
502 |
-
var sum = times.reduce(function(a, b) { return a + b; });
|
503 |
-
var avg = Math.ceil(sum / times.length);
|
504 |
-
$('#meow-perf-load-average').text(avg + ' <?php _e( "ms", $this->domain ); ?>');
|
505 |
-
$('#meow-perf-load-count').text(calls);
|
506 |
-
setTimeout(perfLoad, 5000);
|
507 |
-
});
|
508 |
-
};
|
509 |
-
|
510 |
-
function perfFile() {
|
511 |
-
var start = new Date().getTime();
|
512 |
-
$.ajax(ajaxurl, {
|
513 |
-
method: 'post',
|
514 |
-
dataType: 'json',
|
515 |
-
data: {
|
516 |
-
action: 'meow_file_check',
|
517 |
-
}
|
518 |
-
}).done(function (response) {
|
519 |
-
var end = new Date().getTime();
|
520 |
-
var time = end - start;
|
521 |
-
$('#meow-file-check-time').text(time + ' <?php _e( "ms", $this->domain ); ?>');
|
522 |
-
$('#meow-file-check-start').text('<?php _e( "Check", $this->domain ); ?>');
|
523 |
-
});
|
524 |
-
};
|
525 |
-
|
526 |
-
$('#meow-file-check-start').on('click', function () {
|
527 |
-
$('#meow-file-check-start').text('...');
|
528 |
-
perfFile();
|
529 |
-
});
|
530 |
-
|
531 |
-
setTimeout(perfLoad, 1500);
|
532 |
-
|
533 |
-
})(jQuery);
|
534 |
-
</script>
|
535 |
-
|
536 |
-
<h2><?php _e( 'WordPress Recommendations', $this->domain ); ?></h2>
|
537 |
-
<div style="background: white; padding: 5px 15px 5px 15px; box-shadow: 2px 2px 1px rgba(0,0,0,.02); margin-top: 15px;">
|
538 |
-
<p>
|
539 |
-
<?php _e( 'Too many WordPress installs are blown-up with useless and/or huge plugins, and bad practices. But that is because most users are overwhelmed by the diversity and immensity of the WordPress jungle. One rule of thumb is to keep your install the simplest as possible, with the least number of plugins (avoiding heavy ones too) and a good hosting service (avoid VPS except if you know exactly what you are doing). Articles are kept being updated on the Meow Apps website, with all the latest recommendations: ', $this->domain )?>
|
540 |
-
<a href='https://meowapps.com/debugging-wordpress/' target='_blank'>
|
541 |
-
How To Debug</a>,
|
542 |
-
<a href='https://meowapps.com/seo-optimization/' target='_blank'>
|
543 |
-
SEO Checklist & Optimization</a>,
|
544 |
-
<a href='https://meowapps.com/clean-optimize-wordpress/' target='_blank'>
|
545 |
-
Clean Up and Optimize</a>,
|
546 |
-
<a href='https://meowapps.com/optimize-images-cdn/' target='_blank'>
|
547 |
-
Optimize Images</a>,
|
548 |
-
<a href='https://meowapps.com/best-hosting-services-wordpress/' target='_blank'>
|
549 |
-
Best Hosting Services</a>.
|
550 |
-
</p>
|
551 |
-
</div>
|
552 |
-
|
553 |
-
<h2 style="margin-bottom: 0px; margin-top: 25px;"><?php _e( 'Common Options & Tools', $this->domain ); ?></h2>
|
554 |
-
<div class="meow-row">
|
555 |
-
<div class="meow-box meow-col meow-span_2_of_3">
|
556 |
-
<h3><span class="dashicons dashicons-admin-tools"></span> <?php _e( 'Common', $this->domain ); ?></h3>
|
557 |
-
<div class="inside">
|
558 |
-
<form method="post" action="options.php">
|
559 |
-
<?php settings_fields( 'meowapps_common_settings' ); ?>
|
560 |
-
<?php do_settings_sections( 'meowapps_common_settings-menu' ); ?>
|
561 |
-
<?php submit_button(); ?>
|
562 |
-
</form>
|
563 |
-
</div>
|
564 |
-
</div>
|
565 |
-
|
566 |
-
<div class="meow-box meow-col meow-span_1_of_3">
|
567 |
-
<h3><span class="dashicons dashicons-admin-tools"></span> <?php _e( 'Debug', $this->domain ); ?></h3>
|
568 |
-
<div class="inside">
|
569 |
-
<ul>
|
570 |
-
<li><a href="?page=meowapps-main-menu&tool=error_log"><?php _e( 'Display Error Log', $this->domain ); ?></a></li>
|
571 |
-
<li><a href="?page=meowapps-main-menu&tool=phpinfo"><?php _e( 'Display PHP Info', $this->domain ); ?></a></li>
|
572 |
-
</ul>
|
573 |
-
</div>
|
574 |
-
</div>
|
575 |
-
|
576 |
-
<div class="meow-box meow-col meow-span_1_of_3">
|
577 |
-
<h3><span class="dashicons dashicons-admin-tools"></span> <?php _e( 'Post Types (used by this install)', $this->domain ); ?></h3>
|
578 |
-
<div class="inside">
|
579 |
-
<?php
|
580 |
-
global $wpdb;
|
581 |
-
// Maybe we could avoid to check more post_types.
|
582 |
-
// SELECT post_type, COUNT(*) FROM `wp_posts` GROUP BY post_type
|
583 |
-
$types = $wpdb->get_results( "SELECT post_type as 'type', COUNT(*) as 'count' FROM $wpdb->posts GROUP BY post_type" );
|
584 |
-
$result = array();
|
585 |
-
foreach( $types as $type )
|
586 |
-
array_push( $result, "{$type->type} ({$type->count})" );
|
587 |
-
echo implode( ', ', $result );
|
588 |
-
?>
|
589 |
-
</div>
|
590 |
-
</div>
|
591 |
-
</div>
|
592 |
-
|
593 |
-
<?php
|
594 |
-
}
|
595 |
}
|
596 |
|
597 |
function admin_footer_text( $current ) {
|
598 |
return sprintf(
|
599 |
// translators: %1$s is the version of the interface; %2$s is a file path.
|
600 |
__( 'Thanks for using <a href="https://meowapps.com">Meow Apps</a>! This is the Meow Admin %1$s <br /><i>Loaded from %2$s </i>', $this->domain ),
|
601 |
-
|
602 |
__FILE__
|
603 |
);
|
604 |
}
|
605 |
-
|
606 |
-
// HELPERS
|
607 |
-
|
608 |
-
static function size_shortname( $name ) {
|
609 |
-
$name = preg_split( '[_-]', $name );
|
610 |
-
$short = strtoupper( substr( $name[0], 0, 1 ) );
|
611 |
-
if ( count( $name ) > 1 )
|
612 |
-
$short .= strtoupper( substr( $name[1], 0, 1 ) );
|
613 |
-
return $short;
|
614 |
-
}
|
615 |
-
|
616 |
}
|
617 |
-
|
618 |
-
}
|
619 |
-
|
620 |
-
if ( file_exists( plugin_dir_path( __FILE__ ) . '/meowapps/admin.php' ) ) {
|
621 |
-
require( 'meowapps/admin.php' );
|
622 |
}
|
623 |
|
624 |
?>
|
1 |
<?php
|
2 |
|
3 |
+
if ( !class_exists( 'MeowCommon_Admin' ) ) {
|
4 |
|
5 |
+
class MeowCommon_Admin {
|
|
|
|
|
6 |
|
7 |
public static $loaded = false;
|
8 |
+
public static $admin_version = "3.2";
|
9 |
|
10 |
public $prefix; // prefix used for actions, filters (mfrh)
|
11 |
public $mainfile; // plugin main file (media-file-renamer.php)
|
12 |
public $domain; // domain used for translation (media-file-renamer)
|
13 |
+
public $isPro = false;
|
14 |
+
|
15 |
+
public static $logo = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB2aWV3Qm94PSIwIDAgMTY1IDE2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+Ci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4LTcgOGwtNy01YzQtMiA2LTUgOS04eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik02MyA4Mmw5IDUtNiA5LTEwLTZjNSAwIDYtNCA3LTh6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
|
16 |
|
17 |
+
public function __construct( $prefix, $mainfile, $domain, $isPro = false, $disableReview = false ) {
|
18 |
|
19 |
+
if ( !MeowCommon_Admin::$loaded ) {
|
|
|
20 |
if ( is_admin() ) {
|
21 |
+
|
22 |
+
// Check potential issues with this WordPress install, other plugins, etc.
|
23 |
+
new MeowCommon_Classes_Issues( $prefix, $mainfile, $domain );
|
24 |
+
|
25 |
+
// Create the Meow Apps Menu
|
26 |
add_action( 'admin_menu', array( $this, 'admin_menu_start' ) );
|
|
|
|
|
|
|
|
|
27 |
if ( isset( $_GET['page'] ) && $_GET['page'] === 'meowapps-main-menu' ) {
|
28 |
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
|
29 |
}
|
30 |
}
|
31 |
+
MeowCommon_Admin::$loaded = true;
|
32 |
}
|
33 |
|
34 |
// Variables for this plugin
|
35 |
$this->prefix = $prefix;
|
36 |
$this->mainfile = $mainfile;
|
37 |
$this->domain = $domain;
|
38 |
+
$this->isPro = $isPro;
|
39 |
|
40 |
// If there is no mainfile, it's either a Pro only Plugin (with no Free version available) or a Theme.
|
41 |
+
if ( is_admin() ) {
|
42 |
+
$license = get_option( $this->prefix . '_license', "" );
|
43 |
+
if ( !empty( $license ) && !$this->isPro ) {
|
44 |
+
add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
|
45 |
+
}
|
46 |
+
if ( !$disableReview ) {
|
47 |
+
new MeowCommon_Classes_Ratings( $prefix, $mainfile, $domain );
|
48 |
+
}
|
49 |
+
}
|
50 |
+
add_filter( 'plugin_row_meta', array( $this, 'custom_plugin_row_meta' ), 10, 2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
add_filter( 'edd_sl_api_request_verify_ssl', array( $this, 'request_verify_ssl' ), 10, 0 );
|
52 |
}
|
53 |
|
54 |
+
function custom_plugin_row_meta( $links, $file ) {
|
55 |
+
$path = pathinfo( $file );
|
56 |
+
$pathName = basename( $path['dirname'] );
|
57 |
+
$thisPath = pathinfo( $this->mainfile );
|
58 |
+
$thisPathName = basename( $thisPath['dirname'] );
|
59 |
+
$isActive = is_plugin_active( $file );
|
60 |
+
if ( !$isActive ) {
|
61 |
+
return $links;
|
62 |
+
}
|
63 |
+
$isIssue = $this->isPro && !$this->is_registered();
|
64 |
+
if ( strpos( $pathName, $thisPathName ) !== false ) {
|
65 |
+
$new_links = array(
|
66 |
+
'settings' =>
|
67 |
+
sprintf( __( '<a href="admin.php?page=%s_settings">Settings</a>', $this->domain ), $this->prefix ),
|
68 |
+
'license' =>
|
69 |
+
$this->is_registered() ?
|
70 |
+
('<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>') :
|
71 |
+
( $isIssue ? (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') : (sprintf( '<span>' . __( '<a target="_blank" href="https://store.meowapps.com">Get the <u>Pro Version</u></a>', $this->domain ), $this->prefix ) . '</span>') ),
|
72 |
+
);
|
73 |
+
$links = array_merge( $new_links, $links );
|
74 |
+
}
|
75 |
+
return $links;
|
76 |
}
|
77 |
|
78 |
function request_verify_ssl() {
|
79 |
return get_option( 'force_sslverify', false );
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
function nice_name_from_file( $file ) {
|
83 |
$info = pathinfo( $file );
|
84 |
if ( !empty( $info ) ) {
|
97 |
delete_option( $this->prefix . '_license' );
|
98 |
return;
|
99 |
}
|
100 |
+
echo '<div class="notice notice-error">';
|
101 |
printf(
|
|
|
102 |
__( '<p>It looks like you are using the free version of the plugin (<b>%s</b>) but a license for the Pro version was also found. The Pro version might have been replaced by the Free version during an update (might be caused by a temporarily issue). If it is the case, <b>please download it again</b> from the <a target="_blank" href="https://store.meowapps.com">Meow Store</a>. If you wish to continue using the free version and clear this message, click on this button.', $this->domain ),
|
103 |
$this->nice_name_from_file( $this->mainfile ) );
|
104 |
echo '<p>
|
112 |
echo '</div>';
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
function admin_menu_start() {
|
116 |
+
// Hide the admin if user doesn't like Meow much
|
117 |
if ( get_option( 'meowapps_hide_meowapps', false ) ) {
|
118 |
register_setting( 'general', 'meowapps_hide_meowapps' );
|
119 |
add_settings_field( 'meowapps_hide_ads', 'Meow Apps Menu', array( $this, 'meowapps_hide_dashboard_callback' ), 'general' );
|
120 |
return;
|
121 |
}
|
122 |
|
123 |
+
// Create standard menu if it does not already exist
|
124 |
global $submenu;
|
125 |
if ( !isset( $submenu[ 'meowapps-main-menu' ] ) ) {
|
126 |
+
add_menu_page( 'Meow Apps', '<img alt="Meow Apps" style="width: 24px; margin-left: -30px; position: absolute; margin-top: -3px;" src="' . MeowCommon_Admin::$logo . '" />Meow Apps', 'manage_options', 'meowapps-main-menu',
|
127 |
array( $this, 'admin_meow_apps' ), '', 82 );
|
128 |
add_submenu_page( 'meowapps-main-menu', __( 'Dashboard', $this->domain ),
|
129 |
__( 'Dashboard', $this->domain ), 'manage_options',
|
130 |
'meowapps-main-menu', array( $this, 'admin_meow_apps' ) );
|
131 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
133 |
|
134 |
function meowapps_hide_dashboard_callback() {
|
|
|
135 |
$html = '<input type="checkbox" id="meowapps_hide_meowapps" name="meowapps_hide_meowapps" value="1" ' .
|
136 |
checked( 1, get_option( 'meowapps_hide_meowapps' ), false ) . '/>';
|
137 |
$html .= __( '<label>Hide <b>Meow Apps</b> Menu</label><br /><small>Hide Meow Apps menu and all its components, for a cleaner admin. This option will be reset if a new Meow Apps plugin is installed. <b>Once activated, an option will be added in your General settings to display it again.</b></small>', $this->domain );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
echo $html;
|
139 |
}
|
140 |
|
142 |
return apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
|
143 |
}
|
144 |
|
145 |
+
function get_phpinfo() {
|
146 |
+
ob_start();
|
147 |
+
phpinfo( INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES );
|
148 |
+
$html = ob_get_contents();
|
149 |
+
ob_end_clean();
|
150 |
+
$html = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $html );
|
151 |
+
echo $html;
|
152 |
+
}
|
153 |
|
154 |
+
function get_phperrorlogs() {
|
155 |
+
$errorpath = ini_get( 'error_log' );
|
156 |
+
$output_lines = array();
|
157 |
+
if ( !empty( $errorpath ) && file_exists( $errorpath ) ) {
|
158 |
+
try {
|
159 |
+
$file = new SplFileObject( $errorpath, 'r' );
|
160 |
+
$file->seek( PHP_INT_MAX );
|
161 |
+
$last_line = $file->key();
|
162 |
+
$iterator = new LimitIterator( $file, $last_line > 500 ? $last_line - 500 : 0, $last_line );
|
163 |
+
$lines = iterator_to_array( $iterator );
|
164 |
+
foreach ( $lines as $line ) {
|
165 |
+
$newline = '';
|
166 |
+
if ( preg_match( '/PHP Fatal/', $line ) ) {
|
167 |
+
$newline = '<div class="fatal">' . $line . '</div>';
|
168 |
+
}
|
169 |
+
else if ( preg_match( '/PHP Warning/', $line ) ) {
|
170 |
+
$newline = '<div class="warning">' . $line . '</div>';
|
171 |
+
}
|
172 |
+
else if ( preg_match( '/PHP Notice/', $line ) ) {
|
173 |
+
$newline = '<div class="notice">' . $line . '</div>';
|
174 |
+
}
|
175 |
+
else {
|
176 |
+
continue;
|
177 |
+
}
|
178 |
+
array_push( $output_lines, $newline );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
catch ( OutOfBoundsException $e ) {
|
182 |
+
error_log( $e->getMessage() );
|
183 |
}
|
184 |
}
|
185 |
+
if ( empty( $output_lines ) ) {
|
186 |
+
return '<div class="fatal">Your PHP Error Logs is either empty, or (more likely is not accessible through PHP. You should contact your hosting service and ask them how to get it.</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
else {
|
189 |
+
$output_lines = array_reverse( $output_lines );
|
190 |
+
$html = '';
|
191 |
+
$previous = '';
|
192 |
+
foreach ( $output_lines as $line ) {
|
193 |
+
// Let's avoid similar errors, since it's not useful. We should also make this better
|
194 |
+
// and not only theck this depending on tie.
|
195 |
+
if ( preg_replace( '/\[.*\] PHP/', '', $previous ) !== preg_replace( '/\[.*\] PHP/', '', $line ) ) {
|
196 |
+
$html .= $line;
|
197 |
+
$previous = $line;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
return $html;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
}
|
203 |
|
204 |
function admin_meow_apps() {
|
205 |
+
echo "<div id='meow-common-dashboard'></div>";
|
206 |
+
|
207 |
+
echo "<div style='display: none;' id='meow-common-phperrorlogs'>";
|
208 |
+
echo $this->get_phperrorlogs();
|
209 |
+
echo "</div>";
|
210 |
|
211 |
+
echo "<div style='display: none;' id='meow-common-phpinfo'>";
|
212 |
+
echo $this->get_phpinfo();
|
213 |
+
echo "</div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
|
216 |
function admin_footer_text( $current ) {
|
217 |
return sprintf(
|
218 |
// translators: %1$s is the version of the interface; %2$s is a file path.
|
219 |
__( 'Thanks for using <a href="https://meowapps.com">Meow Apps</a>! This is the Meow Admin %1$s <br /><i>Loaded from %2$s </i>', $this->domain ),
|
220 |
+
MeowCommon_Admin::$admin_version,
|
221 |
__FILE__
|
222 |
);
|
223 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
226 |
|
227 |
?>
|
common/classes/issues.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !class_exists( 'MeowCommon_Classes_Issues' ) ) {
|
4 |
+
|
5 |
+
class MeowCommon_Classes_Issues {
|
6 |
+
|
7 |
+
public function __construct( $prefix, $mainfile, $domain ) {
|
8 |
+
$this->check_plugins();
|
9 |
+
}
|
10 |
+
|
11 |
+
function check_plugins() {
|
12 |
+
if ( class_exists( 'LiteSpeed\Core' ) ) {
|
13 |
+
$this->check_litespeed();
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
function check_litespeed() {
|
18 |
+
// By default, the REST API is cached by Litespeed. Why is that?
|
19 |
+
// It is absolutely not a good idea, especially on the admin side.
|
20 |
+
$cache_rest = get_option( 'litespeed.conf.cache-rest' );
|
21 |
+
if ( $cache_rest ) {
|
22 |
+
update_option( 'litespeed.conf.cache-rest', 0 );
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
?>
|
common/classes/ratings.php
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !class_exists( 'MeowCommon_Classes_Ratings' ) ) {
|
4 |
+
|
5 |
+
class MeowCommon_Classes_Ratings {
|
6 |
+
|
7 |
+
public $mainfile; // plugin main file (media-file-renamer.php)
|
8 |
+
public $domain; // domain used for translation (media-file-renamer)
|
9 |
+
public $prefix; // used for many things (filters, options, etc)
|
10 |
+
|
11 |
+
public function __construct( $prefix, $mainfile, $domain ) {
|
12 |
+
$this->mainfile = $mainfile;
|
13 |
+
$this->domain = $domain;
|
14 |
+
$this->prefix = $prefix;
|
15 |
+
|
16 |
+
register_activation_hook( $mainfile, array( $this, 'show_meowapps_create_rating_date' ) );
|
17 |
+
|
18 |
+
if ( is_admin() ) {
|
19 |
+
$rating_date = $this->create_rating_date();
|
20 |
+
if ( time() > $rating_date ) {
|
21 |
+
add_action( 'admin_notices', array( $this, 'admin_notices_rating' ) );
|
22 |
+
}
|
23 |
+
}
|
24 |
+
}
|
25 |
+
|
26 |
+
function show_meowapps_create_rating_date() {
|
27 |
+
delete_option( 'meowapps_hide_meowapps' );
|
28 |
+
$this->create_rating_date();
|
29 |
+
}
|
30 |
+
|
31 |
+
function create_rating_date() {
|
32 |
+
$rating_date = get_option( $this->prefix . '_rating_date' );
|
33 |
+
if ( empty( $rating_date ) ) {
|
34 |
+
$two_months = strtotime( '+2 months' );
|
35 |
+
$six_months = strtotime( '+4 months' );
|
36 |
+
$rating_date = mt_rand( $two_months, $six_months );
|
37 |
+
update_option( $this->prefix . '_rating_date', $rating_date, false );
|
38 |
+
}
|
39 |
+
return $rating_date;
|
40 |
+
}
|
41 |
+
|
42 |
+
function admin_notices_rating() {
|
43 |
+
if ( isset( $_POST[$this->prefix . '_remind_me'] ) ) {
|
44 |
+
$two_weeks = strtotime( '+2 weeks' );
|
45 |
+
$six_weeks = strtotime( '+6 weeks' );
|
46 |
+
$future_date = mt_rand( $two_weeks, $six_weeks );
|
47 |
+
update_option( $this->prefix . '_rating_date', $future_date, false );
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
else if ( isset( $_POST[$this->prefix . '_never_remind_me'] ) ) {
|
51 |
+
$twenty_years = strtotime( '+5 years' );
|
52 |
+
update_option( $this->prefix . '_rating_date', $twenty_years, false );
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
else if ( isset( $_POST[$this->prefix . '_did_it'] ) ) {
|
56 |
+
$twenty_years = strtotime( '+10 years' );
|
57 |
+
update_option( $this->prefix . '_rating_date', $twenty_years, false );
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
$rating_date = get_option( $this->prefix . '_rating_date' );
|
61 |
+
echo '<div class="notice notice-success" data-rating-date="' . date( 'Y-m-d', $rating_date ) . '">';
|
62 |
+
echo '<p style="font-size: 100%;">';
|
63 |
+
printf(
|
64 |
+
// translators: %1$s is a plugin nicename, %2$s is a short url (slug)
|
65 |
+
__( 'You have been using <b>%1$s</b> for some time now. Thank you! Could you kindly share your opinion with me, along with, maybe, features you would like to see implemented? Then, please <a style="font-weight: bold; color: #b926ff;" target="_blank" href="https://wordpress.org/support/plugin/%2$s/reviews/?rate=5#new-post">write a little review</a>. That will also bring me joy and motivation! I will get back to you :)', $this->domain ),
|
66 |
+
$this->nice_name_from_file( $this->mainfile ),
|
67 |
+
$this->nice_short_url_from_file( $this->mainfile )
|
68 |
+
);
|
69 |
+
echo '<p>
|
70 |
+
<form method="post" action="" style="float: right;">
|
71 |
+
<input type="hidden" name="' . $this->prefix . '_never_remind_me" value="true">
|
72 |
+
<input type="submit" name="submit" id="submit" class="button button-red" value="'
|
73 |
+
. __( 'Never remind me!', $this->domain ) . '">
|
74 |
+
</form>
|
75 |
+
<form method="post" action="" style="float: right; margin-right: 10px;">
|
76 |
+
<input type="hidden" name="' . $this->prefix . '_remind_me" value="true">
|
77 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="'
|
78 |
+
. __( 'Remind me in a few weeks...', $this->domain ) . '">
|
79 |
+
</form>
|
80 |
+
<form method="post" action="" style="float: right; margin-right: 10px;">
|
81 |
+
<input type="hidden" name="' . $this->prefix . '_did_it" value="true">
|
82 |
+
<input type="submit" name="submit" id="submit" class="button button-primary" value="'
|
83 |
+
. __( 'Yes, I did it!', $this->domain ) . '">
|
84 |
+
</form>
|
85 |
+
<div style="clear: both;"></div>
|
86 |
+
</p>
|
87 |
+
';
|
88 |
+
echo '</div>';
|
89 |
+
}
|
90 |
+
|
91 |
+
function nice_short_url_from_file( $file ) {
|
92 |
+
$info = pathinfo( $file );
|
93 |
+
if ( !empty( $info ) ) {
|
94 |
+
$info['filename'] = str_replace( '-pro', '', $info['filename'] );
|
95 |
+
return $info['filename'];
|
96 |
+
}
|
97 |
+
return "";
|
98 |
+
}
|
99 |
+
|
100 |
+
function nice_name_from_file( $file ) {
|
101 |
+
$info = pathinfo( $file );
|
102 |
+
if ( !empty( $info ) ) {
|
103 |
+
if ( $info['filename'] == 'wplr-sync' ) {
|
104 |
+
return "WP/LR Sync";
|
105 |
+
}
|
106 |
+
$info['filename'] = str_replace( '-', ' ', $info['filename'] );
|
107 |
+
$file = ucwords( $info['filename'] );
|
108 |
+
}
|
109 |
+
return $file;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
?>
|
common/classes/rest.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class MeowCommon_Classes_Rest
|
4 |
+
{
|
5 |
+
private $namespace = "meow-common/v1";
|
6 |
+
static public $instance = null;
|
7 |
+
|
8 |
+
static public function init_once() {
|
9 |
+
if ( !function_exists( 'wp_get_current_user' ) ) {
|
10 |
+
return;
|
11 |
+
}
|
12 |
+
if ( !current_user_can( 'administrator' ) ) {
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
if ( !MeowCommon_Classes_Rest::$instance ) {
|
16 |
+
MeowCommon_Classes_Rest::$instance = new self();
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
private function __construct() {
|
21 |
+
add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
function rest_api_init() {
|
25 |
+
register_rest_route( $this->namespace, '/empty_request/', [
|
26 |
+
'methods' => 'POST',
|
27 |
+
'callback' => [ $this, 'empty_request' ]
|
28 |
+
]);
|
29 |
+
register_rest_route( $this->namespace, '/file_operation/', [
|
30 |
+
'methods' => 'POST',
|
31 |
+
'callback' => [ $this, 'file_operation' ]
|
32 |
+
]);
|
33 |
+
register_rest_route( $this->namespace, '/sql_request/', [
|
34 |
+
'methods' => 'POST',
|
35 |
+
'callback' => [ $this, 'sql_request' ]
|
36 |
+
]);
|
37 |
+
register_rest_route( $this->namespace, '/all_settings/', [
|
38 |
+
'methods' => 'GET',
|
39 |
+
'callback' => [ $this, 'rest_all_settings' ]
|
40 |
+
]);
|
41 |
+
register_rest_route( $this->namespace, '/update_option/', [
|
42 |
+
'methods' => 'POST',
|
43 |
+
'callback' => [ $this, 'rest_update_option' ]
|
44 |
+
]);
|
45 |
+
}
|
46 |
+
|
47 |
+
function file_rand( $filesize ) {
|
48 |
+
$tmp_file = tmpfile();
|
49 |
+
fseek( $tmp_file, $filesize - 1, SEEK_CUR );
|
50 |
+
fwrite( $tmp_file, 'a');
|
51 |
+
fclose( $tmp_file );
|
52 |
+
}
|
53 |
+
|
54 |
+
function empty_request() {
|
55 |
+
return new WP_REST_Response( [ 'success' => true ], 200 );
|
56 |
+
}
|
57 |
+
|
58 |
+
function file_operation() {
|
59 |
+
$this->file_rand( 1024 * 10 );
|
60 |
+
return new WP_REST_Response( [ 'success' => true ], 200 );
|
61 |
+
}
|
62 |
+
|
63 |
+
function sql_request() {
|
64 |
+
global $wpdb;
|
65 |
+
$count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts}" );
|
66 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $count ], 200 );
|
67 |
+
}
|
68 |
+
|
69 |
+
function rest_all_settings() {
|
70 |
+
$settings = array(
|
71 |
+
'meowapps_hide_meowapps' => get_option( 'meowapps_hide_meowapps', false ),
|
72 |
+
'force_sslverify' => get_option( 'force_sslverify', false )
|
73 |
+
);
|
74 |
+
return new WP_REST_Response([ 'success' => true, 'data' => $settings ], 200 );
|
75 |
+
}
|
76 |
+
|
77 |
+
function rest_update_option( $request ) {
|
78 |
+
$params = $request->get_json_params();
|
79 |
+
try {
|
80 |
+
$result = update_option( $params['name'], $params['value'] );
|
81 |
+
return new WP_REST_Response([ 'success' => $result ], 200 );
|
82 |
+
}
|
83 |
+
catch (Exception $e) {
|
84 |
+
return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
?>
|
common/classes/rest_license.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class MeowCommon_Classes_Rest_License
|
4 |
+
{
|
5 |
+
private $licenser = null;
|
6 |
+
private $namespace = null;
|
7 |
+
|
8 |
+
public function __construct( &$licenser ) {
|
9 |
+
$this->licenser = $licenser;
|
10 |
+
$this->namespace = "meow-licenser/{$licenser->prefix}/v1";
|
11 |
+
if ( !current_user_can( 'administrator' ) ) {
|
12 |
+
return;
|
13 |
+
}
|
14 |
+
add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
|
15 |
+
}
|
16 |
+
|
17 |
+
function rest_api_init() {
|
18 |
+
register_rest_route( $this->namespace, '/get_license/', [
|
19 |
+
'methods' => 'POST',
|
20 |
+
'callback' => [ $this, 'get_license' ]
|
21 |
+
]);
|
22 |
+
register_rest_route( $this->namespace, '/set_license/', [
|
23 |
+
'methods' => 'POST',
|
24 |
+
'callback' => [ $this, 'set_license' ]
|
25 |
+
]);
|
26 |
+
}
|
27 |
+
|
28 |
+
function get_license() {
|
29 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $this->licenser->license ], 200 );
|
30 |
+
}
|
31 |
+
|
32 |
+
function set_license( $request ) {
|
33 |
+
$params = $request->get_json_params();
|
34 |
+
$serialKey = $params['serialKey'];
|
35 |
+
$this->licenser->validate_pro( $serialKey );
|
36 |
+
return new WP_REST_Response( [ 'success' => true, 'data' => $this->licenser->license ], 200 );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
?>
|
common/classes/updater.php
ADDED
@@ -0,0 +1,591 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Allows plugins to use their own update API.
|
8 |
+
*
|
9 |
+
* @author Easy Digital Downloads
|
10 |
+
* @version 1.6.18
|
11 |
+
*/
|
12 |
+
class MeowCommon_Classes_Updater {
|
13 |
+
|
14 |
+
private $api_url = '';
|
15 |
+
private $api_data = array();
|
16 |
+
private $name = '';
|
17 |
+
private $slug = '';
|
18 |
+
private $version = '';
|
19 |
+
private $wp_override = false;
|
20 |
+
private $cache_key = '';
|
21 |
+
|
22 |
+
private $health_check_timeout = 5;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Class constructor.
|
26 |
+
*
|
27 |
+
* @uses plugin_basename()
|
28 |
+
* @uses hook()
|
29 |
+
*
|
30 |
+
* @param string $_api_url The URL pointing to the custom API endpoint.
|
31 |
+
* @param string $_plugin_file Path to the plugin file.
|
32 |
+
* @param array $_api_data Optional data to send with API calls.
|
33 |
+
*/
|
34 |
+
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
35 |
+
|
36 |
+
global $edd_plugin_data;
|
37 |
+
|
38 |
+
$this->api_url = trailingslashit( $_api_url );
|
39 |
+
$this->api_data = $_api_data;
|
40 |
+
$this->name = plugin_basename( $_plugin_file );
|
41 |
+
$this->slug = basename( $_plugin_file, '.php' );
|
42 |
+
$this->version = $_api_data['version'];
|
43 |
+
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
44 |
+
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
45 |
+
$this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
46 |
+
|
47 |
+
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Fires after the $edd_plugin_data is setup.
|
51 |
+
*
|
52 |
+
* @since x.x.x
|
53 |
+
*
|
54 |
+
* @param array $edd_plugin_data Array of EDD SL plugin data.
|
55 |
+
*/
|
56 |
+
do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
|
57 |
+
|
58 |
+
// Set up hooks.
|
59 |
+
$this->init();
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Set up WordPress filters to hook into WP's update process.
|
65 |
+
*
|
66 |
+
* @uses add_filter()
|
67 |
+
*
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
+
public function init() {
|
71 |
+
|
72 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
73 |
+
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
74 |
+
remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
|
75 |
+
add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
|
76 |
+
add_action( 'admin_init', array( $this, 'show_changelog' ) );
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Check for Updates at the defined API endpoint and modify the update array.
|
82 |
+
*
|
83 |
+
* This function dives into the update API just when WordPress creates its update array,
|
84 |
+
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
85 |
+
* It is reassembled from parts of the native WordPress plugin update code.
|
86 |
+
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
87 |
+
*
|
88 |
+
* @uses api_request()
|
89 |
+
*
|
90 |
+
* @param array $_transient_data Update array build by WordPress.
|
91 |
+
* @return array Modified update array with custom plugin data.
|
92 |
+
*/
|
93 |
+
public function check_update( $_transient_data ) {
|
94 |
+
|
95 |
+
global $pagenow;
|
96 |
+
|
97 |
+
if ( ! is_object( $_transient_data ) ) {
|
98 |
+
$_transient_data = new stdClass;
|
99 |
+
}
|
100 |
+
|
101 |
+
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
102 |
+
return $_transient_data;
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
106 |
+
return $_transient_data;
|
107 |
+
}
|
108 |
+
|
109 |
+
$version_info = $this->get_cached_version_info();
|
110 |
+
|
111 |
+
if ( false === $version_info ) {
|
112 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
113 |
+
|
114 |
+
$this->set_version_info_cache( $version_info );
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
119 |
+
|
120 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
121 |
+
|
122 |
+
$_transient_data->response[ $this->name ] = $version_info;
|
123 |
+
|
124 |
+
// Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
|
125 |
+
$_transient_data->response[ $this->name ]->plugin = $this->name;
|
126 |
+
|
127 |
+
}
|
128 |
+
|
129 |
+
$_transient_data->last_checked = time();
|
130 |
+
$_transient_data->checked[ $this->name ] = $this->version;
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
return $_transient_data;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
|
139 |
+
*
|
140 |
+
* @param string $file
|
141 |
+
* @param array $plugin
|
142 |
+
*/
|
143 |
+
public function show_update_notification( $file, $plugin ) {
|
144 |
+
|
145 |
+
if ( is_network_admin() ) {
|
146 |
+
return;
|
147 |
+
}
|
148 |
+
|
149 |
+
if( ! current_user_can( 'update_plugins' ) ) {
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
if( ! is_multisite() ) {
|
154 |
+
return;
|
155 |
+
}
|
156 |
+
|
157 |
+
if ( $this->name != $file ) {
|
158 |
+
return;
|
159 |
+
}
|
160 |
+
|
161 |
+
// Remove our filter on the site transient
|
162 |
+
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
163 |
+
|
164 |
+
$update_cache = get_site_transient( 'update_plugins' );
|
165 |
+
|
166 |
+
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
167 |
+
|
168 |
+
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
169 |
+
|
170 |
+
$version_info = $this->get_cached_version_info();
|
171 |
+
|
172 |
+
if ( false === $version_info ) {
|
173 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
174 |
+
|
175 |
+
// Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
|
176 |
+
if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
|
177 |
+
$version_info->banners = $this->convert_object_to_array( $version_info->banners );
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( isset( $version_info->sections ) && ! is_array( $version_info->sections ) ) {
|
181 |
+
$version_info->sections = $this->convert_object_to_array( $version_info->sections );
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
|
185 |
+
$version_info->icons = $this->convert_object_to_array( $version_info->icons );
|
186 |
+
}
|
187 |
+
|
188 |
+
$this->set_version_info_cache( $version_info );
|
189 |
+
}
|
190 |
+
|
191 |
+
if ( ! is_object( $version_info ) ) {
|
192 |
+
return;
|
193 |
+
}
|
194 |
+
|
195 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
196 |
+
|
197 |
+
$update_cache->response[ $this->name ] = $version_info;
|
198 |
+
|
199 |
+
}
|
200 |
+
|
201 |
+
$update_cache->last_checked = time();
|
202 |
+
$update_cache->checked[ $this->name ] = $this->version;
|
203 |
+
|
204 |
+
set_site_transient( 'update_plugins', $update_cache );
|
205 |
+
|
206 |
+
} else {
|
207 |
+
|
208 |
+
$version_info = $update_cache->response[ $this->name ];
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
+
// Restore our filter
|
213 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
214 |
+
|
215 |
+
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
216 |
+
|
217 |
+
// build a plugin list row, with update notification
|
218 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
219 |
+
# <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
|
220 |
+
echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
|
221 |
+
echo '<td colspan="3" class="plugin-update colspanchange">';
|
222 |
+
echo '<div class="update-message notice inline notice-warning notice-alt">';
|
223 |
+
|
224 |
+
$changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
|
225 |
+
|
226 |
+
if ( empty( $version_info->download_link ) ) {
|
227 |
+
printf(
|
228 |
+
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'easy-digital-downloads' ),
|
229 |
+
esc_html( $version_info->name ),
|
230 |
+
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
231 |
+
esc_html( $version_info->new_version ),
|
232 |
+
'</a>'
|
233 |
+
);
|
234 |
+
} else {
|
235 |
+
printf(
|
236 |
+
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'easy-digital-downloads' ),
|
237 |
+
esc_html( $version_info->name ),
|
238 |
+
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
239 |
+
esc_html( $version_info->new_version ),
|
240 |
+
'</a>',
|
241 |
+
'<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
|
242 |
+
'</a>'
|
243 |
+
);
|
244 |
+
}
|
245 |
+
|
246 |
+
do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
|
247 |
+
|
248 |
+
echo '</div></td></tr>';
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Updates information on the "View version x.x details" page with custom data.
|
254 |
+
*
|
255 |
+
* @uses api_request()
|
256 |
+
*
|
257 |
+
* @param mixed $_data
|
258 |
+
* @param string $_action
|
259 |
+
* @param object $_args
|
260 |
+
* @return object $_data
|
261 |
+
*/
|
262 |
+
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
263 |
+
|
264 |
+
if ( $_action != 'plugin_information' ) {
|
265 |
+
|
266 |
+
return $_data;
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
|
271 |
+
|
272 |
+
return $_data;
|
273 |
+
|
274 |
+
}
|
275 |
+
|
276 |
+
$to_send = array(
|
277 |
+
'slug' => $this->slug,
|
278 |
+
'is_ssl' => is_ssl(),
|
279 |
+
'fields' => array(
|
280 |
+
'banners' => array(),
|
281 |
+
'reviews' => false,
|
282 |
+
'icons' => array(),
|
283 |
+
)
|
284 |
+
);
|
285 |
+
|
286 |
+
$cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
287 |
+
|
288 |
+
// Get the transient where we store the api request for this plugin for 24 hours
|
289 |
+
$edd_api_request_transient = $this->get_cached_version_info( $cache_key );
|
290 |
+
|
291 |
+
//If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
|
292 |
+
if ( empty( $edd_api_request_transient ) ) {
|
293 |
+
|
294 |
+
$api_response = $this->api_request( 'plugin_information', $to_send );
|
295 |
+
|
296 |
+
// Expires in 3 hours
|
297 |
+
$this->set_version_info_cache( $api_response, $cache_key );
|
298 |
+
|
299 |
+
if ( false !== $api_response ) {
|
300 |
+
$_data = $api_response;
|
301 |
+
}
|
302 |
+
|
303 |
+
} else {
|
304 |
+
$_data = $edd_api_request_transient;
|
305 |
+
}
|
306 |
+
|
307 |
+
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
308 |
+
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
309 |
+
$_data->sections = $this->convert_object_to_array( $_data->sections );
|
310 |
+
}
|
311 |
+
|
312 |
+
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
313 |
+
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
314 |
+
$_data->banners = $this->convert_object_to_array( $_data->banners );
|
315 |
+
}
|
316 |
+
|
317 |
+
// Convert icons into an associative array, since we're getting an object, but Core expects an array.
|
318 |
+
if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
|
319 |
+
$_data->icons = $this->convert_object_to_array( $_data->icons );
|
320 |
+
}
|
321 |
+
|
322 |
+
// Convert icons into an associative array, since we're getting an object, but Core expects an array.
|
323 |
+
if ( isset( $_data->contributors ) && ! is_array( $_data->contributors ) ) {
|
324 |
+
$_data->contributors = $this->convert_object_to_array( $_data->contributors );
|
325 |
+
foreach ( $_data->contributors as $key => $value ) {
|
326 |
+
$_data->contributors[$key] = $this->convert_object_to_array( $value );
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
// FOR DEBUG
|
331 |
+
// $fordebug = clone $_data;
|
332 |
+
// foreach ( $fordebug->sections as $key => $value ) {
|
333 |
+
// if ( strlen( $fordebug->sections[$key] ) > 200 )
|
334 |
+
// $fordebug->sections[$key] = '...';
|
335 |
+
// }
|
336 |
+
// $fordebug->description = '...';
|
337 |
+
// $fordebug->changelog = '...';
|
338 |
+
// var_dump( $fordebug, 1 );
|
339 |
+
// exit;
|
340 |
+
|
341 |
+
if ( !empty( $_data ) && !isset( $_data->plugin ) ) {
|
342 |
+
$_data->plugin = $this->name;
|
343 |
+
}
|
344 |
+
|
345 |
+
return $_data;
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Convert some objects to arrays when injecting data into the update API
|
350 |
+
*
|
351 |
+
* Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
|
352 |
+
* decoding, they are objects. This method allows us to pass in the object and return an associative array.
|
353 |
+
*
|
354 |
+
* @since 3.6.5
|
355 |
+
*
|
356 |
+
* @param stdClass $data
|
357 |
+
*
|
358 |
+
* @return array
|
359 |
+
*/
|
360 |
+
private function convert_object_to_array( $data ) {
|
361 |
+
$new_data = array();
|
362 |
+
foreach ( $data as $key => $value ) {
|
363 |
+
$new_data[ $key ] = $value;
|
364 |
+
}
|
365 |
+
|
366 |
+
return $new_data;
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Disable SSL verification in order to prevent download update failures
|
371 |
+
*
|
372 |
+
* @param array $args
|
373 |
+
* @param string $url
|
374 |
+
* @return object $array
|
375 |
+
*/
|
376 |
+
public function http_request_args( $args, $url ) {
|
377 |
+
|
378 |
+
$verify_ssl = $this->verify_ssl();
|
379 |
+
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
380 |
+
$args['sslverify'] = $verify_ssl;
|
381 |
+
}
|
382 |
+
return $args;
|
383 |
+
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Calls the API and, if successfull, returns the object delivered by the API.
|
388 |
+
*
|
389 |
+
* @uses get_bloginfo()
|
390 |
+
* @uses wp_remote_post()
|
391 |
+
* @uses is_wp_error()
|
392 |
+
*
|
393 |
+
* @param string $_action The requested action.
|
394 |
+
* @param array $_data Parameters for the API action.
|
395 |
+
* @return false|object
|
396 |
+
*/
|
397 |
+
private function api_request( $_action, $_data ) {
|
398 |
+
|
399 |
+
global $wp_version, $edd_plugin_url_available;
|
400 |
+
|
401 |
+
$verify_ssl = $this->verify_ssl();
|
402 |
+
|
403 |
+
// Do a quick status check on this domain if we haven't already checked it.
|
404 |
+
$store_hash = md5( $this->api_url );
|
405 |
+
if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
|
406 |
+
$test_url_parts = parse_url( $this->api_url );
|
407 |
+
|
408 |
+
$scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http';
|
409 |
+
$host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : '';
|
410 |
+
$port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : '';
|
411 |
+
|
412 |
+
if ( empty( $host ) ) {
|
413 |
+
$edd_plugin_url_available[ $store_hash ] = false;
|
414 |
+
} else {
|
415 |
+
$test_url = $scheme . '://' . $host . $port;
|
416 |
+
$response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl ) );
|
417 |
+
$edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
|
418 |
+
}
|
419 |
+
}
|
420 |
+
|
421 |
+
if ( false === $edd_plugin_url_available[ $store_hash ] ) {
|
422 |
+
return;
|
423 |
+
}
|
424 |
+
|
425 |
+
$data = array_merge( $this->api_data, $_data );
|
426 |
+
|
427 |
+
if ( $data['slug'] != $this->slug ) {
|
428 |
+
return;
|
429 |
+
}
|
430 |
+
|
431 |
+
if( $this->api_url == trailingslashit ( home_url() ) ) {
|
432 |
+
return false; // Don't allow a plugin to ping itself
|
433 |
+
}
|
434 |
+
|
435 |
+
$api_params = array(
|
436 |
+
'edd_action' => 'get_version',
|
437 |
+
'license' => ! empty( $data['license'] ) ? $data['license'] : '',
|
438 |
+
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
439 |
+
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
440 |
+
'version' => isset( $data['version'] ) ? $data['version'] : false,
|
441 |
+
'slug' => $data['slug'],
|
442 |
+
'author' => $data['author'],
|
443 |
+
'url' => home_url(),
|
444 |
+
'beta' => ! empty( $data['beta'] ),
|
445 |
+
);
|
446 |
+
|
447 |
+
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
448 |
+
|
449 |
+
if ( ! is_wp_error( $request ) ) {
|
450 |
+
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
451 |
+
}
|
452 |
+
|
453 |
+
if ( $request && isset( $request->sections ) ) {
|
454 |
+
$request->sections = maybe_unserialize( $request->sections );
|
455 |
+
} else {
|
456 |
+
$request = false;
|
457 |
+
}
|
458 |
+
|
459 |
+
if ( $request && isset( $request->banners ) ) {
|
460 |
+
$request->banners = maybe_unserialize( $request->banners );
|
461 |
+
}
|
462 |
+
|
463 |
+
if ( $request && isset( $request->icons ) ) {
|
464 |
+
$request->icons = maybe_unserialize( $request->icons );
|
465 |
+
}
|
466 |
+
|
467 |
+
if( ! empty( $request->sections ) ) {
|
468 |
+
foreach( $request->sections as $key => $section ) {
|
469 |
+
$request->$key = (array) $section;
|
470 |
+
}
|
471 |
+
}
|
472 |
+
|
473 |
+
return $request;
|
474 |
+
}
|
475 |
+
|
476 |
+
public function show_changelog() {
|
477 |
+
|
478 |
+
global $edd_plugin_data;
|
479 |
+
|
480 |
+
if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
|
481 |
+
return;
|
482 |
+
}
|
483 |
+
|
484 |
+
if( empty( $_REQUEST['plugin'] ) ) {
|
485 |
+
return;
|
486 |
+
}
|
487 |
+
|
488 |
+
if( empty( $_REQUEST['slug'] ) ) {
|
489 |
+
return;
|
490 |
+
}
|
491 |
+
|
492 |
+
if( ! current_user_can( 'update_plugins' ) ) {
|
493 |
+
wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
|
494 |
+
}
|
495 |
+
|
496 |
+
$data = $edd_plugin_data[ $_REQUEST['slug'] ];
|
497 |
+
$beta = ! empty( $data['beta'] ) ? true : false;
|
498 |
+
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
|
499 |
+
$version_info = $this->get_cached_version_info( $cache_key );
|
500 |
+
|
501 |
+
if( false === $version_info ) {
|
502 |
+
|
503 |
+
$api_params = array(
|
504 |
+
'edd_action' => 'get_version',
|
505 |
+
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
506 |
+
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
507 |
+
'slug' => $_REQUEST['slug'],
|
508 |
+
'author' => $data['author'],
|
509 |
+
'url' => home_url(),
|
510 |
+
'beta' => ! empty( $data['beta'] )
|
511 |
+
);
|
512 |
+
|
513 |
+
$verify_ssl = $this->verify_ssl();
|
514 |
+
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
515 |
+
|
516 |
+
if ( ! is_wp_error( $request ) ) {
|
517 |
+
$version_info = json_decode( wp_remote_retrieve_body( $request ) );
|
518 |
+
}
|
519 |
+
|
520 |
+
|
521 |
+
if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
|
522 |
+
$version_info->sections = maybe_unserialize( $version_info->sections );
|
523 |
+
} else {
|
524 |
+
$version_info = false;
|
525 |
+
}
|
526 |
+
|
527 |
+
if( ! empty( $version_info ) ) {
|
528 |
+
foreach( $version_info->sections as $key => $section ) {
|
529 |
+
$version_info->$key = (array) $section;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
|
533 |
+
$this->set_version_info_cache( $version_info, $cache_key );
|
534 |
+
|
535 |
+
}
|
536 |
+
|
537 |
+
if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
538 |
+
echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
|
539 |
+
}
|
540 |
+
|
541 |
+
exit;
|
542 |
+
}
|
543 |
+
|
544 |
+
public function get_cached_version_info( $cache_key = '' ) {
|
545 |
+
|
546 |
+
if( empty( $cache_key ) ) {
|
547 |
+
$cache_key = $this->cache_key;
|
548 |
+
}
|
549 |
+
|
550 |
+
$cache = get_option( $cache_key );
|
551 |
+
|
552 |
+
if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) {
|
553 |
+
return false; // Cache is expired
|
554 |
+
}
|
555 |
+
|
556 |
+
// We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point.
|
557 |
+
$cache['value'] = json_decode( $cache['value'] );
|
558 |
+
if ( ! empty( $cache['value']->icons ) ) {
|
559 |
+
$cache['value']->icons = (array) $cache['value']->icons;
|
560 |
+
}
|
561 |
+
|
562 |
+
return $cache['value'];
|
563 |
+
|
564 |
+
}
|
565 |
+
|
566 |
+
public function set_version_info_cache( $value = '', $cache_key = '' ) {
|
567 |
+
|
568 |
+
if( empty( $cache_key ) ) {
|
569 |
+
$cache_key = $this->cache_key;
|
570 |
+
}
|
571 |
+
|
572 |
+
$data = array(
|
573 |
+
'timeout' => strtotime( '+3 hours', time() ),
|
574 |
+
'value' => json_encode( $value )
|
575 |
+
);
|
576 |
+
|
577 |
+
update_option( $cache_key, $data, 'no' );
|
578 |
+
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Returns if the SSL of the store should be verified.
|
583 |
+
*
|
584 |
+
* @since 1.6.13
|
585 |
+
* @return bool
|
586 |
+
*/
|
587 |
+
private function verify_ssl() {
|
588 |
+
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
|
589 |
+
}
|
590 |
+
|
591 |
+
}
|
common/helpers.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !class_exists( 'MeowCommon_Helpers' ) ) {
|
4 |
+
|
5 |
+
class MeowCommon_Helpers {
|
6 |
+
|
7 |
+
static function is_divi_builder() {
|
8 |
+
return isset( $_GET['et_fb'] ) && $_GET['et_fb'] === '1';
|
9 |
+
}
|
10 |
+
|
11 |
+
static function is_asynchronous_request() {
|
12 |
+
return self::is_ajax_request() || self::is_woocommerce_ajax_request() || self::is_rest();
|
13 |
+
}
|
14 |
+
|
15 |
+
static function is_ajax_request() {
|
16 |
+
return wp_doing_ajax();
|
17 |
+
}
|
18 |
+
|
19 |
+
static function is_woocommerce_ajax_request() {
|
20 |
+
return !empty( $_GET['wc-ajax'] );
|
21 |
+
}
|
22 |
+
|
23 |
+
// Originally created by matzeeable, modified by jordymeow
|
24 |
+
static function is_rest() {
|
25 |
+
|
26 |
+
// WP_REST_Request init.
|
27 |
+
$is_rest_request = defined('REST_REQUEST') && REST_REQUEST;
|
28 |
+
if ( $is_rest_request ) {
|
29 |
+
MeowCommon_Classes_Rest::init_once();
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
|
33 |
+
// Plain permalinks.
|
34 |
+
$prefix = rest_get_url_prefix();
|
35 |
+
$request_contains_rest = isset( $_GET['rest_route'] ) && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0;
|
36 |
+
if ( $request_contains_rest) {
|
37 |
+
MeowCommon_Classes_Rest::init_once();
|
38 |
+
return true;
|
39 |
+
}
|
40 |
+
|
41 |
+
// It can happen that WP_Rewrite is not yet initialized, so better to do it.
|
42 |
+
global $wp_rewrite;
|
43 |
+
if ( $wp_rewrite === null ) {
|
44 |
+
$wp_rewrite = new WP_Rewrite();
|
45 |
+
}
|
46 |
+
$rest_url = wp_parse_url( trailingslashit( rest_url() ) );
|
47 |
+
$current_url = wp_parse_url( add_query_arg( array() ) );
|
48 |
+
if ( !$rest_url || !$current_url )
|
49 |
+
return false;
|
50 |
+
|
51 |
+
// URL Path begins with wp-json.
|
52 |
+
if ( !empty( $current_url['path'] ) && !empty( $rest_url['path'] ) ) {
|
53 |
+
$request_contains_rest = strpos( $current_url['path'], $rest_url['path'], 0 ) === 0;
|
54 |
+
if ( $request_contains_rest) {
|
55 |
+
MeowCommon_Classes_Rest::init_once();
|
56 |
+
return true;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
return false;
|
61 |
+
}
|
62 |
+
|
63 |
+
static function test_error( $error = 'timeout', $diceSides = 1 ) {
|
64 |
+
if ( rand( 1, $diceSides ) === 1 ) {
|
65 |
+
if ( $error === 'timeout' ) {
|
66 |
+
header("HTTP/1.0 408 Request Timeout");
|
67 |
+
die();
|
68 |
+
}
|
69 |
+
else {
|
70 |
+
trigger_error( "Error", E_USER_ERROR);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( MeowCommon_Helpers::is_rest() ) {
|
77 |
+
ini_set( 'display_errors', 0 );
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
?>
|
common/licenser.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !class_exists( 'MeowCommon_Licenser' ) ) {
|
4 |
+
|
5 |
+
class MeowCommon_Licenser {
|
6 |
+
public $license = null;
|
7 |
+
public $prefix; // prefix used for actions, filters (mfrh)
|
8 |
+
public $mainfile; // plugin main file (media-file-renamer.php)
|
9 |
+
public $domain; // domain used for translation (media-file-renamer)
|
10 |
+
public $item; // name of the Pro plugin (Media File Renamer Pro)
|
11 |
+
public $version; // version of the plugin (Media File Renamer Pro)
|
12 |
+
|
13 |
+
public function __construct( $prefix, $mainfile, $domain, $item, $version ) {
|
14 |
+
$this->prefix = $prefix;
|
15 |
+
$this->mainfile = $mainfile;
|
16 |
+
$this->domain = $domain;
|
17 |
+
$this->item = $item;
|
18 |
+
$this->version = $version;
|
19 |
+
|
20 |
+
if ( $this->is_registered() ) {
|
21 |
+
add_filter( $this->prefix . '_meowapps_is_registered', array( $this, 'is_registered' ), 10 );
|
22 |
+
}
|
23 |
+
|
24 |
+
if ( MeowCommon_Helpers::is_rest() ) {
|
25 |
+
new MeowCommon_Classes_Rest_License( $this );
|
26 |
+
}
|
27 |
+
else if ( is_admin() ) {
|
28 |
+
$license_key = $this->license && isset( $this->license['key'] ) ? $this->license['key'] : "";
|
29 |
+
new MeowCommon_Classes_Updater(
|
30 |
+
( get_option( 'force_sslverify', false ) ? 'https' : 'http' ) . '://store.meowapps.com', $this->mainfile,
|
31 |
+
array(
|
32 |
+
'version' => $this->version,
|
33 |
+
'license' => $license_key,
|
34 |
+
'item_name' => $this->item,
|
35 |
+
'wp_override' => true,
|
36 |
+
'author' => 'Jordy Meow',
|
37 |
+
'url' => strtolower( home_url() ),
|
38 |
+
'beta' => false
|
39 |
+
)
|
40 |
+
);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
function retry_validation() {
|
45 |
+
if ( isset( $_POST[$this->prefix . '_pro_serial'] ) ) {
|
46 |
+
$serial = $_POST[$this->prefix . '_pro_serial'];
|
47 |
+
$this->validate_pro( $serial );
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
function is_registered( $force = false ) {
|
52 |
+
if ( !$force && !empty( $this->license ) )
|
53 |
+
return empty( $this->license['issue'] );
|
54 |
+
$this->license = get_option( $this->prefix . '_license', "" );
|
55 |
+
if ( empty( $this->license ) || !empty( $this->license['issue'] ) )
|
56 |
+
return false;
|
57 |
+
if ( $this->license['expires'] == "lifetime" )
|
58 |
+
return true;
|
59 |
+
$datediff = strtotime( $this->license['expires'] ) - time();
|
60 |
+
$days = floor( $datediff / ( 60 * 60 * 24 ) );
|
61 |
+
if ( $days < 0 )
|
62 |
+
$this->validate_pro( $this->license['key'] );
|
63 |
+
return true;
|
64 |
+
}
|
65 |
+
|
66 |
+
function validate_pro( $subscr_id ) {
|
67 |
+
$prefix = $this->prefix;
|
68 |
+
delete_option( $prefix . '_license', "" );
|
69 |
+
if ( empty( $subscr_id ) )
|
70 |
+
return false;
|
71 |
+
$url = ( get_option( 'force_sslverify', false ) ? 'https' : 'http' ) .
|
72 |
+
'://store.meowapps.com/?edd_action=activate_license' .
|
73 |
+
'&item_name=' . urlencode( $this->item ) .
|
74 |
+
'&license=' . $subscr_id . '&url=' . strtolower( home_url() ) . '&cache=' . bin2hex( openssl_random_pseudo_bytes( 4 ) );
|
75 |
+
$response = wp_remote_get( $url, array(
|
76 |
+
'user-agent' => "MeowApps",
|
77 |
+
'sslverify' => get_option( 'force_sslverify', false ),
|
78 |
+
'timeout' => 45,
|
79 |
+
'method' => 'GET'
|
80 |
+
)
|
81 |
+
);
|
82 |
+
$body = is_array( $response ) ? $response['body'] : null;
|
83 |
+
$post = @json_decode( $body );
|
84 |
+
$status = null;
|
85 |
+
$license = null;
|
86 |
+
$expires = null;
|
87 |
+
$logs = null;
|
88 |
+
if ( !$post || ( property_exists( $post, 'code' ) ) ) {
|
89 |
+
$status = 'error';
|
90 |
+
// $status = __( "There was an error while validating the serial.<br />Please contact <a target='_blank' href='https://meowapps.com/contact/'>Meow Apps</a> and mention the following log: <br /><ul>", $this->domain );
|
91 |
+
$logs = "<li>Server IP: <b>" . gethostbyname( $_SERVER['SERVER_NAME'] ) . "</b></li>";
|
92 |
+
$logs .= "<li>Google GET: ";
|
93 |
+
$r = wp_remote_get( 'http://google.com' );
|
94 |
+
$logs .= is_wp_error( $r ) ? print_r( $r, true ) : 'OK';
|
95 |
+
$logs .= "</li><li>MeowApps GET: ";
|
96 |
+
$r = wp_remote_get( 'http://meowapps.com' );
|
97 |
+
$logs .= is_wp_error( $r ) ? print_r( $r, true ) : 'OK';
|
98 |
+
$logs .= "</li><li>MeowApps STORE:<br /><br />";
|
99 |
+
$logs .= "REQUEST: $url<br /><br />";
|
100 |
+
$logs .= "RESPONSE: ";
|
101 |
+
$logs .= print_r( $response, true );
|
102 |
+
$logs .= "</li></ul>";
|
103 |
+
error_log( print_r( $response, true ) );
|
104 |
+
}
|
105 |
+
else if ( $post->license !== "valid" ) {
|
106 |
+
$status = $post->error ;
|
107 |
+
}
|
108 |
+
else {
|
109 |
+
$license = $post->license;
|
110 |
+
$expires = $post->expires;
|
111 |
+
delete_option( '_site_transient_update_plugins' );
|
112 |
+
}
|
113 |
+
update_option( $prefix . '_license', array(
|
114 |
+
'key' => $subscr_id,
|
115 |
+
'issue' => $status,
|
116 |
+
'logs' => $logs,
|
117 |
+
'expires' => $expires,
|
118 |
+
'license' => $license ) );
|
119 |
+
return $this->is_registered( true );
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
?>
|
dashboard.php
DELETED
@@ -1,334 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Meow_WR2X_Dashboard {
|
4 |
-
|
5 |
-
public $core = null;
|
6 |
-
|
7 |
-
public function __construct( $core ) {
|
8 |
-
$this->core = $core;
|
9 |
-
add_action( 'admin_menu', array( $this, 'admin_menu_dashboard' ) );
|
10 |
-
}
|
11 |
-
|
12 |
-
function admin_menu_dashboard () {
|
13 |
-
$flagged = count( $this->core->get_issues() );
|
14 |
-
$warning_title = __( "Retina images", 'wp-retina-2x' );
|
15 |
-
$menu_label = sprintf( __( 'Retina %s' ), "<span class='update-plugins count-$flagged' title='$warning_title'><span class='update-count'>" . number_format_i18n( $flagged ) . "</span></span>" );
|
16 |
-
add_media_page( 'Retina', $menu_label, 'manage_options', 'wp-retina-2x', array( $this, 'dashboard' ) );
|
17 |
-
}
|
18 |
-
|
19 |
-
function dashboard() {
|
20 |
-
$refresh = isset ( $_GET[ 'refresh' ] ) ? sanitize_text_field( $_GET[ 'refresh' ] ) : 0;
|
21 |
-
$clearlogs = isset ( $_GET[ 'clearlogs' ] ) ? sanitize_text_field( $_GET[ 'clearlogs' ] ) : 0;
|
22 |
-
$ignore = isset ( $_GET[ 'ignore' ] ) ? sanitize_text_field( $_GET[ 'ignore' ] ) : false;
|
23 |
-
if ( $ignore ) {
|
24 |
-
if ( !$this->core->admin->is_registered() ) {
|
25 |
-
echo "<div class='error' style='margin-top: 20px;'><p>";
|
26 |
-
_e( "Ignore is a Pro feature.", 'wp-retina-2x' );
|
27 |
-
echo "</p></div>";
|
28 |
-
}
|
29 |
-
else
|
30 |
-
$this->core->add_ignore( $ignore );
|
31 |
-
}
|
32 |
-
if ( $refresh ) {
|
33 |
-
$this->core->calculate_issues();
|
34 |
-
}
|
35 |
-
if ( $clearlogs ) {
|
36 |
-
if ( file_exists( plugin_dir_path( __FILE__ ) . '/wp-retina-2x.log' ) ) {
|
37 |
-
unlink( plugin_dir_path( __FILE__ ) . '/wp-retina-2x.log' );
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
$hide_ads = get_option( 'meowapps_hide_ads', false );
|
42 |
-
$view = isset( $_GET[ 'view' ] ) ? sanitize_text_field( $_GET[ 'view' ] ) : 'issues';
|
43 |
-
$paged = isset( $_GET[ 'paged' ] ) ? sanitize_text_field( $_GET[ 'paged' ] ) : 1;
|
44 |
-
$s = isset( $_GET[ 's' ] ) && !empty( $_GET[ 's' ] ) ? sanitize_text_field( $_GET[ 's' ] ) : null;
|
45 |
-
$issues = $count = 0;
|
46 |
-
|
47 |
-
$posts_per_page = get_user_meta( get_current_user_id(), 'upload_per_page', true );
|
48 |
-
if ( empty( $posts_per_page ) )
|
49 |
-
$posts_per_page = 20;
|
50 |
-
$issues = $this->core->get_issues();
|
51 |
-
$ignored = $this->core->get_ignores();
|
52 |
-
|
53 |
-
echo '<div class="wrap">';
|
54 |
-
echo $this->core->admin->display_title( "WP Retina 2x" );
|
55 |
-
echo '<p></p>';
|
56 |
-
|
57 |
-
if ( $this->core->admin->is_registered() && $view == 'issues' ) {
|
58 |
-
global $wpdb;
|
59 |
-
$totalcount = $wpdb->get_var( $wpdb->prepare( "
|
60 |
-
SELECT COUNT(*)
|
61 |
-
FROM $wpdb->posts p
|
62 |
-
WHERE post_status = 'inherit'
|
63 |
-
AND post_type = 'attachment'" . $this->core->create_sql_if_wpml_original() . "
|
64 |
-
AND post_title LIKE %s
|
65 |
-
AND ( post_mime_type = 'image/jpeg' OR
|
66 |
-
post_mime_type = 'image/png' OR
|
67 |
-
post_mime_type = 'image/gif' )
|
68 |
-
", '%' . $s . '%' ) );
|
69 |
-
$postin = count( $issues ) < 1 ? array( -1 ) : $issues;
|
70 |
-
$query = new WP_Query(
|
71 |
-
array(
|
72 |
-
'post_status' => 'inherit',
|
73 |
-
'post_type' => 'attachment',
|
74 |
-
'post__in' => $postin,
|
75 |
-
'paged' => $paged,
|
76 |
-
'posts_per_page' => $posts_per_page,
|
77 |
-
's' => $s
|
78 |
-
)
|
79 |
-
);
|
80 |
-
}
|
81 |
-
else if ( $this->core->admin->is_registered() && $view == 'ignored' ) {
|
82 |
-
global $wpdb;
|
83 |
-
$totalcount = $wpdb->get_var( $wpdb->prepare( "
|
84 |
-
SELECT COUNT(*)
|
85 |
-
FROM $wpdb->posts p
|
86 |
-
WHERE post_status = 'inherit'
|
87 |
-
AND post_type = 'attachment'" . $this->core->create_sql_if_wpml_original() . "
|
88 |
-
AND post_title LIKE %s
|
89 |
-
AND ( post_mime_type = 'image/jpeg' OR
|
90 |
-
post_mime_type = 'image/jpg' OR
|
91 |
-
post_mime_type = 'image/png' OR
|
92 |
-
post_mime_type = 'image/gif' )
|
93 |
-
", '%' . $s . '%' ) );
|
94 |
-
$postin = count( $ignored ) < 1 ? array( -1 ) : $ignored;
|
95 |
-
$query = new WP_Query(
|
96 |
-
array(
|
97 |
-
'post_status' => 'inherit',
|
98 |
-
'post_type' => 'attachment',
|
99 |
-
'post__in' => $postin,
|
100 |
-
'paged' => $paged,
|
101 |
-
'posts_per_page' => $posts_per_page,
|
102 |
-
's' => $s
|
103 |
-
)
|
104 |
-
);
|
105 |
-
}
|
106 |
-
else {
|
107 |
-
$query = new WP_Query(
|
108 |
-
array(
|
109 |
-
'post_status' => 'inherit',
|
110 |
-
'post_type' => 'attachment',
|
111 |
-
'post_mime_type' => 'image/jpeg,image/gif,image/jpg,image/png',
|
112 |
-
'paged' => $paged,
|
113 |
-
'posts_per_page' => $posts_per_page,
|
114 |
-
's' => $s
|
115 |
-
)
|
116 |
-
);
|
117 |
-
|
118 |
-
//$s
|
119 |
-
$totalcount = $query->found_posts;
|
120 |
-
}
|
121 |
-
|
122 |
-
$issues_count = count( $issues );
|
123 |
-
|
124 |
-
// If 'search', then we need to clean-up the issues count
|
125 |
-
if ( $s && $issues_count > 0 ) {
|
126 |
-
global $wpdb;
|
127 |
-
$issues_count = $wpdb->get_var( $wpdb->prepare( "
|
128 |
-
SELECT COUNT(*)
|
129 |
-
FROM $wpdb->posts p
|
130 |
-
WHERE id IN ( " . implode( ',', $issues ) . " )" . $this->core->create_sql_if_wpml_original() . "
|
131 |
-
AND post_title LIKE %s
|
132 |
-
", '%' . $s . '%' ) );
|
133 |
-
}
|
134 |
-
|
135 |
-
$results = array();
|
136 |
-
$count = $query->found_posts;
|
137 |
-
$pagescount = $query->max_num_pages;
|
138 |
-
foreach ( $query->posts as $post ) {
|
139 |
-
$info = $this->core->retina_info( $post->ID );
|
140 |
-
array_push( $results, array( 'post' => $post, 'info' => $info ) );
|
141 |
-
}
|
142 |
-
?>
|
143 |
-
|
144 |
-
<div style='background: #FFF; padding: 5px; border-radius: 4px; height: 28px; box-shadow: 0px 0px 6px #C2C2C2;'>
|
145 |
-
|
146 |
-
<!-- REFRESH -->
|
147 |
-
<a id='wr2x_refresh' href='?page=wp-retina-2x&view=issues&refresh=true' class='button' style='float: left;'><span style="top: 3px; position: relative; left: -5px;" class="dashicons dashicons-controls-repeat"></span><?php _e("Refresh", 'wp-retina-2x'); ?></a>
|
148 |
-
|
149 |
-
<!-- SEARCH -->
|
150 |
-
<form id="posts-filter" action="upload.php" method="get">
|
151 |
-
<p class="search-box" style='margin-left: 5px; float: left;'>
|
152 |
-
<input type="search" name="s" value="<?php echo $s ? $s : ""; ?>">
|
153 |
-
<input type="hidden" name="page" value="wp-retina-2x">
|
154 |
-
<input type="hidden" name="view" value="<?php echo $view; ?>">
|
155 |
-
<input type="hidden" name="paged" value="<?php echo $paged; ?>">
|
156 |
-
<input type="submit" class="button" value="Search">
|
157 |
-
</p>
|
158 |
-
</form>
|
159 |
-
|
160 |
-
<!-- REMOVE BUTTON ALL -->
|
161 |
-
<a id='wr2x_remove_button_all' onclick='wr2x_delete_all()' class='button button-red' style='float: right;'><span style="top: 3px; position: relative; left: -5px;" class="dashicons dashicons-trash"></span><?php _e("Bulk Delete (Retina Only)", 'wp-retina-2x'); ?></a>
|
162 |
-
|
163 |
-
<!-- GENERATE ALL -->
|
164 |
-
<a id='wr2x_generate_button_all' onclick='wr2x_generate_all()' class='button-primary' style='float: right; margin-right: 5px;'><span style="top: 3px; position: relative; left: -5px;" class="dashicons dashicons-controls-play"></span><?php _e("Bulk Generate (Thumbnails & Retina)", 'wp-retina-2x'); ?></a>
|
165 |
-
|
166 |
-
|
167 |
-
<!-- PROGRESS -->
|
168 |
-
<span style='margin-left: 12px; font-size: 13px; top: 5px; position: relative; color: #24547C; font-weight: bold;' id='wr2x_progression'></span>
|
169 |
-
|
170 |
-
</div>
|
171 |
-
|
172 |
-
<?php
|
173 |
-
if (isset ( $_GET[ 'clearlogs' ] ) ? $_GET[ 'clearlogs' ] : 0) {
|
174 |
-
echo "<div class='updated' style='margin-top: 20px;'><p>";
|
175 |
-
_e( "The logs have been cleared.", 'wp-retina-2x' );
|
176 |
-
echo "</p></div>";
|
177 |
-
}
|
178 |
-
|
179 |
-
$active_sizes = $this->core->get_active_image_sizes();
|
180 |
-
$full_size_needed = get_option( "wr2x_full_size" );
|
181 |
-
|
182 |
-
$max_width = 0;
|
183 |
-
$max_height = 0;
|
184 |
-
foreach ( $active_sizes as $name => $active_size ) {
|
185 |
-
if ( $active_size['height'] != 9999 && $active_size['height'] > $max_height ) {
|
186 |
-
$max_height = $active_size['height'];
|
187 |
-
}
|
188 |
-
if ( $active_size['width'] != 9999 && $active_size['width'] > $max_width ) {
|
189 |
-
$max_width = $active_size['width'];
|
190 |
-
}
|
191 |
-
}
|
192 |
-
$max_width = $max_width * 2;
|
193 |
-
$max_height = $max_height * 2;
|
194 |
-
|
195 |
-
$upload_max_size = $this->core->get_max_filesize();
|
196 |
-
?>
|
197 |
-
|
198 |
-
<p>
|
199 |
-
<?php printf( __( 'Based on your <i>image sizes</i> settings, the full-size images should be uploaded at a resolution of at least <b>%d×%d</b> for the plugin to be able generate the <b>%d retina images</b>. Please note that it vares depending on your needs for each image (you will need to discuss this with your developer).', 'wp-retina-2x' ), $max_width, $max_height, count( $active_sizes ) ); ?>
|
200 |
-
<?php if ( $full_size_needed ) printf( __( "You <b>also need</b> to upload a retina image for the Full-Size image (might be <b>%d×%d</b>).", 'wp-retina-2x' ), $max_width * 2, $max_height * 2 ); ?>
|
201 |
-
<?php _e("You can upload or replace the images by drag & drop.", 'wp-retina-2x' ); ?>
|
202 |
-
<?php printf( __( "Your PHP configuration allows uploads of <b>%dMB</b> maximum.", 'wp-retina-2x'), $upload_max_size / 1000000 ); ?>
|
203 |
-
|
204 |
-
<?php
|
205 |
-
if ( file_exists( plugin_dir_path( __FILE__ ) . '/wp-retina-2x.log' ) ) {
|
206 |
-
printf( __( 'The <a target="_blank" href="%s/wp-retina-2x.log">log file</a> is available. You can also <a href="?page=wp-retina-2x&view=issues&clearlogs=true">clear</a> it.', 'wp-retina-2x' ), plugin_dir_url( __FILE__ ) );
|
207 |
-
}
|
208 |
-
?>
|
209 |
-
</p>
|
210 |
-
|
211 |
-
<?php
|
212 |
-
$method = get_option( 'wr2x_method' );
|
213 |
-
$cdn = get_option( 'wr2x_cdn_domain' );
|
214 |
-
$disable_responsive = get_option( 'wr2x_disable_responsive', false );
|
215 |
-
$keep_src = get_option( 'wr2x_picturefill_keep_src', false );
|
216 |
-
|
217 |
-
if ( $method == 'HTML Rewrite' || $method == 'Retina-Images' || $disable_responsive ) {
|
218 |
-
echo '<div class="error"><p>';
|
219 |
-
echo __( '<b>WARNING</b>. You are using an option that will be removed in a future release. The plan is to remove two methods (HTML Rewrite and Retina-Images), and Disable Responsive. Those options are not necessary, and it is better to keep the plugin clean and focus. This warning message will go away if you avoid using those options (and will disappear in a future release). If you are using one of those options and really would like to keep it, please contact the support.', 'wp-retina-2x' );
|
220 |
-
echo '</p></div>';
|
221 |
-
}
|
222 |
-
?>
|
223 |
-
|
224 |
-
<?php
|
225 |
-
if ( !$this->core->admin->is_registered() && !get_option( "wr2x_hide_pro", false ) ) {
|
226 |
-
echo '<div class="updated"><p>';
|
227 |
-
echo __( '<b>Only Pro users have access to the features of this dashboard.</b> As a standard user, the dashboard allow you to Bulk Generate, Bulk Delete and access the Retina Logs. If you wish to stay a standard user and never see this dashboard aver again, you can hide it in the settings.<br /><br />The Pro version of the plugin allows you to <b>replace directly an image already uploaded in the Media Library</b> by a simple drag & drop, upload a <b>retina image for a full-size image</b>, use <b>lazy-loading</b> to load your images (for better performance) and, more importantly, <b>supports the developer</b> :)<br /><br /><a class="button-primary" href="https://store.meowapps.com/wp-retina-2x/" target="_blank">Get WP Retina 2x Pro</a>', 'wp-retina-2x' );
|
228 |
-
echo '</p></div>';
|
229 |
-
}
|
230 |
-
?>
|
231 |
-
|
232 |
-
<div id='wr2x-pages'>
|
233 |
-
<?php
|
234 |
-
echo paginate_links(array(
|
235 |
-
'base' => '?page=wp-retina-2x&s=' . urlencode($s) . '&view=' . $view . '%_%',
|
236 |
-
'current' => $paged,
|
237 |
-
'format' => '&paged=%#%',
|
238 |
-
'total' => $pagescount,
|
239 |
-
'prev_next' => false
|
240 |
-
));
|
241 |
-
?>
|
242 |
-
</div>
|
243 |
-
|
244 |
-
<ul class="subsubsub">
|
245 |
-
<li class="all"><a <?php if ( $view == 'all' ) echo "class='current'"; ?> href='?page=wp-retina-2x&s=<?php echo $s; ?>&view=all'><?php _e( "All", 'wp-retina-2x' ); ?></a><span class="count">(<?php echo $totalcount; ?>)</span></li> |
|
246 |
-
|
247 |
-
<?php if ( $this->core->admin->is_registered() ): ?>
|
248 |
-
|
249 |
-
<li class="all"><a <?php if ( $view == 'issues' ) echo "class='current'"; ?> href='?page=wp-retina-2x&s=<?php echo $s; ?>&view=issues'><?php _e( "Issues", 'wp-retina-2x' ); ?></a><span class="count">(<?php echo $issues_count; ?>)</span></li> |
|
250 |
-
<li class="all"><a <?php if ( $view == 'ignored' ) echo "class='current'"; ?> href='?page=wp-retina-2x&s=<?php echo $s; ?>&view=ignored'><?php _e( "Ignored", 'wp-retina-2x' ); ?></a><span class="count">(<?php echo count( $ignored ); ?>)</span></li>
|
251 |
-
|
252 |
-
<?php else: ?>
|
253 |
-
|
254 |
-
<li class="all"><span><?php _e( "Issues", 'wp-retina-2x' ); ?></span> <span class="count">(<?php echo $issues_count; ?>)</span></li> |
|
255 |
-
<li class="all"><span><?php _e( "Ignored", 'wp-retina-2x' ); ?></span> <span class="count">(<?php echo count( $ignored ); ?>)</span></li>
|
256 |
-
|
257 |
-
<?php endif; ?>
|
258 |
-
|
259 |
-
|
260 |
-
</ul>
|
261 |
-
<table class='wp-list-table widefat fixed media wr2x-table'>
|
262 |
-
<thead><tr>
|
263 |
-
<?php
|
264 |
-
echo "<th style='width: 56px;'>Thumbnail</th>";
|
265 |
-
echo "<th style=' width: 360px;'>" . __( "Base image", 'wp-retina-2x' ) . "</th>";
|
266 |
-
echo "<th style=''>" . __( "Media Sizes<br />Retina-ized", 'wp-retina-2x' ) . "</th>";
|
267 |
-
echo "<th style=''>" . __( "Full-Size<br/><b>Replace</b>", 'wp-retina-2x' ) . "</th>";
|
268 |
-
echo "<th style=''>" . __( "Full-Size Retina", 'wp-retina-2x' ) . "</th>";
|
269 |
-
echo "<th style=''>" . __( "Full-Size Retina<br/><b>Upload</b>", 'wp-retina-2x' ) . "</th>";
|
270 |
-
?>
|
271 |
-
</tr></thead>
|
272 |
-
<tbody>
|
273 |
-
<?php
|
274 |
-
foreach ($results as $index => $attr) {
|
275 |
-
$post = $attr['post'];
|
276 |
-
$info = $attr['info'];
|
277 |
-
$meta = wp_get_attachment_metadata( $post->ID );
|
278 |
-
// Let's clean the issues status
|
279 |
-
if ( $view != 'issues' ) {
|
280 |
-
$this->core->update_issue_status( $post->ID, $issues, $info );
|
281 |
-
}
|
282 |
-
$original_width = ( isset( $meta ) && isset( $meta['width'] ) ) ? $meta['width'] : null;
|
283 |
-
$original_height = ( isset( $meta ) && isset( $meta['height'] ) ) ? $meta['height'] : null;
|
284 |
-
|
285 |
-
$attachmentsrc = wp_get_attachment_image_src( $post->ID, 'thumbnail' );
|
286 |
-
echo "<tr class='wr2x-file-row' postId='" . $post->ID . "'>";
|
287 |
-
|
288 |
-
if ( !$original_width || !$original_height ) {
|
289 |
-
echo "<td colspan='2' style='padding: 15px;'>The metadata for the <a href='media.php?attachment_id={$post->ID}&action=edit'>Media #{$post->ID}</a> is broken. You can try <b>Generate</b> for this media (in the Media Library), <b>Bulk Generate</b>, or a <b>Full-Size Replace</b>.</td>";
|
290 |
-
}
|
291 |
-
else {
|
292 |
-
echo "<td class='wr2x-image wr2x-info-thumbnail'><img src='" . $attachmentsrc[0] . "' /></td>";
|
293 |
-
echo "<td class='wr2x-title'><a href='media.php?attachment_id=" . $post->ID . "&action=edit'>" . ( $post->post_title ? $post->post_title : '<i>Untitled</i>' ) . '</a><br />' .
|
294 |
-
"<span class='resolution'>Full-Size: <span class='" . ( $original_width < $max_width ? "red" : "" ) . "'>" . $original_width . "</span>×<span class='" . ( $original_height < $max_height ? "red" : "" ) . "'>" . $original_height . "</span></span>";
|
295 |
-
echo "<div class='actions'>";
|
296 |
-
echo "<a style='position: relative;' onclick='wr2x_generate(" . $post->ID . ", true)' id='wr2x_generate_button_" . $post->ID . "' class='wr2x-button'>" . __( "GENERATE", 'wp-retina-2x' ) . "</a>";
|
297 |
-
if ( !$this->core->is_ignore( $post->ID ) )
|
298 |
-
echo " <a href='?page=wp-retina-2x&view=" . $view . "&paged=" . $paged . "&ignore=" . $post->ID . "' id='wr2x_generate_button_" . $post->ID . "' class='wr2x-button wr2x-button-ignore'>" . __( "IGNORE", 'wp-retina-2x' ) . "</a>";
|
299 |
-
echo " <a style='position: relative;' class='wr2x-button wr2x-button-view'>" . __( "DETAILS", 'wp-retina-2x' ) . "</a>";
|
300 |
-
echo "</div></td>";
|
301 |
-
}
|
302 |
-
|
303 |
-
// Media Sizes Retina-ized
|
304 |
-
echo '<td id="wr2x-info-' . $post->ID . '" style="padding-top: 10px;" class="wr2x-info">';
|
305 |
-
if ( $original_width && $original_height )
|
306 |
-
echo $this->core->html_get_basic_retina_info( $post, $info );
|
307 |
-
echo "</td>";
|
308 |
-
|
309 |
-
if ( $this->core->admin->is_registered() ) {
|
310 |
-
// Full-Size Replace
|
311 |
-
echo "<td class='wr2x-fullsize-replace'><div class='wr2x-dragdrop'></div>";
|
312 |
-
echo "</td>";
|
313 |
-
// Full-Size Retina
|
314 |
-
echo '<td id="wr2x-info-full-' . $post->ID . '" class="wr2x-image wr2x-info-full">';
|
315 |
-
echo $this->core->html_get_basic_retina_info_full( $post->ID, $info );
|
316 |
-
echo "</td>";
|
317 |
-
// Full-Size Retina Upload
|
318 |
-
echo "<td class='wr2x-fullsize-retina-upload'>";
|
319 |
-
echo "<div class='wr2x-dragdrop'></div>";
|
320 |
-
echo "</td>";
|
321 |
-
}
|
322 |
-
else
|
323 |
-
echo "<td colspan='3' style='text-align: center; background: #F9F9F9;'><small><br />PRO VERSION ONLY</small></td>";
|
324 |
-
echo "</tr>";
|
325 |
-
}
|
326 |
-
?>
|
327 |
-
</tbody>
|
328 |
-
</table>
|
329 |
-
</div>
|
330 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/admin.js
DELETED
@@ -1,497 +0,0 @@
|
|
1 |
-
/* GENERATE RETINA IMAGES ACTION */
|
2 |
-
|
3 |
-
var current;
|
4 |
-
var maxPhpSize = wr2x_admin_server.maxFileSize;
|
5 |
-
var ids = [];
|
6 |
-
var errors = 0;
|
7 |
-
var ajax_action = "generate"; // generate | delete
|
8 |
-
|
9 |
-
function wr2x_display_please_refresh() {
|
10 |
-
wr2x_refresh_progress_status();
|
11 |
-
jQuery('#wr2x_progression').html(jQuery('#wr2x_progression').html() + " - " + wr2x_admin_server.i18n.Refresh);
|
12 |
-
}
|
13 |
-
|
14 |
-
function wr2x_refresh_progress_status() {
|
15 |
-
var errortext = "";
|
16 |
-
if ( errors > 0 ) {
|
17 |
-
errortext = ' - ' + errors + ' error(s)';
|
18 |
-
}
|
19 |
-
jQuery('#wr2x_progression').text(current + "/" + ids.length +
|
20 |
-
" (" + Math.round(current / ids.length * 100) + "%)" + errortext);
|
21 |
-
}
|
22 |
-
|
23 |
-
function wr2x_do_next () {
|
24 |
-
var data = { action: 'wr2x_' + ajax_action, attachmentId: ids[current - 1] };
|
25 |
-
data.nonce = wr2x_admin_server.nonce[data.action];
|
26 |
-
|
27 |
-
wr2x_refresh_progress_status();
|
28 |
-
jQuery.post(ajaxurl, data, function (response) {
|
29 |
-
try {
|
30 |
-
reply = jQuery.parseJSON(response);
|
31 |
-
}
|
32 |
-
catch (e) {
|
33 |
-
reply = null;
|
34 |
-
}
|
35 |
-
if ( !reply || !reply.success )
|
36 |
-
errors++;
|
37 |
-
else {
|
38 |
-
wr2x_refresh_media_sizes(reply.results);
|
39 |
-
if (reply.results_full)
|
40 |
-
wr2x_refresh_full(reply.results_full);
|
41 |
-
}
|
42 |
-
if (++current <= ids.length)
|
43 |
-
wr2x_do_next();
|
44 |
-
else {
|
45 |
-
current--;
|
46 |
-
wr2x_display_please_refresh();
|
47 |
-
}
|
48 |
-
}).fail(function () {
|
49 |
-
errors++;
|
50 |
-
if (++current <= ids.length)
|
51 |
-
wr2x_do_next();
|
52 |
-
else {
|
53 |
-
current--;
|
54 |
-
wr2x_display_please_refresh();
|
55 |
-
}
|
56 |
-
});
|
57 |
-
}
|
58 |
-
|
59 |
-
function wr2x_do_all () {
|
60 |
-
current = 1;
|
61 |
-
ids = [];
|
62 |
-
errors = 0;
|
63 |
-
var data = { action: 'wr2x_list_all', issuesOnly: 0 };
|
64 |
-
data.nonce = wr2x_admin_server.nonce[data.action];
|
65 |
-
|
66 |
-
jQuery('#wr2x_progression').text(wr2x_admin_server.i18n.Wait);
|
67 |
-
jQuery.post(ajaxurl, data, function (response) {
|
68 |
-
reply = jQuery.parseJSON(response);
|
69 |
-
if (reply.success = false) {
|
70 |
-
alert('Error: ' + reply.message);
|
71 |
-
return;
|
72 |
-
}
|
73 |
-
if (reply.total == 0) {
|
74 |
-
jQuery('#wr2x_progression').html(wr2x_admin_server.i18n.Nothing_to_do);
|
75 |
-
return;
|
76 |
-
}
|
77 |
-
ids = reply.ids;
|
78 |
-
jQuery('#wr2x_progression').text(current + "/" + ids.length + " (" + Math.round(current / ids.length * 100) + "%)");
|
79 |
-
wr2x_do_next();
|
80 |
-
});
|
81 |
-
}
|
82 |
-
|
83 |
-
function wr2x_delete_all () {
|
84 |
-
ajax_action = 'delete';
|
85 |
-
wr2x_do_all();
|
86 |
-
}
|
87 |
-
|
88 |
-
function wr2x_generate_all () {
|
89 |
-
ajax_action = 'generate';
|
90 |
-
wr2x_do_all();
|
91 |
-
}
|
92 |
-
|
93 |
-
// Refresh the dashboard retina full with the results from the Ajax operation (Upload)
|
94 |
-
function wr2x_refresh_full (results) {
|
95 |
-
jQuery.each(results, function (id, html) {
|
96 |
-
jQuery('#wr2x-info-full-' + id).html(html);
|
97 |
-
jQuery('#wr2x-info-full-' + id + ' img').attr('src', jQuery('#wr2x-info-full-' + id + ' img').attr('src')+'?'+ Math.random());
|
98 |
-
jQuery('#wr2x-info-full-' + id + ' img').on('click', function (evt) {
|
99 |
-
wr2x_delete_full( jQuery(evt.target).parents('.wr2x-file-row').attr('postid') );
|
100 |
-
});
|
101 |
-
});
|
102 |
-
}
|
103 |
-
|
104 |
-
// Refresh the dashboard media sizes with the results from the Ajax operation (Replace or Generate)
|
105 |
-
function wr2x_refresh_media_sizes (results) {
|
106 |
-
jQuery.each(results, function (id, html) {
|
107 |
-
jQuery('#wr2x-info-' + id).html(html);
|
108 |
-
});
|
109 |
-
}
|
110 |
-
|
111 |
-
function wr2x_generate (attachmentId, retinaDashboard) {
|
112 |
-
var data = { action: 'wr2x_generate', attachmentId: attachmentId };
|
113 |
-
data.nonce = wr2x_admin_server.nonce[data.action];
|
114 |
-
|
115 |
-
jQuery('#wr2x_generate_button_' + attachmentId).text(wr2x_admin_server.i18n.Wait);
|
116 |
-
jQuery.post(ajaxurl, data, function (response) {
|
117 |
-
var reply = jQuery.parseJSON(response);
|
118 |
-
if (!reply.success) {
|
119 |
-
alert(reply.message);
|
120 |
-
return;
|
121 |
-
}
|
122 |
-
jQuery('#wr2x_generate_button_' + attachmentId).html(wr2x_admin_server.i18n.Generate);
|
123 |
-
wr2x_refresh_media_sizes(reply.results);
|
124 |
-
});
|
125 |
-
}
|
126 |
-
|
127 |
-
/* REPLACE FUNCTION */
|
128 |
-
|
129 |
-
function wr2x_stop_propagation(evt) {
|
130 |
-
evt.stopPropagation();
|
131 |
-
evt.preventDefault();
|
132 |
-
}
|
133 |
-
|
134 |
-
function wr2x_delete_full(attachmentId) {
|
135 |
-
var data = {
|
136 |
-
action: 'wr2x_delete_full',
|
137 |
-
isAjax: true,
|
138 |
-
attachmentId: attachmentId
|
139 |
-
};
|
140 |
-
data.nonce = wr2x_admin_server.nonce[data.action];
|
141 |
-
|
142 |
-
jQuery.post(ajaxurl, data, function (response) {
|
143 |
-
var data = jQuery.parseJSON(response);
|
144 |
-
if (data.success === false) {
|
145 |
-
alert(data.message);
|
146 |
-
}
|
147 |
-
else {
|
148 |
-
wr2x_refresh_full(data.results);
|
149 |
-
wr2x_display_please_refresh();
|
150 |
-
}
|
151 |
-
});
|
152 |
-
}
|
153 |
-
|
154 |
-
function wr2x_load_details(attachmentId) {
|
155 |
-
var data = {
|
156 |
-
action: 'wr2x_retina_details',
|
157 |
-
isAjax: true,
|
158 |
-
attachmentId: attachmentId
|
159 |
-
};
|
160 |
-
data.nonce = wr2x_admin_server.nonce[data.action];
|
161 |
-
|
162 |
-
jQuery.post(ajaxurl, data, function (response) {
|
163 |
-
var data = jQuery.parseJSON(response);
|
164 |
-
if (data.success === false) {
|
165 |
-
alert(data.message);
|
166 |
-
}
|
167 |
-
else {
|
168 |
-
jQuery('#meow-modal-info .loading').css('display', 'none');
|
169 |
-
jQuery('#meow-modal-info .content').html(data.result);
|
170 |
-
}
|
171 |
-
});
|
172 |
-
}
|
173 |
-
|
174 |
-
function wr2x_filedropped (evt) {
|
175 |
-
wr2x_stop_propagation(evt);
|
176 |
-
var files = evt.dataTransfer.files;
|
177 |
-
var count = files.length;
|
178 |
-
if (count < 0) {
|
179 |
-
return;
|
180 |
-
}
|
181 |
-
|
182 |
-
var wr2x_replace = jQuery(evt.target).parent().hasClass('wr2x-fullsize-replace');
|
183 |
-
var wr2x_upload = jQuery(evt.target).parent().hasClass('wr2x-fullsize-retina-upload');
|
184 |
-
|
185 |
-
function wr2x_handleprogress(prg) {
|
186 |
-
console.debug("Upload of " + prg.srcElement.filename + ": " + prg.loaded / prg.total * 100 + "%");
|
187 |
-
}
|
188 |
-
|
189 |
-
function wr2x_uploadFile(file, attachmentId, filename) {
|
190 |
-
var action = "";
|
191 |
-
if (wr2x_replace) {
|
192 |
-
action = 'wr2x_replace';
|
193 |
-
}
|
194 |
-
else if (wr2x_upload) {
|
195 |
-
action = 'wr2x_upload';
|
196 |
-
}
|
197 |
-
else {
|
198 |
-
alert("Unknown command. Contact the developer.");
|
199 |
-
}
|
200 |
-
var data = new FormData();
|
201 |
-
data.append('file', file);
|
202 |
-
data.append('action', action);
|
203 |
-
data.append('attachmentId', attachmentId);
|
204 |
-
data.append('isAjax', true);
|
205 |
-
data.append('filename', filename);
|
206 |
-
data.append('nonce', wr2x_admin_server.nonce[action]);
|
207 |
-
|
208 |
-
// var data = {
|
209 |
-
// action: action,
|
210 |
-
// isAjax: true,
|
211 |
-
// filename: evt.target.filename,
|
212 |
-
// data: form_data,
|
213 |
-
// attachmentId: attachmentId
|
214 |
-
// };
|
215 |
-
|
216 |
-
jQuery.ajax({
|
217 |
-
type: 'POST',
|
218 |
-
url: ajaxurl,
|
219 |
-
contentType: false,
|
220 |
-
processData: false,
|
221 |
-
data: data,
|
222 |
-
success: function (response) {
|
223 |
-
jQuery('[postid=' + attachmentId + '] td').removeClass('wr2x-loading-file');
|
224 |
-
jQuery('[postid=' + attachmentId + '] .wr2x-dragdrop').removeClass('wr2x-hover-drop');
|
225 |
-
try {
|
226 |
-
var data = jQuery.parseJSON(response);
|
227 |
-
}
|
228 |
-
catch (e) {
|
229 |
-
alert("The server-side returned an abnormal response. Check your PHP error logs and also your browser console (WP Retina 2x will try to display it there).");
|
230 |
-
console.debug(response);
|
231 |
-
return;
|
232 |
-
}
|
233 |
-
if (wr2x_replace) {
|
234 |
-
var imgSelector = '[postid=' + attachmentId + '] .wr2x-info-thumbnail img';
|
235 |
-
jQuery(imgSelector).attr('src', jQuery(imgSelector).attr('src')+'?'+ Math.random());
|
236 |
-
}
|
237 |
-
if (wr2x_upload) {
|
238 |
-
var imgSelector = '[postid=' + attachmentId + '] .wr2x-info-full img';
|
239 |
-
jQuery(imgSelector).attr('src', jQuery(imgSelector).attr('src')+'?'+ Math.random());
|
240 |
-
}
|
241 |
-
if (data.success === false) {
|
242 |
-
alert(data.message);
|
243 |
-
}
|
244 |
-
else {
|
245 |
-
if ( wr2x_replace ) {
|
246 |
-
wr2x_refresh_media_sizes(data.results);
|
247 |
-
}
|
248 |
-
else if ( wr2x_upload ) {
|
249 |
-
wr2x_refresh_full(data.results);
|
250 |
-
}
|
251 |
-
}
|
252 |
-
},
|
253 |
-
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
254 |
-
jQuery('[postid=' + attachmentId + '] td').removeClass('wr2x-loading-file');
|
255 |
-
jQuery('[postid=' + attachmentId + '] .wr2x-dragdrop').removeClass('wr2x-hover-drop');
|
256 |
-
alert("An error occurred on the server-side. Please check your PHP error logs.");
|
257 |
-
}
|
258 |
-
});
|
259 |
-
}
|
260 |
-
var file = files[0];
|
261 |
-
if (file.size > maxPhpSize) {
|
262 |
-
jQuery(this).removeClass('wr2x-hover-drop');
|
263 |
-
alert( "Your PHP configuration only allows file upload of a maximum of " + (maxPhpSize / 1000000) + "MB." );
|
264 |
-
return;
|
265 |
-
}
|
266 |
-
var postId = jQuery(evt.target).parents('.wr2x-file-row').attr('postid');
|
267 |
-
jQuery(evt.target).parents('td').addClass('wr2x-loading-file');
|
268 |
-
wr2x_uploadFile(file, postId, file.name);
|
269 |
-
}
|
270 |
-
|
271 |
-
jQuery(document).ready(function () {
|
272 |
-
jQuery('.wr2x-dragdrop').on('dragenter', function (evt) {
|
273 |
-
wr2x_stop_propagation(evt);
|
274 |
-
jQuery(this).addClass('wr2x-hover-drop');
|
275 |
-
});
|
276 |
-
|
277 |
-
jQuery('.wr2x-dragdrop').on('dragover', function (evt) {
|
278 |
-
wr2x_stop_propagation(evt);
|
279 |
-
jQuery(this).addClass('wr2x-hover-drop');
|
280 |
-
});
|
281 |
-
|
282 |
-
jQuery('.wr2x-dragdrop').on('dragleave', function (evt) {
|
283 |
-
wr2x_stop_propagation(evt);
|
284 |
-
jQuery(this).removeClass('wr2x-hover-drop');
|
285 |
-
});
|
286 |
-
|
287 |
-
jQuery('.wr2x-dragdrop').on('dragexit', wr2x_stop_propagation);
|
288 |
-
|
289 |
-
jQuery('.wr2x-dragdrop').each(function (index, elem) {
|
290 |
-
this.addEventListener('drop', wr2x_filedropped);
|
291 |
-
});
|
292 |
-
|
293 |
-
jQuery('.wr2x-info, .wr2x-button-view').on('click', function (evt) {
|
294 |
-
jQuery('#meow-modal-info-backdrop').css('display', 'block');
|
295 |
-
jQuery('#meow-modal-info .content').html("");
|
296 |
-
jQuery('#meow-modal-info .loading').css('display', 'block');
|
297 |
-
jQuery('#meow-modal-info').css('display', 'block');
|
298 |
-
jQuery('#meow-modal-info').focus();
|
299 |
-
var postid = jQuery(evt.target).parents('.wr2x-info').attr('postid');
|
300 |
-
if (!postid)
|
301 |
-
postid = jQuery(evt.target).parents('.wr2x-file-row').attr('postid');
|
302 |
-
wr2x_load_details(postid);
|
303 |
-
});
|
304 |
-
|
305 |
-
jQuery('#meow-modal-info .close, #meow-modal-info-backdrop').on('click', function (evt) {
|
306 |
-
jQuery('#meow-modal-info').css('display', 'none');
|
307 |
-
jQuery('#meow-modal-info-backdrop').css('display', 'none');
|
308 |
-
});
|
309 |
-
|
310 |
-
jQuery('.wr2x-info-full img').on('click', function (evt) {
|
311 |
-
wr2x_delete_full( jQuery(evt.target).parents('.wr2x-file-row').attr('postid') );
|
312 |
-
});
|
313 |
-
|
314 |
-
jQuery('#meow-modal-info').bind('keydown', function (evt) {
|
315 |
-
if (evt.keyCode === 27) {
|
316 |
-
jQuery('#meow-modal-info').css('display', 'none');
|
317 |
-
jQuery('#meow-modal-info-backdrop').css('display', 'none');
|
318 |
-
}
|
319 |
-
});
|
320 |
-
|
321 |
-
/**
|
322 |
-
* Retina Uploader
|
323 |
-
*/
|
324 |
-
(function ($) {
|
325 |
-
/**
|
326 |
-
* @constructor
|
327 |
-
*/
|
328 |
-
function Upload(File) {
|
329 |
-
if (!this.validate(File)) return; // Invalid file
|
330 |
-
this.file = File;
|
331 |
-
this.loaded = 0;
|
332 |
-
this.total = 0;
|
333 |
-
this.doms = {
|
334 |
-
wrap: null,
|
335 |
-
filename: null,
|
336 |
-
progress: null,
|
337 |
-
percent: null,
|
338 |
-
bar: null
|
339 |
-
};
|
340 |
-
this.request();
|
341 |
-
}
|
342 |
-
Upload.prototype.getProgress = function (Mul = 1) {
|
343 |
-
if (!this.total) return 0;
|
344 |
-
var r = (this.loaded / this.total) * Mul;
|
345 |
-
return Math.round(r * 10) / 10;
|
346 |
-
}
|
347 |
-
Upload.prototype.validate = function (File) {
|
348 |
-
var err;
|
349 |
-
if (!'type' in File || !File.type)
|
350 |
-
err = 'Unknown File Type';
|
351 |
-
else if (!File.type.match(/^image\//)) // Not image
|
352 |
-
err = 'Unsupported File Type';
|
353 |
-
|
354 |
-
if (err) {
|
355 |
-
console.error(err);
|
356 |
-
alert(err);
|
357 |
-
return false;
|
358 |
-
}
|
359 |
-
return true;
|
360 |
-
}
|
361 |
-
Upload.prototype.request = function () {
|
362 |
-
var self = this;
|
363 |
-
var action = 'wr2x_retina_upload';
|
364 |
-
var data = new FormData();
|
365 |
-
data.append('action', action);
|
366 |
-
data.append('isAjax', true);
|
367 |
-
data.append('nonce', wr2x_admin_server.nonce[action]);
|
368 |
-
data.append('file', this.file);
|
369 |
-
data.append('filename', this.file.name);
|
370 |
-
|
371 |
-
this.show();
|
372 |
-
|
373 |
-
$.ajax({
|
374 |
-
type: 'POST',
|
375 |
-
url: ajaxurl,
|
376 |
-
contentType: false,
|
377 |
-
processData: false,
|
378 |
-
data: data,
|
379 |
-
// Custom XHR
|
380 |
-
xhr: function () {
|
381 |
-
var xhr = new XMLHttpRequest();
|
382 |
-
// Watch upload progress
|
383 |
-
xhr.upload.addEventListener('progress', function (ev) {
|
384 |
-
if (!ev.lengthComputable) return xhr;
|
385 |
-
self.loaded = ev.loaded;
|
386 |
-
self.total = ev.total;
|
387 |
-
self.update();
|
388 |
-
}, false);
|
389 |
-
return xhr;
|
390 |
-
}
|
391 |
-
|
392 |
-
}).done(function (response) {
|
393 |
-
try {
|
394 |
-
response = $.parseJSON(response);
|
395 |
-
} catch (e) { // Malformed Response
|
396 |
-
self.abort();
|
397 |
-
console.error(e);
|
398 |
-
alert('Invalid Response');
|
399 |
-
return;
|
400 |
-
}
|
401 |
-
if (!response.success) { // App Error
|
402 |
-
self.abort();
|
403 |
-
var msg = 'message' in response ?
|
404 |
-
response.message : 'Error';
|
405 |
-
console.error(msg);
|
406 |
-
alert(msg);
|
407 |
-
return;
|
408 |
-
}
|
409 |
-
// Remove the progress indicator
|
410 |
-
self.doms.progress.remove();
|
411 |
-
|
412 |
-
// Edit Link
|
413 |
-
$('<a class="edit-attachment">')
|
414 |
-
.attr('href', response.media.edit_url)
|
415 |
-
.attr('target', '_blank')
|
416 |
-
.text('Edit')
|
417 |
-
.prependTo(self.doms.wrap);
|
418 |
-
|
419 |
-
// Show the thumbnail
|
420 |
-
$('<img class="pinkynail">')
|
421 |
-
.attr('src', response.media.src[0])
|
422 |
-
.prependTo(self.doms.wrap);
|
423 |
-
|
424 |
-
// Just mocking the built-in behavior
|
425 |
-
self.doms.filename
|
426 |
-
.removeClass('original')
|
427 |
-
.addClass('new');
|
428 |
-
|
429 |
-
}).fail(function (e) { // HTTP Error
|
430 |
-
self.abort();
|
431 |
-
var msg = e.status + ' ' + e.statusText;
|
432 |
-
console.error(msg);
|
433 |
-
alert(msg + '\n' + 'An error occurred on the server-side. Please check your PHP error logs.');
|
434 |
-
});
|
435 |
-
}
|
436 |
-
Upload.prototype.show = function () {
|
437 |
-
// Ideal HTML:
|
438 |
-
// <div class="media-item child-of-0" id="media-item">
|
439 |
-
// <div class="progress">
|
440 |
-
// <div class="percent">100%</div>
|
441 |
-
// <div class="bar" style="width: 200px;"></div>
|
442 |
-
// </div>
|
443 |
-
// <div class="filename original">image.jpg</div>
|
444 |
-
// </div>
|
445 |
-
this.doms.wrap = $('<div class="media-item wr2x-retina-uploaded">');
|
446 |
-
this.doms.filename = $('<div class="filename original">')
|
447 |
-
.text(this.file.name)
|
448 |
-
.appendTo(this.doms.wrap);
|
449 |
-
|
450 |
-
this.doms.wrap.appendTo('#media-items'); // First Appearance
|
451 |
-
}
|
452 |
-
Upload.prototype.update = function () {
|
453 |
-
if (!this.doms.progress) { // Initialize the progress bar
|
454 |
-
this.doms.progress = $('<div class="progress">').prependTo(this.doms.wrap);
|
455 |
-
this.doms.percent = $('<div class="percent">').appendTo(this.doms.progress);
|
456 |
-
this.doms.bar = $('<div class="bar">').appendTo(this.doms.progress);
|
457 |
-
}
|
458 |
-
this.doms.percent.text(this.getProgress(100) + '%');
|
459 |
-
this.doms.bar.css('width', this.getProgress(200) + 'px');
|
460 |
-
}
|
461 |
-
Upload.prototype.abort = function () {
|
462 |
-
this.doms.wrap.remove();
|
463 |
-
}
|
464 |
-
|
465 |
-
/** Initialize DOMs **/
|
466 |
-
|
467 |
-
// Drag & Drop Area
|
468 |
-
var dnd = $('#wr2x_drag-drop-area')
|
469 |
-
dnd.on('dragenter dragover', function (ev) {
|
470 |
-
wr2x_stop_propagation(ev);
|
471 |
-
$(this).addClass('wr2x-hover-drop');
|
472 |
-
|
473 |
-
}).on('dragleave dragexit', function (ev) {
|
474 |
-
wr2x_stop_propagation(ev);
|
475 |
-
$(this).removeClass('wr2x-hover-drop');
|
476 |
-
|
477 |
-
}).on('drop', function (ev) {
|
478 |
-
wr2x_stop_propagation(ev);
|
479 |
-
$(this).removeClass('wr2x-hover-drop');
|
480 |
-
var _ev = ev.originalEvent;
|
481 |
-
var files = _ev.dataTransfer.files;
|
482 |
-
for (var i = 0; i < files.length; i++) new Upload(files[i]);
|
483 |
-
});
|
484 |
-
|
485 |
-
// File Selector
|
486 |
-
var selector = $('#wr2x_file-selector');
|
487 |
-
selector.on('change', function (ev) {
|
488 |
-
var files = ev.target.files;
|
489 |
-
for (var i = 0; i < files.length; i++) new Upload(files[i]);
|
490 |
-
});
|
491 |
-
var btn = $('#wr2x_file-select-button');
|
492 |
-
btn.on('click', function (ev) {
|
493 |
-
selector.trigger('click');
|
494 |
-
});
|
495 |
-
|
496 |
-
})(jQuery);
|
497 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/debug.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
window.devicePixelRatio = 2;
|
|
loading.gif
DELETED
Binary file
|
media-library.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Meow_WR2X_MediaLibrary {
|
4 |
-
|
5 |
-
public $core = null;
|
6 |
-
|
7 |
-
public function __construct( $core ) {
|
8 |
-
$this->core = $core;
|
9 |
-
add_filter( 'manage_media_columns', array( $this, 'manage_media_columns' ) );
|
10 |
-
add_action( 'manage_media_custom_column', array( $this, 'manage_media_custom_column' ), 10, 2 );
|
11 |
-
add_action( 'admin_footer', array( $this, 'admin_footer_library' ) );
|
12 |
-
}
|
13 |
-
|
14 |
-
function manage_media_columns( $cols ) {
|
15 |
-
$cols["Retina"] = "Retina";
|
16 |
-
return $cols;
|
17 |
-
}
|
18 |
-
|
19 |
-
function manage_media_custom_column( $column_name, $id ) {
|
20 |
-
if ( $column_name == 'Retina' ) {
|
21 |
-
$info = $this->core->retina_info( $id );
|
22 |
-
if ( empty( $info ) )
|
23 |
-
return;
|
24 |
-
$info = $this->core->html_get_basic_retina_info( $id, $info );
|
25 |
-
echo "<a style='' onclick='wr2x_generate(" . $id . ", true)' id='wr2x_generate_button_" .
|
26 |
-
$id . "' class='wr2x-button'>" . __( "GENERATE", 'wp-retina-2x' ) . "</a><br />";
|
27 |
-
echo '<div class="wr2x-info" postid="' . $id . '" id="wr2x-info-' . $id . '">';
|
28 |
-
echo $info;
|
29 |
-
echo '</div>';
|
30 |
-
}
|
31 |
-
else if ( $column_name == 'Retina-Actions' ) {
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
function admin_footer_library() {
|
36 |
-
$screen = get_current_screen();
|
37 |
-
if ( $screen->base != 'upload' && $screen->base != 'media_page_wp-retina-2x' )
|
38 |
-
return;
|
39 |
-
?>
|
40 |
-
<div id="meow-modal-info-backdrop" style="display: none;">
|
41 |
-
</div>
|
42 |
-
|
43 |
-
<div id="meow-modal-info" style="display: none;" tabindex="1">
|
44 |
-
<div class="close">X</div>
|
45 |
-
<h2 style="margin-top: 0px;">Retina Details</h2>
|
46 |
-
<div class="loading">
|
47 |
-
<img src="<?php echo plugin_dir_url( __FILE__ ); ?>loading.gif" />
|
48 |
-
</div>
|
49 |
-
<div class="content">
|
50 |
-
</div>
|
51 |
-
</div>
|
52 |
-
<?php
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,26 +1,38 @@
|
|
1 |
-
===
|
2 |
Contributors: TigrouMeow
|
3 |
-
Tags: retina, images,
|
4 |
Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a950f61832f
|
5 |
-
Requires at least:
|
6 |
-
Tested up to: 5.
|
7 |
-
Requires PHP:
|
8 |
-
Stable tag:
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
18 |
|
19 |
-
===
|
20 |
-
|
21 |
|
22 |
-
===
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
=== Optimized ===
|
26 |
The plugin is very fast and optimized. It doesn't create anything in the database.
|
@@ -39,10 +51,45 @@ The plugin cannot inject CSS to handles the images added through CSS, that's bot
|
|
39 |
|
40 |
== Changelog ==
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
= 5.6.1 =
|
43 |
* Update: Lazysize from 5.1.1 to 5.2.2.
|
44 |
* Update: PHP Simple Dom updated to 1.9.1.
|
45 |
-
* Info: This is (probably) the last release before a major release in which the whole UI will be re-coded (and everything will be much better and faster). In order to make sure you will be happy with this new release, I made a survey using Google Forms. Please visit it [here](https://forms.gle/wv2tgaEYTKTcDZBA6). Thanks a lot :)
|
46 |
|
47 |
= 5.6.0 =
|
48 |
* Add: Option to remove the image size threshold (which is set to 2560 since WordPress 5.3).
|
@@ -201,7 +248,7 @@ The plugin cannot inject CSS to handles the images added through CSS, that's bot
|
|
201 |
* Change: different way of getting the temporary folder to write files (might help in a few cases).
|
202 |
|
203 |
= 3.1.0 =
|
204 |
-
* Add: Lazy-loading option for PictureFill
|
205 |
* Fix: For the Pro users having the IXR_client error.
|
206 |
* Fix: Plugin now works even behind a proxy.
|
207 |
* Fix: Little UI bug while uploading a new image.
|
1 |
+
=== Perfect Images + Retina ===
|
2 |
Contributors: TigrouMeow
|
3 |
+
Tags: retina, images, replace, regenerate, sizes, lazysizes, high-dpi
|
4 |
Donate link: https://commerce.coinbase.com/checkout/d047546a-77a8-41c8-9ea9-4a950f61832f
|
5 |
+
Requires at least: 5.0
|
6 |
+
Tested up to: 5.6
|
7 |
+
Requires PHP: 5.6
|
8 |
+
Stable tag: 6.1.1
|
9 |
|
10 |
+
Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image Threshold and more.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Originally, this plugin only took care of one thing: Retina Images. But with time, WordPress installs became more and more complex, and it was decided that this plugin should help you more with your images. Here are the main features.
|
15 |
|
16 |
+
* Retina Images
|
17 |
+
* Image Sizes Management
|
18 |
+
* Disable Image Threshold
|
19 |
+
* Regenerate Thumbnails
|
20 |
+
* Replace Images
|
21 |
|
22 |
+
=== Retina Images ===
|
23 |
+
The plugin creates the image files required by the High-DPI devices and it displays them to your visitors accordingly. Your website will look beautiful and crisp on every device! The retina images will be generated for you automatically (though you can also do it manually) and served to the retina devices. The concept of retina images for full-size images is also a very unique feature which is only provided by this plugin (which is why it became unique). More information and tutorial available on the [official website](https://meowapps.com/plugin/wp-retina-2x/).
|
24 |
|
25 |
+
=== Image Sizes Management ===
|
26 |
+
In WordPress, it's impossible to actually know which sizes are set up by your whole system and even less to control them. With Perfect Images, you will be able to disable the sizes you do not want. Also, in the Dashboard, you will be able to check which are the sizes created for each of your media entries. For example, this will allow you to disable the medium_large, 1536x1536, and 2048x2048 sizes which are now created by WordPress automatically and useless in most cases.
|
27 |
+
|
28 |
+
=== Disable Image Threshold ===
|
29 |
+
Maybe you noticed that, sometimes, you had files suffixed with "-scaled" at the end of their filenames. This is because WordPress resizes big images automatically, and it doesn't give you the choice. Perfect Images gives you control over this feature.
|
30 |
+
|
31 |
+
=== Regenerate Thumbnails ===
|
32 |
+
Every time your registered sizes are changed, you need to regenerate your thumbnails. Since Perfect Images does a lot with image sizes, this is a feature which had to be built. Of course, it supports bulk actions.
|
33 |
+
|
34 |
+
=== Replace Images ===
|
35 |
+
If you wish to replace an image by another one, you can do it very quickly and easily with this plugin.
|
36 |
|
37 |
=== Optimized ===
|
38 |
The plugin is very fast and optimized. It doesn't create anything in the database.
|
51 |
|
52 |
== Changelog ==
|
53 |
|
54 |
+
= 6.1.1 =
|
55 |
+
* Annoucement: Partnership with Easy IO! Probably the best deal on the market to optimize your images :)
|
56 |
+
* Fix: Some variables should be initialized as arrays instead of booleans.
|
57 |
+
* Fix: The CDN domain could not be modifed.
|
58 |
+
|
59 |
+
= 6.1.0 =
|
60 |
+
* Fix: PictureFill was not being ran, the Responsive Images method was instead.
|
61 |
+
|
62 |
+
= 6.0.8 =
|
63 |
+
* Fix: Avoid crashing the Retina Dashboard when there are no Retina images at all.
|
64 |
+
|
65 |
+
= 6.0.7 =
|
66 |
+
* Update: Much better dashboard.
|
67 |
+
* Fix: Upload New Retina Image.
|
68 |
+
* Add: Dashboard search.
|
69 |
+
* Add: Ignore button.
|
70 |
+
* Update: Upload in directly in the dashboard.
|
71 |
+
|
72 |
+
= 6.0.5 =
|
73 |
+
* Add: Implementation of Easy IO (CDN + Image Optimization).
|
74 |
+
* Add: Versioning for images, when they are replaced (that helps CDNs to refresh themselves).
|
75 |
+
|
76 |
+
= 6.0.4 =
|
77 |
+
* Fix: The dashboard was crashing when a non-image was being shown.
|
78 |
+
* Update: Removed the unused code from the plugin.
|
79 |
+
* Update: Optimized the way data is loaded in the dashboard.
|
80 |
+
|
81 |
+
= 6.0.3 =
|
82 |
+
* Fix: The API wasn't accessible anymore.
|
83 |
+
* Fix: Lazysizes was only working with PictureFill.
|
84 |
+
* Fix: Avoid the JS of common admin to load more than once.
|
85 |
+
|
86 |
+
= 6.0.2 =
|
87 |
+
* Update: A lot of new features: Image Sizes Management, Disable Image Threshold, Regenerate Thumbnails, Replace Images.
|
88 |
+
* Update: Completely new UI for the Dashboard and the Settings.
|
89 |
+
|
90 |
= 5.6.1 =
|
91 |
* Update: Lazysize from 5.1.1 to 5.2.2.
|
92 |
* Update: PHP Simple Dom updated to 1.9.1.
|
|
|
93 |
|
94 |
= 5.6.0 =
|
95 |
* Add: Option to remove the image size threshold (which is set to 2560 since WordPress 5.3).
|
248 |
* Change: different way of getting the temporary folder to write files (might help in a few cases).
|
249 |
|
250 |
= 3.1.0 =
|
251 |
+
* Add: Lazy-loading option for PictureFill.
|
252 |
* Fix: For the Pro users having the IXR_client error.
|
253 |
* Fix: Plugin now works even behind a proxy.
|
254 |
* Fix: Little UI bug while uploading a new image.
|
wp-retina-2x.php
CHANGED
@@ -1,67 +1,75 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name:
|
4 |
Plugin URI: https://meowapps.com
|
5 |
-
Description:
|
6 |
-
Version:
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: wp-retina-2x
|
10 |
Domain Path: /languages
|
11 |
|
12 |
-
Dual licensed under the MIT and GPL licenses:
|
13 |
-
http://www.opensource.org/licenses/mit-license.php
|
14 |
-
http://www.gnu.org/licenses/gpl.html
|
15 |
-
|
16 |
Originally developed for two of my websites:
|
17 |
- Jordy Meow (https://offbeatjapan.org)
|
18 |
- Haikyo (https://haikyo.org)
|
19 |
*/
|
20 |
|
21 |
-
if (
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
add_action( 'admin_notices', 'mfrh_admin_notices' );
|
26 |
-
return;
|
27 |
-
}
|
28 |
-
|
29 |
-
if ( !get_option( 'wr2x_form_2020' ) ) {
|
30 |
-
function wr2x_form_2020_admin_notices() {
|
31 |
-
echo '<div class="notice notice-error"><h2>The new WP Retina 2x is coming soon!</h2>';
|
32 |
-
echo '<p>The web, the browsers, and WordPress all evolved a lot. Today, the technical situation about images has stabilized, so I would like to try my best and simplify this plugin, make it faster and better. <b>Could you reply to a few questions I have for you?</b> I made a survey with Google Forms: <a target="_blank" href="https://forms.gle/wv2tgaEYTKTcDZBA6">click here</a>. It is quite important to reply to it, as your answer will strongly impact the next version. Thanks a lot :)</p>';
|
33 |
echo '<p>
|
34 |
<form method="post" action="">
|
35 |
-
<input type="hidden" name="
|
36 |
<input type="submit" name="submit" id="submit" class="button" value="Got it. Hide this forever!">
|
37 |
</form>
|
38 |
</p>
|
39 |
';
|
40 |
echo '</div>';
|
41 |
}
|
42 |
-
if ( isset( $_POST['
|
43 |
-
update_option( '
|
44 |
}
|
45 |
else
|
46 |
-
add_action( 'admin_notices', '
|
47 |
}
|
48 |
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
61 |
|
62 |
-
|
63 |
-
require( 'core.php' );
|
64 |
-
$wr2x_core = new Meow_WR2X_Core( $wr2x_admin );
|
65 |
-
$wr2x_admin->core = $wr2x_core;
|
66 |
|
67 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Perfect Images + Retina
|
4 |
Plugin URI: https://meowapps.com
|
5 |
+
Description: Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image Threshold and more.
|
6 |
+
Version: 6.1.1
|
7 |
Author: Jordy Meow
|
8 |
Author URI: https://meowapps.com
|
9 |
Text Domain: wp-retina-2x
|
10 |
Domain Path: /languages
|
11 |
|
|
|
|
|
|
|
|
|
12 |
Originally developed for two of my websites:
|
13 |
- Jordy Meow (https://offbeatjapan.org)
|
14 |
- Haikyo (https://haikyo.org)
|
15 |
*/
|
16 |
|
17 |
+
if ( !get_option( 'wr2x_version_6_0_0' ) ) {
|
18 |
+
function wr2x_version_6_0_0_admin_notices() {
|
19 |
+
echo '<div class="notice notice-error"><h2>WP Retina 2x is now called... <b>Perfect Images!</b></h2>';
|
20 |
+
echo '<p>WordPress is evolving, the way we are using images as well. I knew I had to simplify how Retina works by default (while keeping the same options), but also that I had to provide features to manage your image sizes better. Along with this, the features which were buried in the plugin are now much more obvious and easier to use (Replace Images, Regenerate Thumbnails, etc). This plugin will now evolve with WordPress, making sure best practices are easily actionable. Thanks for your support! And if you have some time, do not hesitate to let a little review <a href="https://wordpress.org/support/plugin/wp-retina-2x/reviews/?rate=5#new-post">here</a>. :)</p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
echo '<p>
|
22 |
<form method="post" action="">
|
23 |
+
<input type="hidden" name="wr2x_version_6_0_0" value="true">
|
24 |
<input type="submit" name="submit" id="submit" class="button" value="Got it. Hide this forever!">
|
25 |
</form>
|
26 |
</p>
|
27 |
';
|
28 |
echo '</div>';
|
29 |
}
|
30 |
+
if ( isset( $_POST['wr2x_version_6_0_0'] ) ) {
|
31 |
+
update_option( 'wr2x_version_6_0_0', true, false );
|
32 |
}
|
33 |
else
|
34 |
+
add_action( 'admin_notices', 'wr2x_version_6_0_0_admin_notices' );
|
35 |
}
|
36 |
|
37 |
+
// We should enable this later, to avoid the two update messages to show at the same
|
38 |
+
// time... maybe, let's do this in December?
|
39 |
+
|
40 |
+
if ( !get_option( 'wr2x_notice_easyio' ) ) {
|
41 |
+
function wr2x_easy_io_admin_notices() {
|
42 |
+
echo '<div class="notice notice-error"><h2>Perfect Images brings its own all-in one Image Optimization + CDN offer! 🥳<b></b></h2>';
|
43 |
+
echo '<p>This is a big news, as I dreamed of this for many years! I really wanted to bring perfect image optimization coupled with a CDN, while being easy to use and affordable. And now, thanks to a partnership with EWWW (which has really nice back-end infrastructure), it is here! Please check the Settings, in <b>Meow Apps > Perfect Images > Optimization & Speed</b>. Enjoy and let me know how it goes!
|
44 |
+
</p>';
|
45 |
+
echo '<p>
|
46 |
+
<form method="post" action="">
|
47 |
+
<input type="hidden" name="wr2x_notice_easyio" value="true">
|
48 |
+
<input type="submit" name="submit" id="submit" class="button" value="Nice! But please hide that now!">
|
49 |
+
</form>
|
50 |
+
</p>
|
51 |
+
';
|
52 |
+
echo '</div>';
|
53 |
+
}
|
54 |
+
if ( isset( $_POST['wr2x_notice_easyio'] ) ) {
|
55 |
+
update_option( 'wr2x_notice_easyio', true, false );
|
56 |
+
}
|
57 |
+
else
|
58 |
+
add_action( 'admin_notices', 'wr2x_easy_io_admin_notices' );
|
59 |
+
}
|
60 |
|
61 |
+
define( 'WR2X_VERSION', '6.1.1' );
|
62 |
+
define( 'WR2X_PREFIX', 'wr2x' );
|
63 |
+
define( 'WR2X_DOMAIN', ' wp-retina-2x' );
|
64 |
+
define( 'WR2X_ENTRY', __FILE__ );
|
65 |
+
define( 'WR2X_PATH', dirname( __FILE__ ) );
|
66 |
+
define( 'WR2X_URL', plugin_dir_url( __FILE__ ) );
|
67 |
|
68 |
+
define ( 'WR2X_VERSION_RETINAJS', '5.6.1' );
|
69 |
+
define ( 'WR2X_VERSION_PICTUREFILL', '3.0.2' );
|
70 |
+
define ( 'WR2X_VERSION_LAZYSIZES', '5.1.0' );
|
71 |
+
define ( 'WR2X_VERSION_RETINA_IMAGES', '1.7.2' );
|
72 |
|
73 |
+
require_once( 'classes/init.php');
|
|
|
|
|
|
|
74 |
|
75 |
?>
|
wr2x_admin.css
DELETED
@@ -1,226 +0,0 @@
|
|
1 |
-
#wr2x-pages {
|
2 |
-
float: right;
|
3 |
-
position: relative;
|
4 |
-
top: 12px;
|
5 |
-
}
|
6 |
-
|
7 |
-
.wr2x-hover-drop {
|
8 |
-
background: #FED5FF;
|
9 |
-
}
|
10 |
-
|
11 |
-
.wr2x-hover-drop .wr2x-title {
|
12 |
-
background: url('replace.png');
|
13 |
-
background-position: 5px 4px;
|
14 |
-
background-repeat: no-repeat;
|
15 |
-
}
|
16 |
-
|
17 |
-
.wr2x-loading-file .wr2x-title {
|
18 |
-
background: url('loading.gif');
|
19 |
-
background-position: 5px 1px;
|
20 |
-
background-repeat: no-repeat;
|
21 |
-
}
|
22 |
-
|
23 |
-
.wr2x-loading-file .wr2x-title a, .wr2x-loading-file .wr2x-title span,
|
24 |
-
.wr2x-hover-drop .wr2x-title a, .wr2x-hover-drop .wr2x-title span {
|
25 |
-
opacity: 0.0;
|
26 |
-
}
|
27 |
-
|
28 |
-
#wr2x-pages a {
|
29 |
-
text-decoration: none;
|
30 |
-
border: 1px solid black;
|
31 |
-
padding: 2px 5px;
|
32 |
-
border-radius: 4px;
|
33 |
-
background: #E9E9E9;
|
34 |
-
color: lightslategrey;
|
35 |
-
border-color: #BEBEBE;
|
36 |
-
}
|
37 |
-
|
38 |
-
#wr2x-pages .current {
|
39 |
-
font-weight: bold;
|
40 |
-
}
|
41 |
-
|
42 |
-
.widefat td .button {
|
43 |
-
margin-right: 2px;
|
44 |
-
}
|
45 |
-
|
46 |
-
.widefat td .button:last-child {
|
47 |
-
margin-right: 0px;
|
48 |
-
}
|
49 |
-
|
50 |
-
.wr2x-table th {
|
51 |
-
font-size: 11px;
|
52 |
-
}
|
53 |
-
|
54 |
-
#wr2x-pages + .subsubsub #icl_subsubsub, #wr2x-pages + .subsubsub br {
|
55 |
-
display: none;
|
56 |
-
}
|
57 |
-
|
58 |
-
.wr2x-image {
|
59 |
-
padding: 0px;
|
60 |
-
}
|
61 |
-
|
62 |
-
.wr2x-image img {
|
63 |
-
margin-bottom: 0px;
|
64 |
-
margin-right: 0px;
|
65 |
-
max-width: 64px;
|
66 |
-
max-height: 64px;
|
67 |
-
}
|
68 |
-
|
69 |
-
.wr2x-info-full img {
|
70 |
-
border: 1px solid white;
|
71 |
-
}
|
72 |
-
|
73 |
-
.wr2x-info-full img:hover {
|
74 |
-
cursor: not-allowed;
|
75 |
-
border: 1px solid red;
|
76 |
-
}
|
77 |
-
|
78 |
-
.wr2x-title {
|
79 |
-
line-height: 16px !important;
|
80 |
-
}
|
81 |
-
|
82 |
-
.wr2x-title .resolution {
|
83 |
-
font-size: 11px;
|
84 |
-
line-height: 10px;
|
85 |
-
}
|
86 |
-
|
87 |
-
.wr2x-title .resolution .red {
|
88 |
-
color: red;
|
89 |
-
font-weight: bold;
|
90 |
-
}
|
91 |
-
|
92 |
-
.wr2x-title .actions {
|
93 |
-
margin-top: 5px;
|
94 |
-
}
|
95 |
-
|
96 |
-
.wr2x-button {
|
97 |
-
font-size: 10px;
|
98 |
-
background: #3E79BB;
|
99 |
-
color: white;
|
100 |
-
display: inline;
|
101 |
-
padding: 2px 6px;
|
102 |
-
height: 18px;
|
103 |
-
box-sizing: border-box;
|
104 |
-
text-transform: uppercase;
|
105 |
-
}
|
106 |
-
|
107 |
-
.wr2x-button:hover {
|
108 |
-
color: white;
|
109 |
-
cursor: pointer;
|
110 |
-
background: #5D93CF;
|
111 |
-
}
|
112 |
-
|
113 |
-
.wr2x-button-ignore {
|
114 |
-
background: #A8A8A8
|
115 |
-
}
|
116 |
-
|
117 |
-
.wr2x-button-ignore:hover {
|
118 |
-
background: #CFCFCF;
|
119 |
-
}
|
120 |
-
|
121 |
-
.wr2x-dragdrop {
|
122 |
-
margin: 0px 0px;
|
123 |
-
width: 48px;
|
124 |
-
height: 48px;
|
125 |
-
border: dashed 2px #BBB;
|
126 |
-
}
|
127 |
-
|
128 |
-
.wr2x-loading-file .wr2x-dragdrop {
|
129 |
-
background-color: rgb(243, 243, 243);
|
130 |
-
background-image: url('loading.gif');
|
131 |
-
background-size: 48px 48px;
|
132 |
-
background-position-y: 4px;
|
133 |
-
background-repeat: no-repeat;
|
134 |
-
border: none;
|
135 |
-
}
|
136 |
-
|
137 |
-
.wp-core-ui .button-red {
|
138 |
-
background-color: #9B2124;
|
139 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#C5292E), to(#9B2124));
|
140 |
-
background-image: -webkit-linear-gradient(top, #C5292E, #9B2124);
|
141 |
-
background-image: -moz-linear-gradient(top, #C5292E, #9B2124);
|
142 |
-
background-image: -ms-linear-gradient(top, #C5292E, #9B2124);
|
143 |
-
background-image: -o-linear-gradient(top, #C5292E, #9B2124);
|
144 |
-
background-image: linear-gradient(to bottom, #C5292E, #9B2124);
|
145 |
-
border-color: #9B2124;
|
146 |
-
border-bottom-color: #8D1F21;
|
147 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
148 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
|
149 |
-
color: #fff;
|
150 |
-
text-decoration: none;
|
151 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
152 |
-
float: right;
|
153 |
-
}
|
154 |
-
|
155 |
-
.wp-core-ui .button-red.hover,
|
156 |
-
.wp-core-ui .button-red:hover,
|
157 |
-
.wp-core-ui .button-red.focus,
|
158 |
-
.wp-core-ui .button-red:focus {
|
159 |
-
background-color: #B72629;
|
160 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#D22E30), to(#9B2124));
|
161 |
-
background-image: -webkit-linear-gradient(top, #D22E30, #9B2124);
|
162 |
-
background-image: -moz-linear-gradient(top, #D22E30, #9B2124);
|
163 |
-
background-image: -ms-linear-gradient(top, #D22E30, #9B2124);
|
164 |
-
background-image: -o-linear-gradient(top, #D22E30, #9B2124);
|
165 |
-
background-image: linear-gradient(to bottom, #D22E30, #9B2124);
|
166 |
-
border-color: #7F1C1F;
|
167 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
168 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
|
169 |
-
color: #fff;
|
170 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
|
171 |
-
}
|
172 |
-
|
173 |
-
.wp-core-ui .button-red.focus,
|
174 |
-
.wp-core-ui .button-red:focus {
|
175 |
-
border-color: #500F0E;
|
176 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
|
177 |
-
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
|
178 |
-
}
|
179 |
-
|
180 |
-
.wp-core-ui .button-red.active,
|
181 |
-
.wp-core-ui .button-red.active:hover,
|
182 |
-
.wp-core-ui .button-red.active:focus,
|
183 |
-
.wp-core-ui .button-red:active {
|
184 |
-
background: #7F1C1F;
|
185 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(#9B2124), to(#B72629));
|
186 |
-
background-image: -webkit-linear-gradient(top, #9B2124, #B72629);
|
187 |
-
background-image: -moz-linear-gradient(top, #9B2124, #B72629);
|
188 |
-
background-image: -ms-linear-gradient(top, #9B2124, #B72629);
|
189 |
-
background-image: -o-linear-gradient(top, #9B2124, #B72629);
|
190 |
-
background-image: linear-gradient(to bottom, #9B2124, #B72629);
|
191 |
-
border-color: #601312 #AE2426 #AE2426 #AE2426;
|
192 |
-
color: rgba(255,255,255,0.95);
|
193 |
-
-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
194 |
-
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
|
195 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.1);
|
196 |
-
}
|
197 |
-
|
198 |
-
.wp-core-ui .button-red[disabled],
|
199 |
-
.wp-core-ui .button-red:disabled,
|
200 |
-
.wp-core-ui .button-red-disabled {
|
201 |
-
color: #E79496 !important;
|
202 |
-
background: #BA292B !important;
|
203 |
-
border-color: #7F1C1F !important;
|
204 |
-
-webkit-box-shadow: none !important;
|
205 |
-
box-shadow: none !important;
|
206 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important;
|
207 |
-
cursor: default;
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Retina Uploader.
|
212 |
-
* Some parts derived from `wp-admin/css/media.css`
|
213 |
-
*
|
214 |
-
* @update WP 4.9.7
|
215 |
-
* @since WP 4.9.7
|
216 |
-
*/
|
217 |
-
#wr2x_retina-uploader {
|
218 |
-
margin-top: 20px;
|
219 |
-
}
|
220 |
-
.drag-drop #wr2x_drag-drop-area {
|
221 |
-
border: 4px dashed #b4b9be;
|
222 |
-
height: 200px;
|
223 |
-
}
|
224 |
-
input#wr2x_file-selector {
|
225 |
-
display: none;
|
226 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wr2x_admin.php
DELETED
@@ -1,475 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
register_deactivation_hook( 'Meow_WR2X_Admin', 'wr2x_deactivate' );
|
4 |
-
register_activation_hook( 'Meow_WR2X_Admin', 'wr2x_activate' );
|
5 |
-
|
6 |
-
include "common/admin.php";
|
7 |
-
|
8 |
-
class Meow_WR2X_Admin extends MeowApps_Admin {
|
9 |
-
|
10 |
-
public $core = null;
|
11 |
-
|
12 |
-
public function __construct( $prefix, $mainfile, $domain ) {
|
13 |
-
parent::__construct( $prefix, $mainfile, $domain );
|
14 |
-
if ( is_admin() ) {
|
15 |
-
add_action( 'admin_menu', array( $this, 'app_menu' ) );
|
16 |
-
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
|
17 |
-
}
|
18 |
-
}
|
19 |
-
|
20 |
-
function admin_notices() {
|
21 |
-
if ( current_user_can( 'activate_plugins' ) ) {
|
22 |
-
if ( delete_transient( 'wr2x_flush_rules' ) ) {
|
23 |
-
global $wp_rewrite;
|
24 |
-
Meow_WR2X_Admin::generate_rewrite_rules( $wp_rewrite, true );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
$method = get_option( 'wr2x_method' );
|
28 |
-
//$cdn = get_option( 'wr2x_cdn_domain' );
|
29 |
-
$disable_responsive = get_option( 'wr2x_disable_responsive', false );
|
30 |
-
$keep_src = get_option( 'wr2x_picturefill_keep_src', false );
|
31 |
-
|
32 |
-
if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
|
33 |
-
echo "<div class='error' style='margin-top: 20px;'><p>";
|
34 |
-
_e( "JetPack's <b>Photon</b> module breaks features built in WP Retina 2x (as Photos moves the files away). A common and better alternative to Photon is to use <a href='http://tracking.maxcdn.com/c/97349/3982/378'>MaxCDN</a> (very popular), CloudFlare or Fastly.", 'wp-retina-2x' );
|
35 |
-
echo "</p></div>";
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
static function activate() {
|
40 |
-
global $wp_rewrite;
|
41 |
-
$wp_rewrite->flush_rules();
|
42 |
-
}
|
43 |
-
|
44 |
-
static function deactivate() {
|
45 |
-
remove_filter( 'generate_rewrite_rules', array( 'Meow_WR2X_Admin', 'generate_rewrite_rules' ) );
|
46 |
-
global $wp_rewrite;
|
47 |
-
$wp_rewrite->flush_rules();
|
48 |
-
}
|
49 |
-
|
50 |
-
static function generate_rewrite_rules( $wp_rewrite, $flush = false ) {
|
51 |
-
global $wp_rewrite;
|
52 |
-
$method = get_option( "wr2x_method" );
|
53 |
-
if ( $method == "Retina-Images" ) {
|
54 |
-
|
55 |
-
// MODIFICATION: docwhat
|
56 |
-
// get_home_url() -> trailingslashit(site_url())
|
57 |
-
// REFERENCE: http://wordpress.org/support/topic/plugin-wp-retina-2x-htaccess-generated-with-incorrect-rewriterule
|
58 |
-
|
59 |
-
// MODIFICATION BY h4ir9
|
60 |
-
// .*\.(jpg|jpeg|gif|png|bmp) -> (.+.(?:jpe?g|gif|png))
|
61 |
-
// REFERENCE: http://wordpress.org/support/topic/great-but-needs-a-little-update
|
62 |
-
|
63 |
-
$handlerurl = str_replace( trailingslashit( site_url()), '', plugins_url( 'wr2x_image.php', __FILE__ ) );
|
64 |
-
add_rewrite_rule( '(.+.(?:jpe?g|gif|png))', $handlerurl, 'top' );
|
65 |
-
}
|
66 |
-
if ( $flush == true ) {
|
67 |
-
$wp_rewrite->flush_rules();
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
function common_url( $file ) {
|
72 |
-
return trailingslashit( plugin_dir_url( __FILE__ ) ) . 'common/' . $file;
|
73 |
-
}
|
74 |
-
|
75 |
-
function app_menu() {
|
76 |
-
|
77 |
-
// SUBMENU > Settings
|
78 |
-
add_submenu_page( 'meowapps-main-menu', 'Retina', 'Retina', 'manage_options',
|
79 |
-
'wr2x_settings-menu', array( $this, 'admin_settings' ) );
|
80 |
-
|
81 |
-
// SUBMENU > Settings > Basic Settings
|
82 |
-
add_settings_section( 'wr2x_settings', null, null, 'wr2x_settings-menu' );
|
83 |
-
add_settings_field( 'wr2x_ignore_sizes', __( "Disabled Sizes", 'wp-retina-2x' ),
|
84 |
-
array( $this, 'admin_ignore_sizes_callback' ),
|
85 |
-
'wr2x_settings-menu', 'wr2x_settings' );
|
86 |
-
add_settings_field( 'wr2x_method', __( "Method", 'wp-retina-2x' ),
|
87 |
-
array( $this, 'admin_method_callback' ),
|
88 |
-
'wr2x_settings-menu', 'wr2x_settings' );
|
89 |
-
add_settings_field( 'wr2x_full_size', __( "Full Size Retina", 'wp-retina-2x' ) . "<br />(Pro)",
|
90 |
-
array( $this, 'admin_full_size_callback' ),
|
91 |
-
'wr2x_settings-menu', 'wr2x_settings' );
|
92 |
-
// add_settings_field( 'wr2x_method', __( "Method", 'wp-retina-2x' ),
|
93 |
-
// array( $this, 'admin_method_callback' ),
|
94 |
-
// 'wr2x_settings-menu', 'wr2x_settings' );
|
95 |
-
add_settings_field( 'wr2x_quality', __( "Retina Quality", 'wp-retina-2x' ),
|
96 |
-
array( $this, 'admin_quality_callback' ),
|
97 |
-
'wr2x_settings-menu', 'wr2x_settings' );
|
98 |
-
|
99 |
-
//// Default Disabled Sizes
|
100 |
-
$defaults = array ();
|
101 |
-
$sizes = $this->core->get_image_sizes();
|
102 |
-
$large_w = 1600;
|
103 |
-
$large_h = 1200;
|
104 |
-
foreach ( $sizes as $name => $details ) {
|
105 |
-
$w = isset($details['width']) ? $details['width'] : 0;
|
106 |
-
$h = isset($details['height']) ? $details['height'] : 0;
|
107 |
-
if ( $w >= $large_w || $h >= $large_h ) $defaults[$name] = 1;
|
108 |
-
}
|
109 |
-
register_setting( 'wr2x_settings', 'wr2x_ignore_sizes', array ( 'default' => $defaults ) );
|
110 |
-
register_setting( 'wr2x_settings', 'wr2x_full_size' );
|
111 |
-
register_setting( 'wr2x_settings', 'wr2x_method' );
|
112 |
-
register_setting( 'wr2x_settings', 'wr2x_quality' );
|
113 |
-
|
114 |
-
// SUBMENU > Settings > Advanced Settings
|
115 |
-
add_settings_section( 'wr2x_advanced_settings', null, null, 'wr2x_advanced_settings-menu' );
|
116 |
-
add_settings_field( 'wr2x_auto_generate', __( "Auto Generate", 'wp-retina-2x' ),
|
117 |
-
array( $this, 'admin_auto_generate_callback' ),
|
118 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
119 |
-
add_settings_field( 'wr2x_regenerate_thumbnails', __( "Regenerate Thumbnails", 'wp-retina-2x' ),
|
120 |
-
array( $this, 'admin_regenerate_thumbnails_callback' ),
|
121 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
122 |
-
add_settings_field( 'wr2x_disable_medium_large', __( "Disable Medium Large", 'wp-retina-2x' ),
|
123 |
-
array( $this, 'admin_disable_medium_large_callback' ),
|
124 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
125 |
-
add_settings_field( 'wr2x_over_http_check', __( "Over HTTP Check", 'wp-retina-2x' ) . "<br />(Pro)",
|
126 |
-
array( $this, 'admin_over_http_check_callback' ),
|
127 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
128 |
-
add_settings_field( 'wr2x_debug', __( "Debug", 'wp-retina-2x' ),
|
129 |
-
array( $this, 'admin_debug_callback' ),
|
130 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
131 |
-
add_settings_field( 'wr2x_disable_responsive', __( "Disable Responsive", 'wp-retina-2x' ),
|
132 |
-
array( $this, 'admin_disable_responsive_callback' ),
|
133 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
134 |
-
add_settings_field( 'wr2x_cdn_domain', __( "Custom CDN Domain", 'wp-retina-2x' ) . "<br />(Pro)",
|
135 |
-
array( $this, 'admin_cdn_domain_callback' ),
|
136 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
137 |
-
add_settings_field( 'wr2x_big_image_size_threshold', __( "Big Image Size Threshold", 'wp-retina-2x' ),
|
138 |
-
array( $this, 'admin_big_image_size_threshold' ),
|
139 |
-
'wr2x_advanced_settings-menu', 'wr2x_advanced_settings' );
|
140 |
-
|
141 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_auto_generate' );
|
142 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_regenerate_thumbnails' );
|
143 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_disable_responsive' );
|
144 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_disable_medium_large' );
|
145 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_cdn_domain' );
|
146 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_big_image_size_threshold' );
|
147 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_over_http_check' );
|
148 |
-
register_setting( 'wr2x_advanced_settings', 'wr2x_debug' );
|
149 |
-
|
150 |
-
// SUBMENU > Settings > PictureFill
|
151 |
-
add_settings_section( 'wr2x_picturefill_settings', null, null, 'wr2x_picturefill_settings-menu' );
|
152 |
-
add_settings_field( 'wr2x_picturefill_keep_src', "Keep IMG SRC",
|
153 |
-
array( $this, 'admin_picturefill_keep_src_callback' ),
|
154 |
-
'wr2x_picturefill_settings-menu', 'wr2x_picturefill_settings' );
|
155 |
-
add_settings_field( 'wr2x_picturefill_lazysizes', "Lazy Retina<br />(Pro)",
|
156 |
-
array( $this, 'admin_picturefill_lazysizes_callback' ),
|
157 |
-
'wr2x_picturefill_settings-menu', 'wr2x_picturefill_settings' );
|
158 |
-
add_settings_field( 'wr2x_picturefill_css_background', "CSS Background<br />(Pro)",
|
159 |
-
array( $this, 'admin_picturefill_css_background_callback' ),
|
160 |
-
'wr2x_picturefill_settings-menu', 'wr2x_picturefill_settings' );
|
161 |
-
add_settings_field( 'wr2x_picturefill_noscript', "Polyfill Script",
|
162 |
-
array( $this, 'admin_picturefill_noscript_callback' ),
|
163 |
-
'wr2x_picturefill_settings-menu', 'wr2x_picturefill_settings' );
|
164 |
-
|
165 |
-
register_setting( 'wr2x_picturefill_settings', 'wr2x_picturefill_keep_src' );
|
166 |
-
register_setting( 'wr2x_picturefill_settings', 'wr2x_picturefill_lazysizes' );
|
167 |
-
register_setting( 'wr2x_picturefill_settings', 'wr2x_picturefill_css_background' );
|
168 |
-
register_setting( 'wr2x_picturefill_settings', 'wr2x_picturefill_noscript' );
|
169 |
-
|
170 |
-
// SUBMENU > Settings > Admin UI
|
171 |
-
add_settings_section( 'wr2x_ui_settings', null, null, 'wr2x_ui_settings-menu' );
|
172 |
-
add_settings_field( 'wr2x_hide_retina_column', __( "Retina Column", 'wp-retina-2x' ),
|
173 |
-
array( $this, 'admin_hide_retina_column_callback' ),
|
174 |
-
'wr2x_ui_settings-menu', 'wr2x_ui_settings' );
|
175 |
-
add_settings_field( 'wr2x_hide_retina_dashboard', __( "Retina Dashboard", 'wp-retina-2x' ),
|
176 |
-
array( $this, 'admin_hide_retina_dashboard_callback' ),
|
177 |
-
'wr2x_ui_settings-menu', 'wr2x_ui_settings' );
|
178 |
-
add_settings_field( 'wr2x_hide_pro', __( "Pro Information", 'wp-retina-2x' ),
|
179 |
-
array( $this, 'admin_hide_pro_callback' ),
|
180 |
-
'wr2x_ui_settings-menu', 'wr2x_ui_settings' );
|
181 |
-
|
182 |
-
register_setting( 'wr2x_ui_settings', 'wr2x_hide_retina_column' );
|
183 |
-
register_setting( 'wr2x_ui_settings', 'wr2x_hide_retina_dashboard' );
|
184 |
-
register_setting( 'wr2x_ui_settings', 'wr2x_hide_pro' );
|
185 |
-
}
|
186 |
-
|
187 |
-
function admin_settings() {
|
188 |
-
$method = get_option( 'wr2x_method', 'Picturefill' );
|
189 |
-
$quality = get_option( 'wr2x_quality', 90 );
|
190 |
-
if ( $quality > 100 || $quality < 0 )
|
191 |
-
update_option( 'wr2x_quality', 90, false );
|
192 |
-
|
193 |
-
?>
|
194 |
-
<div class="wrap">
|
195 |
-
<?php echo $this->display_title( "WP Retina 2x" ); ?>
|
196 |
-
|
197 |
-
<div class="meow-row">
|
198 |
-
<div class="meow-box meow-col meow-span_2_of_2">
|
199 |
-
<div class="inside">
|
200 |
-
<?php
|
201 |
-
if ( $method == 'none' )
|
202 |
-
echo "<p><span>" . __( "Current method:", 'wp-retina-2x' ) . " <u>" . __( "None", 'wp-retina-2x' ) . "</u>.</span>";
|
203 |
-
if ( $method == 'HTML Rewrite' )
|
204 |
-
echo "<p><span>" . __( "Current method:", 'wp-retina-2x' ) . " <u>" . __( "HTML Rewrite", 'wp-retina-2x' ) . "</u>.</span>";
|
205 |
-
if ( $method == 'retina.js' )
|
206 |
-
echo "<p><span>" . __( "Current method:", 'wp-retina-2x' ) . " <u>" . __( "Retina.js", 'wp-retina-2x' ) . "</u>.</span>";
|
207 |
-
if ( $method == 'Picturefill' )
|
208 |
-
echo "<p><span>" . __( "Current method:", 'wp-retina-2x' ) . " <u>" . __( "PictureFill", 'wp-retina-2x' ) . "</u>.</span>";
|
209 |
-
if ( $method == 'Responsive' )
|
210 |
-
echo "<p><span>" . __( "Current method:", 'wp-retina-2x' ) . " <u>" . __( "Responsive Images", 'wp-retina-2x' ) . "</u>.</span>";
|
211 |
-
if ( $method == 'Retina-Images' ) {
|
212 |
-
echo "<p><span>" . __( "Current method:", 'wp-retina-2x' ) . " <u>" . __( "HTML Rewrite", 'wp-retina-2x' ) . "</u>.</span>";
|
213 |
-
if ( defined( 'MULTISITE' ) && MULTISITE == true ) {
|
214 |
-
if ( get_site_option( 'ms_files_rewriting' ) ) {
|
215 |
-
// MODIFICATION: Craig Foster
|
216 |
-
// 'ms_files_rewriting' support
|
217 |
-
echo " <span style='color: red;'>" . __( "By the way, you are using a <b>WordPress Multi-Site installation</b>! You must edit your .htaccess manually and add '<b>RewriteRule ^files/(.+) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as the first RewriteRule if you want the server-side to work.", 'wp-retina-2x' ) . "</span>";
|
218 |
-
}
|
219 |
-
else
|
220 |
-
echo " <span style='color: red;'>" . __( "By the way, you are using a <b>WordPress Multi-Site installation</b>! You must edit your .htaccess manually and add '<b>RewriteRule ^(wp-content/.+\.(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as the first RewriteRule if you want the server-side to work.", 'wp-retina-2x' ) . "</span>";
|
221 |
-
}
|
222 |
-
echo "</p>";
|
223 |
-
if ( !get_option('permalink_structure') )
|
224 |
-
echo "<p><span style='color: red;'>" . __( "The permalinks are not enabled. They need to be enabled in order to use the server-side method.", 'wp-retina-2x' ) . "</span>";
|
225 |
-
}
|
226 |
-
?>
|
227 |
-
</div>
|
228 |
-
</div>
|
229 |
-
</div>
|
230 |
-
|
231 |
-
<div class="meow-row">
|
232 |
-
<div class="meow-box meow-col meow-span_2_of_2">
|
233 |
-
<h3>How to use</h3>
|
234 |
-
<div class="inside">
|
235 |
-
<?php echo _e( 'This plugin works out of the box, the default settings are the best for most installs. However, you should have a look at the <a target="_blank" href="https://meowapps.com/wp-retina-2x/tutorial/">tutorial</a>.', 'wp-retina-2x' ) ?>
|
236 |
-
</div>
|
237 |
-
</div>
|
238 |
-
</div>
|
239 |
-
|
240 |
-
<div class="meow-row">
|
241 |
-
|
242 |
-
<div class="meow-col meow-span_1_of_2">
|
243 |
-
|
244 |
-
<div class="meow-box">
|
245 |
-
<h3>Basic Settings</h3>
|
246 |
-
<div class="inside">
|
247 |
-
<form method="post" action="options.php">
|
248 |
-
<?php settings_fields( 'wr2x_settings' ); ?>
|
249 |
-
<?php do_settings_sections( 'wr2x_settings-menu' ); ?>
|
250 |
-
<?php submit_button(); ?>
|
251 |
-
</form>
|
252 |
-
</div>
|
253 |
-
</div>
|
254 |
-
|
255 |
-
<div class="meow-box">
|
256 |
-
<h3>Advanced Settings</h3>
|
257 |
-
<div class="inside">
|
258 |
-
<form method="post" action="options.php">
|
259 |
-
<?php settings_fields( 'wr2x_advanced_settings' ); ?>
|
260 |
-
<?php do_settings_sections( 'wr2x_advanced_settings-menu' ); ?>
|
261 |
-
<?php submit_button(); ?>
|
262 |
-
</form>
|
263 |
-
</div>
|
264 |
-
</div>
|
265 |
-
|
266 |
-
</div>
|
267 |
-
|
268 |
-
<div class="meow-col meow-span_1_of_2">
|
269 |
-
|
270 |
-
<?php $this->display_serialkey_box( "https://meowapps.com/plugin/wp-retina-2x/" ); ?>
|
271 |
-
|
272 |
-
<?php if ( get_option( 'wr2x_method', 'none' ) == 'Picturefill' ): ?>
|
273 |
-
<div class="meow-box">
|
274 |
-
<h3>PictureFill</h3>
|
275 |
-
<div class="inside">
|
276 |
-
<form method="post" action="options.php">
|
277 |
-
<?php settings_fields( 'wr2x_picturefill_settings' ); ?>
|
278 |
-
<?php do_settings_sections( 'wr2x_picturefill_settings-menu' ); ?>
|
279 |
-
<?php submit_button(); ?>
|
280 |
-
</form>
|
281 |
-
</div>
|
282 |
-
</div>
|
283 |
-
<?php endif; ?>
|
284 |
-
|
285 |
-
<div class="meow-box">
|
286 |
-
<h3>Admin UI</h3>
|
287 |
-
<div class="inside">
|
288 |
-
<form method="post" action="options.php">
|
289 |
-
<?php settings_fields( 'wr2x_ui_settings' ); ?>
|
290 |
-
<?php do_settings_sections( 'wr2x_ui_settings-menu' ); ?>
|
291 |
-
<?php submit_button(); ?>
|
292 |
-
</form>
|
293 |
-
</div>
|
294 |
-
</div>
|
295 |
-
|
296 |
-
</div>
|
297 |
-
|
298 |
-
</div>
|
299 |
-
|
300 |
-
</div>
|
301 |
-
<?php
|
302 |
-
}
|
303 |
-
|
304 |
-
/*
|
305 |
-
OPTIONS CALLBACKS
|
306 |
-
*/
|
307 |
-
|
308 |
-
function admin_ignore_sizes_callback( $args ) {
|
309 |
-
$ignore_sizes = get_option( 'wr2x_ignore_sizes' );
|
310 |
-
if ( empty( $ignore_sizes ) )
|
311 |
-
$ignore_sizes = array();
|
312 |
-
$wpsizes = $this->core->get_image_sizes();
|
313 |
-
$sizes = array();
|
314 |
-
$html = "";
|
315 |
-
foreach ( $wpsizes as $name => $attr ) {
|
316 |
-
$html .= '<input type="checkbox" name="wr2x_ignore_sizes[' . $name . ']" value="1" ' .
|
317 |
-
( array_key_exists( $name, $ignore_sizes ) ? 'checked' : '' ) . '/>' . sprintf( "<label><div style='float: left; text-align: right; margin-right: 5px; width: 20px;'>%s</div> <b>%s</b></label> <small>(Normal: %dx%d, Retina: %dx%d)</small>", MeowApps_Admin::size_shortname( $name ), $name, $attr['width'], $attr['height'], $attr['width'] * 2, $attr['height'] * 2 ) . '<br>';
|
318 |
-
}
|
319 |
-
$html .= '<br /><small class="description">' .
|
320 |
-
__( 'The selected sizes will <b>not</b> have their retina equivalent generated. It is recommended to disable the sizes for which <i>Normal</i> superior to 1200.', 'wp-retina-2x' ) . '</small>';
|
321 |
-
echo $html;
|
322 |
-
}
|
323 |
-
|
324 |
-
function admin_auto_generate_callback( $args ) {
|
325 |
-
$value = get_option( 'wr2x_auto_generate', null );
|
326 |
-
$html = '<input type="checkbox" id="wr2x_auto_generate" name="wr2x_auto_generate" value="1" ' .
|
327 |
-
checked( 1, get_option( 'wr2x_auto_generate' ), false ) . '/>';
|
328 |
-
$html .= '<label>Enabled</label><br /><small>Generate the Retina thumbnails on new upload and thumbnails creation. The <i>Disabled Sizes</i> will be skipped.</small>';
|
329 |
-
echo $html;
|
330 |
-
}
|
331 |
-
|
332 |
-
function admin_regenerate_thumbnails_callback( $args ) {
|
333 |
-
$value = get_option( 'wr2x_regenerate_thumbnails', false );
|
334 |
-
$html = '<input type="checkbox" id="wr2x_regenerate_thumbnails" name="wr2x_regenerate_thumbnails" value="1" ' .
|
335 |
-
checked( 1, get_option( 'wr2x_regenerate_thumbnails' ), false ) . '/>';
|
336 |
-
$html .= '<label>Enabled</label><br /><small>On each <b>Generate</b> action, all standard thumbnails will be regenerated (exactly the same function as Regenerate Thumbnail), and only then the Retina thumbnails will be created (depending on the Auto Generate option).</small>';
|
337 |
-
echo $html;
|
338 |
-
}
|
339 |
-
|
340 |
-
function admin_disable_responsive_callback( $args ) {
|
341 |
-
$value = get_option( 'wr2x_disable_responsive', null );
|
342 |
-
$html = '<input type="checkbox" id="wr2x_disable_responsive" name="wr2x_disable_responsive" value="1" ' .
|
343 |
-
checked( 1, get_option( 'wr2x_disable_responsive' ), false ) . '/>';
|
344 |
-
$html .= '<label>Disable the Responsive Images feature.</label><br /><small>Get back control over your HTML if you need.</small>';
|
345 |
-
echo $html;
|
346 |
-
}
|
347 |
-
|
348 |
-
function admin_big_image_size_threshold( $args ) {
|
349 |
-
$value = get_option( 'wr2x_big_image_size_threshold', null );
|
350 |
-
$html = '<input type="checkbox" id="wr2x_big_image_size_threshold" name="wr2x_big_image_size_threshold"
|
351 |
-
value="1" ' . checked( 1, get_option( 'wr2x_big_image_size_threshold' ), false ) . '/>';
|
352 |
-
$html .= '<label>Disable</label><br /><small>By default, WordPress limits the size of the image to 2560px (with or height) maximum.</small>';
|
353 |
-
echo $html;
|
354 |
-
}
|
355 |
-
|
356 |
-
function admin_disable_medium_large_callback( $args ) {
|
357 |
-
$value = get_option( 'wr2x_disable_medium_large', null );
|
358 |
-
$html = '<input type="checkbox" id="wr2x_disable_medium_large" name="wr2x_disable_medium_large" value="1" ' .
|
359 |
-
checked( 1, get_option( 'wr2x_disable_medium_large' ), false ) . '/>';
|
360 |
-
$html .= '<label>Remove the "Medium Large" image size.</label><br /><small>You probably don\'t need this.</small>';
|
361 |
-
echo $html;
|
362 |
-
}
|
363 |
-
|
364 |
-
function admin_method_callback( $args ) {
|
365 |
-
$value = get_option( 'wr2x_method', 'none' );
|
366 |
-
$html = '<select id="wr2x_method" name="wr2x_method">
|
367 |
-
<option ' . selected( 'Picturefill', $value, false ) . 'value="Picturefill">Recommended: Picturefill</option>
|
368 |
-
<option ' . selected( 'Responsive', $value, false ) . 'value="Responsive">Responsive-Images (Native WP 4.4+)</option>
|
369 |
-
<option ' . selected( 'retina.js', $value, false ) . 'value="retina.js">Retina.js (Client-side)</option>
|
370 |
-
<option ' . selected( 'HTML Rewrite', $value, false ) . 'value="HTML Rewrite">HTML Rewrite</option>
|
371 |
-
<option ' . selected( 'Retina-Images', $value, false ) . 'value="Retina-Images">Retina-Images</option>
|
372 |
-
<option ' . selected( 'none', $value, false ) . 'value="none">None</option>
|
373 |
-
</select><small><br />' . __( 'In all cases (including "None"), Retina support will be added to the Responsive Images. Check the <a target="_blank" href="https://meowapps.com/wp-retina-2x-methods/" />Retina Methods</a> page if you want to know more about those methods.', 'wp-retina-2x' ) . '</small>';
|
374 |
-
echo $html;
|
375 |
-
}
|
376 |
-
|
377 |
-
function admin_full_size_callback( $args ) {
|
378 |
-
$value = get_option( 'wr2x_full_size', null );
|
379 |
-
$html = '<input ' . disabled( $this->is_registered(), false, false ) . ' type="checkbox" id="wr2x_full_size" name="wr2x_full_size" value="1" ' .
|
380 |
-
checked( 1, get_option( 'wr2x_full_size' ), false ) . '/>';
|
381 |
-
$html .= '<label>Enable</label><br /><small>Checks for retina for full-size will be enabled and upload features made available in the <i>Retina Dashboard</i>.</small>';
|
382 |
-
echo $html;
|
383 |
-
}
|
384 |
-
|
385 |
-
function admin_quality_callback( $args ) {
|
386 |
-
$value = get_option( 'wr2x_quality', 90 );
|
387 |
-
$html = '<input type="number" id="wr2x_quality" name="wr2x_quality" value="' . $value . '" />';
|
388 |
-
$html .= __( '<br /><small>Sets image compression quality on a 1-100% scale as an integer (1-100). Default is 90. Only for JPG.</small>', 'wp-retina-2x' );
|
389 |
-
echo $html;
|
390 |
-
}
|
391 |
-
|
392 |
-
function admin_debug_callback( $args ) {
|
393 |
-
$value = get_option( 'wr2x_debug', null );
|
394 |
-
$html = '<input type="checkbox" id="wr2x_debug" name="wr2x_debug" value="1" ' .
|
395 |
-
checked( 1, get_option( 'wr2x_debug' ), false ) . '/>';
|
396 |
-
$html .= __( '<label>Force Retina + Logging</label><br /><small>Displays retina and creates a <a href="' . plugins_url( "wp-retina-2x" ) . '/wp-retina-2x.log">log file</a> in the plugin folder.</small>', 'wp-retina-2x' );
|
397 |
-
echo $html;
|
398 |
-
}
|
399 |
-
|
400 |
-
function admin_cdn_domain_callback( $args ) {
|
401 |
-
$value = get_option( 'wr2x_cdn_domain', null );
|
402 |
-
$html = '<input ' . disabled( $this->is_registered(), false, false ) . ' type="text" id="wr2x_cdn_domain" name="wr2x_cdn_domain" value="' . $value . '" />';
|
403 |
-
$html .= __( '<br /><small>If not empty, your site domain will be replaced with this CDN domain (PictureFill and HTML Rewrite only).</small>', 'wp-retina-2x' );
|
404 |
-
echo $html;
|
405 |
-
}
|
406 |
-
|
407 |
-
function admin_over_http_check_callback( $args ) {
|
408 |
-
$value = get_option( 'wr2x_over_http_check', null );
|
409 |
-
$html = '<input ' . disabled( $this->is_registered(), false, false ) . ' type="checkbox" id="wr2x_over_http_check" name="wr2x_over_http_check" value="1" ' .
|
410 |
-
checked( 1, get_option( 'wr2x_over_http_check' ), false ) . '/>';
|
411 |
-
$html .= __( '<label>Enable</label><br /><small>Normally, the plugin checks if the Retina files exists through your filesystem. With this option, it will check using HTTP requests, that will enable Retina on exotic WordPress installs and also for images hosted on different servers.</small>', 'wp-retina-2x' );
|
412 |
-
echo $html;
|
413 |
-
}
|
414 |
-
|
415 |
-
function admin_picturefill_keep_src_callback( $args ) {
|
416 |
-
$value = get_option( 'wr2x_picturefill_keep_src', null );
|
417 |
-
$html = '<input type="checkbox" id="wr2x_picturefill_keep_src" name="wr2x_picturefill_keep_src" value="1" ' .
|
418 |
-
checked( 1, get_option( 'wr2x_picturefill_keep_src' ), false ) . '/>';
|
419 |
-
$html .= __( '<label>Enable</label><br /><small>With PictureFill, <b>src</b> tags are replaced by <b>src-set</b> tags, but Google might fail to reference those images. This option will keep the SRC for SEO purpose, but that will force the download of two images (standard, then retina) by the browsers. Please use the <b>Lazy Retina</b> option below as it avoid this to happen (as well as making it loading lazily).</small>', 'wp-retina-2x' );
|
420 |
-
echo $html;
|
421 |
-
}
|
422 |
-
|
423 |
-
function admin_picturefill_lazysizes_callback( $args ) {
|
424 |
-
$value = get_option( 'wr2x_picturefill_lazysizes', null );
|
425 |
-
$html = '<input ' . disabled( $this->is_registered(), false, false ) . ' type="checkbox" id="wr2x_picturefill_lazysizes"
|
426 |
-
name="wr2x_picturefill_lazysizes" value="1" ' .
|
427 |
-
checked( 1, get_option( 'wr2x_picturefill_lazysizes' ), false ) . '/>';
|
428 |
-
$html .= __( '<label>Enabled</label><br /><small>Retina images will not be loaded until the visitor gets close to them. HTML will be rewritten and the lazysizes script will be also loaded. The result will be a <b>faster website</b> for everyone, that consumes less bandwidth.</small>', 'wp-retina-2x' );
|
429 |
-
echo $html;
|
430 |
-
}
|
431 |
-
|
432 |
-
function admin_picturefill_noscript_callback( $args ) {
|
433 |
-
$value = get_option( 'wr2x_picturefill_noscript', null );
|
434 |
-
$html = '<input type="checkbox" id="wr2x_picturefill_noscript"
|
435 |
-
name="wr2x_picturefill_noscript" value="1" ' .
|
436 |
-
checked( 1, get_option( 'wr2x_picturefill_noscript' ), false ) . '/>';
|
437 |
-
$html .= __( '<label>Disable</label><br /><small>Only <a href="http://caniuse.com/#feat=srcset" target="_blank">the browsers with src-set support</a> will display Retina images. You can also choose this if you want to load the Picturefill Polyfill script manually or if it is already loaded by your theme.</small>', 'wp-retina-2x' );
|
438 |
-
echo $html;
|
439 |
-
}
|
440 |
-
|
441 |
-
function admin_picturefill_css_background_callback( $args ) {
|
442 |
-
$value = get_option( 'wr2x_picturefill_css_background', null );
|
443 |
-
$html = '<input ' . disabled( $this->is_registered(), false, false ) . ' type="checkbox" id="wr2x_picturefill_css_background" name="wr2x_picturefill_css_background" value="1" ' .
|
444 |
-
checked( 1, get_option( 'wr2x_picturefill_css_background' ), false ) . '/>';
|
445 |
-
$html .= __( '<label>Retina-ize</label><br /><small>In your HTML, inline CSS Background will be replaced by the Retina version of the image.</small>', 'wp-retina-2x' );
|
446 |
-
echo $html;
|
447 |
-
}
|
448 |
-
|
449 |
-
function admin_hide_retina_column_callback( $args ) {
|
450 |
-
$value = get_option( 'wr2x_hide_retina_column', null );
|
451 |
-
$html = '<input type="checkbox" id="wr2x_hide_retina_column" name="wr2x_hide_retina_column" value="1" ' .
|
452 |
-
checked( 1, get_option( 'wr2x_hide_retina_column' ), false ) . '/>';
|
453 |
-
$html .= __( '<label>Hide</label><br /><small>Hide the <i>Retina Column</i> in the Media Library.</small>', 'wp-retina-2x' );
|
454 |
-
echo $html;
|
455 |
-
}
|
456 |
-
|
457 |
-
function admin_hide_retina_dashboard_callback( $args ) {
|
458 |
-
$value = get_option( 'wr2x_hide_retina_dashboard', null );
|
459 |
-
$html = '<input type="checkbox" id="wr2x_hide_retina_dashboard" name="wr2x_hide_retina_dashboard" value="1" ' .
|
460 |
-
checked( 1, get_option( 'wr2x_hide_retina_dashboard' ), false ) . '/>';
|
461 |
-
$html .= __( '<label>Hide</label><br /><small>Disable <i>Retina Dashboard</i> menu and tools.</small>', 'wp-retina-2x' );
|
462 |
-
echo $html;
|
463 |
-
}
|
464 |
-
|
465 |
-
function admin_hide_pro_callback( $args ) {
|
466 |
-
$value = get_option( 'wr2x_hide_pro', null );
|
467 |
-
$html = '<input type="checkbox" id="wr2x_hide_pro" name="wr2x_hide_pro" value="1" ' .
|
468 |
-
checked( 1, get_option( 'wr2x_hide_pro' ), false ) . '/>';
|
469 |
-
$html .= __( '<label>Hide</label><br /><small>Hide information about Pro version.</small>', 'wp-retina-2x' );
|
470 |
-
echo $html;
|
471 |
-
}
|
472 |
-
|
473 |
-
}
|
474 |
-
|
475 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wr2x_image.php
DELETED
@@ -1,169 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/* Version: 1.7.2 - now with even more pixels */
|
4 |
-
|
5 |
-
define('DEBUG', false); // Write debugging information to a log file
|
6 |
-
define('SEND_ETAG', true); // You will want to disable this if you load balance multiple servers
|
7 |
-
define('SEND_EXPIRES', true);
|
8 |
-
define('SEND_CACHE_CONTROL', true);
|
9 |
-
define('USE_X_SENDFILE', false); // This will reduce memory usage, but isn't enabled on all systems. If you have issues enabling this setting, contact your host
|
10 |
-
define('DOWNSIZE_NOT_FOUND', true); // If a regular image is requested and not found, send a retina file instead?
|
11 |
-
define('CACHE_TIME', 24*60*60); // 1 day
|
12 |
-
define('DISABLE_RI_HEADER', false);
|
13 |
-
|
14 |
-
$document_root = $_SERVER['DOCUMENT_ROOT'];
|
15 |
-
$requested_uri = parse_url(urldecode($_SERVER['REQUEST_URI']), PHP_URL_PATH);
|
16 |
-
$requested_file = basename($requested_uri);
|
17 |
-
$source_file = $document_root.$requested_uri;
|
18 |
-
$source_dirname = pathinfo($source_file, PATHINFO_DIRNAME);
|
19 |
-
$source_filename = pathinfo($source_file, PATHINFO_FILENAME);
|
20 |
-
$source_ext = pathinfo($source_file, PATHINFO_EXTENSION);
|
21 |
-
$at2x_file = $source_dirname.'/'.$source_filename.'@2x.'.$source_ext;
|
22 |
-
$at3x_file = $source_dirname.'/'.$source_filename.'@3x.'.$source_ext;
|
23 |
-
$at4x_file = $source_dirname.'/'.$source_filename.'@4x.'.$source_ext;
|
24 |
-
$cache_directive = 'must-revalidate';
|
25 |
-
$status = 'regular image';
|
26 |
-
|
27 |
-
if (DEBUG) {
|
28 |
-
$_debug_fh = fopen('retinaimages.log', 'a');
|
29 |
-
fwrite($_debug_fh, "* * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\n");
|
30 |
-
fwrite($_debug_fh, print_r($_COOKIE, true)."\n\n");
|
31 |
-
fwrite($_debug_fh, "document_root: {$document_root}\n");
|
32 |
-
fwrite($_debug_fh, "requested_uri: {$requested_uri}\n");
|
33 |
-
fwrite($_debug_fh, "requested_file: {$requested_file}\n");
|
34 |
-
fwrite($_debug_fh, "source_file: {$source_file}\n");
|
35 |
-
fwrite($_debug_fh, "source_ext: {$source_ext}\n");
|
36 |
-
fwrite($_debug_fh, "@2x_file: {$at2x_file}\n");
|
37 |
-
fwrite($_debug_fh, "@3x_file: {$at3x_file}\n");
|
38 |
-
fwrite($_debug_fh, "@4x_file: {$at4x_file}\n");
|
39 |
-
}
|
40 |
-
|
41 |
-
// Image was requested
|
42 |
-
if (in_array($source_ext, array('png', 'gif', 'jpg', 'jpeg', 'bmp'))) {
|
43 |
-
|
44 |
-
// Check if a cookie is set
|
45 |
-
$cookie_value = false;
|
46 |
-
if (isset($_COOKIE['devicePixelRatio'])) {
|
47 |
-
$cookie_value = intval($_COOKIE['devicePixelRatio']);
|
48 |
-
}
|
49 |
-
else {
|
50 |
-
// Force revalidation of cache on next request
|
51 |
-
$cache_directive = 'no-cache';
|
52 |
-
$status = 'no cookie';
|
53 |
-
}
|
54 |
-
if (DEBUG) {
|
55 |
-
fwrite($_debug_fh, "devicePixelRatio: {$cookie_value}\n");
|
56 |
-
fwrite($_debug_fh, "cache_directive: {$cache_directive}\n");
|
57 |
-
}
|
58 |
-
|
59 |
-
// No need to check for retina images if screen is low DPR
|
60 |
-
if ($cookie_value !== false && $cookie_value > 1) {
|
61 |
-
// Check over images and match the largest resolution available
|
62 |
-
foreach (array($at4x_file => 3, $at3x_file => 2, $at2x_file => 1) as $retina_file => $min_dpr) {
|
63 |
-
if ($cookie_value > $min_dpr && file_exists($retina_file)) {
|
64 |
-
$source_file = $retina_file;
|
65 |
-
$status = 'retina image';
|
66 |
-
break;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
// Check if we can shrink a larger version of the image
|
72 |
-
if (!file_exists($source_file) && DOWNSIZE_NOT_FOUND){
|
73 |
-
// Check over increasingly larger images and see if one is available
|
74 |
-
foreach (array($at2x_file, $at3x_file, $at4x_file) as $retina_file) {
|
75 |
-
if (file_exists($retina_file)) {
|
76 |
-
$source_file = $retina_file;
|
77 |
-
$status = 'downsized image';
|
78 |
-
break;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
// Check if the image to send exists
|
84 |
-
if (!file_exists($source_file)) {
|
85 |
-
if (DEBUG) { fwrite($_debug_fh, "Image not found. Sending 404\n"); }
|
86 |
-
if (!DISABLE_RI_HEADER) {
|
87 |
-
header('X-Retina-Images: not found');
|
88 |
-
}
|
89 |
-
header('HTTP/1.1 404 Not Found', true);
|
90 |
-
exit();
|
91 |
-
}
|
92 |
-
|
93 |
-
// Attach a Retina Images header for debugging
|
94 |
-
if (!DISABLE_RI_HEADER) {
|
95 |
-
header('X-Retina-Images: '.$status);
|
96 |
-
}
|
97 |
-
|
98 |
-
// Send cache headers
|
99 |
-
if (SEND_CACHE_CONTROL) {
|
100 |
-
header("Cache-Control: private, {$cache_directive}, max-age=".CACHE_TIME, true);
|
101 |
-
}
|
102 |
-
if (SEND_EXPIRES) {
|
103 |
-
date_default_timezone_set('GMT');
|
104 |
-
header('Expires: '.gmdate('D, d M Y H:i:s', time()+CACHE_TIME).' GMT', true);
|
105 |
-
}
|
106 |
-
if (SEND_ETAG) {
|
107 |
-
$etag = '"'.filemtime($source_file).fileinode($source_file).'"';
|
108 |
-
header("ETag: $etag", true);
|
109 |
-
|
110 |
-
if (DEBUG) {
|
111 |
-
fwrite($_debug_fh, "generated etag: {$etag}\n");
|
112 |
-
if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
|
113 |
-
fwrite($_debug_fh, "received etag: {$_SERVER['HTTP_IF_NONE_MATCH']}\n\n");
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
if (isset($_SERVER['HTTP_IF_NONE_MATCH']) && ($_SERVER['HTTP_IF_NONE_MATCH']) === $etag) {
|
118 |
-
// File in cache hasn't change
|
119 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($source_file)).' GMT', true, 304);
|
120 |
-
exit();
|
121 |
-
}
|
122 |
-
}
|
123 |
-
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === filemtime($source_file))) {
|
124 |
-
// File in cache hasn't change
|
125 |
-
header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($source_file)).' GMT', true, 304);
|
126 |
-
exit();
|
127 |
-
}
|
128 |
-
|
129 |
-
// Send image headers
|
130 |
-
if (in_array($source_ext, array('png', 'gif', 'jpeg', 'bmp'))) {
|
131 |
-
header("Content-Type: image/".$source_ext, true);
|
132 |
-
}
|
133 |
-
else {
|
134 |
-
header("Content-Type: image/jpeg", true);
|
135 |
-
}
|
136 |
-
header('Content-Length: '.filesize($source_file), true);
|
137 |
-
|
138 |
-
// Close debug session if open
|
139 |
-
if (DEBUG) {
|
140 |
-
fwrite($_debug_fh, "sending file: {$source_file}\n\n");
|
141 |
-
fclose($_debug_fh);
|
142 |
-
}
|
143 |
-
|
144 |
-
// Send file
|
145 |
-
if (USE_X_SENDFILE) {
|
146 |
-
header('X-Sendfile: '.$source_file);
|
147 |
-
}
|
148 |
-
else {
|
149 |
-
readfile($source_file);
|
150 |
-
}
|
151 |
-
exit();
|
152 |
-
}
|
153 |
-
|
154 |
-
// DPR value was sent
|
155 |
-
elseif(isset($_GET['devicePixelRatio'])) {
|
156 |
-
$dpr = $_GET['devicePixelRatio'];
|
157 |
-
|
158 |
-
// Validate value before setting cookie
|
159 |
-
if (''.ceil(intval($dpr)) !== $dpr) {
|
160 |
-
$dpr = '1';
|
161 |
-
}
|
162 |
-
|
163 |
-
setcookie('devicePixelRatio', $dpr);
|
164 |
-
exit();
|
165 |
-
}
|
166 |
-
|
167 |
-
// Respond with an empty content
|
168 |
-
header('HTTP/1.1 204 No Content', true);
|
169 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|