WP Retina 2x - Version 6.2.8

Version Description

(2022/06/16) = * Fix: Security fix. * Update: Remove all the notifications as they probably don't needed anymore.

Download this release

Release Info

Developer TigrouMeow
Plugin Icon 128x128 WP Retina 2x
Version 6.2.8
Comparing to
See all releases

Code changes from version 6.2.7 to 6.2.8

Files changed (64) hide show
  1. readme.txt +2 -2
  2. trunk/app/debug.js +0 -3
  3. trunk/app/index.js +0 -2
  4. trunk/app/lazysizes.min.js +0 -5
  5. trunk/app/picturefill.min.js +0 -8
  6. trunk/app/retina-cookie.js +0 -3
  7. trunk/app/retina.js +0 -102
  8. trunk/app/retina.min.js +0 -4
  9. trunk/app/vendor.js +0 -27
  10. trunk/classes/admin.php +0 -127
  11. trunk/classes/api.php +0 -51
  12. trunk/classes/core.php +0 -1561
  13. trunk/classes/dashboard.php +0 -23
  14. trunk/classes/init.php +0 -38
  15. trunk/classes/library.php +0 -26
  16. trunk/classes/rest.php +0 -522
  17. trunk/common/admin.php +0 -180
  18. trunk/common/helpers.php +0 -196
  19. trunk/common/img/contact-form-block.png +0 -0
  20. trunk/common/img/database-cleaner.png +0 -0
  21. trunk/common/img/default.png +0 -0
  22. trunk/common/img/media-cleaner.png +0 -0
  23. trunk/common/img/media-file-renamer.png +0 -0
  24. trunk/common/img/meow-analytics.png +0 -0
  25. trunk/common/img/meow-gallery.png +0 -0
  26. trunk/common/img/meow-lightbox.png +0 -0
  27. trunk/common/img/social-engine.png +0 -0
  28. trunk/common/img/wp-retina-2x.png +0 -0
  29. trunk/common/img/wplr-sync.png +0 -0
  30. trunk/common/issues.php +0 -29
  31. trunk/common/ratings.php +0 -122
  32. trunk/common/releases.txt +0 -19
  33. trunk/common/rest.php +0 -133
  34. trunk/languages/wp-retina-2x-de_DE.mo +0 -0
  35. trunk/languages/wp-retina-2x-de_DE.po +0 -309
  36. trunk/languages/wp-retina-2x-de_DE_formal.mo +0 -0
  37. trunk/languages/wp-retina-2x-de_DE_formal.po +0 -584
  38. trunk/languages/wp-retina-2x-fr_FR.mo +0 -0
  39. trunk/languages/wp-retina-2x-fr_FR.po +0 -711
  40. trunk/languages/wp-retina-2x-it_IT.mo +0 -0
  41. trunk/languages/wp-retina-2x-it_IT.po +0 -305
  42. trunk/languages/wp-retina-2x-sv_SE.mo +0 -0
  43. trunk/languages/wp-retina-2x-sv_SE.po +0 -363
  44. trunk/readme.txt +0 -415
  45. trunk/vendor/autoload.php +0 -12
  46. trunk/vendor/composer/ClassLoader.php +0 -572
  47. trunk/vendor/composer/InstalledVersions.php +0 -352
  48. trunk/vendor/composer/LICENSE +0 -21
  49. trunk/vendor/composer/autoload_classmap.php +0 -10
  50. trunk/vendor/composer/autoload_namespaces.php +0 -10
  51. trunk/vendor/composer/autoload_psr4.php +0 -9
  52. trunk/vendor/composer/autoload_real.php +0 -38
  53. trunk/vendor/composer/autoload_static.php +0 -31
  54. trunk/vendor/composer/installed.json +0 -55
  55. trunk/vendor/composer/installed.php +0 -32
  56. trunk/vendor/composer/platform_check.php +0 -26
  57. trunk/vendor/kub-at/php-simple-html-dom-parser/CONTRIBUTING.md +0 -3
  58. trunk/vendor/kub-at/php-simple-html-dom-parser/LICENSE +0 -21
  59. trunk/vendor/kub-at/php-simple-html-dom-parser/README.md +0 -29
  60. trunk/vendor/kub-at/php-simple-html-dom-parser/composer.json +0 -24
  61. trunk/vendor/kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/HtmlDomParser.php +0 -16
  62. trunk/vendor/kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php +0 -2355
  63. trunk/wp-retina-2x.php +0 -33
  64. wp-retina-2x.php +2 -2
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://meowapps.com/donation/
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0
8
- Stable tag: 6.2.6
9
 
10
  Retina, Regenerate Thumbnails, Image Sizes Management, Replace Images, Image Threshold and more.
11
 
@@ -52,7 +52,7 @@ The plugin cannot inject CSS to handles the images added through CSS, that's bot
52
 
53
  == Changelog ==
54
 
55
- = 6.2.6 (2022/06/16) =
56
  * Fix: Security fix.
57
  * Update: Remove all the notifications as they probably don't needed anymore.
58
 
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0
8
+ Stable tag: 6.2.8
9
 
10
  Retina, Regenerate Thumbnails, Image Sizes Management, Replace Images, Image Threshold and more.
11
 
52
 
53
  == Changelog ==
54
 
55
+ = 6.2.8 (2022/06/16) =
56
  * Fix: Security fix.
57
  * Update: Remove all the notifications as they probably don't needed anymore.
58
 
trunk/app/debug.js DELETED
@@ -1,3 +0,0 @@
1
- /* eslint-disable */
2
-
3
- window.devicePixelRatio = 2;
 
 
 
trunk/app/index.js DELETED
@@ -1,2 +0,0 @@
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([140,1]),n()}({0:function(e,t){e.exports=React},131:function(e,t){e.exports=ReactDOM},140:function(e,t,n){"use strict";n.r(t);var r=n(12),a=n(2),c=n(4),i=n(0),l=wr2x_retina.prefix,o=wr2x_retina.domain,s=wr2x_retina.rest_url.replace(/\/+$/,""),u=wr2x_retina.api_url.replace(/\/+$/,""),m=wr2x_retina.plugin_url.replace(/\/+$/,""),d=wr2x_retina.upload_url.replace(/\/+$/,""),f="1"===wr2x_retina.is_pro,p=f&&"1"===wr2x_retina.is_registered,h=wr2x_retina.rest_nonce,g=(wr2x_retina.home_url.replace(/\/+$/,""),wr2x_retina.site_url.replace(/\/+$/,"")),y=wr2x_retina.retina_sizes,b=!!wr2x_retina.full_size;function R(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(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(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(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 v(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(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 k(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){_(c,r,a,i,l,"next",e)}function l(e){_(c,r,a,i,l,"throw",e)}i(void 0)}))}}var S,O,P={issues:"-",ignored:"-",all:"-"},T=0,I={filterBy:"issues",page:1,limit:10,busy:!1,stats:P,sort:{accessor:"id",by:"asc"},search:"",apiErrors:null,status:"",entries:[],totalEntries:0,wr2xSizes:[],wr2xRetinaSizes:null,wr2xCisabledSizes:null,wr2xMethod:null,wr2xFullSize:!1,wr2xPicturefillKeepSrc:!1,wr2xPicturefillLazysizes:!1,wr2xPicturefillCssBackground:!1,wr2xPicturefillNoscript:!1,wr2xAutoGenerate:!1,wr2xOverHttpCheck:!1,wr2xDebug:!1,wr2xDisableResponsive:!1,wr2xImageReplace:!1,wr2xCdnDomain:"",wr2xEasyioDomain:"",wr2xEasyioLossless:"",wr2xBigImageSizeThreshold:!1,wr2xHideRetinaColumn:!1,wr2xHideRetinaDashboard:!1,modals:{uploadRetinaFullsize:!1},mutateEntries:(O=k(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return O.apply(this,arguments)}),mutateStats:(S=k(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return S.apply(this,arguments)})},j=function(e,t){switch(t.type){case"ENTRIES_UPDATED":var n=t.entries;return w(w({},e),{},{entries:n});case"TOTAL_ENTRIES_UPDATED":var r=t.totalEntries;return w(w({},e),{},{totalEntries:r});case"STATS_UPDATED":var a=t.stats;return w(w({},e),{},{stats:a});case"SETTINGS_UPDATED":var c,i,l,o,s,u,m,d,f,p,h,g,y,b,R,E,v,x=t.settings,_=null!==(c=x.wr2x_sizes)&&void 0!==c?c:[],k=x.wr2x_retina_sizes,S=x.wr2x_disabled_sizes,O=x.wr2x_method,P=null!==(i=x.wr2x_full_size)&&void 0!==i&&i,j=null!==(l=x.wr2x_picturefill_keep_src)&&void 0!==l&&l,A=null!==(o=x.wr2x_picturefill_lazysizes)&&void 0!==o&&o,D=null!==(s=x.wr2x_picturefill_css_background)&&void 0!==s&&s,C=null!==(u=x.wr2x_picturefill_noscript)&&void 0!==u&&u,z=null!==(m=x.wr2x_auto_generate)&&void 0!==m&&m,N=null!==(d=x.wr2x_over_http_check)&&void 0!==d&&d,M=null!==(f=x.wr2x_debug)&&void 0!==f&&f,F=null!==(p=x.wr2x_disable_responsive)&&void 0!==p&&p,B=null!==(h=x.wr2x_image_replace)&&void 0!==h&&h,U=null!==(g=x.wr2x_cdn_domain)&&void 0!==g?g:"",L=null!==(y=x.wr2x_easyio_domain)&&void 0!==y?y:"",W=null!==(b=x.wr2x_easyio_lossless)&&void 0!==b?b:"",G=null!==(R=x.wr2x_big_image_size_threshold)&&void 0!==R&&R,q=null!==(E=x.wr2x_hide_retina_column)&&void 0!==E&&E,H=null!==(v=x.wr2x_hide_retina_dashboard)&&void 0!==v&&v;return w(w({},e),{},{wr2xSizes:_,wr2xRetinaSizes:k,wr2xCisabledSizes:S,wr2xMethod:O,wr2xFullSize:P,wr2xPicturefillKeepSrc:j,wr2xPicturefillLazysizes:A,wr2xPicturefillCssBackground:D,wr2xPicturefillNoscript:C,wr2xAutoGenerate:z,wr2xOverHttpCheck:N,wr2xDebug:M,wr2xDisableResponsive:F,wr2xImageReplace:B,wr2xCdnDomain:U,wr2xEasyioDomain:L,wr2xEasyioLossless:W,wr2xBigImageSizeThreshold:G,wr2xHideRetinaColumn:q,wr2xHideRetinaDashboard:H});case"ERROR_UPDATED":var J=t.apiErrors;return w(w({},e),{},{apiErrors:J});case"PAGE_UPDATED":var Y=t.page;return w(w({},e),{},{page:Y});case"SET_ENTRIES_MUTATE":var K=t.mutateEntries;return w(w({},e),{},{mutateEntries:K});case"SET_STATS_MUTATE":var $=t.mutateStats;return w(w({},e),{},{mutateStats:$});case"LIMIT_UPDATED":var V=t.limit;return w(w({},e),{},{limit:V});case"FILTER_UPDATED":var X=t.filter;return w(w({},e),{},{filterBy:X});case"SORT_UPDATED":var Q=t.sort;return w(w({},e),{},{sort:Q});case"SEARCH_UPDATED":var Z=t.search;return w(w({},e),{},{search:Z});case"STATUS_UPDATED":var ee=t.status;return w(w({},e),{},{status:ee});case"TOGGLE_MODAL":var te=t.modal,ne=t.enable;if(!te){var re=w({},e);return re.modals=w({},I.modals),re}if(void 0===e.modals[te])return alert("The modal ".concat(te," doesn't exist.")),e;void 0===ne&&(ne=!e.modals[te]);var ae=w({},e);return ae.modals=w({},ae.modals),ae.modals[te]=ne,ae;case"PUSH_BUSY":return w(w({},e),{},{busy:++T>0});case"POP_BUSY":return w(w({},e),{},{busy:--T>0});default:return e}},A=Object(i.createContext)(),D=function(e){var t=e.children,n=R(Object(i.useReducer)(j,I),2),c=n[0],l=n[1],o=c.filterBy,s=c.limit,m=c.page,d=c.sort,f=c.search,p=Object(i.useMemo)((function(){return[Object(a.H)("".concat(u,"/media"),{limit:s,skip:(m-1)*s,filterBy:o,orderBy:d.accessor,order:d.by,search:f}),{headers:{"X-WP-Nonce":h}}]}),[o,s,m,d,f,u,h,a.H]),g=Object(i.useMemo)((function(){return[Object(a.H)("".concat(u,"/stats"),{search:f}),{headers:{"X-WP-Nonce":h}}]}),[f,u,h,a.H]),y=Object(i.useMemo)((function(){return["".concat(u,"/all_settings/"),{headers:{"X-WP-Nonce":h}}]}),[u,h]),b=Object(r.b)(p,a.I),E=b.data,v=b.mutate;Object(i.useEffect)((function(){l({type:"SET_ENTRIES_MUTATE",mutateEntries:v})}),[v]),Object(i.useEffect)((function(){l({type:"SET_STATS_MUTATE",mutateStats:D})}),[D]);var w=Object(a.K)(E,[],!0),x=w.busy,_=w.data,k=w.total,S=w.error;Object(i.useEffect)((function(){l({type:x?"PUSH_BUSY":"POP_BUSY"})}),[x]),Object(i.useEffect)((function(){l({type:"ENTRIES_UPDATED",entries:_})}),[_]),Object(i.useEffect)((function(){l({type:"TOTAL_ENTRIES_UPDATED",totalEntries:k})}),[k]),Object(i.useEffect)((function(){l({type:"ERROR_UPDATED",apiError:S})}),[S]);var O=Object(r.b)(g,a.I),T=O.data,D=O.mutate,C=Object(a.K)(T,P,!0),z=C.busy,N=C.data,M=C.error;Object(i.useEffect)((function(){l({type:z?"PUSH_BUSY":"POP_BUSY"})}),[z]),Object(i.useEffect)((function(){l({type:"STATS_UPDATED",stats:N})}),[N]),Object(i.useEffect)((function(){l({type:"ERROR_UPDATED",apiError:M})}),[M]);var F=Object(r.b)(y,a.I).data,B=Object(a.K)(F,{},!0),U=B.busy,L=B.data,W=B.error;return Object(i.useEffect)((function(){l({type:U?"PUSH_BUSY":"POP_BUSY"})}),[U]),Object(i.useEffect)((function(){l({type:"SETTINGS_UPDATED",settings:L})}),[L]),Object(i.useEffect)((function(){l({type:"ERROR_UPDATED",apiError:W})}),[W]),React.createElement(A.Provider,{value:[c,l]},t)},C=function(){var e={},t=R(Object(i.useContext)(A),2),n=t[0],r=t[1];return e.setStatus=function(e){r({type:"STATUS_UPDATED",status:e})},e.setPage=function(e){r({type:"PAGE_UPDATED",page:e})},e.setLimit=function(e){r({type:"LIMIT_UPDATED",limit:e})},e.setFilter=function(e){r({type:"FILTER_UPDATED",filter:e})},e.setSort=function(e){r({type:"SORT_UPDATED",sort:e})},e.setSearch=function(e){r({type:"SEARCH_UPDATED",search:e})},e.toggleModal=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r({type:"TOGGLE_MODAL",modal:e,enable:t})},e.pushBusy=function(){r({type:"PUSH_BUSY"})},e.popBusy=function(){r({type:"POP_BUSY"})},w(w({},n),e)},z=wp.i18n.__,N={};N.GENERATE=z("Generate","wp-retina-2x"),N.DASHBOARD=z("Dashboard","wp-retina-2x"),N.PENDING=z("Pending","wp-retina-2x"),N.RENAMED=z("Renamed","wp-retina-2x"),N.ALL=z("All","wp-retina-2x"),N.THUMB=z("Thumb","wp-retina-2x"),N.TITLE_REPLACE=z("Replace / Title / Size","wp-retina-2x"),N.ATTACHED_TO=z("Attached To","wp-retina-2x"),N.FILENAME=z("Filename","wp-retina-2x");var M=N;function F(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 B(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){F(c,r,a,i,l,"next",e)}function l(e){F(c,r,a,i,l,"throw",e)}i(void 0)}))}}function U(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 L(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 L(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 L(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 W(){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 W=function(){return e},e}var G=wp.element,q=G.useState,H=G.useEffect,J=c.a.div(W(),a.B.blue,a.B.red,a.B.red,a.B.orange),Y=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,o=void 0===l||l,s=U(q(e.entry),2),m=s[0],d=s[1],f=U(q(!1),2),p=f[0],g=f[1],y=Object(a.L)({concurrency:2}).runTask;H((function(){e.entry?d(e.entry):e.mediaId&&b(e.mediaId)}),[e.entry]);var b=function(){var e=B(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,y(B(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(u,"/details"),{json:{mediaId:t},nonce:h}));case 1:case"end":return e.stop()}}),e)}))));case 3:n=e.sent,d(n.data),g((function(e){return e-1}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=B(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(n),t&&t();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(){var t=B(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(u,"/build_retina"),{json:{mediaId:e.mediaId},nonce:h});case 3:n=t.sent,R(n.data),g((function(e){return e-1}));case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=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:p},React.createElement("div",{style:{display:"flex",alignItems:"center"}},r&&React.createElement(a.c,{style:{marginLeft:0},title:"Generate",onClick:E},M.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:v(0,e)},e.shortname))})),o&&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:v(0,e)},e.shortname))}))))};function K(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 $(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){K(c,r,a,i,l,"next",e)}function l(e){K(c,r,a,i,l,"throw",e)}i(void 0)}))}}function V(e){return function(e){if(Array.isArray(e))return Z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Q(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 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)||Q(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 Q(e,t){if(e){if("string"==typeof e)return Z(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)?Z(e,t):void 0}}function Z(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 ee(){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 ee=function(){return e},e}var te=wp.element,ne=te.useState,re=te.useEffect,ae=te.useMemo,ce=te.useCallback,ie=y.length>0||b,le={width:40,height:40,objectFit:"cover"},oe=[{accessor:"thumbnail_url",title:"",style:{width:16}},{accessor:"title_metadata",title:M.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:ie&&b},{accessor:"actions",title:"Actions"}],se={accessor:"id",by:"asc"},ue=c.a.div(ee(),a.B.blue,a.B.red,a.B.red,a.B.orange),me=function(e){var t=e.entry,n=e.metadata;if(!n.sizes||!n.file)return null;var r=Object.keys(n.sizes),c=d+"/"+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(ue,{className:m?m.status.toLowerCase():"missing",onClick:function(){return e=u,void console.log(e);var e}},o))})))},de=function(){var e=C(),t=e.entries,n=e.totalEntries,r=e.stats,c=e.busy,i=e.wr2xImageReplace,l=e.filterBy,o=e.modals,s=e.search,m=e.status,d=e.sort,f=e.page,g=e.limit,y=e.apiErrors,R=C(),E=R.mutateStats,v=R.mutateEntries,w=R.setFilter,x=R.toggleModal,_=R.setSearch,k=R.setStatus,S=R.setSort,O=R.setPage,P=R.setLimit,T=X(ne(),2),I=T[0],j=(T[1],X(ne([]),2)),A=j[0],D=j[1],z=X(ne(!1),2),N=z[0],M=z[1],F=X(ne(""),2),B=F[0],U=F[1],L=Object(a.M)(),W=c||N,G=i?parseInt(i):0,q=ce((function(e,n){var r=V(t),a=r.findIndex((function(t){return t.ID===e}));r[a]=n,v({success:!0,data:r},!1),E()}),[t,v,E]),H=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){x(null),q(t,e.data),E()},apiUrl:"".concat(u,"/replace"),apiConfig:{json:{mediaId:t},nonce:h}})},J=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){q(t,e.data),E()},apiUrl:"".concat(u,"/upload_retina_fullsize"),apiConfig:{json:{mediaId:t},nonce:h}})},K=ae((function(){return t.map((function(e){var t,n,r,c=e.info.filter((function(e){return"EXISTS"===e.status&&"full-size"===e.name})).length>0,i=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:le}),title_metadata:React.createElement("div",{style:{display:"flex",alignItems:"center"}},!!G&&React.createElement(H,{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(me,(t={entry:e,metadata:e.metadata},n="entry",r=e.info,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t))),retina_full:React.createElement("div",{style:{display:"flex",alignItems:"center"}},(b||c)&&React.createElement("div",{style:{display:"flex",alignItems:"center"}},!c&&React.createElement(J,{mediaId:e.ID}),React.createElement(Y,{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 de([e.ID])}},"Build Thumbnails"),React.createElement(a.c,{onClick:function(){return ee([e.ID])}},"Build Retina"),c&&React.createElement(a.c,{onClick:function(){confirm("Are you sure?")&&ie([e.ID])}},"Delete ",React.createElement("small",null,"Full-Size Retina")),i&&"issues"===l&&React.createElement(a.c,{onClick:function(){return te(e.ID)}},"Ignore"),"ignored"===l&&React.createElement(a.c,{onClick:function(){return te(e.ID)}},"Un-Ignore"))}}))}),[t]);re((function(){D([]),S(se),O(1)}),[l,s]),re((function(){if(null!==L.busy&&(M(L.busy),!L.busy)){var e=L.getErrorCount();e>0&&U("The process has finished, but ".concat(e," error(s) occurred (check your console).")),L.reset(),D([]),v(),E()}}),[L.busy]);var Q=function(){var e=$(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(u,"/get_all_ids"),{json:{issuesOnly:t},nonce:h});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)}}(),Z=function(){var e=$(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,Object(a.J)("".concat(u,"/refresh"),{nonce:h});case 3:v(),E(),M(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=$(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..."),M(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,Q(!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=$(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(u,"/build_retina"),{json:{mediaId:e},nonce:h,signal:n});case 3:return(r=t.sent).success?q(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,L.start(r);case 15:E();case 16:M(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=$(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,Object(a.J)("".concat(u,"/ignore"),{json:{mediaId:t},nonce:h});case 3:return(n=e.sent).success?(E(),v()):alert("Error!"),M(!1),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=$(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..."),M(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,Q();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=$(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(u,"/delete_retina_fullsize"),{json:{mediaId:e},nonce:h,signal:n});case 3:return(r=t.sent).success?q(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,L.start(r);case 15:E();case 16:M(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=$(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..."),M(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,Q();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=$(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(u,"/delete_retina"),{json:{mediaId:e},nonce:h,signal:n});case 3:return(r=t.sent).success?q(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,L.start(r);case 15:E();case 16:M(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),de=function(){var e=$(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..."),M(!0),!t){e.next=7;break}e.t0=t,e.next=10;break;case 7:return e.next=9,Q();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=$(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(u,"/regenerate"),{json:{mediaId:e},nonce:h,signal:n});case 3:return(r=t.sent).success?q(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,L.start(r);case 15:E();case 16:M(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=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:[y]},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:"header",onClick:function(){return window.open("https://meowapps.com/wp-retina-2x-tutorial/","_blank")}},"Tutorial"),React.createElement(a.c,{icon:"dashboard",className:"header",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:!p&&fe},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 Z()}},"Refresh Stats"),!W&&A.length>0&&React.createElement(React.Fragment,null,React.createElement(a.c,{className:"secondary",onClick:function(){return ee(A)}},"Build Retina for ",React.createElement("strong",null,A.length," Entries")),React.createElement(a.c,{className:"secondary",title:"Regenerate Thumbnails, Metadata and Build Retina",onClick:function(){return de(A)}},"Regenerate ",React.createElement("strong",null,A.length," Entries")),React.createElement(a.c,{className:"danger",onClick:function(){return ue(A)}},"Delete Retina for ",React.createElement("strong",null,A.length," Entries"))),React.createElement("div",{style:{flex:1}},N&&React.createElement(a.u,{status:function(e){return"".concat(m," (").concat(e,"%)")},busy:N,value:L.value,max:L.max,onStopClick:L.stop})),!W&&React.createElement(React.Fragment,null,React.createElement(a.k,{onBlur:function(e){_(e)},value:s,onEnter:function(e){_(e)}}),!s&&React.createElement(a.j,{icon:"search",width:24,style:{position:"relative",left:-34,marginRight:-22},color:"#5a5a5a82"}),s&&React.createElement(a.j,{icon:"close",width:24,style:{position:"relative",left:-34,marginRight:-22},color:a.B.blue,onClick:function(){_("")}})),!W&&0===A.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 ee()}},"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 de()}},"Regenerate ",React.createElement("strong",null,"All Entries")),React.createElement(a.n,{className:"danger",onClick:function(){return ue()}},"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:l,busy:W,onChange:function(e){w(e),O(1)}},React.createElement(a.l,{title:"All",value:"all",count:r.all}),React.createElement(a.l,{title:"Retina Issues",value:"issues",count:r.issues}),React.createElement(a.l,{title:"Ignored",value:"ignored",count:r.ignored})),React.createElement(a.t,{currentPage:f,limit:g,total:n,onCurrentPageChanged:function(e){return O(e)},onClick:function(e){return O(e)}})),React.createElement(a.z,{busy:W,data:K,columns:oe,sort:d,onSortChange:function(e,t){S({accessor:e,by:t})},onSelect:function(e){D([].concat(V(A),V(e)))},onUnselect:function(e){D(V(A.filter((function(t){return!e.includes(t)}))))},selectedItems:A,emptyMessage:React.createElement(React.Fragment,null,"It's all clean & nice here! 👍",React.createElement("br",null),"Why not trying to give a boost ot your DB with ",React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner"),"? 😌")}),React.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10}},React.createElement(a.w,{scrolldown:!0,value:g,onChange:function(e){P(e),O(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:g,total:n,onClick:function(e){return O(e)}}))),React.createElement(a.q,{isOpen:o.uploadRetinaFullsize,onRequestClose:function(){x(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){x(null),q(I,e.data),E()},apiUrl:"".concat(u,"/upload_retina_fullsize"),apiConfig:{json:{mediaId:I},nonce:h}}),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:B,title:"Success",ok:"Close",content:B,onOkClick:function(){U(""),L.reset()}})))};function fe(){var e=be(["\n margin-top: 10px;\n background: rgb(0, 72, 88);\n padding: 10px;\n color: rgb(58, 212, 58);\n max-height: 600px;\n min-height: 200px;\n display: block;\n font-family: monospace;\n font-size: 12px;\n white-space: pre;\n overflow-x: auto;\n width: calc(100vw - 276px);\n\n .log-date {\n color: white;\n margin-left: 8px;\n }\n\n .log-type {\n background: #0000004d;\n padding: 2px 5px;\n border-radius: 8px;\n text-transform: uppercase;\n }\n\n .log-content {\n display: block;\n }\n\n .log-warning .log-type {\n background: #ccb028;\n color: white;\n }\n\n .log-fatal .log-type {\n background: #cc2828;\n color: white;\n }\n"]);return fe=function(){return e},e}function pe(){var e=be(["\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 pe=function(){return e},e}function he(){var e=be(["\n width: 85px;\n height: 85px;\n padding-right: 10px;\n"]);return he=function(){return e},e}function ge(){var e=be(["\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 ge=function(){return e},e}function ye(){var e=be(["\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 ye=function(){return e},e}function be(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Re=c.a.div(ye()),Ee=Object(c.a)(a.a)(ge()),ve=c.a.img(he()),we=c.a.div(pe()),xe=c.a.ul(fe());function _e(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Pe(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 ke(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 Se(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){ke(c,r,a,i,l,"next",e)}function l(e){ke(c,r,a,i,l,"throw",e)}i(void 0)}))}}function Oe(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)||Pe(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 Pe(e,t){if(e){if("string"==typeof e)return Te(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)?Te(e,t):void 0}}function Te(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 Ie=wp.element,je=Ie.useState,Ae=Ie.useEffect,De="".concat(s,"/meow-common/v1"),Ce=function(e){var t=e.request,n=e.title,r=e.max,c=Oe(je(!1),2),i=c[0],l=c[1],o=Oe(je([]),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,f=!s.length&&i;Ae((function(){i&&setTimeout(Se(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(De,"/").concat(t),{nonce:h});case 3:r=(new Date).getTime(),c=r-n,u((function(e){return[].concat(_e(e),[c])}));case 6:case"end":return e.stop()}}),e)}))),1e3)}),[s]);return React.createElement(Re,{style:{width:200,textAlign:"center"}},React.createElement(a.E,{h2:!0,style:{color:"white"}},n),React.createElement(a.h,{size:200,value:f?r:d,max:r},React.createElement("span",{style:{fontSize:20}},f?"START":d+" ms"),React.createElement("span",{style:{fontSize:12}},f?"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 ze(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 Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(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 Be(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){Fe(c,r,a,i,l,"next",e)}function l(e){Fe(c,r,a,i,l,"throw",e)}i(void 0)}))}}function Ue(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 Le(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 Le(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 Le(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 We=wp.element,Ge=We.useState,qe=We.useEffect;u&&s&&m||console.error("[@common/dashboard] apiUrl, restUrl and pluginUrl are mandatory.");var He="".concat(s,"/meow-common/v1"),Je=React.createElement(Re,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"),".")),Ye=React.createElement(Re,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"),".")),Ke=React.createElement(Re,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/how-to-debug-wordpress-errors/",target:"_blank"},"How To Debug WordPress")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-improve-seo-wordpress/",target:"_blank"},"SEO Checklist & Optimization")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-faster-wordpress-optimize/",target:"_blank"},"Optimize your WordPress Speed")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-optimize-images-wordpress/",target:"_blank"},"Optimize Images (CDN, and so on)")),React.createElement("li",null,"☘️  ",React.createElement("a",{href:"https://meowapps.com/tutorial-hosting-service-wordpress/",target:"_blank"},"Best Hosting Services for WordPress"))))),$e=["".concat(He,"/all_settings/"),{headers:{"X-WP-Nonce":h}}],Ve=function(){var e=Ue(Ge(!1),2),t=e[0],n=e[1],c=Object(r.b)($e,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,d=null==s?void 0:s.force_sslverify,f=Ue(Ge(!1),2),p=f[0],g=f[1],y=Ue(Ge([]),2),b=y[0],R=y[1],E=Ue(Ge(""),2),v=E[0],w=E[1];qe((function(){o&&!t&&(n(!0),console.error("Error from UseSWR",o.message))}),[o]),qe((function(){var e=document.getElementById("meow-common-phpinfo");w(e.innerHTML)}),[]);var x=function(){var e=Be(regeneratorRuntime.mark((function e(t,n){var r,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=Ne({},i.data))[n]=t,l(Ne(Ne({},i),{},{data:r}),!1),g(!0),e.next=6,Object(a.J)("".concat(He,"/update_option"),{json:{name:n,value:t},nonce:h});case 6:c=e.sent,g(!1),c.success||alert(c.message),l();case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),_=function(){var e=Be(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(!0),e.next=3,Object(a.J)("".concat(He,"/error_logs"),{nonce:h});case 3:t=e.sent,n=t&&t.data?t.data:[],R(n.reverse()),g(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=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:p,checked:u,onChange:x}))),S=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:p,checked:d,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"},Je,React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(Ee,{title:"Media Cleaner",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/media-cleaner.png")}),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(Ee,{title:"Database Cleaner",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/database-cleaner.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/database-cleaner/"},"Database Cleaner")),React.createElement("p",null,"Clean your WordPress database. This plugin is simple, handles risk levels, and aims to work even on oversized databases on which other plugins fail to operate."))),React.createElement(Ee,{title:"Media File Renamer",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/media-file-renamer.png")}),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(Ee,{title:"Social Engine",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/social-engine.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/social-engine/"},"Social Engine")),React.createElement("p",null,"Organize, schedule and automate the publishing of your content and photos on social accounts. Similar to Buffer, TweetDeck, etc, but without all the limitations, and in your WordPress."))),React.createElement(Ee,{title:"Meow Analytics",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/meow-analytics.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(Ee,{title:"Photo Engine",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/wplr-sync.png")}),React.createElement("div",null,React.createElement("h2",null,React.createElement("a",{target:"_blank",href:"https://wordpress.org/plugins/wplr-sync/"},"Photo Engine")),React.createElement("p",null,"Are you using Lightroom? So you know Photo Engine already. Wait, you don't? You must try it! This plugin will be your favorite very soon."))),React.createElement(Ee,{title:"Meow Gallery",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/meow-gallery.png")}),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(Ee,{title:"Meow Lightbox",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/meow-lightbox.png")}),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(Ee,{title:"Perfect Images (Retina)",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/wp-retina-2x.png")}),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(Ee,{title:"Contact Form Block",className:"primary"},React.createElement(ve,{src:"".concat(m,"/common/img/contact-form-block.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(a.y,{title:"Performance"},Ye,React.createElement("div",{style:{display:"flex",justifyContent:"space-around",marginBottom:25}},React.createElement(Ce,{title:"Empty Request Time",request:"empty_request",max:2500}),React.createElement(Ce,{title:"File Operation Time",request:"file_operation",max:2600}),React.createElement(Ce,{title:"SQL Request Time",request:"sql_request",max:2800}))),React.createElement(a.y,{title:"Recommendations"},Ke),React.createElement(a.y,{title:"PHP Info"},React.createElement(we,{dangerouslySetInnerHTML:{__html:v}})),React.createElement(a.y,{title:"PHP Error Logs"},React.createElement(Re,null,React.createElement(a.c,{style:{marginBottom:10},color:"#ccb027",onClick:_},"Load PHP Error Logs"),React.createElement(xe,null,b.map((function(e){return React.createElement("li",{class:"log-".concat(e.type)},React.createElement("span",{class:"log-type"},e.type),React.createElement("span",{class:"log-date"},e.date),React.createElement("span",{class:"log-content"},e.content))}))))),React.createElement(a.y,{title:"Settings"},React.createElement(a.a,{title:"Settings",className:"primary"},k,S))))))};function Xe(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 Qe(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){Xe(c,r,a,i,l,"next",e)}function l(e){Xe(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 et(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 et(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 et(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 tt=wp.element,nt=tt.useState,rt=tt.useEffect,at="".concat(s,"/meow-licenser/").concat(l,"/v1"),ct=function(){var e=Ze(nt(!1),2),t=e[0],n=e[1],r=Ze(nt(!1),2),c=r[0],i=r[1],l=Ze(nt(null),2),o=l[0],s=l[1],u=Ze(nt(null),2),m=u[0],d=u[1],g=Ze(nt(""),2),y=g[0],b=g[1],R=p&&(!m||"valid"!==m.license),E=function(){var e=Qe(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(f){e.next=2;break}return e.abrupt("return");case 2:return n(!0),e.next=5,Object(a.J)("".concat(at,"/get_license"),{nonce:h});case 5:t=e.sent,d(t.data),t.data.key&&b(t.data.key),n(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=Qe(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(at,"/set_license"),{nonce:h,json:{serialKey:null}});case 3:e.sent.success&&(b(""),d(null),s("licenseRemoved")),n(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=Qe(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(at,"/set_license"),{nonce:h,json:{serialKey:y,override:!0}});case 3:(t=e.sent).success&&(d(t.data),t.data&&!t.data.issue&&s("licenseAdded")),n(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=Qe(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("MEOW_OVERRIDE"!==y){e.next=5;break}return i(!0),d(null),b(""),e.abrupt("return");case 5:return n(!0),e.next=8,Object(a.J)("".concat(at,"/set_license"),{nonce:h,json:{serialKey:y}});case 8:(t=e.sent).success&&(d(t.data),t.data&&!t.data.issue&&s("licenseAdded")),n(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();rt((function(){E()}),[]);var _=R?"Forced License":p?"Enabled":"Disabled",k=R||m&&"valid"===m.license,S="Your license is active. Thanks a lot for your support :)";R&&m&&m.check_url&&(S=React.createElement(React.Fragment,null,React.createElement("span",null,S),React.createElement("br",null),React.createElement("small",null,"This license was enabled manually. To check your license status, please click ",React.createElement("a",{target:"_blank",href:m.check_url+"&cache="+642e3*Math.random()},"here"),"."))),k||(m?"no_activations_left"===m.issue?S=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://meowapps.com"},"Meow Apps Store"),", unregister a site, and click on ",React.createElement("i",null,"Retry to validate"),"."):"expired"===m.issue?S=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://meowapps.com"},"Meow Apps Store"),"."):"missing"===m.issue?S="This license does not exist.":"disabled"===m.issue?S="This license has been disabled.":"item_name_mismatch"===m.issue?S="This license seems to be for a different plugin... isn't it? :)":"forced"===m.issue?S="ABC":(S=React.createElement("span",null,"There is an unknown error related to the system or this serial key. Really sorry about this! Make sure your security plugins and systems are off temporarily. If you are still experiencing an issue, please ",React.createElement("a",{target:"_blank",rel:"noreferrer",href:"https://meowapps.com/contact/"},"contact us"),"."),console.error({license:m})):S="Unknown error :(");var O=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"},"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://meowapps.com/"},"Meow Apps Store"),"."),P=React.createElement(a.a,{title:"Pro Version (".concat(_,")"),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:y,onChange:function(e){return b(e)},placeholder:""})),m&&!k&&React.createElement(a.o,null,S),m&&k&&React.createElement(a.p,null,S),!m&&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:"https://meowapps.com"},"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"},m&&!k&&React.createElement(a.c,{className:"secondary",disabled:t||!y,onClick:x},"Retry to validate"),m&&m.key===y&&React.createElement(a.c,{className:"secondary",disabled:t||!y,onClick:v},"Remove License"),React.createElement(a.c,{disabled:t||!y||m&&m.key===y,onClick:x},"Validate License"),c&&!k&&React.createElement(a.c,{disabled:t||!y||m&&m.key===y,onClick:w,className:"danger"},"Force License")),React.createElement(a.q,{isOpen:"licenseAdded"===o,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"===o,title:"Goodbye :(",content:"The Pro features have been disabled. This page should be now reloaded.",ok:"Reload",onOkClick:function(){return location.reload()}}));return f?P:O},it=wp.element.render;function lt(e){return function(e){if(Array.isArray(e))return ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||pt(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 ot(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 st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){ut(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(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 dt(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var c=e.apply(t,n);function i(e){mt(c,r,a,i,l,"next",e)}function l(e){mt(c,r,a,i,l,"throw",e)}i(void 0)}))}}function ft(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)||pt(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 pt(e,t){if(e){if("string"==typeof e)return ht(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)?ht(e,t):void 0}}function ht(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&&it(React.createElement(Ve,null),t)})));var gt=wp.element,yt=gt.useState,bt=gt.useEffect,Rt=gt.useMemo,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]},vt=function(){var e=Rt((function(){return["".concat(u,"/all_settings/"),{headers:{"X-WP-Nonce":h}}]}),[u,h]),t=Object(r.b)(e,a.I),n=t.data,c=t.mutate,i=t.error,s=Object(a.K)(n,{},!0),m=s.busy,d=s.data,y=ft(yt(!1),2),b=y[0],R=y[1],E=ft(yt(null),2),v=E[0],w=E[1],x=ft(yt(null),2),_=x[0],k=x[1],S=m||b,O=null==d?void 0:d.wr2x_method,P=null==d?void 0:d.wr2x_sizes,T=null==d?void 0:d.wr2x_retina_sizes,I=null==d?void 0:d.wr2x_disabled_sizes,j=null==d?void 0:d.wr2x_full_size,A=null==d?void 0:d.wr2x_picturefill_keep_src,D=null==d?void 0:d.wr2x_picturefill_lazysizes,C=null==d?void 0:d.wr2x_picturefill_css_background,z=null==d?void 0:d.wr2x_picturefill_noscript,N=null==d?void 0:d.wr2x_auto_generate,M=null==d?void 0:d.wr2x_over_http_check,F=null==d?void 0:d.wr2x_debug,B=null==d?void 0:d.wr2x_disable_responsive,U=null==d?void 0:d.wr2x_cdn_domain,L=null==d?void 0:d.wr2x_big_image_size_threshold,W=null==d?void 0:d.wr2x_hide_retina_column,G=null==d?void 0:d.wr2x_hide_retina_dashboard,q=null==d?void 0:d.wr2x_image_replace,H=null==d?void 0:d.wr2x_easyio_domain,J=null==d?void 0:d.wr2x_easyio_lossless,Y="none"===O,K=function(){var e=dt(regeneratorRuntime.mark((function e(t,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=st({},n.data))[r]=t,c(st(st({},n),{},{data:i}),!1),R(!0),e.prev=4,e.next=7,Object(a.J)("".concat(u,"/update_option"),{json:{name:r,value:t},nonce:h});case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),alert(e.t0.message);case 12:R(!1),c();case 14:case"end":return e.stop()}}),e,null,[[4,9]])})));return function(t,n){return e.apply(this,arguments)}}(),$=[{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")}],V=function(){var e=dt(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!H){e.next=7;break}return e.next=4,Object(a.J)("".concat(u,"/easy_io_stats"),{nonce:h});case 4:(null==(t=e.sent)?void 0:t.stats.original)&&(null==t?void 0:t.stats.savings)&&w(t.stats),(null==t?void 0:t.stats.bandwidth)&&(null==t?void 0:t.stats.quota)&&k(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)}}();bt((function(){V()}),[H]);var X=function(){var e=dt(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t?lt(I.filter((function(e){return e!==n}))):[].concat(lt(I),[n]),K(r,"wr2x_disabled_sizes");case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Q=function(){var e=dt(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t?[].concat(lt(T),[n]):lt(T.filter((function(e){return e!==n}))),K(r,"wr2x_retina_sizes");case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Z=function(){var e=dt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),e.prev=1,e.next=4,Object(a.J)("".concat(u,"/easy_io_link"),{nonce:h});case 4:e.sent,c(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),alert(e.t0.message);case 11:R(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=dt(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),e.prev=1,e.next=4,Object(a.J)("".concat(u,"/easy_io_unlink"),{nonce:h});case 4:e.sent,c(),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),alert(e.t0.message);case 11:R(!1);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(){return e.apply(this,arguments)}}(),te=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,P&&P.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:S,value:"1",checked:e.enabled,onChange:function(){return X(!e.enabled,e.name)}})),React.createElement("td",null,React.createElement(a.d,{id:"retina-"+e.name,disabled:S||!e.enabled,value:"1",checked:e.retina,onChange:function(){return Q(!e.retina,e.name)}})))}))))),ne=React.createElement(a.x,{title:"Delivery Method"},React.createElement(a.w,{scrolldown:!0,id:"wr2x_method",name:"wr2x_method",disabled:S,value:O,description:"",onChange:K},$.map((function(e){return React.createElement(a.r,{key:e.id,id:e.id,value:e.value,label:e.label,requirePro:e.requirePro})})))),re=React.createElement(a.x,{title:"Full-Size Retina"},React.createElement(a.d,{id:"wr2x_full_size",disabled:S,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:!p,checked:j,onChange:K})),ae=React.createElement(a.x,{title:"Keep IMG SRC"},React.createElement(a.d,{id:"wr2x_picturefill_keep_src",disabled:S,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:A,onChange:K})),ce=React.createElement(a.x,{title:"Responsive Images"},React.createElement(a.d,{id:"wr2x_picturefill_lazysizes",disabled:S,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:!p,checked:D,onChange:K})),ie=React.createElement(a.x,{title:"CSS Background"},React.createElement(a.d,{id:"wr2x_picturefill_css_background",disabled:S,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:!p,checked:C,onChange:K})),le=React.createElement(a.x,{title:"Polyfill Script"},React.createElement(a.d,{id:"wr2x_picturefill_noscript",disabled:S,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:z,onChange:K})),oe=React.createElement(a.x,{title:"Retina Images"},React.createElement(a.d,{id:"wr2x_auto_generate",disabled:S,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:N,onChange:K})),se=React.createElement(a.x,{title:"Over HTTP Check"},React.createElement(a.d,{id:"wr2x_over_http_check",disabled:Y||S,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. ",M?React.createElement("b",null,"This option slows down processing dramatically; therefore, caching is absolutely necessary."):""),value:"1",requirePro:!p,checked:!Y&&M,onChange:K})),ue=React.createElement(a.x,{title:"Debug"},React.createElement(a.d,{id:"wr2x_debug",disabled:S,label:"Force Retina + Logging",description:React.createElement(React.Fragment,null,"Displays retina and creates a log file in the plugin folder."),value:"1",checked:F,onChange:K})),me=React.createElement(a.x,{title:"Responsive Images"},React.createElement(a.d,{id:"wr2x_disable_responsive",disabled:S,label:"Disable",description:React.createElement(React.Fragment,null,"Disable the natural Responsive Images feature built in WordPress. For developers only."),value:"1",checked:B,onChange:K})),de=React.createElement(a.x,{title:"CDN Domain",requirePro:!p},React.createElement(a.k,{id:"wr2x_cdn_domain",type:"text",disabled:S,value:U,onEnter:K,onBlur:K,description:React.createElement(React.Fragment,null,"If not empty, your site domain will be replaced with this CDN domain.")})),fe=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,H&&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: ",H,".")),!H&&React.createElement("b",null,"Not linked with Easy IO."),!H&&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,g),"] 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! 🏁")))),H&&React.createElement("div",null,React.createElement(a.c,{className:"danger",onClick:ee},"Disable Easy IO")),!H&&React.createElement("div",null,React.createElement(a.c,{onClick:Z},"Verify & Enable Easy IO"))))),pe=H?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: "),!_&&React.createElement("span",null,"N/A"),_&&React.createElement("span",null,Et(_.bandwidth)," of ",Et(_.quota)," (",Math.round(_.bandwidth/_.quota*100)+"%",")")),React.createElement(a.E,null,React.createElement("span",null,"Image Size Reduction: "),!v&&React.createElement("span",null,"N/A"),v&&React.createElement("span",null,Math.round(v.savings/v.original*100)+"%")))):null,he=H?React.createElement(a.x,{title:"Lossless Quality"},React.createElement(a.d,{id:"wr2x_easyio_lossless",disabled:!H||S,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:J,onChange:K})):null,ge=React.createElement(a.x,{title:"Image Threshold"},React.createElement(a.d,{id:"wr2x_big_image_size_threshold",disabled:S,label:"Disable",value:"1",checked:L,onChange:K})),ye=React.createElement(a.x,{title:"Image Replace"},React.createElement(a.d,{id:"wr2x_image_replace",disabled:S,label:"Enable",description:React.createElement(React.Fragment,null),requirePro:!p,value:"1",checked:q,onChange:K})),be=React.createElement(a.x,{title:"Hide Retina Column"},React.createElement(a.d,{id:"wr2x_hide_retina_column",disabled:Y||S,label:"Yes",description:React.createElement(React.Fragment,null,"Hide the ",React.createElement("i",null,"Retina Column")," in the Media Library."),value:"1",checked:!Y&&W,onChange:K})),Re=React.createElement(a.x,{title:"Hide Dashboard"},React.createElement(a.d,{id:"wr2x_hide_retina_dashboard",disabled:S,label:"Yes",description:React.createElement(React.Fragment,null,"Hide the ",React.createElement("i",null,"Perfect Images Dashboard")," menu and tools."),value:"1",checked:G,onChange:K}));return React.createElement(a.s,{nekoError:[i]},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:"header",onClick:function(){return window.open("https://meowapps.com/wp-retina-2x-tutorial/","_blank")}},"Tutorial"),!G&&React.createElement(a.c,{icon:"dashboard",className:"header",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:S,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."),te,oe,re)),React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:S,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"),"."),ge),React.createElement(a.a,{busy:S,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."),ye,Re,be)))),React.createElement(a.y,{title:"Retina Delivery"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:S,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"),"."),ne,se)),React.createElement(a.f,{minimal:!0},"Picturefill"===O&&React.createElement(a.a,{busy:S,title:"PictureFill",className:"primary"},ae,ie,le)))),React.createElement(a.y,{title:"Optimization & Speed"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:S,title:"Perfect Images + Easy IO",className:"primary"},!H&&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"),"."),fe,pe,he)),React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:S,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."),ce)))),React.createElement(a.y,{title:"Advanced"},React.createElement(a.G,null,React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:S,className:"primary"},me,ue)),React.createElement(a.f,{minimal:!0},React.createElement(a.a,{busy:S,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"),"."),de)))),React.createElement(a.y,{title:"Pro Version"},React.createElement(ct,{domain:o,prefix:l,isPro:f,isRegistered:p}))))))},wt=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(u,"/upload_retina"),apiConfig:{nonce:h}}))},xt=wp.element.render,_t={fetcher:a.I,revalidateOnFocus:!1};function kt(){Array.from(document.getElementsByClassName("wr2x-retina-field")).forEach((function(e){var t=e.getAttribute("data-id");xt(React.createElement(r.a,{value:_t},React.createElement(Y,{natural:!0,mediaId:t})),e)}))}document.addEventListener("DOMContentLoaded",(function(){var e,t;new window.MutationObserver((function(){kt()})).observe(document.documentElement,{childList:!0,subtree:!0}),(e=document.getElementById("wr2x-admin-settings"))&&xt(React.createElement(r.a,{value:_t},React.createElement(vt,null)),e),(t=document.getElementById("wr2x-dashboard"))&&xt(React.createElement(r.a,{value:_t},React.createElement(D,null,React.createElement(de,null))),t),kt(),function(){var e=document.getElementById("wr2x-fullsize-uploader");e&&xt(React.createElement(r.a,{value:_t},React.createElement(wt,null)),e)}()}))},2:function(e,t,n){"use strict";var r=n(15);n.d(t,"b",(function(){return r.a}));var a=n(11);n.d(t,"c",(function(){return a.a}));var c=n(39);n.d(t,"m",(function(){return c.a})),n.d(t,"n",(function(){return c.b}));var i=n(51);n.d(t,"s",(function(){return i.a}));var l=n(52);n.d(t,"a",(function(){return l.a}));var o=n(53);n.d(t,"g",(function(){return o.a}));var s=n(54);n.d(t,"x",(function(){return s.a}));n(55);var u=n(40);n.d(t,"G",(function(){return u.b})),n.d(t,"f",(function(){return u.a}));var m=n(56);n.d(t,"d",(function(){return m.a}));var d=n(57);n.d(t,"e",(function(){return d.a}));var f=n(23);n.d(t,"k",(function(){return f.a}));n(58);var p=n(41);n.d(t,"w",(function(){return p.b})),n.d(t,"r",(function(){return p.a}));n(59),n(60),n(9),n(42),n(24);var h=n(61);n.d(t,"u",(function(){return h.a}));var g=n(62);n.d(t,"i",(function(){return g.a}));var y=n(25);n.d(t,"t",(function(){return y.a}));var b=n(6);n.d(t,"j",(function(){return b.a}));var R=n(17);n.d(t,"E",(function(){return R.a}));var E=n(43);n.d(t,"v",(function(){return E.b})),n.d(t,"l",(function(){return E.a}));var v=n(63);n.d(t,"h",(function(){return v.a}));var w=n(44);n.d(t,"o",(function(){return w.a})),n.d(t,"p",(function(){return w.b}));var x=n(64);n.d(t,"F",(function(){return x.a}));n(26);var _=n(20);n.d(t,"D",(function(){return _.a}));n(16);var k=n(27);n.d(t,"q",(function(){return k.a}));n(69);var S=n(28);n.d(t,"z",(function(){return S.a}));var O=n(46);n.d(t,"A",(function(){return O.b})),n.d(t,"y",(function(){return O.a}));n(47);var P=n(70);n.d(t,"C",(function(){return P.a}));var T=n(3);n.d(t,"B",(function(){return T.a}));var I=n(8);n.d(t,"M",(function(){return I.d})),n.d(t,"K",(function(){return I.b})),n.d(t,"L",(function(){return I.c}));var j=n(14);n.d(t,"J",(function(){return j.c})),n.d(t,"I",(function(){return j.b})),n.d(t,"H",(function(){return j.a}));n(21)}});
2
- //# sourceMappingURL=index.js.map
 
 
trunk/app/lazysizes.min.js DELETED
@@ -1,5 +0,0 @@
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:{});
 
 
 
 
 
trunk/app/picturefill.min.js DELETED
@@ -1,8 +0,0 @@
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);
 
 
 
 
 
 
 
 
trunk/app/retina-cookie.js DELETED
@@ -1,3 +0,0 @@
1
- /* eslint-disable */
2
-
3
- document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';
 
 
 
trunk/app/retina.js DELETED
@@ -1,102 +0,0 @@
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) :
6
- (global.retinajs = factory());
7
- }(this, (function () { 'use strict';
8
-
9
- var hasWindow = typeof window !== 'undefined';
10
- var environment = Math.round(hasWindow ? window.devicePixelRatio || 1 : 1);
11
- var srcReplace = /(\.[A-z]{3,4}\/?(\?.*)?)$/;
12
- var inlineReplace = /url\(('|")?([^)'"]+)('|")?\)/i;
13
- var selector = '[data-rjs]';
14
- var processedAttr = 'data-rjs-processed';
15
- function arrayify(object) {
16
- return Array.prototype.slice.call(object);
17
- }
18
- function chooseCap(cap) {
19
- var numericCap = parseInt(cap, 10);
20
- if (environment < numericCap) {
21
- return environment;
22
- } else {
23
- return numericCap;
24
- }
25
- }
26
- function forceOriginalDimensions(image) {
27
- if (!image.hasAttribute('data-no-resize')) {
28
- if (image.offsetWidth === 0 && image.offsetHeight === 0) {
29
- image.setAttribute('width', image.naturalWidth);
30
- image.setAttribute('height', image.naturalHeight);
31
- } else {
32
- image.setAttribute('width', image.offsetWidth);
33
- image.setAttribute('height', image.offsetHeight);
34
- }
35
- }
36
- return image;
37
- }
38
- function setSourceIfAvailable(image, retinaURL) {
39
- var imgType = image.nodeName.toLowerCase();
40
- var testImage = document.createElement('img');
41
- testImage.addEventListener('load', function () {
42
- if (imgType === 'img') {
43
- forceOriginalDimensions(image).setAttribute('src', retinaURL);
44
- } else {
45
- image.style.backgroundImage = 'url(' + retinaURL + ')';
46
- }
47
- });
48
- testImage.setAttribute('src', retinaURL);
49
- image.setAttribute(processedAttr, true);
50
- }
51
- function dynamicSwapImage(image, src) {
52
- var rjs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
53
- var cap = chooseCap(rjs);
54
- if (src && cap > 1) {
55
- var newSrc = src.replace(srcReplace, '@' + cap + 'x$1');
56
- setSourceIfAvailable(image, newSrc);
57
- }
58
- }
59
- function manualSwapImage(image, src, hdsrc) {
60
- if (environment > 1) {
61
- setSourceIfAvailable(image, hdsrc);
62
- }
63
- }
64
- function getImages(images) {
65
- if (!images) {
66
- return typeof document !== 'undefined' ? arrayify(document.querySelectorAll(selector)) : [];
67
- } else {
68
- return typeof images.forEach === 'function' ? images : arrayify(images);
69
- }
70
- }
71
- function cleanBgImg(img) {
72
- return img.style.backgroundImage.replace(inlineReplace, '$2');
73
- }
74
- function retina(images) {
75
- getImages(images).forEach(function (img) {
76
- if (!img.getAttribute(processedAttr)) {
77
- var isImg = img.nodeName.toLowerCase() === 'img';
78
- var src = isImg ? img.getAttribute('src') : cleanBgImg(img);
79
- var rjs = img.getAttribute('data-rjs');
80
- var rjsIsNumber = !isNaN(parseInt(rjs, 10));
81
- if (rjs === null) {
82
- return;
83
- }
84
- if (rjsIsNumber) {
85
- dynamicSwapImage(img, src, rjs);
86
- } else {
87
- manualSwapImage(img, src, rjs);
88
- }
89
- }
90
- });
91
- }
92
- if (hasWindow) {
93
- window.addEventListener('load', function () {
94
- retina();
95
- });
96
- window.retinajs = retina;
97
- }
98
-
99
- return retina;
100
-
101
- })));
102
- //# sourceMappingURL=retina.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/app/retina.min.js DELETED
@@ -1,4 +0,0 @@
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
 
 
 
 
trunk/app/vendor.js DELETED
@@ -1,27 +0,0 @@
1
- (window.wpJsonWr2x=window.wpJsonWr2x||[]).push([[1],[,function(e,n,t){e.exports=t(120)()},,function(e,n,t){"use strict";function r(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 o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var i={black:"#000000",blackRGB:"0, 0, 0",blue:"#007cba",blueRGB:"0, 124, 186",deepBlue:"#134575",finderBorder:"#DEDEDE",lightBlue:"#EBF3FF",lightGray:"#cacaca",lightGray2:"#F5F5F5",lightPurple:"#D8B1FF",gray:"#E8E8E8",green:"#0EA480",darkGray:"#A0A0A0",disabledForm:"#828282",orange:"#daa827",overlay:"rgba(16, 16, 16, 0.92)",red:"#ba4300",redHighlight:"#de5307",header:"#007cba",proGray:"#7F8EA0",progress:"#8414a8",purple:"#956DBE",tableGray:"#FAFAFA",yellow:"#e4b42b",yellowRGB:"224, 156, 54",white:"#ffffff",whiteRGB:"255, 255, 255"},l={danger:i.red,primary:i.blue,secondary:i.lightBlue,success:i.green},c=o(o(o({},i),l),{},{fontFamily:"Lato",fontSizeH1:"24px",fontSizeH2:"18px",fontSizeText:"13px",fontSizeSmall:"12px",fontSizeSmallButton:"10px",lightShadow:"0px 0px 10px rgba(0,0,0,0.1)"});n.a=c},function(e,n,t){"use strict";(function(e){var r=t(29),o=t(0),a=t.n(o),i=(t(72),t(73)),l=t(74),c=t(50),u=t(48),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},j=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}(),E=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,M=1,z=function(e){if(P.has(e))return P.get(e);var n=M++;return P.set(e,n),A.set(n,e),n},I=function(e){return A.get(e)},T=function(e,n){n>=M&&(M=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-]+)"\\].*?"([^"]*)'),L=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)},F=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&&(T(u,c),L(e,u,l[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(i)}}},D=w,B={isServer:!w,useCSSOMInjection:!x},U=function(){function e(e,n,t){void 0===e&&(e=B),void 0===n&&(n={}),this.options=f({},B,{},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)&&(F(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return z(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 j(o):new E(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(z(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(z(e),t)},n.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},n.clearRules=function(e){this.getTag().clearGroup(z(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=I(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},q=function(e){return H(5381,e)};var V=/^\s*\/\/.*$/gm;function $(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(V,""),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 W=a.a.createContext(),G=(W.Consumer,a.a.createContext()),K=(G.Consumer,new U),X=$();function Y(){return Object(o.useContext)(W)||K}function J(){return Object(o.useContext)(G)||X}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,X.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=q(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(q(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=Y(),i=J(),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 j in O)"$"!==j[0]&&"as"!==j&&("forwardedAs"===j?C.as=O[j]:k&&!k(j,c.a)||(C[j]=O[j]));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 je=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){je[e]=je(e)}));n.a=je}).call(this,t(122))},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,"a",(function(){return pn}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(7),u=t(5),s=t(75),f=t.n(s),d=t(76),p=t.n(d),h=t(77),m=t.n(h),b=t(30),v=t.n(b),y=t(31),g=t.n(y),w=t(32),x=t.n(w),O=t(13),k=t.n(O),C=t(10),j=t.n(C),E=t(18),S=t.n(E),_=t(33),P=t.n(_),A=t(34),M=t.n(A),z=t(78),I=t.n(z),T=t(79),R=t.n(T),N=t(35),L=t.n(N),F=t(80),D=t.n(F),B=t(81),U=t.n(B),H=t(82),q=t.n(H),V=t(83),$=t.n(V),W=(t(124),t(84)),G=t.n(W),K=t(85),X=t.n(K),Y=t(86),J=t.n(Y),Z=t(87),Q=t.n(Z),ee=t(88),ne=t.n(ee),te=t(89),re=t.n(te),oe=t(90),ae=t.n(oe),ie=t(91),le=t.n(ie),ce=t(19),ue=t.n(ce),se=t(36),fe=t.n(se),de=t(37),pe=t.n(de),he=t(92),me=t.n(he),be=t(93),ve=t.n(be),ye=t(94),ge=t.n(ye),we=t(95),xe=t.n(we),Oe=t(96),ke=t.n(Oe),Ce=t(97),je=t.n(Ce),Ee=t(98),Se=t.n(Ee),_e=t(99),Pe=t.n(_e),Ae=t(100),Me=t.n(Ae),ze=t(101),Ie=t.n(ze),Te=t(102),Re=t.n(Te),Ne=t(103),Le=t.n(Ne),Fe=t(104),De=t.n(Fe),Be=t(105),Ue=t.n(Be),He=t(106),qe=t.n(He),Ve=t(107),$e=t.n(Ve),We=t(108),Ge=t.n(We),Ke=t(109),Xe=t.n(Ke),Ye=t(110),Je=t.n(Ye),Ze=t(111),Qe=t.n(Ze),en=t(112),nn=t.n(en),tn={lock:f.a,"lock-open":p.a,"file-undo":m.a,"chevron-double-left":v.a,"chevron-double-right":g.a,"chevron-left":x.a,"chevron-right":k.a,"chevron-down":j.a,"chevron-up":S.a,pause:P.a,play:M.a,replay:I.a,check:R.a,stop:L.a,delete:D.a,undo:U.a,alert:q.a,database:$.a,tools:G.a,cog:X.a,close:J.a,cat:Q.a,upload:Re.a,trash:ne.a,pencil:re.a,dashboard:ae.a,search:le.a,folder:ue.a,"folder-open":fe.a,"image-multiple-outline":pe.a,plus:me.a,"folder-plus":ve.a,"image-plus":ge.a,"view-grid":xe.a,"format-list-bulleted":ke.a,twitter:je.a,instagram:Se.a,facebook:Pe.a,star:Me.a,"timer-outline":Ie.a,link:Le.a,linkedin:De.a,pinterest:Ue.a,"zoom-in":qe.a,"info-outline":$e.a,"arrow-up":Ge.a,"arrow-down":Xe.a,sort:Je.a,eye:Qe.a,"rocket-launch":nn.a},rn=t(20);function on(){return(on=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 an(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 ln(){var e=un(["\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\n &.busy {\n animation: crescendo 0.4s alternate infinite;\n @keyframes crescendo {\n 0% {transform: scale(.65);}\n 100% {transform: scale(1);}\n }\n }\n\n &.disabled {\n pointer-events: none;\n opacity: 0.35;\n cursor: default;\n }\n"]);return ln=function(){return e},e}function cn(){var e=un(["\n display: flex;\n align-items: center;\n"]);return cn=function(){return e},e}function un(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var sn=l.a.div(cn()),fn=Object(l.a)(u.Icon)(ln(),(function(e){return e.color}),(function(e){return n=e.color,(t=e.hoverColor)?"\n &:hover {\n path {\n fill: ".concat(t,";\n }\n }\n "):n?"\n &:hover {\n path {\n fill: ".concat(Object(c.a)(.1,n),";\n }\n }\n "):void 0;var n,t})),dn=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,s=e.color,f=e.hoverColor,d=e.disabled,p=void 0!==d&&d,h=e.raw,m=e.isBusy,b=void 0!==m&&m,v=an(e,["icon","spinning","className","title","tooltip","containerStyle","color","hoverColor","disabled","raw","isBusy"]);v.width||v.height||(v.width=v.height=30);var y=function(){return"string"==typeof n?tn[n]||null:n},g="nui-icon ".concat(i).concat(v.onClick?" nui-clickable":"").concat(r?" spin":"").concat(p?" disabled":"").concat(b?" busy":"");return c?o.a.createElement(rn.a,{text:c.text,position:c.position||"top"},o.a.createElement(sn,{style:u},o.a.createElement(fn,on({icon:y(),className:g,color:s,hoverColor:f},v)))):h?o.a.createElement(fn,on({icon:y(),className:g,color:s,hoverColor:f},v)):o.a.createElement(sn,{style:u,title:l},o.a.createElement(fn,on({icon:y(),className:g,color:s,hoverColor:f},v)),c?o.a.createElement(rn.a,null,c):null)},pn=function(e){return o.a.createElement(dn,e)};pn.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,raw:i.a.bool,isBusy:i.a.bool},pn.defaultProps={icon:void 0,color:void 0,spinning:!1,className:"",tooltip:void 0,raw:void 0,isBusy:!1}},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 F}));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 j=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 E(e){var n=e.toString(16);return 1===n.length?"0"+n:n}function S(e){return E(Math.round(255*e))}function _(e,n,t){return j("#"+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 M(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 z(e,n,t){if("number"==typeof e&&"number"==typeof n&&"number"==typeof t)return j("#"+E(e)+E(n)+E(t));if("object"===u(e)&&void 0===n&&void 0===t)return j("#"+E(e.red)+E(e.green)+E(e.blue));throw new s(6)}function I(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?z(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?z(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new s(7)}function T(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 I(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 z(e);if(function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha}(e))return M(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 L(e,n){if("transparent"===n)return n;var t=C(n);return T(r({},t,{lightness:N(0,1,t.lightness+parseFloat(e))}))}var F=R(L)},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(49),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],j=u(Object(r.useState)(0),2),E=j[0],S=j[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(){I(),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)}}(),M=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)}}(),z=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)}}(),I=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)}}(),T=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,T(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}),[]),L=Object(r.useCallback)((function(){return a.current}),[]);return{start:P,stop:z,pause:A,resume:M,reset:_,addTask:T,setAlwaysSkip:N,getErrorCount:L,error:w,success:k,busy:s,paused:p,value:E,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(1),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){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 y}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(7),u=t(3),s=t(5),f=t(16),d=t(6);function p(){return(p=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 h(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 m(){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-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 8px;\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 &.header {\n background-color: ",";\n border-color: ",";\n height: 40px;\n padding: 0 20px;\n\n\t &:hover {\n\t\t background-color: ",";\n\t }\n }\n\n &.rounded {\n border-radius: 100%;\n min-width: 30px;\n height: ","px;\n width: ","px;\n padding: 3px;\n }\n\n &.busy {\n pointer-events: none;\n }\n\n ","\n"]);return m=function(){return e},e}var b=Object(l.a)((function(e){var n=e.className,t=e.icon,a=void 0===t?null:t,i=e.onClick,l=e.disabled,c=void 0!==l&&l,u=e.color,s=void 0===u?null:u,m=e.small,b=e.isBusy,v=void 0!==b&&b,y=e.width,g=(e.height,e.children),w=e.rounded,x=e.busyText,O=e.spinning,k=void 0!==O&&O,C=e.hideBusyIcon,j=void 0!==C&&C,E=h(e,["className","icon","onClick","disabled","color","small","isBusy","width","height","children","rounded","busyText","spinning","hideBusyIcon"]),S=!!a,_=Object(r.useMemo)((function(){var e=null!=y?y:30;return w?e-10:e-6}),[y,w]),P="nui-button ".concat(n||"").concat(S?" has-icon":"").concat(s?" custom-color":"").concat(m?" small":"").concat(w?" rounded":"").concat(v?" busy":"");return o.a.createElement("button",p({type:"button",className:P,onClick:i,disabled:c},E),v&&!j&&!S&&o.a.createElement(f.a,{type:"circle",color:"#fff",size:w?"82%":"35%"}),v&&!!x&&o.a.createElement("span",{style:{marginLeft:j?0:"4px",marginRight:"2xp"}},x),S&&o.a.createElement(d.a,{icon:a,width:_,height:_,spinning:k,raw:!0,style:w?{margin:"0 auto"}:{}}),!!g&&!v&&o.a.createElement("span",{style:{marginLeft:S?"4px":0,marginRight:S?"2xp":0}},g))}))(m(),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,u.a.deepBlue,u.a.deepBlue,Object(c.a)(.1,u.a.deepBlue),(function(e){var n,t;return null!==(n=e.height)&&void 0!==n?n:null!==(t=e.width)&&void 0!==t?t:30}),(function(e){var n;return null!==(n=e.width)&&void 0!==n?n:30}),(function(e){return v(e.color)})),v=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 ")},y=function(e){return o.a.createElement(b,e)};y.propTypes={className:i.a.oneOf(["primary","secondary","danger","success","header"]),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,rounded:i.a.bool,isBusy:i.a.bool,spinning:i.a.bool,busyText:i.a.string,hideBusyIcon:i.a.bool},y.defaultProps={className:"primary",disabled:!1,icon:null,color:null,onClick:function(){},rounded:void 0,isBusy:!1,spinning:!1,busyText:void 0,hideBusyIcon:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return M}));var r=t(0),o=t(71),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={},j={},E={};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(j[o]=Date.now()-1,E[o]=0,i=j[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!==j[o]||l!==x[o]){if(s)throw s;return[2,c]}if(void 0!==c&&u.set(o,c),u.set(a,s),E[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 M=h.Provider,z=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,M=u.get(v),z=Object(r.useRef)({data:!1,error:!1,isValidating:!1}),I=Object(r.useRef)({data:_,error:M,isValidating:!1});Object(r.useDebugValue)(I.current.data);var T=Object(r.useState)(null)[1],R=Object(r.useCallback)((function(e){var n=!1;for(var t in e)I.current[t]=e[t],z.current[t]&&(n=!0);if(n||l.suspense){if(N.current)return;T({})}}),[]),N=Object(r.useRef)(!1),L=Object(r.useRef)(s),F=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]),B=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&&F.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),F.current.emit("onSuccess",r,s,l),d.label=5;case 5:return x[s]>o||j[s]&&(o<=j[s]||o<=E[s]||0===E[s])?(R({isValidating:!1}),[2,!1]):(u.set(s,r),u.set(v,void 0),i={isValidating:!1},void 0!==I.current.error&&(i.error=void 0),l.compare(I.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),I.current.error!==c&&(R({isValidating:!1,error:c}),t||P(s,void 0,c)),F.current.emit("onError",c,s,l),l.shouldRetryOnError&&(f=(n.retryCount||0)+1,F.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=I.current.data,n=u.get(s)||l.initialData;L.current!==s&&(L.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(I.current.data,n)||(a.data=n,i=!0),I.current.error!==r&&(a.error=r,i=!0),i&&R(a),!!e&&(o?t():H())};return B(O,o),B(k,a),B(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 I.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 q=u.get(s),V=u.get(v);if(void 0===q&&(q=_),void 0===V&&(V=M),void 0===q&&void 0===V){if(w[s]||H(),w[s]&&"function"==typeof w[s].then)throw w[s];q=w[s]}if(void 0===q&&V)throw V;return{error:V,data:q,revalidate:H,mutate:D,isValidating:I.current.isValidating}}return Object(r.useMemo)((function(){var e={revalidate:H,mutate:D};return Object.defineProperties(e,{error:{get:function(){return z.current.error=!0,L.current===s?I.current.error:M},enumerable:!0},data:{get:function(){return z.current.data=!0,L.current===s?I.current.data:_},enumerable:!0},isValidating:{get:function(){return z.current.isValidating=!0,I.current.isValidating},enumerable:!0}}),e}),[H])};n.b=z},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 L}));var r=t(0),o=t(119),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&&E(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 E(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&&E(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,j=(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))}),E=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,j(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(21);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)||z(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 M(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=z(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 z(e,n){if(e){if("string"==typeof e)return I(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)?I(e,n):void 0}}function I(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 T=function(e){if(!e.data)return e;if(e.data.length>0&&e.data[0].meta){var n,t=M(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",T(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)}}(),L=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(1),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 d}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a);function l(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 c(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n width: ",";\n padding-top: ",";\n position: relative;\n margin: 0 auto;\n\n .double-bounce1, .double-bounce2 {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: ",";\n opacity: 0.6;\n position: absolute;\n top: 0;\n left: 0;\n\n -webkit-animation: sk-bounce 2.0s infinite ease-in-out;\n animation: sk-bounce 2.0s infinite ease-in-out;\n }\n\n .double-bounce2 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n }\n\n @-webkit-keyframes sk-bounce {\n 0%, 100% { -webkit-transform: scale(0.0) }\n 50% { -webkit-transform: scale(1.0) }\n }\n\n @keyframes sk-bounce {\n 0%, 100% {\n transform: scale(0.0);\n -webkit-transform: scale(0.0);\n } 50% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n }\n"]);return c=function(){return e},e}var u=t(4).a.div(c(),(function(e){return e.size||"50%"}),(function(e){return e.size||"50%"}),(function(e){return e.color||"#333"})),s=function(e){return o.a.createElement(u,e,o.a.createElement("div",{className:"double-bounce1"}),o.a.createElement("div",{className:"double-bounce2"}))},f=function(e){var n=e.type,t=void 0===n?"circle":n,r=l(e,["type"]);switch(t){case"circle":return o.a.createElement(s,r);default:return null}},d=function(e){return o.a.createElement(f,e)};d.propTypes={type:i.a.string},d.defaultProps={type:"circle"}},function(e,n,t){"use strict";t.d(n,"a",(function(){return O}));var r=t(0),o=t.n(r),a=t(1),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=m(["\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=m(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 0;\n padding: 0;\n"]);return f=function(){return e},e}function d(){var e=m(["\n font-family: ",";\n font-size: ",";\n line-height: normal;\n margin: 16px 0 24px;\n padding: 0;\n"]);return d=function(){return e},e}function p(){var e=m(["\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 p=function(){return e},e}function h(){var e=m(["\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 h=function(){return e},e}function m(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=l.a.h1(h(),c.a.fontFamily,c.a.fontSizeH1),v=l.a.h2(p(),c.a.fontFamily,c.a.fontSizeH2),y=l.a.p(d(),c.a.fontFamily,c.a.fontSizeText),g=l.a.span(f(),c.a.fontFamily,c.a.fontSizeText),w=l.a.label(s(),c.a.fontFamily,c.a.fontSizeText),x=function(e){var n=e.children,t=u(e,["children"]);return e.h1?o.a.createElement(b,t,n):e.h2?o.a.createElement(v,t,n):e.p?o.a.createElement(y,t,n):e.label?o.a.createElement(w,t,n):o.a.createElement(g,t,n)},O=function(e){return o.a.createElement(x,e)};O.propTypes={h1:i.a.any,h2:i.a.any,p:i.a.any},O.defaultProps={h1:void 0,h2:void 0,p: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){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 y}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(8),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\tword-break: break-word;\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 t&&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){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,t){"use strict";t.d(n,"a",(function(){return b}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(6);function s(){return(s=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 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}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 .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 h=function(){return e},e}var m=Object(l.a)((function(e){var n=e.id,t=e.name,a=e.value,i=void 0===a?"":a,l=e.description,d=e.placeholder,h=void 0===d?"":d,m=e.onEnter,b=void 0===m?null:m,v=e.readOnly,y=void 0!==v&&v,g=e.type,w=void 0===g?"text":g,x=e.step,O=void 0===x?1:x,k=e.min,C=void 0===k?1:k,j=e.max,E=void 0===j?999:j,S=e.maxLength,_=void 0===S?void 0:S,P=e.className,A=e.style,M=e.natural,z=void 0!==M&&M,I=e.inputStyle,T=e.onChange,R=e.onBlur,N=e.onReset,L=p(e,["id","name","value","description","placeholder","onEnter","readOnly","type","step","min","max","maxLength","className","style","natural","inputStyle","onChange","onBlur","onReset"]),F=f(Object(r.useState)(i),2),D=F[0],B=F[1],U=!!T,H=_||("number"===w?3:void 0);Object(r.useEffect)((function(){U||B(i)}),[i]);var q=function(e){U?T(e.target.value,n):B(e.target.value,n)},V=function(e){b&&"Enter"===event.key&&(e.preventDefault(),b(e.target.value,n))},$=function(e){R&&i!==e.target.value&&R(e.target.value,n)},W="neko-input ".concat(z?" natural":"");return o.a.createElement("div",{className:[P].join(" "),style:A},o.a.createElement("div",{style:{position:"relative"}},"number"===w?o.a.createElement("input",s({className:[W].join(" "),id:n,name:t,value:U?i:D,type:w,step:O,min:C,max:E,maxLength:H,autoComplete:"off",placeholder:h,style:I,onChange:q,onKeyPress:V,onBlur:$,readOnly:y},L)):o.a.createElement("input",s({className:[W].join(" ")},L,{id:n,name:t,value:U?i:D,type:w,spellCheck:"false",autoComplete:"off",placeholder:h,style:I,maxLength:H,onChange:q,onKeyPress:V,onBlur:$,readOnly:y},L)),!!i&&!!N&&o.a.createElement(u.a,{icon:"close",width:24,style:{position:"absolute",top:"3px",right:"3px"},color:c.a.blue,onClick:N})),l&&o.a.createElement("p",{className:"neko-input-description"},l))}))(h(),c.a.fontFamily,c.a.fontSizeText,c.a.blue,c.a.gray,c.a.fontFamily,c.a.fontSizeSmall),b=function(e){return o.a.createElement(m,e)};b.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,onReset:i.a.func},b.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:void 0,natural:!1,onReset:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return c}));var r=t(0),o=t.n(r);t(1);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";t.d(n,"a",(function(){return k}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(5),u=t(30),s=t.n(u),f=t(32),d=t.n(f),p=t(31),h=t.n(p),m=t(13),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 user-select: none;\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\n &.neko-paging-full {\n flex-grow: 1;\n\n .neko-paging-controller {\n flex-grow: 1;\n }\n .nako-paging-controller-text {\n margin: 0 auto;\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=void 0===t?0:t,i=e.onClick,l=e.total,u=void 0===l?0:l,f=e.onCurrentPageChanged,p=e.full,m=e.infinite,v=void 0!==m&&m,g=e.controllerText,w=!!f,O=Object(r.useMemo)((function(){return v?0:Math.ceil(0===u?1:a>0?u/a:1)}),[v,a,u]),k="nako-paging-controller-icon ".concat(v||1!==n?"":"disabled"),C="nako-paging-controller-icon ".concat(v||n!==O?"":"disabled"),j=y(Object(r.useState)(!1),2),E=j[0],S=j[1],_=p?"neko-paging-full":"",P=function(e){S(!1),i(e)},A=function(e){if(v)return e;var n=Number(e);return n>O?O:n<1?1:n},M=function(e){var n=e.target.value;isNaN(n)||f(A(n)),S(!1)},z=function(e){if("Enter"===event.key){e.preventDefault();var n=e.target.value;isNaN(n)||f(A(n)),S(!1)}},I=Object(r.useMemo)((function(){if(!E){return o.a.createElement("span",{className:w?"neko-paging-current-page":"",onClick:function(){w&&S(!0)}},n)}return o.a.createElement("input",{autoFocus:!0,type:"text",className:w?"neko-paging-current-page":"",defaultValue:n,onBlur:M,onKeyPress:z})}),[n,E,f]),T=function(e){E&&e.target===e.currentTarget&&S(!1)};return o.a.createElement(x,{className:_},!!u&&o.a.createElement("span",{className:"neko-paging-text"},u," result",u>0?"s":""),o.a.createElement("div",{className:"neko-paging-controller",onClick:T},!v&&o.a.createElement(c.Icon,{icon:s.a,className:k,onClick:function(){return P(1)}}),o.a.createElement(c.Icon,{icon:d.a,className:k,onClick:function(){return P(n-1)}}),o.a.createElement("p",{className:"nako-paging-controller-text",onClick:T},g||o.a.createElement(o.a.Fragment,null,"Page ",I," of ",O)),o.a.createElement(c.Icon,{icon:b.a,className:C,onClick:function(){return P(n+1)}}),!v&&o.a.createElement(c.Icon,{icon:h.a,className:C,onClick:function(){return P(O)}})))},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,lastPage:i.a.number,infinite:i.a.bool,controllerText:i.a.object},k.defaultProps={currentPage:void 0,limit:0,total:0,onClick:void 0,lastPage:void 0,infinite:!1,controllerText:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return g}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(2);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){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||h(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 f(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 d(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var a=e.apply(n,t);function i(e){f(a,r,o,i,l,"next",e)}function l(e){f(a,r,o,i,l,"throw",e)}i(void 0)}))}}function p(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)||h(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 h(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}function b(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 v(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n &.dropping {\n background: #a4d5ff;\n }\n"]);return v=function(){return e},e}var y=l.a.div(v()),g=Object(r.forwardRef)((function(e,n){var t=e.onSuccess,a=void 0===t?function(){}:t,i=e.onFailure,l=void 0===i?function(){}:i,f=e.apiUrl,h=e.apiConfig,m=e.className,v=e.disabled,g=void 0!==v&&v,w=e.children,x=e.multiple,O=b(e,["onSuccess","onFailure","apiUrl","apiConfig","className","disabled","children","multiple"]),k=p(Object(r.useState)(!1),2),C=k[0],j=k[1],E=p(Object(r.useState)(!1),2),S=E[0],_=E[1],P=Object(r.useCallback)(function(){var e=d(regeneratorRuntime.mark((function e(n){var t,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(!0),t=function(){var e=d(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.file=n,e.next=3,Object(c.J)(f,h);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),e.next=4,Promise.all(n.map(function(){var e=d(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(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)}}()));case 4:r=e.sent,o=r.filter((function(e){return e.success})),i=r.filter((function(e){return!e.success})),o.length&&a(x?o:o[0]),i.length&&l(x?i:i[0]),_(!1);case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),[h,a,l]),A=Object(r.useCallback)((function(e,n){n.preventDefault(),n.stopPropagation(),j(!1),P(e)}),[P]),M=Object(r.useCallback)((function(e){e.preventDefault(),e.stopPropagation()}),[]),z=Object(r.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),g||j(!0)}),[g]),I=Object(r.useCallback)((function(e){e.preventDefault(),e.stopPropagation(),g||j(!1)}),[g]),T=Object(r.useCallback)((function(e){if(!g){var n=s(e.dataTransfer.files);A(n,e)}}),[g,A]),R=Object(r.useCallback)((function(e){var n=s(e.target.files);A(n,e)}),[A]);return o.a.createElement(c.b,{busy:S},o.a.createElement("input",{type:"file",accept:"image/*",ref:n,onChange:R,style:{display:"none"},multiple:x}),o.a.createElement(y,u({className:"".concat(m||""," ").concat(C?"dropping":""),onDragOver:M,onDragEnter:z,onDragLeave:I,onDrop:T},O),w))}));g.propTypes={ref:i.a.ref,onSuccess:i.a.func,onFailure:i.a.func,apiUrl:i.a.string,apiConfig:i.a.object,disabled:i.a.bool},g.defaultProps={onSuccess:function(){},onFailure:function(){},disabled:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return w}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(117),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-container {\n display: flex;\n margin-top: 15px;\n\n .thumbnail {\n margin-right: 15px;\n width: 240px;\n overflow: hidden;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n }\n .content {\n flex: auto;\n font-family: ",";\n font-style: normal;\n font-weight: normal;\n font-size: 13px;\n line-height: 14px;\n width: 100%;\n }\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.id,t=void 0===n?"neko-modal-parent":n,a=e.isOpen,i=e.children,l=e.className,u=e.style,s=e.ok,h=void 0===s?"OK":s,m=e.cancel,b=void 0===m?"Cancel":m,g=e.customButtons,w=void 0===g?null:g,x=e.customButtonsPosition,O=void 0===x?"right":x,k=e.title,C=void 0===k?"":k,j=e.content,E=void 0===j?"":j,S=e.onOkClick,_=e.onCancelClick,P=e.okOnEnter,A=void 0!==P&&P,M=e.thumbnail,z=p(e,["id","isOpen","children","className","style","ok","cancel","customButtons","customButtonsPosition","title","content","onOkClick","onCancelClick","okOnEnter","thumbnail"]),I=u?"custom-modal":"",T=null!==w,R=Object(r.useCallback)((function(e){"Enter"===e.key&&S()}),[S]);Object(r.useEffect)((function(){if(A&&a)return window.addEventListener("keyup",R),function(){window.removeEventListener("keyup",R)}}),[a,R]);var N=i||o.a.createElement(y,null,C&&o.a.createElement("p",{className:"title"},C),o.a.createElement("div",{className:"content-container"},M&&o.a.createElement("div",{className:"thumbnail"},M),E&&o.a.createElement("p",{className:"content"},E)),o.a.createElement("div",{className:"button-group"},T&&"left"===O&&w,_&&o.a.createElement(f.a,{className:"danger",onClick:_},b),S&&o.a.createElement(f.a,{onClick:S},h),T&&"right"===O&&w));return o.a.createElement(o.a.Fragment,null,o.a.createElement(v,{id:t}),o.a.createElement(c.a,d({ariaHideApp:!1,parentSelector:function(){return document.getElementById(t)},closeTimeoutMS:200,className:"neko-modal ".concat(l||""," ").concat(I),isOpen:a},z),N))},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,okOnEnter:i.a.bool,thumbnail:i.a.element},w.defaultProps={className:void 0,style:void 0,ok:"OK",cancel:"Cancel",title:"",content:"",onOkClick:void 0,onCancelClick:void 0,customButtons:null,okOnEnter:!1,thumbnail:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return A}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(5),u=t(10),s=t.n(u),f=t(18),d=t.n(f),p=t(22),h=t.n(p),m=t(38),b=t.n(m),v=t(118),y=t.n(v),g=t(3),w=t(15);function x(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 O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){k(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(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=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n font-family: ",";\n border-spacing: 0;\n width: 100%;\n word-break: break-all;\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 &.nekotable-raw {\n th, td {\n border: 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 thead tr th:first-child {\n border-top-left-radius: 10px;\n }\n\n thead tr th:last-child {\n border-top-right-radius: 10px;\n }\n\n tfoot tr th:first-child {\n border-bottom-left-radius: 10px;\n }\n\n tfoot tr th:last-child {\n border-bottom-right-radius: 10px;\n }\n\n &.nekotable-raw {\n th {\n font-weight: bold;\n }\n th, tfoot td {\n background-color: ",";\n color: ",";\n\n div {\n justify-content: normal;\n }\n }\n }\n\n tbody {\n background-color: ",";\n \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 &.nekotable-raw {\n tbody {\n tr {\n :nth-child(even) {\n background-color: ",";\n }\n &.selected {\n background-color: ",";\n color: ",";\n }\n }\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 j=function(){return e},e}var E=l.a.table(j(),g.a.fontFamily,g.a.blackRGB,g.a.blackRGB,g.a.blue,g.a.white,g.a.white,g.a.black,g.a.white,g.a.tableGray,g.a.blueRGB,g.a.white,g.a.white,g.a.white,g.a.black),S=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;C(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(e){n?u(e):i(e)}})},_={left:"start",center:"center",right:"end"},P=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=e.variant,m=void 0===h?"default":h,b=e.sortIconColor,v=void 0===b?void 0:b,y=e.emptyMessage,x=void 0===y?"Empty.":y,k=n.length+(i?1:0),C=function(e){var n={};return e.align&&(n={textAlign:e.align,justifyContent:_[e.align]}),e.width&&(n=O(O({},n),{},{width:e.width})),e.style&&(n=O(O({},n),e.style)),n},j=t.map((function(e){var t=n.map((function(n){return{value:e[n.accessor],style:C(n)}}));return{id:e.id,cells:t}})),P=j.map((function(e){return e.id})),A=P.filter((function(e){return u.includes(e)})).length===P.length,M=!A&&u.length>0,z=n.reduce((function(e,n,t){return!1===n.visible&&e.push(t),e}),[]),I=o.a.createElement("tr",null,i&&o.a.createElement("th",{className:"table-checkbox-cell"},o.a.createElement(S,{checked:A,intermediate:M,onSelect:function(e){return i(P,e)},onUnselect:function(e){l(M?u:P,e)}})),n.filter((function(e,n){return!z.includes(n)})).map((function(e){var n=f&&f.accessor===e.accessor,t=f&&"asc"===f.by,r=n?g.a.white:"rgba(".concat(g.a.blackRGB,", 0.1)");v&&(r=v);var a=C(e);return o.a.createElement("th",{style:a,key:e.accessor},o.a.createElement("div",{className:e.sortable?"sortable":"",style:a,onClick:e.sortable?function(r){p(e.accessor,n&&t?"desc":"asc",r)}: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:r,width:"26px",height:"26px"}))))})));return o.a.createElement(w.a,{busy:a,overlayStyle:{top:"36px",height:"calc(100% - 76px)"}},o.a.createElement(E,{className:"nekotable-".concat(m)},o.a.createElement("thead",null,I),o.a.createElement("tbody",null,!j.length&&o.a.createElement("tr",null,o.a.createElement("td",{colspan:k,style:{textAlign:"center",height:40,color:"gray"}},x)),j.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(S,{checked:u.includes(e.id),onSelect:function(n){return i([e.id],n)},onUnselect:function(n){return l([e.id],n)}})),e.cells.filter((function(e,n){return!z.includes(n)})).map((function(e){return o.a.createElement("td",{style:e.style},e.value)})))}))),"default"===m&&o.a.createElement("tfoot",null,I)))},A=function(e){return o.a.createElement(P,e)};A.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,variant:i.a.string,sortIconColor:i.a.string},A.defaultProps={columns:void 0,data:void 0,busy:!1,onSelect:void 0,onUnselect:void 0,selectedItems:void 0,onSortChange:void 0,variant:"default",sortIconColor:void 0}},function(e,n,t){"use strict";e.exports=t(123)},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){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="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,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(1),i=t.n(a),l=t(4),c=t(7),u=t(3),s=t(9),f=t(5),d=t(10),p=t.n(d),h=t(8);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),j=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))},E=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(E,{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(j,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(1),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 q})),t.d(n,"a",(function(){return V}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(9),s=t(8),f=t(16),d=t(5),p=t(113),h=t.n(p),m=t(114),b=t.n(m),v=t(10),y=t.n(v),g=t(18),w=t.n(g),x=t(6);function O(){var e=I(["\n background-color: ",";\n cursor: pointer;\n font-family: ",";\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 padding: 8px 12px;\n\n .option-group {\n align-items: center;\n display: flex;\n }\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 O=function(){return e},e}function k(){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 k=function(){return e},e}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 j(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 E(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 E(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 E(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 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 _(){var e=I(["\n background-color: ",";\n overflow-y: auto;\n max-height: 300px;\n"]);return _=function(){return e},e}function P(){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 P=function(){return e},e}function A(){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 A=function(){return e},e}function M(){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 &.isBusy {\n padding-left: 5px;\n }\n\n .rightContent {\n align-items: center;\n display: flex;\n margin-left: auto;\n }\n"]);return M=function(){return e},e}function z(){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\n &[data-is-disabled=true] {\n cursor: none;\n pointer-events: none;\n }\n"]);return z=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(z(),c.a.blue),R=l.a.div(M(),c.a.white,c.a.blue,c.a.fontFamily),N=l.a.div(A()),L=l.a.div(P()),F=l.a.div(_(),c.a.white),D=function(e){var n,t=e.id,a=e.name,i=e.value,l=e.scrolldown,c=void 0!==l&&l,p=e.isPro,h=void 0!==p&&p,m=e.onChange,b=e.className,v=e.disabled,g=e.isBusy,O=void 0!==g&&g,k=S(e,["id","name","value","scrolldown","isPro","onChange","className","disabled","isBusy"]),E=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,_=(null==E?void 0:E.label)||"Select",P=(null==E?void 0:E.description)||e.description,A=(null==E?void 0:E.requirePro)||!1,M=null==E?void 0:E.icon,z=j(Object(r.useState)(!1),2),I=z[0],D=z[1],B=c?Object(s.e)((function(){D(!1)})):null,U=A&&!h,H=function(n){if(n!==i){if(!m)return void console.log("The onChange handler it not set for this checkbox.",e);m(n,t)}c&&D(!1)},q=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:H,scrolldown:c,isPro:h,disabled:v})}));return c?o.a.createElement(T,C({id:t,ref:B},k,{onClick:function(){return D(!I)},className:["nui-select",b,I?"show-options":""],childrenLength:q.length,"data-is-disabled":v||O}),o.a.createElement(R,{className:"".concat(O?"isBusy":"")},O?o.a.createElement(o.a.Fragment,null,o.a.createElement(f.a,{type:"circle",size:"20px"})):o.a.createElement(o.a.Fragment,null,M&&o.a.createElement(x.a,{icon:M,width:20,height:20,style:{marginRight:"9px"}}),_,o.a.createElement("div",{className:"rightContent"},U&&o.a.createElement(u.a,null),!v&&o.a.createElement(d.Icon,{icon:I?w.a:y.a,width:"24"})))),P&&o.a.createElement(N,null,P),I&&o.a.createElement(L,{className:"nui-option ".concat(I?"":"hidden")},o.a.createElement(F,null,[q]))):q},B=l.a.div(k(),c.a.fontFamily,c.a.disabledForm),U=l.a.div(O(),c.a.blue,c.a.fontFamily,c.a.white,c.a.fontFamily),H=function(e){var n=e.id,t=e.name,r=e.value,a=e.checked,i=e.icon,l=e.label,s=e.description,f=e.onClick,p=e.scrolldown,m=e.isPro,v=void 0!==m&&m,y=e.requirePro,g=void 0!==y&&y,w=e.disabled,O=g&&!v,k=O||w?"disabled":"",C=o.a.createElement(B,{className:"nui-select ".concat(e.className||""," ").concat(k)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,onClick:function(e){return f(e.target.value)},disabled:O||w}),o.a.createElement("label",{htmlFor:n},o.a.createElement(d.Icon,{icon:a?b.a:h.a,width:"24px",color:O?c.a.disabledForm:c.a.blue}),o.a.createElement("div",{className:"inner-container"},o.a.createElement("span",{className:"label"},l,o.a.createElement(u.a,{className:"inline",style:{top:-1},show:O})),s?o.a.createElement("small",{className:"description"},s):null))),j=o.a.createElement(U,{className:"nui-select ".concat(e.className||""," ").concat(k)},o.a.createElement("input",{id:n,name:t,type:"radio",value:r,defaultChecked:a,disabled:O||w}),o.a.createElement("div",{className:"option",onClick:function(){return f(r)}},o.a.createElement("div",{className:"option-group"},i&&o.a.createElement(x.a,{icon:i,width:20,height:20,style:{marginRight:"9px"}}),l),o.a.createElement(u.a,{show:O})));return p?j:C},q=function(e){return o.a.createElement(D,e)};q.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,isBusy:i.a.bool},q.propTypes={id:void 0,name:void 0,description:void 0,scrolldown:!1,isPro:!1,onChange:void 0,isBusy:!1};var V=function(e){return o.a.createElement(H,e)};V.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,icon:i.a.string},V.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,icon:void 0}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(5),s=t(19),f=t.n(s),d=t(36),p=t.n(d),h=t(37),m=t.n(h),b=t(13),v=t.n(b),y=t(10),g=t.n(y),w=t(115),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=A(["\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 C=function(){return e},e}function j(){var e=A(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 100;\n"]);return j=function(){return e},e}function E(){var e=A(["\n position: relative;\n width: 24px;\n height: 24px;\n"]);return E=function(){return e},e}function S(){var e=A(["\n height: 24px;\n width: 24px;\n"]);return S=function(){return e},e}function _(){var e=A(["\n align-items: center;\n display: flex;\n\n &.can-expand {\n cursor: pointer;\n }\n\n &.selected {\n color: #956DBE;\n }\n\n span {\n font-weight: normal;\n font-size: 13px;\n margin: 0 0 0 8px;\n }\n"]);return _=function(){return e},e}function P(){var e=A(["\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin-bottom: 5px;\n font-family: Lato;\n"]);return P=function(){return e},e}function A(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var M=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})}))},z=l.a.div(P()),I=l.a.div(_()),T=l.a.div(S()),R=l.a.div(E()),N=l.a.div(j()),L=l.a.div(C(),c.a.finderBorder),F=function(e){var n={gallery:m.a,tag:x.a},t=e.title,a=e.chevron,i=e.rightElement,l=void 0===i?null:i,s=e.rightElementStyle,d=void 0===s?{marginLeft:"5px"}:s,h=e.showRightElement,b=void 0!==h&&h,y=e.selected,w=void 0!==y&&y,k=e.draggable,C=void 0!==k&&k,j=e.onDragStart,E=e.onDragOver,S=e.onDragEnd,_=e.onDrop,P=e.isExpanded,A=void 0!==P&&P,M=e.dragging,F=void 0!==M&&M,D=e.rightAction,B=void 0===D?null:D,U=e.rightActionOnHover,H=void 0===U?null:U,q=e.onDragLeave,V=(e.preventClose,!!e.icon),$=!!e.children,W=O(Object(r.useState)(A),2),G=W[0],K=W[1],X=O(Object(r.useState)((function(){return"string"==typeof e.icon&&Object.keys(n).includes(e.icon)?n[e.icon]:e.icon?e.icon:f.a})),2),Y=X[0],J=X[1],Z=Boolean(Y),Q=O(Object(r.useState)(!1),2),ee=Q[0],ne=Q[1];Object(r.useEffect)((function(){K(A),V||J(A?f.a:p.a)}),[A]);var te=o.a.Children.map(e.children,(function(e){return o.a.cloneElement(e,{chevron:a})})),re=F||w?c.a.purple:w?c.a.black:c.a.blue;return o.a.createElement("div",null,o.a.createElement(z,{onMouseEnter:function(){return ne(!0)},onMouseLeave:function(){return ne(!1)}},o.a.createElement(I,{onClick:function(){e.onClick&&e.onClick()},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,draggable:C,onDragStart:j,onDragOver:E,onDrop:_,className:"".concat(Z||te||e.onClick?"can-expand":""," ").concat(w?"selected":""),onDragLeave:q,onDragEnd:S},a?Z&&$?o.a.createElement(u.Icon,{icon:G?g.a:v.a,width:"24",height:"24",onClick:function(e){e.stopPropagation(),K(!G)}}):o.a.createElement(T,null):null,o.a.createElement(R,null,o.a.createElement(N,null),o.a.createElement(u.Icon,{icon:Y,color:re,width:"24",height:"24"})),o.a.createElement("span",null,t),b&&o.a.createElement("div",{style:d},l)),ee&&H||B),G&&o.a.createElement(L,{className:"".concat(Z?"":"no-line"," ").concat(a?"":"no-chevron")},te))},D=function(e){return o.a.createElement(M,e)};D.propTypes={chevron:i.a.bool},D.defaultProps={chevron:!0};var B=function(e){return o.a.createElement(F,e)};B.propTypes={icon:i.a.oneOfType([i.a.instanceOf(u.IconifyIcon),i.a.oneOf(["gallery"])]),title:i.a.string,isExpanded:i.a.bool},B.defaultProps={icon:f.a,title:void 0,isExpanded:!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(1),i=t.n(a),l=t(4),c=t(3),u=t(6);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(),(function(e){return e.variant||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=e.className,c=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,{className:l},c)},b=function(e){var n=e.title,t=e.value,a=void 0===t?0:t,i=e.count,l=e.onClick,s=e.busy,f=e.isActive,d=e.className,p=e.variant,m=Object(r.useMemo)((function(){if(p)return Object.keys(c.a).includes(p)?c.a[p]:p}),[p]);return o.a.createElement(h,{onClick:function(){return l(a)},className:"".concat(f?"is-active":""," ").concat(d),variant:m},n,null===i?null:o.a.createElement("span",null,"(",s?o.a.createElement(u.a,{icon:"replay",spinning:!0,width:12,containerStyle:{display:"inline"}}):i,")"))},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,variant:i.a.string},y.defaultProps={title:void 0,value:"default",count:0,onClick:void 0,isActive:!1,variant:void 0}},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(136);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 j})),t.d(n,"b",(function(){return C}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(9),s=t(6);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}function p(){var e=v(["\n background-color: ",";\n display: none;\n padding: 10px;\n\n &.active {\n display: block;\n }\n"]);return p=function(){return e},e}function h(){var e=v(["\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 / 65%);\n display: flex;\n align-items: center;\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\n &.hidden {\n display: none;\n }\n"]);return h=function(){return e},e}function m(){var e=v(["\n display: flex;\n"]);return m=function(){return e},e}function b(){var e=v(["\n"]);return b=function(){return e},e}function v(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var y=l.a.div(b()),g=l.a.div(m()),w=l.a.button(h(),c.a.fontFamily,c.a.fontSizeText,c.a.blue,c.a.white),x=l.a.div(p(),c.a.blue),O=function(e){var n=f(o.a.useState(0),2),t=n[0],r=n[1],a=e.children?e.children.length?e.children.filter((function(e){return!!e})):[e.children]:[];o.a.useEffect((function(){if(e.keepTabOnReload){var n=new URL(window.location.href).searchParams.get("nekoTab");if(!n)return r(0),void(e.callOnTabChangeFirst&&c(0,i[0]));var t=decodeURIComponent(n),l=o.a.Children.toArray(a).map((function(e){return e.props.title.replaceAll(" ","")})).indexOf(t);return-1===l?(r(0),void(e.callOnTabChangeFirst&&c(0,i[0]))):(r(l),void(e.callOnTabChangeFirst&&c(l,i[l])))}r(0),e.callOnTabChangeFirst&&c(0,i[0])}),[]);var i=o.a.Children.map(a,(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),hidden:n.props.hidden||!1,icon:n.props.icon||!1}})),l=o.a.Children.map(a,(function(e,n){return o.a.cloneElement(e,{isActive:n===t})})),c=function(n,t,o){t.requirePro||(r(n),e.onChange&&e.onChange(n,t,o),e.keepTabOnReload&&function(e){if(history.pushState&&"string"==typeof e){var n=new URLSearchParams(window.location.search),t=encodeURIComponent(e.replaceAll(" ",""));n.set("nekoTab",t);var r=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+n.toString();window.history.replaceState({path:r},"",r)}}(t.title))};return o.a.createElement(y,null,o.a.createElement(g,null,i.map((function(e,n){return o.a.createElement(w,{key:e.key,className:"neko-tab-title ".concat(n===t?"active":""," ").concat(e.requirePro?"disabled":""," ").concat(e.hidden?"hidden":""),onClick:function(t){c(n,e,t)}},e.icon&&o.a.createElement(s.a,{icon:e.icon,width:15,height:15,style:{marginRight:"2px"},raw:!0}),e.title,o.a.createElement(u.a,{className:"inline",style:{marginLeft:10,marginRight:-5,top:-1},show:e.requirePro}))}))),l)},k=function(e){var n=e.children,t=e.isActive;return o.a.createElement(x,{className:"".concat(t?"active":"")},!!t&&n)},C=function(e){return o.a.createElement(O,e)};C.propTypes={isPro:i.a.bool,onChange:i.a.func},C.defaultProps={isPro:!1,onChange:void 0};var j=function(e){return o.a.createElement(k,e)};j.propTypes={isActive:i.a.bool,requirePro:i.a.bool,title:i.a.string,icon:i.a.string},j.defaultProps={isActive:!1,requirePro:!1,title:void 0,icon:void 0}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(9),s=t(5),f=t(10),d=t.n(f),p=t(13),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(e.activeTabIndex),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),onDragOver:n.props.onDragOver,onDrop:n.props.onDrop,rightActions:n.props.rightActions||null}})),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)},onDragOver:n.onDragOver,onDrop:n.onDrop},o.a.createElement("p",null,o.a.createElement("span",{style:{fontSize:15}},n.title),o.a.createElement(u.a,{className:"inline",show:n.requirePro})),null===n.rightActions?o.a.createElement(s.Icon,{icon:a===t?d.a:h.a,className:"neko-side-tab-icon"}):a===t?o.a.createElement("div",{style:{marginLeft:"auto"}},n.rightActions):o.a.createElement(s.Icon,{icon:h.a,className:"neko-side-tab-icon"})),i[a])})))},j=function(e){var n=e.children,t=e.isActive;return o.a.createElement(k,{className:"".concat(t?"active":"")},n)},E=function(e){return o.a.createElement(C,e)};E.propTypes={isPro:i.a.bool,onChange:i.a.func,activeTabIndex:i.a.number},E.defaultProps={isPro:!1,onChange:void 0,activeTabIndex:null};var S=function(e){return o.a.createElement(j,e)};S.propTypes={isActive:i.a.bool,requirePro:i.a.bool,title:i.a.string,onDragOver:i.a.func,onDrop:i.a.func,rightActions:i.a.element},S.defaultProps={isActive:!1,requirePro:!1,title:void 0,onDragOver:void 0,onDrop:void 0,rightActions:void 0}},function(e,n,t){"use strict";var r=t(29),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(125),p=t(126),h=t(128),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(1),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/fix-wordpress-rest-api/","_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(1),i=t.n(a),l=t(4),c=t(3),u=t(17),s=t(15);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-header {\n display: flex;\n justify-content: space-between;\n }\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,f=e.action;return o.a.createElement(d,{className:"nui-block "+(r||""),style:c},o.a.createElement(s.a,{busy:i},o.a.createElement("div",{className:"nui-block-header"},o.a.createElement(u.a,{h2:!0,className:"nui-block-title"},n),!!f&&f),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,action:i.a.element},h.defaultProps={title:void 0,className:"",style:{},action:void 0}},function(e,n,t){"use strict";t.d(n,"a",(function(){return m}));var r=t(0),o=t.n(r),a=t(1),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.lightGray2),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(1),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(1),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 y}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(9),s=t(16),f=t(5),d=t(22),p=t.n(d),h=t(38),m=t.n(h);function b(){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 user-select: none;\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 align-items: center;\n }\n .nui-checkbox-check-container {\n display: flex;\n align-content: center;\n flex-basis: 30px;\n\n .nui-checkbox-busy-container {\n position: relative\n }\n }\n .nui-checkbox-inner-container {\n margin-left: 4px;\n\n .label {\n display: block;\n font-size: 14px;\n line-height: 17px;\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 b=function(){return e},e}var v=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,d=e.description,h=e.isPro,b=e.disabled,v=e.requirePro,y=void 0!==v&&v,g=e.isBusy,w=void 0!==g&&g,x=y&&!h,O=b||x,k=O?"disabled":"",C=function(){i?i(!a,n):console.log("The onChange handler it not set for this checkbox.",e)};return o.a.createElement("div",{className:["nui-checkbox",e.className,k].join(" "),onClick:function(e){return e.stopPropagation()}},o.a.createElement("input",{id:n,name:t,type:"checkbox",defaultChecked:!1,onChange:function(){return C()},disabled:O||w}),o.a.createElement("label",{htmlFor:n},o.a.createElement("div",{className:"nui-checkbox-check-container"},w?o.a.createElement("div",{className:"nui-checkbox-busy-container"},o.a.createElement(f.Icon,{icon:p.a,width:"30px",height:"30px",color:c.a.blue}),o.a.createElement(s.a,{type:"circle",size:"16px",style:{position:"absolute",top:"7px",left:"7px"}})):o.a.createElement(f.Icon,{icon:a?m.a:p.a,width:"30px",height:"30px",color:O?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:x})),d?o.a.createElement("small",{className:"description"},d):null)))}))(b(),c.a.fontFamily,c.a.disabledForm),y=function(e){return o.a.createElement(v,e)};y.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,isBusy:i.a.bool},y.defaultProps={id:void 0,name:void 0,checked:!1,label:void 0,description:void 0,isPro:!1,requirePro:!1,isBusy:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return s}));var r=t(0),o=t.n(r),a=t(1),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";var r=t(0),o=t.n(r),a=t(1),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-container {\n position: relative;\n }\n .neko-textarea {\n font-family: ",";\n font-size: ",";\n border: 2px solid ",";\n box-sizing: border-box;\n background: rgb(0 124 186 / 10%);\n padding: 5px 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 .neko-textarea-count {\n color: rgba(",", 0.4);\n font-size: 11px;\n margin: 0;\n position: absolute;\n right: 13px;\n bottom: 10px;\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.avoidOnEnterWithShift,h=void 0!==p&&p,m=e.onEnter,b=void 0===m?null:m,v=e.readOnly,y=void 0!==v&&v,g=e.maxLength,w=void 0===g?null:g,x=e.className,O=e.style,k=e.textAreaStyle,C=void 0===k?{}:k,j=e.countable,E=void 0!==j&&j,S=d(e,["id","name","value","description","placeholder","avoidOnEnterWithShift","onEnter","readOnly","maxLength","className","style","textAreaStyle","countable"]),_=s(Object(r.useState)(i),2),P=_[0],A=_[1],M=s(Object(r.useState)(0),2),z=M[0],I=M[1],T=s(Object(r.useState)(!1),2),R=T[0],N=T[1],L=!!e.onChange,F=Object(r.useCallback)((function(e){N(e.shiftKey)}),[]),D=Object(r.useCallback)((function(){N(!1)}),[]);Object(r.useEffect)((function(){return document.addEventListener("keydown",F,!1),document.addEventListener("keyup",D,!1),function(){document.removeEventListener("keydown",F,!1),document.removeEventListener("keyup",D,!1)}}),[]),Object(r.useEffect)((function(){L||A(i),E&&I(i.length)}),[i,E]);var B=Object(r.useCallback)((function(t){var r=w?t.target.value.substr(0,w):t.target.value;L?e.onChange(r,n):A(r,n)}),[w]);return o.a.createElement("div",{className:[x].join(" "),style:O},o.a.createElement("div",{className:"neko-textarea-container"},o.a.createElement("textarea",u({className:"neko-textarea",rows:6},S,{id:n,name:t,spellCheck:"false",placeholder:f,onChange:B,onKeyPress:function(t){if(b&&!t.shiftKey&&"Enter"===t.key){if(h&&R)return;t.preventDefault(),e.onEnter(t.target.value,n)}},onBlur:function(t){e.onBlur&&i!==t.target.value&&e.onBlur(t.target.value,n)},readOnly:y,style:C,value:L?i:P})),E&&o.a.createElement("p",{className:"neko-textarea-count"},z," / ",w," characters")),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.blackRGB,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,avoidOnEnterWithShift: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,avoidOnEnterWithShift:!1}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=(t(1),t(4));t(3);function i(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n label {\n display: block;\n margin-bottom: 3px;\n }\n\n .neko-input, .neko-textarea {\n margin-bottom: 5px;\n }\n"]);return i=function(){return e},e}var l=a.a.div(i()),c=function(e){return o.a.createElement(l,null,e.children||null)},u=function(e){return o.a.createElement(c,e)};u.propTypes={},u.defaultProps={}},function(e,n,t){"use strict";var r=t(0),o=t.n(r),a=t(1),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 color: ",";\n font-family: ",";\n font-size: ",";\n position: relative;\n display: inline-block;\n width: ",";\n height: ",";\n\n &[data-is-disabled=disabled] {\n opacity: 0.4;\n\n .nui-switch-slider {\n cursor: auto;\n }\n }\n\n input {\n opacity: 0;\n width: 0;\n height: 0;\n border: 0;\n }\n\n .nui-switch-slider {\n background-color: ",";\n border-radius: ",';\n align-items: center;\n cursor: pointer;\n display: inline-flex;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n transition: .4s;\n }\n\n .nui-switch-slider:before {\n border-radius: 50%;\n position: absolute;\n content: "";\n height: ',";\n width: ",';\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: .3s;\n }\n\n .nui-switch-slider:after {\n content: "','";\n margin-left: auto;\n margin-right: ',";\n }\n\n input:checked + .nui-switch-slider {\n background-color: ",";\n }\n\n input:checked + .nui-switch-slider:before {\n transform: translateX(",');\n }\n\n input:checked + .nui-switch-slider:after {\n content: "','";\n margin-left: ',";\n margin-right: auto;\n }\n"]);return f=function(){return e},e}var d=Object(l.a)((function(e){e.width,e.height,e.fontSize;var n=e.onValue,t=e.offValue,a=e.checked,i=void 0!==a&&a,l=(e.onBackgroundColor,e.offBackgroundColor,e.onLabel,e.offLabel,e.onChange),c=e.disabled,f=s(e,["width","height","fontSize","onValue","offValue","checked","onBackgroundColor","offBackgroundColor","onLabel","offLabel","onChange","disabled"]),d=Object(r.useCallback)((function(e){l(e.target.checked?n:t)}),[l,n,t]);return o.a.createElement("label",u({},f,{"data-is-disabled":c?"disabled":""}),o.a.createElement("input",{type:"checkbox",onChange:d,checked:i,disabled:c}),o.a.createElement("span",{className:"nui-switch-slider"}))}))(f(),c.a.white,c.a.fontFamily,(function(e){return e.fontSize}),(function(e){return e.width}),(function(e){return e.height}),(function(e){return e.offBackgroundColor}),(function(e){return e.height}),(function(e){return"calc(".concat(e.height," - 8px)")}),(function(e){return"calc(".concat(e.height," - 8px)")}),(function(e){return e.offLabel}),(function(e){return"calc(".concat(e.height," / 2)")}),(function(e){return e.onBackgroundColor}),(function(e){return"calc(".concat(e.width," - ").concat(e.height,")")}),(function(e){return e.onLabel}),(function(e){return"calc(".concat(e.height," / 2)")})),p=function(e){return o.a.createElement(d,e)};p.propTypes={width:i.a.string,height:i.a.string,fontSize:i.a.string,onValue:i.a.string,offValue:i.a.string,checked:i.a.bool,onBackgroundColor:i.a.string,offBackgroundColor:i.a.string,onLabel:i.a.string,offLabel:i.a.string},p.defaultProps={width:"100%",height:"20px",fontSize:"12px",checked:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return k}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(7),u=t(5),s=t(33),f=t.n(s),d=t(35),p=t.n(d),h=t(34),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(1),i=t.n(a),l=t(4),c=t(24),u=t(6),s=t(3),f=t(116),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 height: 61px;\n overflow: hidden;\n align-items: center;\n padding: 15px 20px;\n background-color: ",";\n display: flex;\n\n .nui-header-logo-container {\n width: 102px;\n height: 102px;\n padding: 20px;\n margin-right: 25px;\n background: rgba(",", 0.1);\n border-radius: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(-29.83deg);\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.blackRGB,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 u}));var r=t(0),o=t.n(r),a=t(1),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 O}));var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(2);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){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 f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){d(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function d(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||v(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 h(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 m(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var a=e.apply(n,t);function i(e){h(a,r,o,i,l,"next",e)}function l(e){h(a,r,o,i,l,"throw",e)}i(void 0)}))}}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)||v(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){if(e){if("string"==typeof e)return y(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)?y(e,n):void 0}}function y(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 g(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 w(){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: #C4C4C4;\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 &[data-is-disabled=true] {\n svg {\n opacity: 0.7;\n }\n }\n\n div {\n transition: all 0.5s ease;\n transform: scale(1.5);\n pointer-events: none;\n max-width: 100%;\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 w=function(){return e},e}var x=l.a.div(w()),O=function(e){var n=e.multiple,t=e.width,a=void 0===t?"100%":t,i=e.height,l=void 0===i?"100%":i,s=e.iconSize,d=void 0===s?48:s,h=e.iconColor,v=void 0===h?"#A9A9A9":h,y=e.onSuccess,w=void 0===y?function(){}:y,O=e.onFailure,k=void 0===O?function(){}:O,C=e.style,j=void 0===C?{}:C,E=e.apiUrl,S=e.apiConfig,_=e.onClick,P=e.disabled,A=g(e,["multiple","width","height","iconSize","iconColor","onSuccess","onFailure","style","apiUrl","apiConfig","onClick","disabled"]),M=b(Object(r.useState)(!1),2),z=M[0],I=M[1],T=b(Object(r.useState)(Math.floor(1e8*Math.random())),2),R=T[0],N=(T[1],Object(r.useRef)(null)),L=Object(r.useRef)(null),F=b(Object(r.useState)(!1),2),D=F[0],B=F[1];Object(r.useEffect)((function(){L&&(L.current.style.pointerEvents=D?"none":"auto")}),[L,D]);var U=function(){var e=m(regeneratorRuntime.mark((function e(t){var r,o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),r=function(){var e=m(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S.file=n,e.next=3,Object(c.J)(E,S);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),e.next=4,Promise.all(t.map(function(){var e=m(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r(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)}}()));case 4:o=e.sent,a=o.filter((function(e){return e.success})),i=o.filter((function(e){return!e.success})),a.length&&w(n?a:a[0]),i.length&&k(n?i:i[0]),B(!1);case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(e){e.preventDefault(),e.stopPropagation()},q=function(e){e.preventDefault(),e.stopPropagation(),I(!0)},V=function(e,n){n.preventDefault(),n.stopPropagation(),I(!1),console.log(e),U(e)};return o.a.createElement("div",{ref:L},o.a.createElement("input",{type:"file",id:R,accept:"image/*",ref:N,onChange:function(e){var n=p(e.target.files);V(n,e)},style:{display:"none"},disabled:P,multiple:n}),o.a.createElement(x,u({onClick:function(){_?_():N.current.click()},style:f(f({},j),{},{width:a,height:l}),className:z?"dropping":"",onDragOver:H,onDragEnter:q,onDragLeave:function(e){e.preventDefault(),e.stopPropagation(),I(!1)},onDrop:function(e){var n=p(e.dataTransfer.files);V(n,e)},"data-is-disabled":P},A),o.a.createElement(c.j,{width:d,height:d,icon:"upload",spinning:D,color:v,onDragOver:H,onDragEnter:q})))};O.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},O.defaultProps={width:"100%",height:"100%",onSuccess:function(){},onFailure:function(){},style:{}}},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(135),a=(r=o)&&r.__esModule?r:{default:r},i=t(45);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";var r=t(0),o=t.n(r),a=t(1),i=t.n(a),l=t(4),c=t(3),u=t(27),s=t(17),f=t(23),d=t(11),p=t(25),h=t(15),m=t(6),b=t(26),v=t(28);function y(){return(y=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 g(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||x(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 w(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)||x(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 x(e,n){if(e){if("string"==typeof e)return O(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)?O(e,n):void 0}}function O(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 k(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 C(){var e=function(e,n){n||(n=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["\n width: 633px;\n\n &.custom-modal {\n padding: 0;\n }\n\n .neko-modal-wrapper {\n padding: 15px;\n }\n\n .neko-media-library-modal-content-header {\n align-items: center;\n display: flex;\n justify-content: space-between;\n\n h1 {\n font-size: 21px;\n font-weight: bold;\n margin: 0;\n }\n\n input {\n background-color: ",";\n border: 1px solid ",";\n border-radius: 3px;\n }\n }\n .neko-media-library-modal-content-body {\n margin-top: 33px;\n margin-bottom: 36px;\n\n .neko-media-library-modal-content-body-list {\n max-height: 406px;\n overflow-y: scroll;\n margin-bottom: 10px;\n width: 100%;\n }\n .neko-media-library-modal-content-body-gallery {\n display: grid;\n gap: 10px;\n grid-template-columns: repeat(6, 1fr);\n margin-bottom: 10px;\n\n .neko-media-library-modal-content-media-container {\n cursor: pointer;\n position: relative;\n\n img {\n box-sizing: border-box;\n }\n\n &.selected {\n img {\n border: 5px solid ",";\n }\n }\n\n &:hover {\n .zoom-button {\n display: block;\n }\n }\n\n .zoom-button {\n background-color: rgba(",", 0.4);\n border: 0;\n border-radius: 30px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 2px;\n left: 2px;\n width: 30px;\n height: 30px;\n }\n }\n }\n\n .neko-media-library-modal-content-body-selected-gallery {\n display: flex;\n\n .neko-media-library-modal-content-selected-media-container {\n overflow: hidden;\n position: relative;\n height: 50px;\n width: 50px;\n padding-right: 5px;\n\n &.dummy {\n width: 50px;\n\n &.drag-over {\n width: 50px;\n }\n }\n\n &.drag-over {\n width: 105px;\n\n .zoom-button {\n left: 56px;\n }\n }\n\n &.drag-over::before {\n content: '';\n display: inline-block;\n width: 50px;\n height: 50px;\n background-color: ",";\n }\n\n img {\n box-sizing: border-box;\n width: 100%;\n max-width: 50px;\n }\n\n &.drag-over {\n img {\n margin-left: 5px;\n }\n }\n\n &:hover {\n .remove-button,\n .zoom-button {\n display: block;\n }\n }\n\n .remove-button {\n background-color: rgba(",", 0.4);\n border: 0;\n border-radius: 20px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 1px;\n right: 1px;\n width: 20px;\n height: 20px;\n }\n\n .zoom-button {\n background-color: rgba(",", 0.4);\n border: 0;\n border-radius: 20px;\n cursor: pointer;\n display: none;\n position: absolute;\n top: 1px;\n left: 1px;\n width: 20px;\n height: 20px;\n }\n }\n }\n }\n .neko-media-library-modal-content-footer {\n display: flex;\n justify-content: space-between;\n }\n .neko-media-library-modal-search {\n position: relative;\n }\n"]);return C=function(){return e},e}var j=Object(l.a)(u.a)(C(),c.a.white,c.a.black,c.a.blue,c.a.blackRGB,c.a.blue,c.a.blackRGB,c.a.blackRGB),E=function(e){Array.prototype.forEach.call(document.getElementsByClassName(e),(function(n){n.classList.remove(e)}))},S="grid",_="list",P=[{accessor:"thumbnail_url",title:"Thumb",style:{width:"42px"}},{accessor:"title",title:"Title"},{accessor:"size",title:"Size",style:{width:"70px"}},{accessor:"filename",title:"Filename"}],A=function(e){var n=e.images,t=(e.onNextPage,e.onPreviousPage,e.onRefresh),a=e.onClick,i=e.onRemoveClick,l=e.onZoomClick,u=e.onSearch,x=e.searchValue,O=e.busy,C=e.currentPage,A=e.limit,M=e.total,z=e.onPageChange,I=e.selected,T=e.multiSelect,R=void 0!==T&&T,N=e.showUploader,L=void 0!==N&&N,F=e.uploader,D=e.onSelectedOrderChanged,B=e.onUploadSuccess,U=void 0===B?function(){}:B,H=e.onUploadFailure,q=void 0===H?function(){}:H,V=e.uploadApiUrl,$=e.uploadApiConfig,W=e.uploadMultiple,G=e.onClose,K=e.onCancel,X=e.onSave,Y=k(e,["images","onNextPage","onPreviousPage","onRefresh","onClick","onRemoveClick","onZoomClick","onSearch","searchValue","busy","currentPage","limit","total","onPageChange","selected","multiSelect","showUploader","uploader","onSelectedOrderChanged","onUploadSuccess","onUploadFailure","uploadApiUrl","uploadApiConfig","uploadMultiple","onClose","onCancel","onSave"]),J=w(Object(r.useState)(x),2),Z=J[0],Q=J[1],ee=w(Object(r.useState)(null),2),ne=ee[0],te=ee[1],re=w(Object(r.useState)(S),2),oe=re[0],ae=re[1],ie=Object(r.useRef)(null),le=function(e,n){if(e.preventDefault(),null!==ne){var t=e.currentTarget.getBoundingClientRect(),r=t.width,o=t.left,a=t.right,i=n;ne<n&&(n>0&&n<I.length?i+1===ne&&e.clientX>=a-25?i-=1:(i-1===ne&&e.clientX>=o-25||55!==r&&e.clientX>=a-25)&&(i+=1):55!==r&&e.clientX>=a-25&&(i+=1)),E("drag-over"),ne!==i&&ne+1!==i&&document.getElementById("".concat("nmlm-selected-").concat(i)).classList.add("drag-over")}},ce=function(e){e.preventDefault(),te(null),E("drag-over")},ue=function(e,n){e.preventDefault(),null!==ne&&ne!==n&&ne+1!==n&&D({currentIndex:ne,afterIndex:ne>n?n:n-1})},se=Object(r.useMemo)((function(){if(!R)return[];var e=o.a.createElement("div",{id:"nmlm-selected-".concat(I.length),className:"neko-media-library-modal-content-selected-media-container dummy",draggable:!1,onDragEnd:function(e){return ce(e)},onDragOver:function(e){return le(e,I.length)},onDrop:function(e){return ue(e,I.length)},onDragLeave:function(){return E("drag-over")}}),n=I.map((function(e,n){return o.a.createElement("div",{id:"nmlm-selected-".concat(n),key:e.id,className:"neko-media-library-modal-content-selected-media-container",draggable:!0,onDragStart:function(){return te(n)},onDragEnd:ce,onDragOver:function(e){return le(e,n)},onDrop:function(e){return ue(e,n)}},o.a.createElement("img",{src:e.src,className:"neko-media-library-modal-content-media"}),o.a.createElement("button",{className:"remove-button",onClick:function(){return i({id:e.id,src:e.src})}},o.a.createElement(m.a,{icon:"close",color:c.a.white,width:19,height:19})),o.a.createElement("button",{className:"zoom-button",onClick:function(){return l({id:e.id,src:e.zoom_src})}},o.a.createElement(m.a,{icon:"zoom-in",color:c.a.white,width:19,height:19})))}));return[].concat(g(n),[e])}),[I,R,i,l,le,ce,ue]),fe=Object(r.useMemo)((function(){return n.map((function(e){return o.a.createElement("div",{key:e.id,className:"neko-media-library-modal-content-media-container ".concat(I.some((function(n){return n.id===e.id}))?"selected":""),onClick:function(){a({id:e.id,src:e.src,zoom_src:e.zoom_src})}},o.a.createElement("img",{src:e.src,className:"neko-media-library-modal-content-media",width:"90",height:"90"}),o.a.createElement("button",{className:"zoom-button",onClick:function(n){n.stopPropagation(),l({id:e.id,src:e.zoom_src})}},o.a.createElement(m.a,{icon:"zoom-in",color:c.a.white,width:29,height:29})))}))}),[n,I,l,a]),de=Object(r.useMemo)((function(){return n.map((function(e){return{id:e.id,thumbnail_url:o.a.createElement("img",{src:e.src,style:{width:40,height:40,objectFit:"cover"}}),title:e.title,size:e.size,filename:e.filename}}))}),[n]),pe=Object(r.useCallback)((function(){Q(""),t()}),[t]),he=Object(r.useMemo)((function(){var e=function(e,t){var r=n.find((function(n){return e.includes(n.id)}));a({id:r.id,src:r.src,zoom_src:r.zoom_src})};return o.a.createElement(v.a,{data:de,columns:P,onSelect:e,onUnselect:e,selectedItems:I.map((function(e){return e.id}))})}),[n,de,I,a]);return o.a.createElement(j,y({style:!0},Y),o.a.createElement("div",{className:"neko-modal-wrapper",draggable:!0,onDragOver:function(){return E("drag-over")}},o.a.createElement(b.a,{ref:ie,onSuccess:U,onFailure:q,apiUrl:V,apiConfig:$,disabled:!L||null!==ne,multiple:W},o.a.createElement("div",{className:"neko-media-library-modal-content"},o.a.createElement("div",{className:"neko-media-library-modal-content-header"},o.a.createElement(s.a,{h1:!0},"Media Library"),o.a.createElement("div",{style:{display:"flex"}},o.a.createElement("div",{className:"neko-media-library-modal-search"},o.a.createElement(f.a,{value:Z,disabled:O,onEnter:u,onChange:function(e){return Q(e)},placeholder:"Search..."}),""!==Z&&o.a.createElement(m.a,{icon:"close",containerStyle:{width:"20px",position:"absolute",right:"5px",top:"5px",cursor:"pointer"},width:20,height:20,color:c.a.darkGray,onClick:pe})),o.a.createElement(d.a,{onClick:function(){return u(Z)},style:{marginLeft:"4px",marginRight:"4px"}},"Search"),o.a.createElement(m.a,{color:oe===S?c.a.black:c.a.blue,icon:"view-grid",onClick:function(){return ae(S)},width:"20",height:"20"}),o.a.createElement(m.a,{color:oe===_?c.a.black:c.a.blue,icon:"format-list-bulleted",onClick:function(){return ae(_)},width:"20",height:"20"}))),o.a.createElement("div",null,o.a.createElement("div",{className:"neko-media-library-modal-content-body"},o.a.createElement(h.a,{busy:O},o.a.createElement("div",{className:"".concat(oe===S?"neko-media-library-modal-content-body-gallery":"neko-media-library-modal-content-body-list")},oe===S&&L&&F,oe===S?fe:he)),o.a.createElement("div",{className:"neko-media-library-modal-content-body-selected-gallery"},se))),o.a.createElement("div",{className:"neko-media-library-modal-content-footer"},o.a.createElement(p.a,{limit:A,currentPage:C,total:M,onClick:z}),o.a.createElement("div",{style:{display:"flex"}},!!G&&o.a.createElement(d.a,{onClick:function(){return G()}},"Close"),!!K&&o.a.createElement(d.a,{className:"danger",onClick:function(){return K()}},"Cansel"),!!X&&o.a.createElement(d.a,{onClick:function(){return X()}},"Save")))))))},M=function(e){return o.a.createElement(A,e)};M.propTypes={images:i.a.array,onNextPage:i.a.func,onPreviousPage:i.a.func,onRefresh:i.a.func,onClick:i.a.func,onSearch:i.a.func,searchValue:i.a.string,busy:i.a.bool,currentPage:i.a.number,limit:i.a.number,total:i.a.number,onPageChange:i.a.func,multiSelect:i.a.bool,selected:i.a.array,onClose:i.a.func,onCancel:i.a.func,onSave:i.a.func},M.defaultProps={multiSelect:!1}},function(e,n,t){"use strict";t.d(n,"a",(function(){return h}));var r=t(0),o=t.n(r),a=t(1),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 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 f=function(){return e},e}var d=l.a.div(f(),c.a.white,c.a.blackRGB),p=function(e){var n=e.align,t=void 0===n?"left":n,r=s(e,["align"]);return o.a.createElement(d,u({className:"neko-align-".concat(t)},r),r.children)},h=function(e){return o.a.createElement(p,e)};h.propTypes={align:i.a.oneOf(["left","right"])},h.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){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(j,"$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),I(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<z;++d)switch(f=M[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)&&(I=null,e?"function"!=typeof e?P=1:(P=2,I=e):P=0),l}function c(e,t){var l=e;if(33>l.charCodeAt(0)&&(l=l.trim()),l=[l],0<z){var c=i(-1,t,l,l,S,E,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,j=0,M=0,I=0,R=m=p=0,N=0,L=0,F=0,D=0,B=c.length,U=B-1,H="",q="",V="",$="";N<B;){if(h=c.charCodeAt(N),N===U&&0!==k+j+C+O&&(0!==k&&(h=47===k?10:47),j=C=O=0,B++,U++),0===k+j+C+O){if(N===U&&(0<L&&(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<B;){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<L&&(H=H.replace(s,"")),h=H.charCodeAt(1)){case 100:case 109:case 115:case 45:L=l;break;default:L=A}if(D=(m=e(l,L,m,h,d+1)).length,0<z&&(x=i(3,m,L=n(A,H,F),l,S,E,D,h,d,f),H=L.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&&(q+=m,m="")}else m="";break;default:m=e(l,n(l,H,F),m,f,d+1)}V+=m,m=F=L=R=p=0,H="",h=c.charCodeAt(++N);break;case 125:case 59:if(1<(D=(H=(0<L?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<z&&void 0!==(x=i(1,H,l,t,S,E,q.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){$+=H+c.charAt(N);break}default:58!==H.charCodeAt(D-1)&&(q+=r(H,p,h,H.charCodeAt(2)))}F=L=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&&(L=1,H+="\0"),0<z*T&&i(0,H,l,t,S,E,q.length,f,d,f),E=1,S++;break;case 59:case 125:if(0===k+j+C+O){E++;break}default:switch(E++,g=c.charAt(N),h){case 9:case 32:if(0===j+O+k)switch(M){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===j+k+O&&(L=F=1,g="\f"+g);break;case 108:if(0===j+k+O+_&&0<R)switch(N-R){case 2:112===M&&58===c.charCodeAt(N-3)&&(_=M);case 8:111===I&&(_=I)}break;case 58:0===j+k+O&&(R=N);break;case 44:0===k+C+j+O&&(L=1,g+="\r");break;case 34:case 39:0===k&&(j=j===h?0:0===j?h:j);break;case 91:0===j+k+C&&O++;break;case 93:0===j+k+C&&O--;break;case 41:0===j+k+O&&C--;break;case 40:if(0===j+k+O){if(0===p)switch(2*M+3*I){case 533:break;default:p=1}C++}break;case 64:0===k+C+j+O+R+m&&(m=1);break;case 42:case 47:if(!(0<j+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===M&&D+2!==N&&(33===c.charCodeAt(D+2)&&(q+=c.substring(D,N+1)),g="",k=0)}}0===k&&(H+=g)}I=M,M=h,N++}if(0<(D=q.length)){if(L=l,0<z&&(void 0!==(x=i(2,q,L,t,S,E,D,f,d,f))&&0===(q=x).length))return $+q+V;if(q=L.join(",")+"{"+q+"}",0!=P*_){switch(2!==P||o(q,2)||(_=0),_){case 111:q=q.replace(y,":-moz-$1")+q;break;case 112:q=q.replace(v,"::-webkit-input-$1")+q.replace(v,"::-moz-$1")+q.replace(v,":-ms-input-$1")+q}_=0}}return $+q+V}(A,l,t,0,0);return 0<z&&(void 0!==(c=i(-2,f,l,l,S,E,f.length,0,0,0))&&(f=c)),"",_=0,E=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)/,j=/([^-])(image-set\()/,E=1,S=1,_=0,P=1,A=[],M=[],z=0,I=null,T=0;return c.use=function e(n){switch(n){case void 0:case null:z=M.length=0;break;default:if("function"==typeof n)M[z++]=n;else if("object"==typeof n)for(var t=0,r=n.length;t<r;++t)e(n[t]);else T=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="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 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){n.__esModule=!0,n.default={body:'<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M10 4l2 2h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-1.11.89-2 2-2h6m5 5v3h-3v2h3v3h2v-3h3v-2h-3V9h-2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h9.09c-.06-.33-.09-.66-.09-1c0-.68.12-1.36.35-2H5l3.5-4.5l2.5 3l3.5-4.5l2.23 2.97c.97-.63 2.11-.97 3.27-.97c.34 0 .67.03 1 .09V5a2 2 0 0 0-2-2H5m14 13v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M3 11h8V3H3m0 18h8v-8H3m10 8h8v-8h-8m0-10v8h8V3" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M7 5h14v2H7V5m0 8v-2h14v2H7M4 4.5A1.5 1.5 0 0 1 5.5 6A1.5 1.5 0 0 1 4 7.5A1.5 1.5 0 0 1 2.5 6A1.5 1.5 0 0 1 4 4.5m0 6A1.5 1.5 0 0 1 5.5 12A1.5 1.5 0 0 1 4 13.5A1.5 1.5 0 0 1 2.5 12A1.5 1.5 0 0 1 4 10.5M7 19v-2h14v2H7m-3-2.5A1.5 1.5 0 0 1 5.5 18A1.5 1.5 0 0 1 4 19.5A1.5 1.5 0 0 1 2.5 18A1.5 1.5 0 0 1 4 16.5z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M22.46 6c-.77.35-1.6.58-2.46.69c.88-.53 1.56-1.37 1.88-2.38c-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29c0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15c0 1.49.75 2.81 1.91 3.56c-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07a4.28 4.28 0 0 0 4 2.98a8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21C16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56c.84-.6 1.56-1.36 2.14-2.23z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8A1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5a5 5 0 0 1-5 5a5 5 0 0 1-5-5a5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 2.04c-5.5 0-10 4.49-10 10.02c0 5 3.66 9.15 8.44 9.9v-7H7.9v-2.9h2.54V9.85c0-2.51 1.49-3.89 3.78-3.89c1.09 0 2.23.19 2.23.19v2.47h-1.26c-1.24 0-1.63.77-1.63 1.56v1.88h2.78l-.45 2.9h-2.33v7a10 10 0 0 0 8.44-9.9c0-5.53-4.5-10.02-10-10.02z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.62L12 2L9.19 8.62L2 9.24l5.45 4.73L5.82 21L12 17.27z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 20a7 7 0 0 1-7-7a7 7 0 0 1 7-7a7 7 0 0 1 7 7a7 7 0 0 1-7 7m7.03-12.61l1.42-1.42c-.45-.51-.9-.97-1.41-1.41L17.62 6c-1.55-1.26-3.5-2-5.62-2a9 9 0 0 0-9 9a9 9 0 0 0 9 9c5 0 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M11 14h2V8h-2m4-7H9v2h6V1z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 7l5 5h-3v4h-4v-4H7l5-5m0 15A10 10 0 0 1 2 12A10 10 0 0 1 12 2a10 10 0 0 1 10 10a10 10 0 0 1-10 10m0-2a8 8 0 0 0 8-8a8 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="M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24a2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24a2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24a.973.973 0 0 1 0-1.42z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M9.04 21.54c.96.29 1.93.46 2.96.46a10 10 0 0 0 10-10A10 10 0 0 0 12 2A10 10 0 0 0 2 12c0 4.25 2.67 7.9 6.44 9.34c-.09-.78-.18-2.07 0-2.96l1.15-4.94s-.29-.58-.29-1.5c0-1.38.86-2.41 1.84-2.41c.86 0 1.26.63 1.26 1.44c0 .86-.57 2.09-.86 3.27c-.17.98.52 1.84 1.52 1.84c1.78 0 3.16-1.9 3.16-4.58c0-2.4-1.72-4.04-4.19-4.04c-2.82 0-4.48 2.1-4.48 4.31c0 .86.28 1.73.74 2.3c.09.06.09.14.06.29l-.29 1.09c0 .17-.11.23-.28.11c-1.28-.56-2.02-2.38-2.02-3.85c0-3.16 2.24-6.03 6.56-6.03c3.44 0 6.12 2.47 6.12 5.75c0 3.44-2.13 6.2-5.18 6.2c-.97 0-1.92-.52-2.26-1.13l-.67 2.37c-.23.86-.86 2.01-1.29 2.7v-.03z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M9 2a7 7 0 0 1 7 7c0 1.57-.5 3-1.39 4.19l.8.81H16l6 6l-2 2l-6-6v-.59l-.81-.8A6.916 6.916 0 0 1 9 16a7 7 0 0 1-7-7a7 7 0 0 1 7-7M8 5v3H5v2h3v3h2v-3h3V8h-3V5H8z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-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 2m-1 15h2v-6h-2v6z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8v12z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M11 4h2v12l5.5-5.5l1.42 1.42L12 19.84l-7.92-7.92L5.5 10.5L11 16V4z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M18 21l-4-4h3V7h-3l4-4l4 4h-3v10h3M2 19v-2h10v2M2 13v-2h7v2M2 7V5h4v2H2z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M12 9a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3m0 8a5 5 0 0 1-5-5a5 5 0 0 1 5-5a5 5 0 0 1 5 5a5 5 0 0 1-5 5m0-12.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5z" fill="currentColor"/>',width:24,height:24}},function(e,n){n.__esModule=!0,n.default={body:'<path d="M13.13 22.19l-1.63-3.83c1.57-.58 3.04-1.36 4.4-2.27l-2.77 6.1M5.64 12.5l-3.83-1.63l6.1-2.77C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39S16.66.269 11 5.93c-2.19 2.19-3.5 4.6-4.35 6.71c-.28.75-.09 1.57.46 2.13l2.13 2.12c.55.56 1.37.74 2.12.46A19.1 19.1 0 0 0 18.07 13c5.66-5.66 3.54-10.61 3.54-10.61m-7.07 7.07c-.78-.78-.78-2.05 0-2.83s2.05-.78 2.83 0c.77.78.78 2.05 0 2.83c-.78.78-2.05.78-2.83 0m-5.66 7.07l-1.41-1.41l1.41 1.41M6.24 22l3.64-3.64c-.34-.09-.67-.24-.97-.45L4.83 22h1.41M2 22h1.41l4.77-4.76l-1.42-1.41L2 20.59V22m0-2.83l4.09-4.08c-.21-.3-.36-.62-.45-.97L2 17.76v1.41z" fill="currentColor"/>',width:24,height:24}},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="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(130),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(121);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){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){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,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(127),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(129),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(131)),u=m(t(1)),s=m(t(132)),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(66)),d=t(45),p=m(d),h=t(139);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(1)),s=b(t(133)),f=v(t(134)),d=b(t(66)),p=b(t(137)),h=v(t(45)),m=v(t(68));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(138);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(65),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(65),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(67))&&t(67)?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(68),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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/admin.php DELETED
@@ -1,127 +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
- 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
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/api.php DELETED
@@ -1,51 +0,0 @@
1
- <?php
2
-
3
- /**
4
- *
5
- * FUNCTIONS THAT CAN BE USED BY THEMES/PLUGINS DEVELOPERS
6
- * FOR ADDITIONAL RETINA SUPPORT
7
- *
8
- */
9
-
10
- // Rewrite the HTML to add Retina support (not recommended, that is
11
- // done automatically by the plugin through the Method)
12
- function wr2x_picture_rewrite( $buffer ) {
13
- global $wr2x_core;
14
- return $wr2x_core->picture_rewrite( $buffer );
15
- }
16
-
17
- // Return Retina URL from the Image URL
18
- function wr2x_get_retina_from_url( $url ) {
19
- global $wr2x_core;
20
- return $wr2x_core->get_retina_from_url( $url );
21
- }
22
-
23
- // Return the retina file if my found for this normal file
24
- function wr2x_get_retina( $file ) {
25
- global $wr2x_core;
26
- return $wr2x_core->get_retina( $file );
27
- }
28
-
29
- // Generate the retina images for the given meta of a media
30
- function wr2x_generate_images( $meta ) {
31
- global $wr2x_core;
32
- return $wr2x_core->generate_images( $meta );
33
- }
34
-
35
- // Delete the Retina files for this attachment
36
- function wr2x_delete_attachment( $attach_id, $deleteFullSize = true ) {
37
- global $wr2x_core;
38
- return $wr2x_core->delete_attachment( $attach_id, $deleteFullSize );
39
- }
40
-
41
- function wr2x_get_pathinfo_from_image_src( $image_src ) {
42
- global $wr2x_core;
43
- return $wr2x_core->get_pathinfo_from_image_src( $image_src );
44
- }
45
-
46
- function wr2x_retina_extension() {
47
- global $wr2x_core;
48
- return $wr2x_core->retina_extension();
49
- }
50
-
51
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/core.php DELETED
@@ -1,1561 +0,0 @@
1
- <?php
2
-
3
- require trailingslashit( 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( trailingslashit( 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
- $this->method = 'Responsive';
90
- }
91
- if ( is_null( $wr2x_auto_generate ) ) {
92
- update_option( 'wr2x_auto_generate', '1' );
93
- }
94
- if ( is_null( $wr2x_retina_sizes ) ) {
95
- $wr2x_retina_sizes = array();
96
- // Let's try to get this data from the old option first
97
- $wr2x_ignore_sizes = get_option( 'wr2x_ignore_sizes' );
98
- $sizes = $this->get_image_sizes();
99
- $large_w = 1024;
100
- $large_h = 1024;
101
- foreach ( $sizes as $name => $details ) {
102
- $w = isset( $details['width'] ) ? $details['width'] : 0;
103
- $h = isset( $details['height'] ) ? $details['height'] : 0;
104
- if ( ( $w <= $large_w || $w === 9999 ) && ( $h <= $large_h || $h === 9999 ) ) {
105
- array_push( $wr2x_retina_sizes, $name );
106
- }
107
- }
108
- if ( !empty( $wr2x_ignore_sizes ) ) {
109
- $wr2x_retina_sizes = array_diff( $wr2x_retina_sizes, array_keys( $wr2x_ignore_sizes ) );
110
- delete_option( 'wr2x_ignore_sizes' );
111
- }
112
- update_option( 'wr2x_retina_sizes', $wr2x_retina_sizes );
113
- }
114
-
115
- if ( is_null( $wr2x_disabled_sizes ) ) {
116
- update_option( 'wr2x_disabled_sizes', [ 'medium_large' ] );
117
- delete_option( 'wr2x_disable_medium_large' );
118
- }
119
- }
120
-
121
- function big_image_size_threshold() {
122
- return false;
123
- }
124
-
125
- function is_rest() {
126
- if ( empty( $_SERVER[ 'REQUEST_URI' ] ) )
127
- return false;
128
- $rest_prefix = trailingslashit( rest_get_url_prefix() );
129
- return strpos( $_SERVER[ 'REQUEST_URI' ], $rest_prefix ) !== false ? true : false;
130
- }
131
-
132
- /**
133
- *
134
- * REMOVE (DISABLE) IMAGE SIZES
135
- *
136
- */
137
-
138
- function disable_image_sizes() {
139
- $wr2x_disabled_sizes = get_option( 'wr2x_disabled_sizes', array() );
140
- foreach ( $wr2x_disabled_sizes as $size ) {
141
- remove_image_size( $size );
142
- add_filter( 'image_size_names_choose', array( $this, 'unset_image_sizes' ) );
143
- add_filter( 'intermediate_image_sizes_advanced', array( $this, 'unset_image_sizes' ) );
144
- }
145
- }
146
-
147
- function unset_image_sizes( $sizes ) {
148
- $wr2x_disabled_sizes = get_option( 'wr2x_disabled_sizes', array() );
149
- foreach ( $wr2x_disabled_sizes as $size ) {
150
- unset( $sizes[$size] );
151
- }
152
- return $sizes;
153
- }
154
-
155
- /**
156
- *
157
- * PICTURE METHOD
158
- *
159
- */
160
-
161
- function is_supported_image( $url ) {
162
- $wr2x_supported_image = array( 'jpg', 'jpeg', 'png', 'gif' );
163
- $ext = strtolower( pathinfo( $url, PATHINFO_EXTENSION ) );
164
- if ( !in_array( $ext, $wr2x_supported_image ) ) {
165
- $this->log( "Extension (" . $ext . ") is not " . implode( ', ', $wr2x_supported_image ) . "." );
166
- return false;
167
- }
168
- return true;
169
- }
170
-
171
- function picture_buffer_start() {
172
- ob_start( array( $this, "picture_rewrite" ) );
173
- $this->log( "* HTML REWRITE FOR PICTUREFILL" );
174
- }
175
-
176
- function picture_buffer_end() {
177
- @ob_end_flush();
178
- }
179
-
180
- // Replace the IMG tags by PICTURE tags with SRCSET
181
- function picture_rewrite( $buffer ) {
182
- if ( !isset( $buffer ) || trim( $buffer ) === '' )
183
- return $buffer;
184
- $html = new KubAT\PhpSimple\HtmlDomParser();
185
- $lazysize = get_option( "wr2x_picturefill_lazysizes" ) && class_exists( 'MeowPro_WR2X_Core' );
186
- $killSrc = !get_option( "wr2x_picturefill_keep_src" );
187
- $nodes_count = 0;
188
- $nodes_replaced = 0;
189
- $html = $html->str_get_html( $buffer );
190
- if ( !$html ) {
191
- $this->log( "The HTML buffer is null, another plugin might block the process." );
192
- return $buffer;
193
- }
194
-
195
- // IMG TAGS
196
- foreach( $html->find( 'img' ) as $element ) {
197
- $nodes_count++;
198
- $parent = $element->parent();
199
- if ( $parent->tag == "picture" ) {
200
- $this->log("The img tag is inside a picture tag. Tag ignored.");
201
- continue;
202
- }
203
- else {
204
- $valid = apply_filters( "wr2x_validate_src", $element->src );
205
- if ( empty( $valid ) ) {
206
- $nodes_count--;
207
- continue;
208
- }
209
-
210
- // Original HTML
211
- $from = substr( $element, 0 );
212
-
213
- // SRC-SET already exists, let's check if LazySize is used
214
- if ( !empty( $element->srcset ) ) {
215
- if ( $lazysize ) {
216
- $this->log( "The src-set has already been created but it will be modifid to data-srcset for lazyload." );
217
- $element->class = $element->class . ' lazyload';
218
- $element->{'data-srcset'} = $element->srcset;
219
- if ( $killSrc ) {
220
- $element->src = null;
221
- }
222
- else {
223
- // If SRC is kept, to avoid it to load before LazySizes kicks in, we set srcset to a blank 1x1 pixel.
224
- $element->srcset = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
225
- }
226
- $to = $element;
227
- $buffer = str_replace( trim( $from, "</> "), trim( $to, "</> " ), $buffer );
228
- $this->log( "The img tag '$from' was rewritten to '$to'" );
229
- $nodes_replaced++;
230
- }
231
- else {
232
- $this->log( "The src-set has already been created. Tag ignored." );
233
- }
234
- continue;
235
- }
236
-
237
- // Process of SRC-SET creation
238
- if ( !$this->is_supported_image( $element->src ) ) {
239
- $nodes_count--;
240
- continue;
241
- }
242
- $retina_url = $this->get_retina_from_url( $element->src );
243
- $retina_url = apply_filters( 'wr2x_img_retina_url', $retina_url );
244
- if ( $retina_url != null ) {
245
- $retina_url = $this->cdn_this( $retina_url );
246
- $img_url = $this->cdn_this( $element->src );
247
- $img_url = apply_filters( 'wr2x_img_url', $img_url );
248
- if ( $lazysize ) {
249
- $element->class = $element->class . ' lazyload';
250
- $element->{'data-srcset'} = "$img_url, $retina_url 2x";
251
- }
252
- else
253
- $element->srcset = "$img_url, $retina_url 2x";
254
- if ( $killSrc )
255
- $element->src = null;
256
- else {
257
- $img_src = apply_filters( 'wr2x_img_src', $element->src );
258
- $element->src = $this->cdn_this( $img_src );
259
- }
260
- $to = $element;
261
- $buffer = str_replace( trim( $from, "</> "), trim( $to, "</> " ), $buffer );
262
- $this->log( "The img tag '$from' was rewritten to '$to'" );
263
- $nodes_replaced++;
264
- }
265
- else {
266
- $this->log( "The img tag was not rewritten. No retina for '" . $element->src . "'." );
267
- }
268
- }
269
- }
270
- $this->log( "$nodes_replaced/$nodes_count img tags were replaced." );
271
-
272
- // INLINE CSS BACKGROUND
273
- if ( get_option( 'wr2x_picturefill_css_background', false ) && class_exists( 'MeowPro_WR2X_Core' ) ) {
274
- // Standard CSS background
275
- preg_match_all( "/url(?:\(['\"]?)(.*?)(?:['\"]?\))/", $buffer, $matches );
276
- //error_log( print_r( $matches, 1 ) );
277
- if ( count( $matches ) == 2 ) {
278
- $match_css = $matches[0];
279
- $match_url = $matches[1];
280
- }
281
- // Lazy CSS background
282
- preg_match_all( "/data-background=(?:['\"])(.*?)(?:['\"])/", $buffer, $matches );
283
- if ( count( $matches ) == 2 ) {
284
- $match_css = array_merge( $match_css, $matches[0] );
285
- $match_url = array_merge( $match_url, $matches[1] );
286
- }
287
- // Lazy CSS background
288
- preg_match_all( "/data-bigimg=(?:['\"])(.*?)(?:['\"])/", $buffer, $matches );
289
- if ( count( $matches ) == 2 ) {
290
- $match_css = array_merge( $match_css, $matches[0] );
291
- $match_url = array_merge( $match_url, $matches[1] );
292
- }
293
- $nodes_count = 0;
294
- $nodes_replaced = 0;
295
- for ( $c = 0; $c < count( $match_css ); $c++ ) {
296
- $css = $match_css[$c];
297
- $url = $match_url[$c];
298
- if ( !$this->is_supported_image( $url ) )
299
- continue;
300
- $nodes_count++;
301
- $retina_url = $this->get_retina_from_url( $url );
302
- $retina_url = apply_filters( 'wr2x_img_retina_url', $retina_url );
303
- if ( $retina_url != null ) {
304
- $retina_url = $this->cdn_this( $retina_url );
305
- $minibuffer = str_replace( $url, $retina_url, $css );
306
- $buffer = str_replace( $css, $minibuffer, $buffer );
307
- $this->log( "The background src '$css' was rewritten to '$minibuffer'" );
308
- $nodes_replaced++;
309
- }
310
- else {
311
- $this->log( "The background src was not rewritten. No retina for '" . $url . "'." );
312
- }
313
- }
314
- $this->log( "$nodes_replaced/$nodes_count background src were replaced." );
315
- }
316
-
317
- $html->clear();
318
- return $buffer;
319
- }
320
-
321
- /**
322
- *
323
- * HTML REWRITE METHOD
324
- *
325
- */
326
-
327
- function buffer_start () {
328
- ob_start( array( $this, "html_rewrite" ) );
329
- $this->log( "* HTML REWRITE" );
330
- }
331
-
332
- function buffer_end () {
333
- @ob_end_flush();
334
- }
335
-
336
- // Replace the images by retina images (if available)
337
- function html_rewrite( $buffer ) {
338
- if ( !isset( $buffer ) || trim( $buffer ) === '' )
339
- return $buffer;
340
- $nodes_count = 0;
341
- $nodes_replaced = 0;
342
- $doc = new DOMDocument();
343
- @$doc->loadHTML( $buffer ); // = ($doc->strictErrorChecking = false;)
344
- $imageTags = $doc->getElementsByTagName('img');
345
- foreach ( $imageTags as $tag ) {
346
- $nodes_count++;
347
- $img_pathinfo = $this->get_pathinfo_from_image_src( $tag->getAttribute('src') );
348
- $filepath = trailingslashit( $this->get_upload_root() ) . $img_pathinfo;
349
- $system_retina = $this->get_retina( $filepath );
350
- if ( !empty( $system_retina ) ) {
351
- $retina_pathinfo = $this->cdn_this( ltrim( str_replace( $this->get_upload_root(), "", $system_retina ), '/' ) );
352
- $buffer = str_replace( $img_pathinfo, $retina_pathinfo, $buffer );
353
- $this->log( "The img src '$img_pathinfo' was replaced by '$retina_pathinfo'" );
354
- $nodes_replaced++;
355
- }
356
- else {
357
- $this->log( "The file '$system_retina' was not found. Tag not modified." );
358
- }
359
- }
360
- $this->log( "$nodes_replaced/$nodes_count were replaced." );
361
- return $buffer;
362
- }
363
-
364
-
365
- // Converts PHP INI size type (e.g. 24M) to int
366
- function parse_ini_size( $size ) {
367
- $unit = preg_replace('/[^bkmgtpezy]/i', '', $size);
368
- $size = preg_replace('/[^0-9\.]/', '', $size);
369
- if ( $unit )
370
- return round( $size * pow( 1024, stripos( 'bkmgtpezy', $unit[0] ) ) );
371
- else
372
- round( $size );
373
- }
374
-
375
- function get_max_filesize() {
376
- if ( defined ('HHVM_VERSION' ) ) {
377
- $post_max_size = ini_get( 'post_max_size' ) ? (int)$this->parse_ini_size( ini_get( 'post_max_size' ) ) : (int)ini_get( 'hhvm.server.max_post_size' );
378
- $upload_max_filesize = ini_get( 'upload_max_filesize' ) ? (int)$this->parse_ini_size( ini_get( 'upload_max_filesize' ) ) :
379
- (int)ini_get( 'hhvm.server.upload.upload_max_file_size' );
380
- }
381
- else {
382
- $post_max_size = (int)$this->parse_ini_size( ini_get( 'post_max_size' ) );
383
- $upload_max_filesize = (int)$this->parse_ini_size( ini_get( 'upload_max_filesize' ) );
384
- }
385
- $max = min( $post_max_size, $upload_max_filesize );
386
- return $max > 0 ? $max : 66600000;
387
- }
388
-
389
- /**
390
- *
391
- * RESPONSIVE IMAGES METHOD
392
- *
393
- */
394
-
395
- function calculate_image_srcset( $srcset, $size, $image_src, $image_meta, $attachment_id ) {
396
- if ( get_option( "wr2x_disable_responsive" ) )
397
- return null;
398
- if ( empty( $srcset ) ) {
399
- return $srcset;
400
- }
401
- $retinized_srcset = $srcset;
402
- $count = 0;
403
- $total = 0;
404
- foreach ( $srcset as $s => $cfg ) {
405
- $total++;
406
- $retinized_srcset[$s]['url'] = $this->cdn_this( $cfg['url'], $attachment_id );
407
- if ( $this->method !== "none" ) {
408
- $retinaForUrl = $this->get_retina_from_url( $cfg['url'] );
409
- if ( !empty( $retinaForUrl ) ) {
410
- $retina = $this->cdn_this( $retinaForUrl, $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
- }
418
- $this->log( "WP's srcset: " . $count . " retina files added out of " . $total . " image sizes" );
419
- return $retinized_srcset;
420
- }
421
-
422
- /**
423
- *
424
- * ISSUES CALCULATION AND FUNCTIONS
425
- *
426
- */
427
-
428
- // Compares two images dimensions (resolutions) against each while accepting an margin error
429
- function are_dimensions_ok( $width, $height, $retina_width, $retina_height ) {
430
- $w_margin = $width - $retina_width;
431
- $h_margin = $height - $retina_height;
432
- return ( $w_margin >= -2 && $h_margin >= -2 );
433
- }
434
-
435
- // UPDATE THE ISSUE STATUS OF THIS ATTACHMENT
436
- function update_issue_status( $attachmentId, $issues = null, $info = null ) {
437
- if ( $this->is_ignore( $attachmentId ) )
438
- return;
439
- if ( $issues == null )
440
- $issues = $this->get_issues();
441
- if ( $info == null )
442
- $info = $this->retina_info( $attachmentId );
443
- $consideredIssue = in_array( $attachmentId, $issues );
444
- $realIssue = $this->info_has_issues( $info );
445
- if ( $consideredIssue && !$realIssue )
446
- $this->remove_issue( $attachmentId );
447
- else if ( !$consideredIssue && $realIssue )
448
- $this->add_issue( $attachmentId );
449
- return $realIssue;
450
- }
451
-
452
- function get_issues($search = '') {
453
- if ($search) {
454
- return $this->calculate_issues_by_search($search);
455
- }
456
- $issues = get_transient( 'wr2x_issues' );
457
- if ( !$issues || !is_array( $issues ) ) {
458
- $issues = array();
459
- set_transient( 'wr2x_issues', $issues );
460
- }
461
- return $issues;
462
- }
463
-
464
- // CHECK IF THE 'INFO' OBJECT CONTAINS ISSUE (RETURN TRUE OR FALSE)
465
- function info_has_issues( $info ) {
466
- foreach ( $info as $aindex => $aval ) {
467
- if ( is_array( $aval ) || $aval == 'PENDING' )
468
- return true;
469
- }
470
- return false;
471
- }
472
-
473
- function calculate_issues() {
474
- global $wpdb;
475
- $postids = $wpdb->get_col( "
476
- SELECT p.ID FROM $wpdb->posts p
477
- WHERE post_status = 'inherit'
478
- AND post_type = 'attachment'" . $this->create_sql_if_wpml_original() . "
479
- AND ( post_mime_type = 'image/jpeg' OR
480
- post_mime_type = 'image/jpg' OR
481
- post_mime_type = 'image/png' OR
482
- post_mime_type = 'image/gif' )
483
- " );
484
- $issues = array();
485
- foreach ( $postids as $id ) {
486
- $info = $this->retina_info( $id );
487
- if ( $this->info_has_issues( $info ) )
488
- array_push( $issues, $id );
489
-
490
- }
491
- //set_transient( 'wr2x_ignores', array() );
492
- set_transient( 'wr2x_issues', $issues );
493
- }
494
-
495
- function calculate_issues_by_search($search) {
496
- global $wpdb;
497
- $postids = $wpdb->get_col($wpdb->prepare( "
498
- SELECT p.ID FROM $wpdb->posts p
499
- WHERE post_status = 'inherit'
500
- AND p.post_title LIKE %s
501
- AND post_type = 'attachment'" . $this->create_sql_if_wpml_original() . "
502
- AND ( post_mime_type = 'image/jpeg' OR
503
- post_mime_type = 'image/jpg' OR
504
- post_mime_type = 'image/png' OR
505
- post_mime_type = 'image/gif' )
506
- ", ( '%' . $search . '%' )));
507
- $issues = array();
508
- foreach ( $postids as $id ) {
509
- $info = $this->retina_info( $id );
510
- if ( $this->info_has_issues( $info ) )
511
- array_push( $issues, $id );
512
-
513
- }
514
- return $issues;
515
- }
516
-
517
- function add_issue( $attachmentId ) {
518
- if ( $this->is_ignore( $attachmentId ) )
519
- return;
520
- $issues = $this->get_issues();
521
- if ( !in_array( $attachmentId, $issues ) ) {
522
- array_push( $issues, $attachmentId );
523
- set_transient( 'wr2x_issues', $issues );
524
- }
525
- return $issues;
526
- }
527
-
528
- function remove_issue( $attachmentId, $onlyIgnore = false ) {
529
- $issues = array_diff( $this->get_issues(), array( $attachmentId ) );
530
- set_transient( 'wr2x_issues', $issues );
531
- if ( !$onlyIgnore )
532
- $this->remove_ignore( $attachmentId );
533
- return $issues;
534
- }
535
-
536
- // IGNORE
537
-
538
- function calculate_ignores_by_search($search) {
539
- $ids = get_transient( 'wr2x_ignores' );
540
- if ( !$ids || !is_array( $ids ) ) {
541
- return [];
542
- }
543
- global $wpdb;
544
- $placeholders = implode(',', array_fill(0, count($ids), '%s'));
545
- $ignores = $wpdb->get_col($wpdb->prepare( "
546
- SELECT p.ID FROM $wpdb->posts p
547
- WHERE ID IN ($placeholders)
548
- AND p.post_title LIKE %s
549
- ", array_merge($ids, ['%' . $search . '%'])));
550
- return $ignores;
551
- }
552
-
553
- function get_ignores($search = '') {
554
- if ($search) {
555
- return $this->calculate_ignores_by_search($search);
556
- }
557
- $ignores = get_transient( 'wr2x_ignores' );
558
- if ( !$ignores || !is_array( $ignores ) ) {
559
- $ignores = array();
560
- set_transient( 'wr2x_ignores', $ignores );
561
- }
562
- return $ignores;
563
- }
564
-
565
- function is_ignore( $attachmentId ) {
566
- $ignores = $this->get_ignores();
567
- return in_array( $attachmentId, $ignores );
568
- }
569
-
570
- function remove_ignore( $attachmentId ) {
571
- $ignores = $this->get_ignores();
572
- $ignores = array_diff( $ignores, array( $attachmentId ) );
573
- set_transient( 'wr2x_ignores', $ignores );
574
- return $ignores;
575
- }
576
-
577
- function add_ignore( $attachmentId ) {
578
- $ignores = $this->get_ignores();
579
- if ( !in_array( $attachmentId, $ignores ) ) {
580
- array_push( $ignores, $attachmentId );
581
- set_transient( 'wr2x_ignores', $ignores );
582
- }
583
- $this->remove_issue( $attachmentId, true );
584
- return $ignores;
585
- }
586
-
587
- /**
588
- *
589
- * GET DETAILS / INFO
590
- *
591
- */
592
-
593
- // Get the information about a specific Media (usually for the Retina Dashboard)
594
- function get_media_status_one( $mediaId ) {
595
- $mediaId = (int)$mediaId;
596
- $entry = new stdClass();
597
- $entry->ID = $mediaId;
598
- $entry->post_title = get_the_title( $mediaId );
599
- $entry->metadata = wp_get_attachment_metadata( $mediaId, true );
600
- $entry->info = $this->retina_info( $mediaId, ARRAY_A );
601
- $entry->thumbnail_url = wp_get_attachment_thumb_url( $mediaId );
602
- $attached_file = get_attached_file( $mediaId );
603
- $entry->filesize = $attached_file ? size_format( filesize( $attached_file ), 2 ) : 0;
604
- $version = get_post_meta( $mediaId, '_media_version', true );
605
- $entry->version = (int)$version;
606
- return $entry;
607
- }
608
-
609
- function html_get_basic_retina_info_full( $attachmentId, $retina_info ) {
610
- $status = ( isset( $retina_info ) && isset( $retina_info['full-size'] ) ) ? $retina_info['full-size'] : 'IGNORED';
611
- if ( $status == 'EXISTS' ) {
612
- return '<ul class="meow-sized-images"><li class="meow-bk-blue" title="full-size"></li></ul>';
613
- }
614
- else if ( is_array( $status ) ) {
615
- return '<ul class="meow-sized-images"><li class="meow-bk-orange" title="full-size"></li></ul>';
616
- }
617
- else if ( $status == 'IGNORED' ) {
618
- return __( "N/A", "wp-retina-2x" );
619
- }
620
- return $status;
621
- }
622
-
623
- function format_title( $i, $size ) {
624
- return $i . ' (' . ( $size['width'] * 2 ) . 'x' . ( $size['height'] * 2 ) . ')';
625
- }
626
-
627
- static function size_shortname( $name ) {
628
- if ( $name === 'thumbnail' ) {
629
- return 'T';
630
- }
631
- else if ( $name === 'medium' ) {
632
- return 'M';
633
- }
634
- else if ( $name === 'medium_large' ) {
635
- return 'ML';
636
- }
637
- else if ( $name === 'large' ) {
638
- return 'L';
639
- }
640
- else if ( $name === '1536x1536' ) {
641
- return 'W1';
642
- }
643
- else if ( $name === '2048x2048' ) {
644
- return 'W2';
645
- }
646
- else if ( $name === 'post-thumbnail' ) {
647
- return 'PT';
648
- }
649
- $name = preg_split( '[_-]', $name );
650
- $short = strtoupper( substr( $name[0], 0, 2 ) );
651
- if ( count( $name ) > 1 )
652
- $short .= strtoupper( substr( $name[1], 0, 2 ) );
653
-
654
- return $short;
655
- }
656
-
657
- // Information for the 'Media Sizes Retina-ized' Column in the Retina Dashboard
658
- function html_get_basic_retina_info( $attachmentId, $retina_info ) {
659
- $sizes = $this->get_active_image_sizes();
660
- $result = '<ul class="meow-sized-images" postid="' . ( is_integer( $attachmentId ) ? $attachmentId : $attachmentId->ID ) . '">';
661
- foreach ( $sizes as $i => $size ) {
662
- $status = ( isset( $retina_info ) && isset( $retina_info[$i] ) ) ? $retina_info[$i] : null;
663
- if ( is_array( $status ) )
664
- $result .= '<li class="meow-bk-red" title="' . $this->format_title( $i, $size ) . '">'
665
- . self::size_shortname( $i ) . '</li>';
666
- else if ( $status == 'EXISTS' )
667
- $result .= '<li class="meow-bk-blue" title="' . $this->format_title( $i, $size ) . '">'
668
- . self::size_shortname( $i ) . '</li>';
669
- else if ( $status == 'PENDING' )
670
- $result .= '<li class="meow-bk-orange" title="' . $this->format_title( $i, $size ) . '">'
671
- . self::size_shortname( $i ) . '</li>';
672
- else if ( $status == 'MISSING' )
673
- $result .= '<li class="meow-bk-red" title="' . $this->format_title( $i, $size ) . '">'
674
- . self::size_shortname( $i ) . '</li>';
675
- else if ( $status == 'IGNORED' )
676
- $result .= '<li class="meow-bk-gray" title="' . $this->format_title( $i, $size ) . '">'
677
- . self::size_shortname( $i ) . '</li>';
678
- else {
679
- error_log( "Retina: This status is not recognized: " . $status );
680
- }
681
- }
682
- $result .= '</ul>';
683
- return $result;
684
- }
685
-
686
- // Information for Details in the Retina Dashboard
687
- function html_get_details_retina_info( $post, $retina_info ) {
688
- if ( !class_exists( 'MeowPro_WR2X_Core' ) ) {
689
- return __( "PRO VERSION ONLY", 'wp-retina-2x' );
690
- }
691
-
692
- $sizes = $this->get_image_sizes();
693
- $total = 0; $possible = 0; $issue = 0; $ignored = 0; $retina = 0;
694
-
695
- $postinfo = get_post( $post, OBJECT );
696
- $meta = wp_get_attachment_metadata( $post );
697
- $fullsize_file = get_attached_file( $post );
698
- $pathinfo_system = pathinfo( $fullsize_file );
699
- $pathinfo = pathinfo( $meta['file'] );
700
- $uploads = wp_upload_dir();
701
- $basepath_url = trailingslashit( $uploads['baseurl'] ) . $pathinfo['dirname'];
702
- if ( get_option( "wr2x_full_size" ) ) {
703
- $sizes['full-size']['file'] = $pathinfo['basename'];
704
- $sizes['full-size']['width'] = $meta['width'];
705
- $sizes['full-size']['height'] = $meta['height'];
706
- $meta['sizes']['full-size']['file'] = $pathinfo['basename'];
707
- $meta['sizes']['full-size']['width'] = $meta['width'];
708
- $meta['sizes']['full-size']['height'] = $meta['height'];
709
- }
710
- $result = "<p>This screen displays all the image sizes set-up by your WordPress configuration with the Retina details.</p>";
711
- $result .= "<br /><a target='_blank' href='" . trailingslashit( $uploads['baseurl'] ) . $meta['file'] . "'><img src='" . trailingslashit( $uploads['baseurl'] ) . $meta['file'] . "' height='100px' style='float: left; margin-right: 10px;' /></a><div class='base-info'>";
712
- $result .= "Title: <b>" . ( $postinfo->post_title ? $postinfo->post_title : '<i>Untitled</i>' ) . "</b><br />";
713
- $result .= "Full-size: <b>" . $meta['width'] . "×" . $meta['height'] . "</b><br />";
714
- $result .= "Image URL: <a target='_blank' href='" . trailingslashit( $uploads['baseurl'] ) . $meta['file'] . "'>" . trailingslashit( $uploads['baseurl'] ) . $meta['file'] . "</a><br />";
715
- $result .= "Image Path: " . $fullsize_file . "<br />";
716
- $result .= "</div><div style='clear: both;'></div><br />";
717
- $result .= "<div class='scrollable-info'>";
718
-
719
- foreach ( $sizes as $i => $sizemeta ) {
720
- $total++;
721
- $normal_file_system = ""; $retina_file_system = "";
722
- $normal_file = ""; $retina_file = ""; $width = ""; $height = "";
723
-
724
- if ( isset( $retina_info[$i] ) && $retina_info[$i] == 'IGNORED' ) {
725
- $status = "IGNORED";
726
- }
727
- else if ( !isset( $meta['sizes'] ) ) {
728
- $statusText = __( "The metadata is broken! This is not related to the retina plugin. You should probably use a plugin to re-generate the missing metadata and images.", 'wp-retina-2x' );
729
- $status = "MISSING";
730
- }
731
- else if ( !isset( $meta['sizes'][$i] ) ) {
732
- $statusText = sprintf( __( "The image size '%s' could not be found. You probably changed your image sizes but this specific image was not re-build. This is not related to the retina plugin. You should probably use a plugin to re-generate the missing metadata and images.", 'wp-retina-2x' ), $i );
733
- $status = "MISSING";
734
- }
735
- else {
736
- $normal_file_system = trailingslashit( $pathinfo_system['dirname'] ) . $meta['sizes'][$i]['file'];
737
- $retina_file_system = $this->get_retina( $normal_file_system );
738
- $normal_file = trailingslashit( $basepath_url ) . $meta['sizes'][$i]['file'];
739
- $retina_file = $this->get_retina_from_url( $normal_file );
740
- $status = ( isset( $retina_info ) && isset( $retina_info[$i] ) ) ? $retina_info[$i] : null;
741
- $width = $meta['sizes'][$i]['width'];
742
- $height = $meta['sizes'][$i]['height'];
743
- }
744
-
745
- $result .= "<h3>";
746
-
747
- // Status Icon
748
- if ( is_array( $status ) && $i == 'full-size' ) {
749
- $result .= '<div class="meow-sized-image meow-bk-red"></div>';
750
- $statusText = sprintf( __( "The retina version of the Full-Size image is missing.<br />Full Size Retina has been checked in the Settings and this image is therefore required.<br />Please drag & drop an image of at least <b>%dx%d</b> in the <b>Full-Size Retina Upload</b> column.", 'wp-retina-2x' ), $status['width'], $status['height'] );
751
- }
752
- else if ( is_array( $status ) ) {
753
- $result .= '<div class="meow-sized-image meow-bk-red"></div>';
754
- $statusText = sprintf( __( "The Full-Size image is too small (<b>%dx%d</b>) and this size cannot be generated.<br />Please upload an image of at least <b>%dx%d</b>.", 'wp-retina-2x' ), $meta['width'], $meta['height'], $status['width'], $status['height'] );
755
- $issue++;
756
- }
757
- else if ( $status == 'EXISTS' ) {
758
- $result .= '<div class="meow-sized-image meow-bk-blue"></div>';
759
- $statusText = "";
760
- $retina++;
761
- }
762
- else if ( $status == 'PENDING' ) {
763
- $result .= '<div class="meow-sized-image meow-bk-orange"></div>';
764
- $statusText = __( "The retina image can be created. Please use the 'GENERATE' button.", 'wp-retina-2x' );
765
- $possible++;
766
- }
767
- else if ( $status == 'MISSING' ) {
768
- $result .= '<div class="meow-sized-image meow-bk-gray"></div>';
769
- $statusText = __( "The standard image normally created by WordPress is missing.", 'wp-retina-2x' );
770
- $total--;
771
- }
772
- else if ( $status == 'IGNORED' ) {
773
- $result .= '<div class="meow-sized-image meow-bk-gray"></div>';
774
- $statusText = __( "This size is ignored by your retina settings.", 'wp-retina-2x' );
775
- $ignored++;
776
- $total--;
777
- }
778
-
779
- $result .= "&nbsp;Size: $i</h3><p>$statusText</p>";
780
-
781
- if ( !is_array( $status ) && $status !== 'IGNORED' && $status !== 'MISSING' ) {
782
- $result .= "<table><tr><th>Normal (" . $width . "×" . $height. ")</th><th>Retina 2x (" . $width * 2 . "×" . $height * 2 . ")</th></tr><tr><td><a target='_blank' href='$normal_file'><img src='$normal_file' width='100'></a></td><td><a target='_blank' href='$retina_file'><img src='$retina_file' width='100'></a></td></tr></table>";
783
- $result .= "<p><small>";
784
- $result .= "Image URL: <a target='_blank' href='$normal_file'>$normal_file</a><br />";
785
- $result .= "Retina URL: <a target='_blank' href='$retina_file'>$retina_file</a><br />";
786
- $result .= "Image Path: $normal_file_system<br />";
787
- $result .= "Retina Path: $retina_file_system<br />";
788
- $result .= "</small></p>";
789
- }
790
- }
791
- $result .= "</table>";
792
- $result .= "</div>";
793
- return $result;
794
- }
795
-
796
- /**
797
- *
798
- * WP RETINA 2X CORE
799
- *
800
- */
801
-
802
- // Get WordPress upload directory
803
- function get_upload_root() {
804
- $uploads = wp_upload_dir();
805
- return $uploads['basedir'];
806
- }
807
-
808
- function get_upload_root_url() {
809
- $uploads = wp_upload_dir();
810
- return $uploads['baseurl'];
811
- }
812
-
813
- // Get WordPress directory
814
- function get_wordpress_root() {
815
- return ABSPATH;
816
- }
817
-
818
- // Resize the image
819
- function resize( $file_path, $width, $height, $crop, $newfile, $customCrop = false ) {
820
- $crop_params = $crop == '1' ? true : $crop;
821
- $orig_size = getimagesize( $file_path );
822
- $image_src = array ();
823
- $image_src[0] = $file_path;
824
- $image_src[1] = $orig_size[0];
825
- $image_src[2] = $orig_size[1];
826
- $file_info = pathinfo( $file_path );
827
- $newfile_info = pathinfo( $newfile );
828
- $extension = '.' . $newfile_info['extension'];
829
- $no_ext_path = $file_info['dirname'] . '/' . $file_info['filename'];
830
- $cropped_img_path = $no_ext_path . '-' . $width . 'x' . $height . "-tmp" . $extension;
831
- $image = wp_get_image_editor( $file_path );
832
-
833
- if ( is_wp_error( $image ) ) {
834
- $this->log( "Resize failure: " . $image->get_error_message() );
835
- error_log( "Resize failure: " . $image->get_error_message() );
836
- return null;
837
- }
838
-
839
- // Resize or use Custom Crop
840
- if ( !$customCrop )
841
- $image->resize( $width, $height, $crop_params );
842
- else
843
- $image->crop( $customCrop['x'] * $customCrop['scale'], $customCrop['y'] * $customCrop['scale'], $customCrop['w'] * $customCrop['scale'], $customCrop['h'] * $customCrop['scale'], $width, $height, false );
844
-
845
- // Quality
846
- $quality = get_option( 'wr2x_quality' );
847
- if ( empty( $quality ) ) {
848
- $quality = apply_filters( 'jpeg_quality', 75 );
849
- }
850
- $image->set_quality( $quality );
851
-
852
- $saved = $image->save( $cropped_img_path );
853
- if ( is_wp_error( $saved ) ) {
854
- $error = $saved->get_error_message();
855
- trigger_error( "Retina: Could not create/resize image " . $file_path . " to " . $newfile . ": " . $error , E_WARNING );
856
- error_log( "Retina: Could not create/resize image " . $file_path . " to " . $newfile . ":" . $error );
857
- return null;
858
- }
859
- if ( rename( $saved['path'], $newfile ) )
860
- $cropped_img_path = $newfile;
861
- else {
862
- trigger_error( "Retina: Could not move " . $saved['path'] . " to " . $newfile . "." , E_WARNING );
863
- error_log( "Retina: Could not move " . $saved['path'] . " to " . $newfile . "." );
864
- return null;
865
- }
866
- $new_img_size = getimagesize( $cropped_img_path );
867
- $new_img = str_replace( basename( $image_src[0] ), basename( $cropped_img_path ), $image_src[0] );
868
- $vt_image = array ( 'url' => $new_img, 'width' => $new_img_size[0], 'height' => $new_img_size[1] );
869
- return $vt_image;
870
- }
871
-
872
- // Return the retina file if there is any (system path)
873
- function get_retina( $file ) {
874
- $pathinfo = pathinfo( $file ) ;
875
- if ( empty( $pathinfo ) || !isset( $pathinfo['dirname'] ) ) {
876
- if ( empty( $file ) ) {
877
- $this->log( "An empty filename was given to $this->get_retina()." );
878
- error_log( "An empty filename was given to $this->get_retina()." );
879
- }
880
- else {
881
- $this->log( "Pathinfo is null for " . $file . "." );
882
- error_log( "Pathinfo is null for " . $file . "." );
883
- }
884
- return null;
885
- }
886
- $retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] .
887
- $this->retina_extension() . ( isset( $pathinfo['extension'] ) ? $pathinfo['extension'] : "" );
888
- if ( file_exists( $retina_file ) )
889
- return $retina_file;
890
- $this->log( "Retina file at '{$retina_file}' does not exist." );
891
- return null;
892
- }
893
-
894
- function get_retina_from_remote_url( $url ) {
895
- $over_http = get_option( 'wr2x_over_http_check', false ) && class_exists( 'MeowPro_WR2X_Core' );
896
- if ( !$over_http )
897
- return null;
898
- $potential_retina_url = $this->rewrite_url_to_retina( $url );
899
- $response = wp_remote_head( $potential_retina_url, array(
900
- 'user-agent' => "MeowApps-Retina",
901
- 'sslverify' => false,
902
- 'timeout' => 10
903
- ));
904
- if ( is_array( $response ) && is_array( $response['response'] ) && isset( $response['response']['code'] ) ) {
905
- if ( $response['response']['code'] == 200 ) {
906
- $this->log( "Retina URL: " . $potential_retina_url, true);
907
- return $potential_retina_url;
908
- }
909
- else
910
- $this->log( "Remote head failed with code " . $response['response']['code'] . "." );
911
- }
912
- $this->log( "Retina URL couldn't be found (URL -> Retina URL).", true);
913
- }
914
-
915
- // Return retina URL from the image URL
916
- function get_retina_from_url( $url ) {
917
- $this->log( "Standard URL: " . $url, true);
918
- $over_http = get_option( 'wr2x_over_http_check', false ) && class_exists( 'MeowPro_WR2X_Core' );
919
- $filepath = $this->from_url_to_system( $url );
920
- if ( empty ( $filepath ) )
921
- return $this->get_retina_from_remote_url( $url );
922
- $this->log( "Standard PATH: " . $filepath, true);
923
- $system_retina = $this->get_retina( $filepath );
924
- if ( empty ( $system_retina ) )
925
- return $this->get_retina_from_remote_url( $url );
926
- $this->log( "Retina PATH: " . $system_retina, true);
927
- $retina_url = $this->rewrite_url_to_retina( $url );
928
- $this->log( "Retina URL: " . $retina_url, true);
929
- return $retina_url;
930
- }
931
-
932
- // Get the filepath from the URL
933
- function from_url_to_system( $url ) {
934
- $img_pathinfo = $this->get_pathinfo_from_image_src( $url );
935
- $filepath = trailingslashit( $this->get_wordpress_root() ) . $img_pathinfo;
936
- if ( file_exists( $filepath ) )
937
- return $filepath;
938
- $filepath = trailingslashit( $this->get_upload_root() ) . $img_pathinfo;
939
- if ( file_exists( $filepath ) )
940
- return $filepath;
941
- $this->log( "Standard PATH couldn't be found (URL -> System).", true);
942
- return null;
943
- }
944
-
945
- function rewrite_url_to_retina( $url ) {
946
- $whereisdot = strrpos( $url, '.' );
947
- $url = substr( $url, 0, $whereisdot ) . $this->retina_extension() . substr( $url, $whereisdot + 1 );
948
- return $url;
949
- }
950
-
951
- // Clean the PathInfo of the IMG SRC.
952
- // IMPORTANT: This function STRIPS THE UPLOAD FOLDER if it's found
953
- // REASON: The reason is that on some installs the uploads folder is linked to a different "unlogical" physical folder
954
- // http://wordpress.org/support/topic/cant-find-retina-file-with-custom-uploads-constant?replies=3#post-5078892
955
- function get_pathinfo_from_image_src( $image_src ) {
956
- $uploads_url = trailingslashit( $this->get_upload_root_url() );
957
- if ( strpos( $image_src, $uploads_url ) === 0 ){
958
- return ltrim( substr( $image_src, strlen( $uploads_url ) ), '/');
959
- }
960
- else if ( strpos( $image_src, wp_make_link_relative( $uploads_url ) ) === 0 ){
961
- return ltrim( substr( $image_src, strlen( wp_make_link_relative( $uploads_url ) ) ), '/');
962
- }
963
- $img_info = parse_url( $image_src );
964
- // The fix multisite is proposed by Emile
965
- // (https://secure.helpscout.net/conversation/1420887033/6577?folderId=1781329)
966
- return ltrim( $this->fix_multisite($img_info['path']), '/' );
967
- }
968
-
969
- function fix_multisite( $path ){
970
- if ( !is_multisite() ) {
971
- return $path;
972
- }
973
- $current_blog = get_blog_details()->path;
974
- return '/' . str_replace( $current_blog, '', $path );
975
- }
976
-
977
- // Rename this filename with CDN
978
- function cdn_this( $url, $mediaId = null ) {
979
-
980
- $cdn_domain = "";
981
- $cdn_params = array();
982
- $wr2x_easyio_domain = get_option( 'wr2x_easyio_domain', '' );
983
- $wr2x_cdn_domain = get_option( 'wr2x_cdn_domain', '' );
984
-
985
- // CDN Domain
986
- if ( !empty( $wr2x_easyio_domain ) ) {
987
- $cdn_domain = "${wr2x_easyio_domain}";
988
- if ( get_option( 'wr2x_easyio_lossless', false ) ) {
989
- $cdn_params['lossy'] = 0;
990
- }
991
- }
992
- else if ( !empty( $wr2x_cdn_domain ) ) {
993
- $cdn_domain = $wr2x_cdn_domain;
994
- }
995
- else {
996
- return $url;
997
- }
998
-
999
- // Version
1000
- if ( !empty( $mediaId ) ) {
1001
- $version = get_post_meta( $mediaId, '_media_version', true );
1002
- if ( $version ) {
1003
- $cdn_params['version'] = $version;
1004
- }
1005
- }
1006
-
1007
- $home_url = parse_url( home_url() );
1008
- $uploads_url = trailingslashit( $this->get_upload_root_url() );
1009
- $uploads_url_cdn = str_replace( $home_url['host'], $cdn_domain, $uploads_url );
1010
-
1011
- // Perform additional CDN check (Issue #1631 by Martin)
1012
- if ( strpos( $url, $uploads_url_cdn ) === 0 ) {
1013
- $this->log( "URL already has CDN: $url" );
1014
- return $url;
1015
- }
1016
- $this->log( "URL before CDN: $url" );
1017
- $queryUrl = !empty( $cdn_params ) ? ( '?' . http_build_query( $cdn_params ) ) : '';
1018
- $site_url = preg_replace( '#^https?://#', '', rtrim( get_site_url(), '/' ) );
1019
- $new_url = str_replace( $site_url, $cdn_domain, $url ) . $queryUrl;
1020
- $this->log( "URL with CDN: $new_url" );
1021
- return $new_url;
1022
- }
1023
-
1024
- // function admin_menu() {
1025
- // add_options_page( 'Retina', 'Retina', 'manage_options', 'wr2x_settings', 'wr2x_settings_page' );
1026
- // }
1027
-
1028
- function get_image_sizes( $output_type = OBJECT ) {
1029
- $sizes = array();
1030
-
1031
- global $_wp_additional_image_sizes;
1032
- foreach ( get_intermediate_image_sizes() as $s ) {
1033
-
1034
- // Get the information
1035
- $crop = false;
1036
- if ( isset( $_wp_additional_image_sizes[$s] ) ) {
1037
- $width = intval( $_wp_additional_image_sizes[$s]['width'] );
1038
- $height = intval( $_wp_additional_image_sizes[$s]['height'] );
1039
- $crop = $_wp_additional_image_sizes[$s]['crop'];
1040
- }
1041
- else {
1042
- $width = intval( get_option( $s . '_size_w' ) );
1043
- $height = intval( get_option( $s . '_size_h' ) );
1044
- $crop = intval( get_option( $s . '_crop' ) );
1045
- }
1046
-
1047
- // Retina shouldn't be active if the size is disabled
1048
- $enabled = !in_array( $s, $this->disabled_sizes );
1049
- $retina = in_array( $s, $this->retina_sizes );
1050
- if ( !$enabled && $retina ) {
1051
- $this->retina_sizes = array_diff( $this->retina_sizes, array( $s ) );
1052
- update_option( 'wr2x_retina_sizes', $this->retina_sizes );
1053
- $retina = false;
1054
- }
1055
-
1056
- $sizes[$s] = array(
1057
- 'width' => $width,
1058
- 'height' => $height,
1059
- 'crop' => $crop,
1060
- 'enabled' => $enabled,
1061
- 'retina' => $retina,
1062
- 'name' => $s,
1063
- 'shortname' => Meow_WR2X_Core::size_shortname( $s )
1064
- );
1065
- }
1066
-
1067
- // Let's re-add the disabled sizes
1068
- $disabled_to_add = array();
1069
- foreach ( $this->disabled_sizes as $size ) {
1070
- $retina = in_array( $size, $this->retina_sizes );
1071
- if ( $retina ) {
1072
- $retina_sizes = array_diff( $this->retina_sizes, array( $size ) );
1073
- update_option( 'wr2x_retina_sizes', $retina_sizes );
1074
- }
1075
- if ( !array_key_exists( $size, $sizes ) ) {
1076
- $disabled_to_add[$size] = array(
1077
- 'enabled' => false,
1078
- 'retina' => false,
1079
- 'name' => $size,
1080
- 'shortname' => Meow_WR2X_Core::size_shortname( $size )
1081
- );
1082
- }
1083
- }
1084
-
1085
- usort( $disabled_to_add, array( $this, 'sizes_sort_func' ) );
1086
- $sizes = array_merge( $sizes, $disabled_to_add );
1087
-
1088
- // if ( get_option( 'wr2x_disable_medium_large' ) )
1089
- // unset( $sizes['medium_large'] );
1090
- if ( $output_type === ARRAY_A ) {
1091
- return array_values( $sizes );
1092
- }
1093
-
1094
- return $sizes;
1095
- }
1096
-
1097
- function sizes_sort_func( $a, $b ) {
1098
- return strncmp( $a['shortname'], $b['shortname'], 10 );
1099
- }
1100
-
1101
- function get_active_image_sizes() {
1102
- $sizes = $this->get_image_sizes();
1103
- $active_sizes = array();
1104
- // $ignore = get_option( "wr2x_ignore_sizes", array() );
1105
- // if ( empty( $ignore ) )
1106
- // $ignore = array();
1107
- // $ignore = array_keys( $ignore );
1108
- foreach ( $sizes as $name => $attr ) {
1109
- $validSize = !empty( $attr['width'] ) || !empty( $attr['height'] );
1110
- if ( $validSize && $attr['retina'] ) {
1111
- $active_sizes[$name] = $attr;
1112
- }
1113
- }
1114
- return $active_sizes;
1115
- }
1116
-
1117
- function is_wpml_installed() {
1118
- return function_exists( 'icl_object_id' ) && !class_exists( 'Polylang' );
1119
- }
1120
-
1121
- // SQL Query if WPML with an AND to check if the p.ID (p is attachment) is indeed an original
1122
- // That is to limit the SQL that queries all the attachments
1123
- function create_sql_if_wpml_original() {
1124
- $whereIsOriginal = "";
1125
- if ( $this->is_wpml_installed() ) {
1126
- global $wpdb;
1127
- global $sitepress;
1128
- $tbl_wpml = $wpdb->prefix . "icl_translations";
1129
- $language = $sitepress->get_default_language();
1130
- $whereIsOriginal = " AND p.ID IN (SELECT element_id FROM $tbl_wpml WHERE element_type = 'post_attachment' AND language_code = '$language') ";
1131
- }
1132
- return $whereIsOriginal;
1133
- }
1134
-
1135
- function increase_media_version( $mediaId ) {
1136
- $version = get_post_meta( $mediaId, '_media_version', true );
1137
- $version = $version ? intval( $version ) + 1 : 2;
1138
- update_post_meta( $mediaId, '_media_version', $version );
1139
- return $version;
1140
- }
1141
-
1142
- function is_debug() {
1143
- static $debug = -1;
1144
- if ( $debug == -1 ) {
1145
- $debug = get_option( "wr2x_debug" );
1146
- }
1147
- return !!$debug;
1148
- }
1149
-
1150
- function log( $data, $isExtra = false ) {
1151
- if ( !$this->is_debug() )
1152
- return;
1153
- $fh = fopen( trailingslashit( dirname(__FILE__) ) . 'wp-retina-2x.log', 'a' );
1154
- $date = date( "Y-m-d H:i:s" );
1155
- fwrite( $fh, "$date: {$data}\n" );
1156
- fclose( $fh );
1157
- }
1158
-
1159
- // Based on http://wordpress.stackexchange.com/questions/6645/turn-a-url-into-an-attachment-post-id
1160
- function get_attachment_id( $file ) {
1161
- $query = array(
1162
- 'post_type' => 'attachment',
1163
- 'meta_query' => array(
1164
- array(
1165
- 'key' => '_wp_attached_file',
1166
- 'value' => ltrim( $file, '/' )
1167
- )
1168
- )
1169
- );
1170
- $posts = get_posts( $query );
1171
- foreach( $posts as $post )
1172
- return $post->ID;
1173
- return false;
1174
- }
1175
-
1176
- // Return the retina extension followed by a dot
1177
- function retina_extension() {
1178
- return '@2x.';
1179
- }
1180
-
1181
- function is_image_meta( $meta ) {
1182
- if ( !isset( $meta ) )
1183
- return false;
1184
- if ( !isset( $meta['sizes'] ) )
1185
- return false;
1186
- if ( !isset( $meta['width'], $meta['height'] ) )
1187
- return false;
1188
- return true;
1189
- }
1190
-
1191
- // Adds the shortname to the metadata
1192
- function postprocess_metadata( $metadata ) {
1193
- if ( !empty( $metadata['sizes'] ) ) {
1194
- foreach ( $metadata['sizes'] as $key => $value ) {
1195
- $metadata['sizes'][$key]['shortname'] = self::size_shortname( $key );
1196
- }
1197
- }
1198
- return $metadata;
1199
- }
1200
-
1201
- function retina_info( $id, $output_type = OBJECT ) {
1202
- $result = array();
1203
- $meta = wp_get_attachment_metadata( $id );
1204
- if ( !$this->is_image_meta( $meta ) )
1205
- return $result;
1206
- $original_width = $meta['width'];
1207
- $original_height = $meta['height'];
1208
- $sizes = $this->get_image_sizes();
1209
- $originalfile = get_attached_file( $id );
1210
- $pathinfo_fullsize = pathinfo( $originalfile );
1211
- $basepath = $pathinfo_fullsize['dirname'];
1212
-
1213
- // Image Sizes
1214
- if ( $sizes ) {
1215
- foreach ( $sizes as $name => $attr ) {
1216
- $validSize = !empty( $attr['width'] ) || !empty( $attr['height'] );
1217
- if ( !$validSize || !$attr['retina'] ) {
1218
- $result[$name] = 'IGNORED';
1219
- continue;
1220
- }
1221
- // Check if the file related to this size is present
1222
- $pathinfo = null;
1223
- $retina_file = null;
1224
-
1225
- if ( isset( $meta['sizes'][$name]['width'] ) && isset( $meta['sizes'][$name]['height']) && isset($meta['sizes'][$name]) && isset($meta['sizes'][$name]['file']) && file_exists( trailingslashit( $basepath ) . $meta['sizes'][$name]['file'] ) ) {
1226
- $normal_file = trailingslashit( $basepath ) . $meta['sizes'][$name]['file'];
1227
- $pathinfo = pathinfo( $normal_file ) ;
1228
- $retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->retina_extension() . $pathinfo['extension'];
1229
- }
1230
- // None of the file exist
1231
- else {
1232
- $result[$name] = 'MISSING';
1233
- continue;
1234
- }
1235
-
1236
- // The retina file exists
1237
- if ( $retina_file && file_exists( $retina_file ) ) {
1238
- $result[$name] = 'EXISTS';
1239
- continue;
1240
- }
1241
- // The size file exists
1242
- else if ( $retina_file )
1243
- $result[$name] = 'PENDING';
1244
-
1245
- // The retina file exists
1246
- $required_width = $meta['sizes'][$name]['width'] * 2;
1247
- $required_height = $meta['sizes'][$name]['height'] * 2;
1248
- if ( !$this->are_dimensions_ok( $original_width, $original_height, $required_width, $required_height ) ) {
1249
- $result[$name] = array( 'width' => $required_width, 'height' => $required_height );
1250
- }
1251
- }
1252
- }
1253
-
1254
- // Full-Size (if required in the settings)
1255
- $fullsize_required = get_option( "wr2x_full_size" ) && class_exists( 'MeowPro_WR2X_Core' );
1256
- $retina_file = trailingslashit( $pathinfo_fullsize['dirname'] ) . $pathinfo_fullsize['filename'] .
1257
- $this->retina_extension() . $pathinfo_fullsize['extension'];
1258
- if ( $retina_file && file_exists( $retina_file ) )
1259
- $result['full-size'] = 'EXISTS';
1260
- else if ( $fullsize_required && $retina_file )
1261
- $result['full-size'] = array( 'width' => $original_width * 2, 'height' => $original_height * 2 );
1262
-
1263
- if ( $output_type === ARRAY_A ) {
1264
- $new_results = array();
1265
- foreach ( $result as $key => $value ) {
1266
- array_push( $new_results, array(
1267
- 'name' => $key,
1268
- 'shortname' => self::size_shortname( $key ),
1269
- 'status' => is_array( $value ) ? 'CANNOT' : $value,
1270
- 'required' => is_array( $value ) ? $value : null
1271
- )
1272
- );
1273
- }
1274
- return $new_results;
1275
- }
1276
-
1277
- return $result;
1278
- }
1279
-
1280
- function delete_attachment( $attach_id, $deleteFullSize = true ) {
1281
- $meta = wp_get_attachment_metadata( $attach_id );
1282
- $this->delete_images( $meta, $deleteFullSize );
1283
- $this->remove_issue( $attach_id );
1284
- }
1285
-
1286
- function wp_generate_attachment_metadata( $meta ) {
1287
- if ( get_option( "wr2x_auto_generate" ) == true )
1288
- if ( $this->is_image_meta( $meta ) )
1289
- $this->generate_images( $meta );
1290
- return $meta;
1291
- }
1292
-
1293
- /**
1294
- * @param mixed[] $meta
1295
- * int width
1296
- * int height
1297
- * string file
1298
- * mixed[][] sizes
1299
- */
1300
- function generate_images( $meta ) {
1301
- global $_wp_additional_image_sizes;
1302
- $sizes = $this->get_image_sizes();
1303
- if ( !isset( $meta['file'] ) ) return;
1304
-
1305
- $uploads = wp_upload_dir();
1306
-
1307
- // Check if the full-size-retina version of the generation source exists.
1308
- // If it exists, replace the file path and its dimensions
1309
- if ( $retina = $this->get_retina( $uploads['basedir'] . '/' . $meta['file'] ) ) {
1310
- $meta['file'] = substr( $retina, strlen( $uploads['basedir'] ) + 1 );
1311
- $dim = getimagesize( $retina );
1312
- $meta['width'] = $dim[0];
1313
- $meta['height'] = $dim[1];
1314
- }
1315
-
1316
- $originalfile = $meta['file'];
1317
- $pathinfo = pathinfo( $originalfile );
1318
- $original_basename = $pathinfo['basename'];
1319
- $basepath = trailingslashit( $uploads['basedir'] ) . $pathinfo['dirname'];
1320
-
1321
- // $ignore = get_option( "wr2x_ignore_sizes" );
1322
- // if ( empty( $ignore ) )
1323
- // $ignore = array();
1324
- // $ignore = array_keys( $ignore );
1325
- $issue = false;
1326
- $id = $this->get_attachment_id( $meta['file'] );
1327
-
1328
- /**
1329
- * @param $id ID of the attachment whose retina image is to be generated
1330
- */
1331
- do_action( 'wr2x_before_generate_retina', $id );
1332
-
1333
- $this->log("* GENERATE RETINA FOR ATTACHMENT '{$meta['file']}'");
1334
- $this->log( "Full-Size is {$original_basename}." );
1335
-
1336
- foreach ( $sizes as $name => $attr ) {
1337
- $normal_file = "";
1338
- if ( !$attr['retina'] ) {
1339
- $this->log( "Retina for {$name} ignored (settings)." );
1340
- continue;
1341
- }
1342
- // Is the file related to this size there?
1343
- $pathinfo = null;
1344
- $retina_file = null;
1345
-
1346
- if ( isset( $meta['sizes'][$name] ) && isset( $meta['sizes'][$name]['file'] ) ) {
1347
- $normal_file = trailingslashit( $basepath ) . $meta['sizes'][$name]['file'];
1348
- $pathinfo = pathinfo( $normal_file ) ;
1349
- $retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->retina_extension() . $pathinfo['extension'];
1350
- }
1351
-
1352
- if ( $retina_file && file_exists( $retina_file ) ) {
1353
- $this->log( "Base for {$name} is '{$normal_file }'." );
1354
- $this->log( "Retina for {$name} already exists: '$retina_file'." );
1355
- continue;
1356
- }
1357
- if ( $retina_file ) {
1358
- $originalfile = trailingslashit( $pathinfo['dirname'] ) . $original_basename;
1359
-
1360
- if ( !file_exists( $originalfile ) ) {
1361
- $this->log( "[ERROR] Original file '{$originalfile}' cannot be found." );
1362
- return $meta;
1363
- }
1364
-
1365
- // Maybe that new image is exactly the size of the original image.
1366
- // In that case, let's make a copy of it.
1367
- if ( $meta['sizes'][$name]['width'] * 2 == $meta['width'] && $meta['sizes'][$name]['height'] * 2 == $meta['height'] ) {
1368
- copy ( $originalfile, $retina_file );
1369
- $this->log( "Retina for {$name} created: '{$retina_file}' (as a copy of the full-size)." );
1370
- }
1371
- // Otherwise let's resize (if the original size is big enough).
1372
- else if ( $this->are_dimensions_ok( $meta['width'], $meta['height'], $meta['sizes'][$name]['width'] * 2, $meta['sizes'][$name]['height'] * 2 ) ) {
1373
- // Change proposed by Nicscott01, slighlty modified by Jordy (+isset)
1374
- // (https://wordpress.org/support/topic/issue-with-crop-position?replies=4#post-6200271)
1375
- $crop = isset( $_wp_additional_image_sizes[$name] ) ? $_wp_additional_image_sizes[$name]['crop'] : true;
1376
- $customCrop = apply_filters( 'wr2x_custom_crop', null, $id, $name );
1377
-
1378
- // // Support for Manual Image Crop
1379
- // // If the size of the image was manually cropped, let's keep it.
1380
- // if ( class_exists( 'ManualImageCrop' ) && isset( $meta['micSelectedArea'] ) && isset( $meta['micSelectedArea'][$name] ) && isset( $meta['micSelectedArea'][$name]['scale'] ) ) {
1381
- // $customCrop = $meta['micSelectedArea'][$name];
1382
- // }
1383
-
1384
- $image = $this->resize( $originalfile, $meta['sizes'][$name]['width'] * 2,
1385
- $meta['sizes'][$name]['height'] * 2, $crop, $retina_file, $customCrop );
1386
- }
1387
- if ( !file_exists( $retina_file ) ) {
1388
- $is_ok = apply_filters( "wr2x_last_chance_generate", false, $id, $retina_file,
1389
- $meta['sizes'][$name]['width'] * 2, $meta['sizes'][$name]['height'] * 2 );
1390
- if ( !$is_ok ) {
1391
- $this->log( "[ERROR] Retina for {$name} could not be created. Full-Size is " . $meta['width'] . "x" . $meta['height'] . " but Retina requires a file of at least " . $meta['sizes'][$name]['width'] * 2 . "x" . $meta['sizes'][$name]['height'] * 2 . "." );
1392
- $issue = true;
1393
- }
1394
- }
1395
- else {
1396
- do_action( 'wr2x_retina_file_added', $id, $retina_file, $name );
1397
- $this->log( "Retina for {$name} created: '{$retina_file}'." );
1398
- }
1399
- } else {
1400
- if ( empty( $normal_file ) )
1401
- $this->log( "[ERROR] Base file for '{$name}' does not exist." );
1402
- else
1403
- $this->log( "[ERROR] Base file for '{$name}' cannot be found here: '{$normal_file}'." );
1404
- }
1405
- }
1406
-
1407
- // Checks attachment ID + issues
1408
- if ( !$id )
1409
- return $meta;
1410
- if ( $issue )
1411
- $this->add_issue( $id );
1412
- else
1413
- $this->remove_issue( $id );
1414
-
1415
- /**
1416
- * @param $id ID of the attachment whose retina image has been generated
1417
- */
1418
- do_action( 'wr2x_generate_retina', $id );
1419
-
1420
- return $meta;
1421
- }
1422
-
1423
- function delete_images( $meta, $deleteFullSize = false ) {
1424
- if ( !$this->is_image_meta( $meta ) )
1425
- return $meta;
1426
- $sizes = $meta['sizes'];
1427
- if ( !$sizes || !is_array( $sizes ) )
1428
- return $meta;
1429
- $this->log("* DELETE RETINA FOR ATTACHMENT '{$meta['file']}'");
1430
- $originalfile = $meta['file'];
1431
- $id = $this->get_attachment_id( $originalfile );
1432
- $pathinfo = pathinfo( $originalfile );
1433
- $uploads = wp_upload_dir();
1434
- $basepath = trailingslashit( $uploads['basedir'] ) . $pathinfo['dirname'];
1435
- foreach ( $sizes as $name => $attr ) {
1436
- $pathinfo = pathinfo( $attr['file'] );
1437
- $retina_file = $pathinfo['filename'] . $this->retina_extension() . $pathinfo['extension'];
1438
- if ( file_exists( trailingslashit( $basepath ) . $retina_file ) ) {
1439
- $fullpath = trailingslashit( $basepath ) . $retina_file;
1440
- unlink( $fullpath );
1441
- do_action( 'wr2x_retina_file_removed', $id, $retina_file );
1442
- $this->log("Deleted '$fullpath'.");
1443
- }
1444
- }
1445
- // Remove full-size if there is any
1446
- if ( $deleteFullSize ) {
1447
- $pathinfo = pathinfo( $originalfile );
1448
- $retina_file = $pathinfo[ 'filename' ] . $this->retina_extension() . $pathinfo[ 'extension' ];
1449
- if ( file_exists( trailingslashit( $basepath ) . $retina_file ) ) {
1450
- $fullpath = trailingslashit( $basepath ) . $retina_file;
1451
- unlink( $fullpath );
1452
- do_action( 'wr2x_retina_file_removed', $id, $retina_file );
1453
- $this->log( "Deleted '$fullpath'." );
1454
- }
1455
- }
1456
- return $meta;
1457
- }
1458
-
1459
- // This is called by functions in the REST API
1460
- // TODO: However, this function seems to be what delete_images does above,
1461
- // so maybe we could optimize and avoid code redundancy.
1462
- function delete_retina_fullsize( $mediaId ) {
1463
- $originalfile = get_attached_file( $mediaId );
1464
- $pathinfo = pathinfo( $originalfile );
1465
- $retina_file = trailingslashit( $pathinfo['dirname'] ) . $pathinfo['filename'] . $this->retina_extension() . $pathinfo['extension'];
1466
- if ( $retina_file && file_exists( $retina_file ) ) {
1467
- return unlink( $retina_file );
1468
- }
1469
- return false;
1470
- }
1471
-
1472
- /**
1473
- *
1474
- * FILTERS
1475
- *
1476
- */
1477
-
1478
- function validate_src( $src ) {
1479
- if ( preg_match( "/^data:/i", $src ) )
1480
- return null;
1481
- return $src;
1482
- }
1483
-
1484
- /**
1485
- *
1486
- * LOAD SCRIPTS IF REQUIRED
1487
- *
1488
- */
1489
-
1490
- function wp_enqueue_scripts () {
1491
-
1492
- // Picturefill Debug
1493
- if ( $this->method == "Picturefill" && $this->is_debug() ) {
1494
- $physical_file = trailingslashit( WR2X_PATH ) . 'app/debug.js';
1495
- $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
1496
- wp_enqueue_script( 'wr2x-debug-js', trailingslashit( WR2X_URL ) . 'app/debug.js', array(), $cache_buster, false );
1497
- }
1498
-
1499
- // No Picturefill Script
1500
- if ( $this->method == "Picturefill" && !get_option( "wr2x_picturefill_noscript" ) ) {
1501
- $physical_file = trailingslashit( WR2X_PATH ) . 'app/picturefill.min.js';
1502
- $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
1503
- wp_enqueue_script( 'wr2x-picturefill-js', trailingslashit( WR2X_URL ) . 'app/picturefill.min.js', array(), $cache_buster, false );
1504
- }
1505
-
1506
- // Lazysizes
1507
- if ( get_option( "wr2x_picturefill_lazysizes" ) && class_exists( 'MeowPro_WR2X_Core' ) ) {
1508
- $physical_file = trailingslashit( WR2X_PATH ) . 'app/lazysizes.min.js';
1509
- $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
1510
- wp_enqueue_script( 'wr2x-picturefill-js', trailingslashit( WR2X_URL ) . 'app/lazysizes.min.js', array(), $cache_buster, false );
1511
- }
1512
-
1513
- // Debug + HTML Rewrite = No JS!
1514
- if ( $this->is_debug() && $this->method == "HTML Rewrite" ) {
1515
- return;
1516
- }
1517
-
1518
- // Debug mode, we force the devicePixelRatio to be Retina
1519
- if ( $this->is_debug() ) {
1520
- $physical_file = trailingslashit( WR2X_PATH ) . 'app/debug.js';
1521
- $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
1522
- wp_enqueue_script( 'wr2x-debug-js', trailingslashit( WR2X_URL ) . 'app/debug.js', array(), $cache_buster, false );
1523
- }
1524
-
1525
- // Retina-Images and HTML Rewrite both need the devicePixelRatio cookie on the server-side
1526
- if ( $this->method == "Retina-Images" || $this->method == "HTML Rewrite" ) {
1527
- $physical_file = trailingslashit( WR2X_PATH ) . 'app/retina-cookie.js';
1528
- $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
1529
- wp_enqueue_script( 'wr2x-debug-js', trailingslashit( WR2X_URL ) . 'app/retina-cookie.js', array(), $cache_buster, false );
1530
- }
1531
-
1532
- // Retina.js only needs itself
1533
- if ( $this->method == "retina.js" ) {
1534
- $physical_file = trailingslashit( WR2X_PATH ) . 'app/retina.min.js';
1535
- $cache_buster = file_exists( $physical_file ) ? filemtime( $physical_file ) : WR2X_VERSION;
1536
- wp_enqueue_script( 'wr2x-retinajs-js', trailingslashit( WR2X_URL ) . 'app/retina.min.js', array(), $cache_buster, false );
1537
- }
1538
- }
1539
-
1540
- /**
1541
- *
1542
- * Roles & Access Rights
1543
- *
1544
- */
1545
- function can_access_settings() {
1546
- return apply_filters( 'wr2x_allow_setup', current_user_can( 'manage_options' ) );
1547
- }
1548
-
1549
- function can_access_features() {
1550
- return apply_filters( 'wr2x_allow_usage', current_user_can( 'administrator' ) );
1551
- }
1552
-
1553
- }
1554
-
1555
- // Used by WP Rocket (and maybe by other plugins)
1556
- function wr2x_is_registered() {
1557
- global $wr2x_core;
1558
- return $wr2x_core->admin->is_registered();
1559
- }
1560
-
1561
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/dashboard.php DELETED
@@ -1,23 +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 = __( "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
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/init.php DELETED
@@ -1,38 +0,0 @@
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_' ) !== false ) {
18
- $file = WR2X_PATH . '/common/' . str_replace( 'meowcommon_', '', strtolower( $class ) ) . '.php';
19
- }
20
- else if ( strpos( $class, 'MeowCommonPro_' ) !== false ) {
21
- $necessary = false;
22
- $file = WR2X_PATH . '/common/premium/' . str_replace( 'meowcommonpro_', '', strtolower( $class ) ) . '.php';
23
- }
24
- else if ( strpos( $class, 'MeowPro_WR2X' ) !== false ) {
25
- $necessary = false;
26
- $file = WR2X_PATH . '/premium/' . str_replace( 'meowpro_wr2x_', '', strtolower( $class ) ) . '.php';
27
- }
28
- if ( $file ) {
29
- if ( !$necessary && !file_exists( $file ) ) {
30
- return;
31
- }
32
- require( $file );
33
- }
34
- });
35
-
36
- new Meow_WR2X_Core();
37
-
38
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/library.php DELETED
@@ -1,26 +0,0 @@
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 wp_kses_post( '<div class="wr2x-retina-field" data-id="' . $id . '"></div>' );
21
- }
22
- }
23
- }
24
-
25
-
26
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/classes/rest.php DELETED
@@ -1,522 +0,0 @@
1
- <?php
2
-
3
- class Meow_WR2X_Rest
4
- {
5
- private $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( 'upload_files' ) ) {
25
- return;
26
- }
27
-
28
- // SETTINGS
29
- register_rest_route( $this->namespace, '/update_option/', array(
30
- 'methods' => 'POST',
31
- 'permission_callback' => array( $this->core, 'can_access_settings' ),
32
- 'callback' => array( $this, 'rest_update_option' )
33
- ) );
34
- register_rest_route( $this->namespace, '/all_settings/', array(
35
- 'methods' => 'GET',
36
- 'permission_callback' => array( $this->core, 'can_access_settings' ),
37
- 'callback' => array( $this, 'rest_all_settings' )
38
- ) );
39
- register_rest_route( $this->namespace, '/easy_io_link/', array(
40
- 'methods' => 'POST',
41
- 'permission_callback' => array( $this->core, 'can_access_settings' ),
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' => array( $this->core, 'can_access_settings' ),
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' => array( $this->core, 'can_access_settings' ),
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' => array( $this->core, 'can_access_features' ),
59
- 'callback' => array( $this, 'rest_get_stats' ),
60
- 'args' => array(
61
- 'search' => array( 'required' => false ),
62
- ),
63
- ) );
64
- register_rest_route( $this->namespace, '/media', array(
65
- 'methods' => 'GET',
66
- 'permission_callback' => array( $this->core, 'can_access_features' ),
67
- 'callback' => array( $this, 'rest_media' ),
68
- 'args' => array(
69
- 'limit' => array( 'required' => false, 'default' => 10 ),
70
- 'skip' => array( 'required' => false, 'default' => 20 ),
71
- 'filterBy' => array( 'required' => false, 'default' => 'all' ),
72
- 'orderBy' => array( 'required' => false, 'default' => 'id' ),
73
- 'order' => array( 'required' => false, 'default' => 'desc' ),
74
- 'search' => array( 'required' => false ),
75
- 'offset' => array( 'required' => false ),
76
- 'order' => array( 'required' => false ),
77
- 'search' => array( 'required' => false )
78
- )
79
- ) );
80
- register_rest_route( $this->namespace, '/get_all_ids', array(
81
- 'methods' => 'POST',
82
- 'permission_callback' => array( $this->core, 'can_access_features' ),
83
- 'callback' => array( $this, 'rest_get_all_ids' )
84
- ) );
85
-
86
- // ACTIONS
87
- register_rest_route( $this->namespace, '/refresh', array(
88
- 'methods' => 'POST',
89
- 'permission_callback' => array( $this->core, 'can_access_features' ),
90
- 'callback' => array( $this, 'rest_refresh' )
91
- ) );
92
- register_rest_route( $this->namespace, '/details', array(
93
- 'methods' => 'POST',
94
- 'permission_callback' => array( $this->core, 'can_access_features' ),
95
- 'callback' => array( $this, 'rest_get_details' )
96
- ) );
97
- register_rest_route( $this->namespace, '/build_retina', array(
98
- 'methods' => 'POST',
99
- 'permission_callback' => array( $this->core, 'can_access_features' ),
100
- 'callback' => array( $this, 'rest_build_retina' )
101
- ) );
102
- register_rest_route( $this->namespace, '/regenerate', array(
103
- 'methods' => 'POST',
104
- 'permission_callback' => array( $this->core, 'can_access_features' ),
105
- 'callback' => array( $this, 'rest_regenerate' )
106
- ) );
107
- register_rest_route( $this->namespace, '/delete_retina', array(
108
- 'methods' => 'POST',
109
- 'permission_callback' => array( $this->core, 'can_access_features' ),
110
- 'callback' => array( $this, 'rest_delete_retina' )
111
- ) );
112
- register_rest_route( $this->namespace, '/ignore', array(
113
- 'methods' => 'POST',
114
- 'permission_callback' => array( $this->core, 'can_access_features' ),
115
- 'callback' => array( $this, 'rest_ignore' )
116
- ) );
117
- }
118
-
119
- function rest_all_settings() {
120
- return new WP_REST_Response( [ 'success' => true, 'data' => $this->get_all_options() ], 200 );
121
- }
122
-
123
- function count_issues($search) {
124
- return count( $this->core->get_issues($search) );
125
- }
126
-
127
- function count_ignored($search) {
128
- return count( $this->core->get_ignores($search) );
129
- }
130
-
131
- function count_all($search) {
132
- global $wpdb;
133
- $whereSql = '';
134
- if ($search) {
135
- $whereSql = $wpdb->prepare("AND post_title LIKE %s ", ( '%' . $search . '%' ));
136
- }
137
- return (int)$wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts p
138
- WHERE post_type='attachment'
139
- $whereSql"
140
- );
141
- }
142
-
143
- function rest_get_stats($request) {
144
- $search = sanitize_text_field( $request->get_param('search') );
145
- return new WP_REST_Response( [ 'success' => true, 'data' => array(
146
- 'issues' => $this->count_issues($search),
147
- 'ignored' => $this->count_ignored($search),
148
- 'all' => $this->count_all($search)
149
- ) ], 200 );
150
- }
151
-
152
- function rest_get_all_ids( $request ) {
153
- global $wpdb;
154
- $params = $request->get_json_params();
155
- $issuesOnly = isset( $params['issuesOnly'] ) ? (bool)$params['issuesOnly'] : false;
156
- if ( $issuesOnly ) {
157
- $ids = array_values( $this->core->get_issues() );
158
- }
159
- else {
160
- $wpml = $this->core->create_sql_if_wpml_original();
161
- $ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts p
162
- WHERE post_type='attachment'
163
- AND post_type = 'attachment' ${wpml}
164
- AND post_status='inherit'
165
- AND ( post_mime_type = 'image/jpeg' OR
166
- post_mime_type = 'image/png' OR
167
- post_mime_type = 'image/gif' )"
168
- );
169
- }
170
- return new WP_REST_Response( [ 'success' => true, 'data' => $ids ], 200 );
171
- }
172
-
173
- function rest_refresh() {
174
- $this->core->calculate_issues();
175
- return new WP_REST_Response( [ 'success' => true ], 200 );
176
- }
177
-
178
- /**
179
- * Get the status for many Media IDs.
180
- *
181
- * @param integer $skip
182
- * @param integer $limit
183
- * @return void
184
- */
185
- function get_media_status( $skip = 0, $limit = 10, $filterBy = 'all', $orderBy = 'id', $order = 'desc', $search = '' ) {
186
- global $wpdb;
187
- $whereIsIn = '';
188
- if ( $filterBy === 'issues' ) {
189
- $in = $this->core->get_issues();
190
- if ( empty( $in ) ) {
191
- return array();
192
- }
193
- $whereIsIn = 'AND p.ID IN (' . implode( ',', $in ) . ')';
194
- }
195
- else if ( $filterBy === 'ignored' ) {
196
- $in = $this->core->get_ignores();
197
- if ( empty( $in ) ) {
198
- return array();
199
- }
200
- $whereIsIn = 'AND p.ID IN (' . implode( ',', $in ) . ')';
201
- }
202
- $orderSql = 'ORDER BY p.ID DESC';
203
- if ($orderBy === 'post_title') {
204
- $orderSql = 'ORDER BY post_title ' . ( $order === 'asc' ? 'ASC' : 'DESC' );
205
- }
206
- else if ($orderBy === 'current_filename') {
207
- $orderSql = 'ORDER BY current_filename ' . ( $order === 'asc' ? 'ASC' : 'DESC' );
208
- }
209
- $entries = [];
210
- if ( empty( $search ) ) {
211
- $sql = $wpdb->prepare( "SELECT p.ID, p.post_title,
212
- MAX(CASE WHEN pm.meta_key = '_wp_attachment_metadata' THEN pm.meta_value END) AS metadata
213
- FROM $wpdb->posts p
214
- INNER JOIN $wpdb->postmeta pm ON pm.post_id = p.ID
215
- WHERE post_type = 'attachment'
216
- AND pm.meta_key = '_wp_attachment_metadata'
217
- $whereIsIn
218
- GROUP BY p.ID
219
- $orderSql
220
- LIMIT %d, %d", $skip, $limit
221
- );
222
- $entries = $wpdb->get_results( $sql );
223
- }
224
- else {
225
- $sql = $wpdb->prepare( "SELECT p.ID, p.post_title,
226
- MAX(CASE WHEN pm.meta_key = '_wp_attachment_metadata' THEN pm.meta_value END) AS metadata
227
- FROM $wpdb->posts p
228
- INNER JOIN $wpdb->postmeta pm ON pm.post_id = p.ID
229
- WHERE post_type = 'attachment'
230
- AND pm.meta_key = '_wp_attachment_metadata'
231
- $whereIsIn
232
- AND p.post_title LIKE %s
233
- GROUP BY p.ID
234
- $orderSql
235
- LIMIT %d, %d", ( '%' . $search . '%' ), $skip, $limit
236
- );
237
- $entries = $wpdb->get_results( $sql );
238
- }
239
- foreach ( $entries as $entry ) {
240
- $entry->ID = (int)$entry->ID;
241
- $entry->info = $this->core->retina_info( $entry->ID, ARRAY_A );
242
- $entry->thumbnail_url = wp_get_attachment_thumb_url( $entry->ID );
243
- $entry->metadata = unserialize( $entry->metadata );
244
- $entry->metadata = $this->core->postprocess_metadata( $entry->metadata );
245
- $attached_file = get_attached_file( $entry->ID );
246
- $entry->filesize = $attached_file ? size_format( filesize( $attached_file ), 2 ) : 0;
247
- $version = get_post_meta( $entry->ID, '_media_version', true );
248
- $entry->version = (int)$version;
249
- }
250
- return $entries;
251
- }
252
-
253
- function rest_media( $request ) {
254
- $limit = trim( $request->get_param('limit') );
255
- $skip = trim( $request->get_param('skip') );
256
- $filterBy = trim( $request->get_param('filterBy') );
257
- $orderBy = trim( $request->get_param('orderBy') );
258
- $order = trim( $request->get_param('order') );
259
- $search = sanitize_text_field( $request->get_param('search') );
260
- $entries = $this->get_media_status( $skip, $limit, $filterBy, $orderBy, $order, $search );
261
- $total = 0;
262
- if ( $filterBy == 'issues' ) {
263
- $total = $this->count_issues($search);
264
- }
265
- else if ( $filterBy == 'ignored' ) {
266
- $total = $this->count_ignored($search);
267
- }
268
- else if ( $filterBy == 'all' ) {
269
- $total = $this->count_all($search);
270
- }
271
- return new WP_REST_Response( [ 'success' => true, 'data' => $entries, 'total' => $total ], 200 );
272
- }
273
-
274
- function rest_get_details( $request ) {
275
- // Check errors
276
- $params = $request->get_json_params();
277
- $mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
278
- if ( empty( $mediaId ) ) {
279
- return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
280
- }
281
-
282
- // Prepare result
283
- $info = $this->core->retina_info( $mediaId, ARRAY_A );
284
- return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
285
- }
286
-
287
- // Regenerate the Thumbnails
288
- function regenerate_thumbnails( $mediaId ) {
289
- require_once ABSPATH . 'wp-admin/includes/image.php';
290
- do_action( 'wr2x_before_generate_thumbnails', $mediaId );
291
- $file = get_attached_file( $mediaId );
292
- $meta = wp_generate_attachment_metadata( $mediaId, $file );
293
- wp_update_attachment_metadata( $mediaId, $meta );
294
- do_action( 'wr2x_generate_thumbnails', $mediaId );
295
- }
296
-
297
- function rest_build_retina( $request ) {
298
- // Check errors
299
- $params = $request->get_json_params();
300
- $mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
301
- if ( empty( $mediaId ) ) {
302
- return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
303
- }
304
-
305
- // Build retina
306
- do_action( 'wr2x_before_regenerate', $mediaId );
307
- $this->core->delete_attachment( $mediaId, false );
308
- $meta = wp_get_attachment_metadata( $mediaId );
309
- $this->core->generate_images( $meta );
310
- do_action( 'wr2x_regenerate', $mediaId );
311
-
312
- // Prepare result
313
- $info = $this->core->get_media_status_one( $mediaId );
314
- return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
315
- }
316
-
317
- function rest_delete_retina( $request ) {
318
- if ( !current_user_can( 'upload_files' ) ) {
319
- $this->core->log( "You do not have permission to upload files." );
320
- return __( "You do not have permission to upload files.", 'wp-retina-2x' );
321
- }
322
- $params = $request->get_json_params();
323
-
324
- // Check errors
325
- $mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
326
- if ( empty( $mediaId ) ) {
327
- return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
328
- }
329
-
330
- // Delete Retina
331
- $this->core->delete_retina_fullsize( $mediaId );
332
- $this->core->delete_attachment( $mediaId, true );
333
- $meta = wp_get_attachment_metadata( $mediaId );
334
- $info = $this->core->get_media_status_one( $mediaId );
335
- return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
336
- }
337
-
338
- function rest_ignore( $request ) {
339
- $params = $request->get_json_params();
340
- $mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
341
-
342
- // Check errors
343
- if ( empty( $mediaId ) ) {
344
- return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
345
- }
346
-
347
- // Ignore
348
- if ( $this->core->is_ignore( $mediaId ) ) {
349
- $info = $this->core->remove_ignore( $mediaId );
350
- }
351
- else {
352
- $info = $this->core->add_ignore( $mediaId );
353
- }
354
- return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
355
- }
356
-
357
- function rest_regenerate( $request ) {
358
- require_once ABSPATH . 'wp-admin/includes/image.php';
359
- $params = $request->get_json_params();
360
- $mediaId = isset( $params['mediaId'] ) ? (int)$params['mediaId'] : null;
361
-
362
- // Check errors
363
- if ( empty( $mediaId ) ) {
364
- return new WP_REST_Response( [ 'success' => false, 'message' => "The Media ID is required." ] );
365
- }
366
-
367
- // Regenerate
368
- $this->regenerate_thumbnails( $mediaId );
369
- $info = $this->core->get_media_status_one( $mediaId );
370
- return new WP_REST_Response( [ 'success' => true, 'data' => $info ], 200 );
371
- }
372
-
373
- function list_options() {
374
- return array(
375
- 'wr2x_retina_sizes' => false,
376
- 'wr2x_disabled_sizes' => false,
377
- 'wr2x_method' => false,
378
- 'wr2x_full_size' => false,
379
- 'wr2x_picturefill_keep_src' => false,
380
- 'wr2x_picturefill_lazysizes' => false,
381
- 'wr2x_picturefill_css_background' => false,
382
- 'wr2x_picturefill_noscript' => false,
383
- 'wr2x_auto_generate' => false,
384
- 'wr2x_over_http_check' => false,
385
- 'wr2x_debug' => false,
386
- 'wr2x_disable_responsive' => false,
387
- 'wr2x_image_replace' => false,
388
- 'wr2x_cdn_domain' => '',
389
- 'wr2x_easyio_domain' => '',
390
- 'wr2x_easyio_lossless' => '',
391
- 'wr2x_big_image_size_threshold' => false,
392
- 'wr2x_hide_retina_column' => false,
393
- 'wr2x_hide_retina_dashboard' => false,
394
- );
395
- }
396
-
397
- function get_all_options() {
398
- $options = $this->list_options();
399
- $current_options = array('wr2x_sizes' => $this->core->get_image_sizes( ARRAY_A ));
400
- foreach ( $options as $option => $default ) {
401
- if ($option === 'wr2x_retina_sizes' || $option === 'wr2x_disabled_sizes') {
402
- $current_options[$option] = array_values(get_option( $option, $default ));
403
- continue;
404
- }
405
- $current_options[$option] = get_option( $option, $default );
406
- }
407
- return $current_options;
408
- }
409
-
410
- function rest_update_option( $request ) {
411
- $params = $request->get_json_params();
412
- try {
413
- $name = $params['name'];
414
- $options = $this->list_options();
415
- if ( !array_key_exists( $name, $options ) ) {
416
- return new WP_REST_Response([ 'success' => false, 'message' => 'This option does not exist.' ], 200 );
417
- }
418
- $value = is_bool( $params['value'] ) ? ( $params['value'] ? '1' : '' ) : $params['value'];
419
- $success = update_option( $name, $value );
420
- if ( !$success ) {
421
- return new WP_REST_Response([ 'success' => false, 'message' => 'Could not update option.' ], 200 );
422
- }
423
- return new WP_REST_Response([ 'success' => true, 'data' => $value ], 200 );
424
- }
425
- catch (Exception $e) {
426
- return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
427
- }
428
- }
429
-
430
- function rest_easy_io_unlink( $request ) {
431
- delete_option( 'wr2x_easyio_domain' );
432
- delete_option( 'wr2x_easyio_plan' );
433
- return new WP_REST_Response([ 'success' => true ], 200 );
434
- }
435
-
436
- function rest_easy_io_link( $request ) {
437
- try {
438
- $error_message = null;
439
- $site_url = get_site_url();
440
- $home_url = get_home_url();
441
- $url = 'http://optimize.exactlywww.com/exactdn/activate.php';
442
- $ssl = wp_http_supports( array( 'ssl' ) );
443
- if ( $ssl ) {
444
- $url = set_url_scheme( $url, 'https' );
445
- }
446
- //add_filter( 'http_headers_useragent', 'perfect_images', PHP_INT_MAX );
447
- $result = wp_remote_post( $url, array( 'timeout' => 10, 'body' => array( 'site_url' => $site_url, 'home_url' => $home_url ) ) );
448
-
449
- if ( is_wp_error( $result ) ) {
450
- $error_message = $result->get_error_message();
451
- }
452
- else if ( !empty( $result['body'] ) && strpos( $result['body'], 'domain' ) !== false ) {
453
- $response = json_decode( $result['body'], true );
454
- if ( !empty( $response['domain'] ) ) {
455
- update_option( 'wr2x_easyio_domain', $response['domain'] );
456
- if ( !empty( $response['plan_id'] ) ) {
457
- update_option( 'wr2x_easyio_plan', (int)$response['plan_id'] );
458
- }
459
-
460
- // Clear cache
461
- // From https://github.com/nosilver4u/ewww-image-optimizer/blob/master/classes/class-exactdn.php#L298
462
- if ( 'external' === get_option( 'elementor_css_print_method' ) ) {
463
- update_option( 'elementor_css_print_method', 'internal' );
464
- }
465
- if ( function_exists( 'et_get_option' ) && function_exists( 'et_update_option' ) &&
466
- 'on' === et_get_option( 'et_pb_static_css_file', 'on' ) ) {
467
- et_update_option( 'et_pb_static_css_file', 'off' );
468
- et_update_option( 'et_pb_css_in_footer', 'off' );
469
- }
470
- if ( function_exists( 'envira_flush_all_cache' ) ) {
471
- envira_flush_all_cache();
472
- }
473
- }
474
- }
475
- else if ( !empty( $result['body'] ) && false !== strpos( $result['body'], 'error' ) ) {
476
- $response = json_decode( $result['body'], true );
477
- $error_message = $response['error'];
478
- }
479
- if ( $error_message ) {
480
- return new WP_REST_Response([ 'success' => false, 'message' => $error_message ], 200 );
481
- }
482
- return new WP_REST_Response([ 'success' => true, 'logs' => json_decode( $result['body'] ) ], 200 );
483
- }
484
- catch ( Exception $e ) {
485
- return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
486
- }
487
- }
488
-
489
- function rest_easy_io_stats( $request ) {
490
- try {
491
- $error_message = null;
492
- $stats = null;
493
- $url = 'http://optimize.exactlywww.com/exactdn/savings.php';
494
- $ssl = wp_http_supports( array( 'ssl' ) );
495
- if ( $ssl ) {
496
- $url = set_url_scheme( $url, 'https' );
497
- }
498
- $easyio_domain = get_option( 'wr2x_easyio_domain' );
499
- $result = wp_remote_post( $url, array( 'timeout' => 10, 'body' => array( 'alias' => $easyio_domain ) ) );
500
- if ( is_wp_error( $result ) ) {
501
- $error_message = $result->get_error_message();
502
- }
503
- else if ( !empty( $result['body'] ) ) {
504
- $stats = json_decode( $result['body'], true );
505
- }
506
- else if ( !empty( $result['body'] ) && false !== strpos( $result['body'], 'error' ) ) {
507
- $response = json_decode( $result['body'], true );
508
- $error_message = $response['error'];
509
- }
510
- if ( $error_message ) {
511
- return new WP_REST_Response([ 'success' => false, 'message' => $error_message ], 200 );
512
- }
513
- return new WP_REST_Response([ 'success' => true, 'stats' => $stats ], 200 );
514
- }
515
- catch ( Exception $e ) {
516
- return new WP_REST_Response([ 'success' => false, 'message' => $e->getMessage() ], 500 );
517
- }
518
- }
519
-
520
- }
521
-
522
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/common/admin.php DELETED
@@ -1,180 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists( 'MeowCommon_Admin' ) ) {
4
-
5
- class MeowCommon_Admin {
6
-
7
- public static $loaded = false;
8
- public static $version = "3.7";
9
- public static $admin_version = "3.7";
10
-
11
- public $prefix; // prefix used for actions, filters (mfrh)
12
- public $mainfile; // plugin main file (media-file-renamer.php)
13
- public $domain; // domain used for translation (media-file-renamer)
14
- public $isPro = false;
15
-
16
- public static $logo = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxIiB2aWV3Qm94PSIwIDAgMTY1IDE2NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8c3R5bGU+CiAgICAuc3Qye2ZpbGw6IzgwNDYyNX0uc3Qze2ZpbGw6I2ZkYTk2MH0KICA8L3N0eWxlPgogIDxwYXRoIGQ9Ik03MiA3YTc2IDc2IDAgMCAxIDg0IDkxQTc1IDc1IDAgMSAxIDcyIDd6IiBmaWxsPSIjNGE2YjhjIi8+CiAgPHBhdGggZD0iTTQ4IDQ4YzIgNSAyIDEwIDUgMTQgNSA4IDEzIDE3IDIyIDIwbDEtMTBjMS0yIDMtMyA1LTNoMTNjMiAwIDQgMSA1IDNsMyA5IDQtMTBjMi0zIDYtMiA5LTJoMTFjMyAyIDMgNSAzIDhsMiAzN2MwIDMtMSA3LTQgOGgtMTJjLTIgMC0zLTItNS00LTEgMS0yIDMtNCAzLTUgMS05IDEtMTMtMS0zIDItNSAyLTkgMnMtOSAxLTEwLTNjLTItNC0xLTggMC0xMi04LTMtMTUtNy0yMi0xMi03LTctMTUtMTQtMjAtMjMtMy00LTUtOC01LTEzIDEtNCAzLTEwIDYtMTMgNC0zIDEyLTIgMTUgMnoiIGZpbGw9IiMxMDEwMTAiLz4KICA8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDMgNTFsNCAxMS02IDVoLTZjLTMtNS0zLTExIDAtMTYgMi0yIDYtMyA4IDB6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTQ3IDYybDMgNmMwIDMgMCA0LTIgNnMtNCAyLTcgMmwtNi05aDZsNi01eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik01MCA2OGw4IDljLTMgMy01IDYtOSA4bC04LTljMyAwIDUgMCA3LTJzMy0zIDItNnoiLz4KICA8cGF0aCBkPSJNODIgNzRoMTJsNSAxOCAzIDExIDgtMjloMTNsMiA0MmgtOGwtMS0yLTEtMzEtMTAgMzItNyAxLTktMzMtMSAyOS0xIDRoLThsMy00MnoiIGZpbGw9IiNmZmYiLz4KICA8cGF0aCBjbGFzcz0ic3QzIiBkPSJNNTggNzdsNSA1Yy0xIDQtMiA4LTcgOGwtNy01YzQtMiA2LTUgOS04eiIvPgogIDxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik02MyA4Mmw5IDUtNiA5LTEwLTZjNSAwIDYtNCA3LTh6Ii8+CiAgPHBhdGggY2xhc3M9InN0MyIgZD0iTTcyIDg3bDMgMS0xIDExLTgtMyA2LTEweiIvPgo8L3N2Zz4K';
17
-
18
- public function __construct( $prefix, $mainfile, $domain, $isPro = false, $disableReview = false, $freeOnly = false ) {
19
-
20
- if ( !MeowCommon_Admin::$loaded ) {
21
- if ( is_admin() ) {
22
-
23
- // Check potential issues with this WordPress install, other plugins, etc.
24
- new MeowCommon_Issues( $prefix, $mainfile, $domain );
25
-
26
- // Create the Meow Apps Menu
27
- add_action( 'admin_menu', array( $this, 'admin_menu_start' ) );
28
- $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : null;
29
- if ( $page === 'meowapps-main-menu' ) {
30
- add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 100000, 1 );
31
- }
32
- }
33
- MeowCommon_Admin::$loaded = true;
34
- }
35
-
36
- // Variables for this plugin
37
- $this->prefix = $prefix;
38
- $this->mainfile = $mainfile;
39
- $this->domain = $domain;
40
- $this->isPro = $isPro;
41
-
42
- // If there is no mainfile, it's either a Pro only Plugin (with no Free version available) or a Theme.
43
- if ( is_admin() ) {
44
- $license = get_option( $this->prefix . '_license', "" );
45
- if ( !empty( $license ) && !$this->isPro ) {
46
- add_action( 'admin_notices', array( $this, 'admin_notices_licensed_free' ) );
47
- }
48
- if ( !$disableReview ) {
49
- new MeowCommon_Ratings( $prefix, $mainfile, $domain );
50
- }
51
- }
52
- add_filter( 'plugin_row_meta', array( $this, 'custom_plugin_row_meta' ), 10, 2 );
53
- add_filter( 'edd_sl_api_request_verify_ssl', array( $this, 'request_verify_ssl' ), 10, 0 );
54
- }
55
-
56
- function custom_plugin_row_meta( $links, $file ) {
57
- $path = pathinfo( $file );
58
- $pathName = basename( $path['dirname'] );
59
- $thisPath = pathinfo( $this->mainfile );
60
- $thisPathName = basename( $thisPath['dirname'] );
61
- $isActive = is_plugin_active( $file );
62
- if ( !$isActive ) {
63
- return $links;
64
- }
65
- $isIssue = $this->isPro && !$this->is_registered();
66
- if ( strpos( $pathName, $thisPathName ) !== false ) {
67
- $new_links = array(
68
- 'settings' =>
69
- sprintf( __( '<a href="admin.php?page=%s_settings">Settings</a>', $this->domain ), $this->prefix ),
70
- 'license' =>
71
- $this->is_registered() ?
72
- ('<span style="color: #a75bd6;">' . __( 'Pro Version', $this->domain ) . '</span>') :
73
- ( $isIssue ? (sprintf( '<span style="color: #ff3434;">' . __( 'License Issue', $this->domain ), $this->prefix ) . '</span>') : (sprintf( '<span>' . __( '<a target="_blank" href="https://meowapps.com">Get the <u>Pro Version</u></a>', $this->domain ), $this->prefix ) . '</span>') ),
74
- );
75
- $links = array_merge( $new_links, $links );
76
- }
77
- return $links;
78
- }
79
-
80
- function request_verify_ssl() {
81
- return get_option( 'force_sslverify', false );
82
- }
83
-
84
- function nice_name_from_file( $file ) {
85
- $info = pathinfo( $file );
86
- if ( !empty( $info ) ) {
87
- if ( $info['filename'] == 'wplr-sync' ) {
88
- return "WP/LR Sync";
89
- }
90
- $info['filename'] = str_replace( '-', ' ', $info['filename'] );
91
- $file = ucwords( $info['filename'] );
92
- }
93
- return $file;
94
- }
95
-
96
- function admin_notices_licensed_free() {
97
- if ( isset( $_POST[$this->prefix . '_reset_sub'] ) ) {
98
- delete_option( $this->prefix . '_pro_serial' );
99
- delete_option( $this->prefix . '_license' );
100
- return;
101
- }
102
- $html = '<div class="notice notice-error">';
103
- $html .= sprintf(
104
- __( '<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://meowapps.com">Meow Store</a>. If you wish to continue using the free version and clear this message, click on this button.', $this->domain ),
105
- $this->nice_name_from_file( $this->mainfile ) );
106
- $html .= '<p>
107
- <form method="post" action="">
108
- <input type="hidden" name="' . $this->prefix . '_reset_sub" value="true">
109
- <input type="submit" name="submit" id="submit" class="button" value="'
110
- . __( 'Remove the license', $this->domain ) . '">
111
- </form>
112
- </p>';
113
- $html .= '</div>';
114
- wp_kses_post( $html );
115
- }
116
-
117
- function admin_menu_start() {
118
- // Hide the admin if user doesn't like Meow much
119
- if ( get_option( 'meowapps_hide_meowapps', false ) ) {
120
- register_setting( 'general', 'meowapps_hide_meowapps' );
121
- add_settings_field( 'meowapps_hide_ads', 'Meow Apps Menu', array( $this, 'meowapps_hide_dashboard_callback' ), 'general' );
122
- return;
123
- }
124
-
125
- // Create standard menu if it does not already exist
126
- global $submenu;
127
- if ( !isset( $submenu[ 'meowapps-main-menu' ] ) ) {
128
- 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',
129
- array( $this, 'admin_meow_apps' ), '', 82 );
130
- add_submenu_page( 'meowapps-main-menu', __( 'Dashboard', $this->domain ),
131
- __( 'Dashboard', $this->domain ), 'manage_options',
132
- 'meowapps-main-menu', array( $this, 'admin_meow_apps' ) );
133
- }
134
- }
135
-
136
- function meowapps_hide_dashboard_callback() {
137
- $html = '<input type="checkbox" id="meowapps_hide_meowapps" name="meowapps_hide_meowapps" value="1" ' .
138
- checked( 1, get_option( 'meowapps_hide_meowapps' ), false ) . '/>';
139
- $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 );
140
- echo wp_kses_post( $html );
141
- }
142
-
143
- function is_registered() {
144
- $is_registered = apply_filters( $this->prefix . '_meowapps_is_registered', false, $this->prefix );
145
- return $is_registered;
146
- }
147
-
148
- function get_phpinfo() {
149
- if ( !current_user_can( 'administrator' ) ) {
150
- return;
151
- }
152
- ob_start();
153
- // phpcs:disable WordPress.PHP.DevelopmentFunctions
154
- phpinfo( INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES );
155
- // phpcs:enable
156
- $html = ob_get_contents();
157
- ob_end_clean();
158
- $html = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', $html );
159
- return $html;
160
- }
161
-
162
- function admin_meow_apps() {
163
- $html = "<div id='meow-common-dashboard'></div>";
164
- $html .= "<div style='height: 0; width: 0; overflow: hidden;' id='meow-common-phpinfo'>";
165
- $html .= $this->get_phpinfo();
166
- $html .= "</div>";
167
- $html = preg_replace("/<img[^>]+\>/i", "", $html);
168
- echo wp_kses_post( $html );
169
- }
170
-
171
- function admin_footer_text( $current ) {
172
- return sprintf(
173
- // translators: %1$s is the version of the interface; %2$s is a file path.
174
- __( '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 ),
175
- MeowCommon_Admin::$version,
176
- __FILE__
177
- );
178
- }
179
- }
180
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/common/helpers.php DELETED
@@ -1,196 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists( 'MeowCommon_Helpers' ) ) {
4
-
5
- class MeowCommon_Helpers {
6
-
7
- //public static $version = MeowCommon_Admin::version;
8
- private static $startTimes = array();
9
- private static $startQueries = array();
10
-
11
- static function is_divi_builder() {
12
- return isset( $_GET['et_fb'] ) && $_GET['et_fb'] === '1';
13
- }
14
-
15
- static function is_cornerstone_builder() {
16
- return isset( $_GET['cs-render'] ) && $_GET['cs-render'] === '1';
17
- }
18
-
19
- static function is_pagebuilder_request() {
20
- return self::is_divi_builder() || self::is_cornerstone_builder();
21
- }
22
-
23
- static function is_asynchronous_request() {
24
- return self::is_ajax_request() || self::is_woocommerce_ajax_request() || self::is_rest();
25
- }
26
-
27
- static function is_ajax_request() {
28
- return wp_doing_ajax();
29
- }
30
-
31
- static function is_woocommerce_ajax_request() {
32
- return !empty( $_GET['wc-ajax'] );
33
- }
34
-
35
- // Originally created by matzeeable, modified by jordymeow
36
- static function is_rest() {
37
-
38
- // WP_REST_Request init.
39
- $is_rest_request = defined('REST_REQUEST') && REST_REQUEST;
40
- if ( $is_rest_request ) {
41
- MeowCommon_Rest::init_once();
42
- return true;
43
- }
44
-
45
- // Plain permalinks.
46
- $prefix = rest_get_url_prefix();
47
- $request_contains_rest = isset( $_GET['rest_route'] ) && strpos( trim( $_GET['rest_route'], '\\/' ), $prefix , 0 ) === 0;
48
- if ( $request_contains_rest) {
49
- MeowCommon_Rest::init_once();
50
- return true;
51
- }
52
-
53
- // It can happen that WP_Rewrite is not yet initialized, so better to do it.
54
- global $wp_rewrite;
55
- if ( $wp_rewrite === null ) {
56
- $wp_rewrite = new WP_Rewrite();
57
- }
58
- $rest_url = wp_parse_url( trailingslashit( rest_url() ) );
59
- $current_url = wp_parse_url( add_query_arg( array() ) );
60
- if ( !$rest_url || !$current_url )
61
- return false;
62
-
63
- // URL Path begins with wp-json.
64
- if ( !empty( $current_url['path'] ) && !empty( $rest_url['path'] ) ) {
65
- $request_contains_rest = strpos( $current_url['path'], $rest_url['path'], 0 ) === 0;
66
- if ( $request_contains_rest) {
67
- MeowCommon_Rest::init_once();
68
- return true;
69
- }
70
- }
71
-
72
- return false;
73
- }
74
-
75
- static function test_error( $error = 'timeout', $diceSides = 1 ) {
76
- if ( rand( 1, $diceSides ) === 1 ) {
77
- if ( $error === 'timeout' ) {
78
- header("HTTP/1.0 408 Request Timeout");
79
- die();
80
- }
81
- else {
82
- trigger_error( "Error", E_USER_ERROR);
83
- }
84
- }
85
- }
86
-
87
- static function php_error_logs() {
88
- $errorpath = ini_get( 'error_log' );
89
- $output_lines = array();
90
- if ( !empty( $errorpath ) && file_exists( $errorpath ) ) {
91
- try {
92
- $file = new SplFileObject( $errorpath, 'r' );
93
- $file->seek( PHP_INT_MAX );
94
- $last_line = $file->key();
95
- $iterator = new LimitIterator( $file, $last_line > 3500 ? $last_line - 3500 : 0, $last_line );
96
- $lines = iterator_to_array( $iterator );
97
- $previous_line = null;
98
- foreach ( $lines as $line ) {
99
-
100
- // Parse the date
101
- $date = '';
102
- try {
103
- $dateArr = [];
104
- preg_match( '~^\[(.*?)\]~', $line, $dateArr );
105
- if ( isset( $dateArr[0] ) ) {
106
- $line = str_replace( $dateArr[0], '', $line );
107
- $line = trim( $line );
108
- $date = new DateTime( $dateArr[1] );
109
- $date = get_date_from_gmt( $date->format('Y-m-d H:i:s'), 'Y-m-d H:i:s' );
110
- }
111
- else {
112
- continue;
113
- }
114
- }
115
- catch ( Exception $e ) {
116
- continue;
117
- }
118
-
119
- // Parse the error
120
- $type = '';
121
- if ( preg_match( '/PHP Fatal error/', $line ) ) {
122
- $line = trim( str_replace( 'PHP Fatal error:', '', $line ) );
123
- $type = 'fatal';
124
- }
125
- else if ( preg_match( '/PHP Warning/', $line ) ) {
126
- $line = trim( str_replace( 'PHP Warning:', '', $line ) );
127
- $type = 'warning';
128
- }
129
- else if ( preg_match( '/PHP Notice/', $line ) ) {
130
- $line = trim( str_replace( 'PHP Notice:', '', $line ) );
131
- $type = 'notice';
132
- }
133
- else if ( preg_match( '/PHP Parse error/', $line ) ) {
134
- $line = trim( str_replace( 'PHP Parse error:', '', $line ) );
135
- $type = 'parse';
136
- }
137
- else if ( preg_match( '/PHP Exception/', $line ) ) {
138
- $line = trim( str_replace( 'PHP Exception:', '', $line ) );
139
- $type = 'exception';
140
- }
141
- else {
142
- continue;
143
- }
144
-
145
- // Skip the error if is the same as before.
146
- if ( $line !== $previous_line ) {
147
- array_push( $output_lines, array( 'date' => $date, 'type' => $type, 'content' => $line ) );
148
- $previous_line = $line;
149
- }
150
- }
151
- }
152
- catch ( OutOfBoundsException $e ) {
153
- error_log( $e->getMessage() );
154
- return array();
155
- }
156
- }
157
- return $output_lines;
158
-
159
- // else {
160
- // $output_lines = array_reverse( $output_lines );
161
- // $html = '';
162
- // $previous = '';
163
- // foreach ( $output_lines as $line ) {
164
- // // Let's avoid similar errors, since it's not useful. We should also make this better
165
- // // and not only theck this depending on tie.
166
- // if ( preg_replace( '/\[.*\] PHP/', '', $previous ) !== preg_replace( '/\[.*\] PHP/', '', $line ) ) {
167
- // $html .= $line;
168
- // $previous = $line;
169
- // }
170
- // }
171
- // return $html;
172
- // }
173
- }
174
-
175
- static function timer_start( $timerName = 'default' ) {
176
- MeowCommon_Helpers::$startQueries[ $timerName ] = get_num_queries();
177
- MeowCommon_Helpers::$startTimes[ $timerName ] = microtime( true );
178
- }
179
-
180
- static function timer_elapsed( $timerName = 'default' ) {
181
- return microtime( true ) - MeowCommon_Helpers::$startTimes[ $timerName ];
182
- }
183
-
184
- static function timer_log_elapsed( $timerName = 'default' ) {
185
- $elapsed = MeowCommon_Helpers::timer_elapsed( $timerName );
186
- $queries = get_num_queries() - MeowCommon_Helpers::$startQueries[ $timerName ];
187
- error_log( $timerName . ": " . $elapsed . "ms (" . $queries . " queries)" );
188
- }
189
- }
190
-
191
- // Asked by WP Security Team to remove this.
192
-
193
- // if ( MeowCommon_Helpers::is_rest() ) {
194
- // ini_set( 'display_errors', 0 );
195
- // }
196
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/common/img/contact-form-block.png DELETED
Binary file
trunk/common/img/database-cleaner.png DELETED
Binary file
trunk/common/img/default.png DELETED
Binary file
trunk/common/img/media-cleaner.png DELETED
Binary file
trunk/common/img/media-file-renamer.png DELETED
Binary file
trunk/common/img/meow-analytics.png DELETED
Binary file
trunk/common/img/meow-gallery.png DELETED
Binary file
trunk/common/img/meow-lightbox.png DELETED
Binary file
trunk/common/img/social-engine.png DELETED
Binary file
trunk/common/img/wp-retina-2x.png DELETED
Binary file
trunk/common/img/wplr-sync.png DELETED
Binary file
trunk/common/issues.php DELETED
@@ -1,29 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists( 'MeowCommon_Issues' ) ) {
4
-
5
- class MeowCommon_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
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/common/ratings.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists( 'MeowCommon_Ratings' ) ) {
4
-
5
- class MeowCommon_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_weeks = strtotime( '+2 weeks' );
35
- $three_weeks = strtotime( '+3 weeks' );
36
- $rating_date = mt_rand( $two_weeks, $three_weeks );
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
- $html = wp_kses_post( '<div class="notice notice-success" data-rating-date="' .
62
- date( 'Y-m-d', $rating_date ) . '">' );
63
- $esc_nice_name = esc_attr( $this->nice_name_from_file( $this->mainfile ) );
64
- $esc_short_url = esc_attr( $this->nice_short_url_from_file( $this->mainfile ) );
65
- $escaped_prefix = $this->prefix;
66
- $html .= '<p style="font-size: 100%;">';
67
- // Translators: %1$s is a plugin nicename, %2$s is a short url (slug)
68
- $html .= sprintf(
69
- __( '<h2 class="title">You have been using <b>%1$s</b> for some time now! Thank you 💕</h2>Could you take one minute and write a <b>little review</b> for me? That would <b>really</b> bring me joy and motivation 🥰<br />In the review, don\'t hesitate to share your feature requests and remarks. I will try my best!
70
- ', $this->domain ), $esc_nice_name
71
- );
72
- $html .= '<div style="padding: 20px 0 12px 0; display: flex; align-items: center;">';
73
- $html .= '<a target="_blank" class="button button-primary" style="float: left; margin-right: 10px;"
74
- href="https://wordpress.org/support/plugin/' . $esc_short_url . '/reviews/?rate=5#new-post">
75
- ✍🏼 Yes, let\'s write it now!
76
- </a>
77
- <form method="post" action="" style="margin-right: 10px;">
78
- <input type="hidden" name="' . $escaped_prefix . '_did_it" value="true">
79
- <input type="submit" name="submit" id="submit" class="button button-primary" value="'
80
- . __( '🥰 I did it', $this->domain ) . '">
81
- </form>
82
- <div style="flex: auto;"></div>
83
- <form method="post" action="" style="margin-right: 10px;">
84
- <input type="hidden" name="' . $escaped_prefix . '_remind_me" value="true">
85
- <input type="submit" name="submit" id="submit" class="button button-primary" value="'
86
- . __( '⏰ Remind me later', $this->domain ) . '">
87
- </form>
88
- <form method="post" action="">
89
- <input type="hidden" name="' . $escaped_prefix . '_never_remind_me" value="true">
90
- <input type="submit" name="submit" id="submit" class="button-link" style="font-size: small;" value="'
91
- . __( 'Hide this', $this->domain ) . '">
92
- </form>
93
- <div style="clear: both;"></div>
94
- </div>';
95
- $html .= '</div>';
96
- echo $html;
97
- }
98
-
99
- function nice_short_url_from_file( $file ) {
100
- $info = pathinfo( $file );
101
- if ( !empty( $info ) ) {
102
- $info['filename'] = str_replace( '-pro', '', $info['filename'] );
103
- return $info['filename'];
104
- }
105
- return "";
106
- }
107
-
108
- function nice_name_from_file( $file ) {
109
- $info = pathinfo( $file );
110
- if ( !empty( $info ) ) {
111
- if ( $info['filename'] == 'wplr-sync' ) {
112
- return "Photo Engine";
113
- }
114
- $info['filename'] = str_replace( '-', ' ', $info['filename'] );
115
- $file = ucwords( $info['filename'] );
116
- }
117
- return $file;
118
- }
119
- }
120
- }
121
-
122
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/common/releases.txt DELETED
@@ -1,19 +0,0 @@
1
- Releases of the Meow Commmon has to be carefully made, and version_compare
2
- should be used when big changes are made.
3
-
4
- = 3.7 (2021/11/24) =
5
- * Added Database Cleaner in the dashboard.
6
-
7
- = 3.6 (2021/09/22) =
8
- * Premium classes are now separated.
9
-
10
- = 3.5 (2021/08/31) =
11
- * Better security.
12
- * New images.
13
-
14
- = 3.4 (2021/08/05) =
15
- * Sanitize and escaping.
16
-
17
- = 3.3 (2020/12/19) =
18
- * is_cornerstone_builder()
19
- * is_pagebuilder_request()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/common/rest.php DELETED
@@ -1,133 +0,0 @@
1
- <?php
2
-
3
- class MeowCommon_Rest
4
- {
5
- private $namespace = "meow-common/v1";
6
- static public $instance = null;
7
-
8
- static public function init_once() {
9
- if ( !MeowCommon_Rest::$instance ) {
10
- MeowCommon_Rest::$instance = new self();
11
- }
12
- }
13
-
14
- private function __construct() {
15
- add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
16
- }
17
-
18
- function rest_api_init() {
19
- if ( !current_user_can( 'administrator' ) ) {
20
- return;
21
- }
22
- register_rest_route( $this->namespace, '/empty_request/', [
23
- 'methods' => 'POST',
24
- 'permission_callback' => function () {
25
- return current_user_can( 'administrator' );
26
- },
27
- 'callback' => [ $this, 'empty_request' ]
28
- ]);
29
- register_rest_route( $this->namespace, '/file_operation/', [
30
- 'methods' => 'POST',
31
- 'permission_callback' => function () {
32
- return current_user_can( 'administrator' );
33
- },
34
- 'callback' => [ $this, 'file_operation' ]
35
- ]);
36
- register_rest_route( $this->namespace, '/sql_request/', [
37
- 'methods' => 'POST',
38
- 'permission_callback' => function () {
39
- return current_user_can( 'administrator' );
40
- },
41
- 'callback' => [ $this, 'sql_request' ]
42
- ]);
43
- register_rest_route( $this->namespace, '/error_logs/', [
44
- 'methods' => 'POST',
45
- 'permission_callback' => function () {
46
- return current_user_can( 'administrator' );
47
- },
48
- 'callback' => [ $this, 'rest_error_logs' ]
49
- ]);
50
- register_rest_route( $this->namespace, '/all_settings/', [
51
- 'methods' => 'GET',
52
- 'permission_callback' => function () {
53
- return current_user_can( 'administrator' );
54
- },
55
- 'callback' => [ $this, 'rest_all_settings' ]
56
- ]);
57
- register_rest_route( $this->namespace, '/update_option/', [
58
- 'methods' => 'POST',
59
- 'permission_callback' => function () {
60
- return current_user_can( 'administrator' );
61
- },
62
- 'callback' => [ $this, 'rest_update_option' ]
63
- ]);
64
- }
65
-
66
- function file_rand( $filesize ) {
67
- $tmp_file = tmpfile();
68
- fseek( $tmp_file, $filesize - 1, SEEK_CUR );
69
- fwrite( $tmp_file, 'a');
70
- fclose( $tmp_file );
71
- }
72
-
73
- function empty_request() {
74
- return new WP_REST_Response( [ 'success' => true ], 200 );
75
- }
76
-
77
- function file_operation() {
78
- $this->file_rand( 1024 * 10 );
79
- return new WP_REST_Response( [ 'success' => true ], 200 );
80
- }
81
-
82
- function sql_request() {
83
- global $wpdb;
84
- $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->posts}" );
85
- return new WP_REST_Response( [ 'success' => true, 'data' => $count ], 200 );
86
- }
87
-
88
- // List all the options with their default values.
89
- function list_options() {
90
- return array(
91
- 'meowapps_hide_meowapps' => false,
92
- 'force_sslverify' => false
93
- );
94
- }
95
-
96
- function get_all_options() {
97
- $options = $this->list_options();
98
- $current_options = array();
99
- foreach ( $options as $option => $default ) {
100
- $current_options[$option] = get_option( $option, $default );
101
- }
102
- return $current_options;
103
- }
104
-
105
- function rest_all_settings() {
106
- return new WP_REST_Response( [ 'success' => true, 'data' => $this->get_all_options() ], 200 );
107
- }
108
-
109
- function rest_update_option( $request ) {
110
- $params = $request->get_json_params();
111
- try {
112
- $name = $params['name'];
113
- $options = $this->list_options();
114
- if ( !array_key_exists( $name, $options ) ) {
115
- return new WP_REST_Response([ 'success' => false, 'message' => 'This option does not exist.' ], 200 );
116
- }
117
- $value = is_bool( $params['value'] ) ? ( $params['value'] ? '1' : '' ) : $params['value'];
118
- $success = update_option( $name, $value );
119
- if ( !$success ) {
120
- return new WP_REST_Response( [ 'success' => false, 'message' => 'Could not update option.' ], 200 );
121
- }
122
- return new WP_REST_Response( [ 'success' => true, 'data' => $value ], 200 );
123
- }
124
- catch (Exception $e) {
125
- return new WP_REST_Response( [ 'success' => false, 'message' => $e->getMessage() ], 500 );
126
- }
127
- }
128
-
129
- function rest_error_logs( $request ) {
130
- return new WP_REST_Response( [ 'success' => true, 'data' => MeowCommon_Helpers::php_error_logs() ], 200 );
131
- }
132
-
133
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/wp-retina-2x-de_DE.mo DELETED
Binary file
trunk/languages/wp-retina-2x-de_DE.po DELETED
@@ -1,309 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
4
- "Project-Id-Version: Perfect Images + Retina (Pro)\n"
5
- "POT-Creation-Date: 2021-06-01 19:10+0200\n"
6
- "PO-Revision-Date: 2021-06-01 19:11+0200\n"
7
- "Language-Team: Kolja Spyra <webmaster@ntw-ks.de>\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 2.4.3\n"
12
- "X-Poedit-Basepath: ..\n"
13
- "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
14
- "X-Poedit-WPHeader: wp-retina-2x-pro.php\n"
15
- "X-Poedit-SourceCharset: UTF-8\n"
16
- "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
17
- "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
18
- "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
19
- "Last-Translator: Kolja Spyra <webmaster@ntw-ks.de>\n"
20
- "Language: de_DE\n"
21
- "X-Poedit-SearchPath-0: .\n"
22
- "X-Poedit-SearchPathExcluded-0: *.min.js\n"
23
- "X-Poedit-SearchPathExcluded-1: vendor\n"
24
-
25
- #: app/js/i18n.js:7
26
- msgid "Generate"
27
- msgstr "Generieren"
28
-
29
- #: app/js/i18n.js:11 common/admin.php:129 common/admin.php:130
30
- msgid "Dashboard"
31
- msgstr "Dashboard"
32
-
33
- #: app/js/i18n.js:12
34
- msgid "Pending"
35
- msgstr "Ausstehend"
36
-
37
- #: app/js/i18n.js:13
38
- msgid "Renamed"
39
- msgstr "Umbenannt"
40
-
41
- #: app/js/i18n.js:14
42
- msgid "All"
43
- msgstr "Alle"
44
-
45
- #: app/js/i18n.js:15
46
- msgid "Thumb"
47
- msgstr "Vorschaubild"
48
-
49
- #: app/js/i18n.js:16
50
- msgid "Replace / Title / Size"
51
- msgstr "Ersetzen / Titel / Größe"
52
-
53
- #: app/js/i18n.js:17
54
- msgid "Attached To"
55
- msgstr "Angefügt an"
56
-
57
- #: app/js/i18n.js:18
58
- msgid "Filename"
59
- msgstr "Dateiname"
60
-
61
- #: classes/admin.php:75
62
- msgid ""
63
- "JetPack's <b>Photon</b> module breaks features built in WP Retina 2x (as "
64
- "Photos moves the files away). A common and better alternative to Photon is "
65
- "to use <a href='http://tracking.maxcdn.com/c/97349/3982/378'>MaxCDN</a> "
66
- "(very popular), CloudFlare or Fastly."
67
- msgstr ""
68
- "JetPacks <b>Photon-Modul</b> bricht Funktionen, die in WP Retina 2x "
69
- "eingebaut sind (wenn Fotos die Dateien wegbewegt). Eine häufige und bessere "
70
- "Alternative zu Photon ist <a href='http://tracking.maxcdn.com/"
71
- "c/97349/3982/378'>maxCDN</a> (sehr beliebt), CloudFlare oder Fastly zu "
72
- "verwenden."
73
-
74
- #: classes/admin.php:121 classes/dashboard.php:14
75
- msgid "Perfect Images"
76
- msgstr "Perfekte Bilder"
77
-
78
- #: classes/core.php:572
79
- msgid "N/A"
80
- msgstr "n. a."
81
-
82
- #: classes/core.php:643
83
- msgid "PRO VERSION ONLY"
84
- msgstr "NUR PRO VERSION"
85
-
86
- #: classes/core.php:682
87
- msgid ""
88
- "The metadata is broken! This is not related to the retina plugin. You should "
89
- "probably use a plugin to re-generate the missing metadata and images."
90
- msgstr ""
91
- "Die Metadaten sind defekt! Dies hängt nicht mit dem Retina-Plugin zusammen. "
92
- "Sie sollten wahrscheinlich ein Plugin verwenden, um die fehlenden Metadaten "
93
- "und Bilder neu zu generieren."
94
-
95
- #: classes/core.php:686
96
- #, php-format
97
- msgid ""
98
- "The image size '%s' could not be found. You probably changed your image "
99
- "sizes but this specific image was not re-build. This is not related to the "
100
- "retina plugin. You should probably use a plugin to re-generate the missing "
101
- "metadata and images."
102
- msgstr ""
103
- "Die Bildgröße '%s' konnte nicht gefunden werden. Sie haben wahrscheinlich "
104
- "Ihre Bildgrößen geändert, aber dieses bestimmte Bild wurde nicht neu "
105
- "erstellt. Dies hängt nicht mit dem Retina-Plugin zusammen. Sie sollten "
106
- "wahrscheinlich ein Plugin verwenden, um die fehlenden Metadaten und Bilder "
107
- "neu zu generieren."
108
-
109
- #: classes/core.php:704
110
- #, php-format
111
- msgid ""
112
- "The retina version of the Full-Size image is missing.<br />Full Size Retina "
113
- "has been checked in the Settings and this image is therefore required.<br /"
114
- ">Please drag & drop an image of at least <b>%dx%d</b> in the <b>Full-Size "
115
- "Retina Upload</b> column."
116
- msgstr ""
117
- "Die Retina-Version des Full-Size-Bildes fehlt.<br />Die Netzhaut in voller "
118
- "Größe wurde in den Einstellungen überprüft und dieses Bild ist daher "
119
- "erforderlich.<br />Bitte ziehen & ablegen Sie ein Bild von mindestens <b> %d "
120
- "x %d </b> in der Spalte Retina Upload in <b>voller Größe.</b>"
121
-
122
- #: classes/core.php:708
123
- #, php-format
124
- msgid ""
125
- "The Full-Size image is too small (<b>%dx%d</b>) and this size cannot be "
126
- "generated.<br />Please upload an image of at least <b>%dx%d</b>."
127
- msgstr ""
128
- "Das Bild in voller Größe ist zu klein (<b> %d x %d </b>) und diese Größe "
129
- "kann nicht generiert werden.<br />Bitte laden Sie ein Bild von mindestens "
130
- "<b> %d x %d </b>hoch."
131
-
132
- #: classes/core.php:718
133
- msgid "The retina image can be created. Please use the 'GENERATE' button."
134
- msgstr ""
135
- "Das Retinabild kann erstellt werden. Bitte verwenden Sie die Schaltfläche "
136
- "'Generieren'."
137
-
138
- #: classes/core.php:723
139
- msgid "The standard image normally created by WordPress is missing."
140
- msgstr ""
141
- "Das Standardbild, das normalerweise von WordPress erstellt wird, fehlt."
142
-
143
- #: classes/core.php:728
144
- msgid "This size is ignored by your retina settings."
145
- msgstr "Diese Größe wird von Ihren Retina-Einstellungen ignoriert."
146
-
147
- #: classes/dashboard.php:15
148
- #, php-format
149
- msgid "Perfect Images %s"
150
- msgstr "Perfekte Bilder %s"
151
-
152
- #: classes/rest.php:319 premium/rest.php:43 premium/rest.php:119
153
- msgid "You do not have permission to upload files."
154
- msgstr "Sie haben keine Berechtigung zum Dateiupload."
155
-
156
- #: common/admin.php:68
157
- #, php-format
158
- msgid "<a href=\"admin.php?page=%s_settings\">Settings</a>"
159
- msgstr "<a href=\"admin.php?page=%s_settings\">Einstellungen</a>"
160
-
161
- #: common/admin.php:71
162
- msgid "Pro Version"
163
- msgstr "Pro Version"
164
-
165
- #: common/admin.php:72
166
- msgid "License Issue"
167
- msgstr "Lizenz"
168
-
169
- #: common/admin.php:72
170
- msgid ""
171
- "<a target=\"_blank\" href=\"https://store.meowapps.com\">Get the <u>Pro "
172
- "Version</u></a>"
173
- msgstr ""
174
- "<a target=\"_blank\" href=\"https://store.meowapps.com\">Holen Sie sich die "
175
- "<u>Pro-Version</u></a>"
176
-
177
- #: common/admin.php:103
178
- #, php-format
179
- msgid ""
180
- "<p>It looks like you are using the free version of the plugin (<b>%s</b>) "
181
- "but a license for the Pro version was also found. The Pro version might have "
182
- "been replaced by the Free version during an update (might be caused by a "
183
- "temporarily issue). If it is the case, <b>please download it again</b> from "
184
- "the <a target=\"_blank\" href=\"https://store.meowapps.com\">Meow Store</a>. "
185
- "If you wish to continue using the free version and clear this message, click "
186
- "on this button."
187
- msgstr ""
188
- "<p>Es sieht so aus, als ob Sie die kostenlose Version des Plugins ( ) "
189
- "verwenden, <b>%s</b> aber eine Lizenz für die Pro-Version wurde auch "
190
- "gefunden. Die Pro-Version wurde möglicherweise während eines Updates durch "
191
- "die Kostenlose Version ersetzt (möglicherweise durch ein vorübergehendes "
192
- "Problem verursacht). Wenn dies der Fall ist, <b>laden Sie es bitte erneut</"
193
- "b> aus dem <a target=\"_blank\" href=\"https://store.meowapps.com\">Meow "
194
- "Store</a>herunter. Wenn Sie die kostenlose Version weiterhin verwenden und "
195
- "diese Nachricht löschen möchten, klicken Sie auf diese Schaltfläche."
196
-
197
- #: common/admin.php:109
198
- msgid "Remove the license"
199
- msgstr "Lizenz"
200
-
201
- #: common/admin.php:138
202
- msgid ""
203
- "<label>Hide <b>Meow Apps</b> Menu</label><br /><small>Hide Meow Apps menu "
204
- "and all its components, for a cleaner admin. This option will be reset if a "
205
- "new Meow Apps plugin is installed. <b>Once activated, an option will be "
206
- "added in your General settings to display it again.</b></small>"
207
- msgstr ""
208
- "<label>Menü für <b>Meow Apps</b> ausblenden</label><br /><small>Versteckt "
209
- "das Meow Apps Menü und alle seine Komponenten, für eine sauberere "
210
- "Verwaltung. Diese Option wird zurückgesetzt, wenn ein neues Meow Apps Plugin "
211
- "installiert wird. <b>Nach der Aktivierung wird in den Allgemeinen "
212
- "Einstellungen eine Option hinzugefügt, um das Menü wieder anzuzeigen.</b></"
213
- "small>"
214
-
215
- #. translators: %1$s is the version of the interface; %2$s is a file path.
216
- #: common/admin.php:166
217
- #, php-format
218
- msgid ""
219
- "Thanks for using <a href=\"https://meowapps.com\">Meow Apps</a>! This is the "
220
- "Meow Admin %1$s <br /><i>Loaded from %2$s </i>"
221
- msgstr ""
222
- "Vielen Dank für die Verwendung von <a href=\"https://meowapps.com\">Meow "
223
- "Apps</a>! Dies ist der Meow Admin %1$s<br><i>Geladen von %2$s</i>"
224
-
225
- #. translators: %1$s is a plugin nicename, %2$s is a short url (slug)
226
- #: common/classes/ratings.php:65
227
- #, php-format
228
- msgid ""
229
- "You have been using <b>%1$s</b> for some time now. Thank you! Could you "
230
- "kindly share your opinion with me, along with, maybe, features you would "
231
- "like to see implemented? Then, please <a style=\"font-weight: bold; color: "
232
- "#b926ff;\" target=\"_blank\" href=\"https://wordpress.org/support/plugin/"
233
- "%2$s/reviews/?rate=5#new-post\">write a little review</a>. That will also "
234
- "bring me joy and motivation! I will get back to you :)"
235
- msgstr ""
236
- "Sie verwenden es schon <b>%1$s</b> seit einiger Zeit. Vielen Dank! Könnten "
237
- "Sie ihre Meinung mit mir teilen, zusammen mit vielleicht Funktionen, die Sie "
238
- "gerne umgesetzt sehen möchten? Dann schreiben Sie bitte <a style=\"font-"
239
- "weight: bold; color: #b926ff;\" target=\"_blank\" href=\"https://wordpress."
240
- "org/support/plugin/%2$s/reviews/?rate=5#new-post\">eine kleine Rezension</"
241
- "a>. Das bringt mir auch Freude und Motivation! Ich werde mich :)"
242
-
243
- #: common/classes/ratings.php:73
244
- msgid "Never remind me!"
245
- msgstr "Niemals"
246
-
247
- #: common/classes/ratings.php:78
248
- msgid "Remind me in a few weeks..."
249
- msgstr "Erinnern Sie mich in ein paar Wochen..."
250
-
251
- #: common/classes/ratings.php:83
252
- msgid "Yes, I did it!"
253
- msgstr "Hast"
254
-
255
- #: common/classes/updater.php:228
256
- #, php-format
257
- msgid ""
258
- "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
259
- msgstr ""
260
- "Es ist eine neue Version von %1$s verfügbar. %2$sDetails zu Version %3$s "
261
- "ansehen%4$s."
262
-
263
- #: common/classes/updater.php:236
264
- #, php-format
265
- msgid ""
266
- "There is a new version of %1$s available. %2$sView version %3$s details%4$s "
267
- "or %5$supdate now%6$s."
268
- msgstr ""
269
- "Es ist eine neue Version von %1$s verfügbar. %2$sDetails zu Version %3$s "
270
- "ansehen%4$s oder %5$sjetzt aktualisieren%6$s."
271
-
272
- #: common/classes/updater.php:493
273
- msgid "You do not have permission to install plugin updates"
274
- msgstr ""
275
- "Du hast keine Berechtigung, um Aktualisierungen für Erweiterungen "
276
- "durchzuführen"
277
-
278
- #: common/classes/updater.php:493
279
- msgid "Error"
280
- msgstr "Fehler"
281
-
282
- #: premium/rest.php:125
283
- msgid "The file is not an image or the upload went wrong."
284
- msgstr "Die Datei ist kein Bild oder der Upload ist schief gelaufen."
285
-
286
- #: premium/rest.php:131
287
- msgid "You cannot use this file (wrong extension? wrong type?)."
288
- msgstr "Sie können diese Datei nicht hochladen (falscher Dateityp?)."
289
-
290
- #. Plugin Name of the plugin/theme
291
- msgid "Perfect Images + Retina (Pro)"
292
- msgstr "Dateien für hohe Auflösungen"
293
-
294
- #. Plugin URI of the plugin/theme
295
- #. Author URI of the plugin/theme
296
- msgid "https://meowapps.com"
297
- msgstr "https://woocommerce.com"
298
-
299
- #. Description of the plugin/theme
300
- msgid ""
301
- "Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image "
302
- "Threshold and more."
303
- msgstr ""
304
- "Retina, Bilder ersetzen, Miniaturansichten regenerieren, Verwaltung der "
305
- "Bildgrößen, Bildschwelle und mehr."
306
-
307
- #. Author of the plugin/theme
308
- msgid "Jordy Meow"
309
- msgstr "Jordy Meow"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/wp-retina-2x-de_DE_formal.mo DELETED
Binary file
trunk/languages/wp-retina-2x-de_DE_formal.po DELETED
@@ -1,584 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: WP Retina 2x\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2021-06-01 19:10+0200\n"
6
- "PO-Revision-Date: 2021-06-01 19:11+0200\n"
7
- "Last-Translator: Kolja Spyra <webmaster@ntw-ks.de>\n"
8
- "Language-Team: Kolja Spyra <translation@kolja-spyra.de>\n"
9
- "Language: de_DE@formal\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _e;__\n"
14
- "X-Poedit-Basepath: ..\n"
15
- "X-Generator: Poedit 2.4.3\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
- "X-Poedit-SearchPath-0: .\n"
19
-
20
- #: app/js/i18n.js:7
21
- msgid "Generate"
22
- msgstr "Generieren"
23
-
24
- #: app/js/i18n.js:11 common/admin.php:129 common/admin.php:130
25
- msgid "Dashboard"
26
- msgstr "Dashboard"
27
-
28
- #: app/js/i18n.js:12
29
- msgid "Pending"
30
- msgstr "Ausstehend"
31
-
32
- #: app/js/i18n.js:13
33
- msgid "Renamed"
34
- msgstr "Umbenannt"
35
-
36
- #: app/js/i18n.js:14
37
- msgid "All"
38
- msgstr "Alle"
39
-
40
- #: app/js/i18n.js:15
41
- msgid "Thumb"
42
- msgstr "Vorschaubild"
43
-
44
- #: app/js/i18n.js:16
45
- msgid "Replace / Title / Size"
46
- msgstr "Ersetzen / Titel / Größe"
47
-
48
- #: app/js/i18n.js:17
49
- msgid "Attached To"
50
- msgstr "Metadaten zu diesen Versandkosten."
51
-
52
- #: app/js/i18n.js:18
53
- msgid "Filename"
54
- msgstr "Dateiname"
55
-
56
- #: classes/admin.php:75
57
- msgid ""
58
- "JetPack's <b>Photon</b> module breaks features built in WP Retina 2x (as "
59
- "Photos moves the files away). A common and better alternative to Photon is "
60
- "to use <a href='http://tracking.maxcdn.com/c/97349/3982/378'>MaxCDN</a> "
61
- "(very popular), CloudFlare or Fastly."
62
- msgstr ""
63
- "Das <b>Photon-Modul</b> von JetPack bricht die Funktionen der WP Retina 2x "
64
- "(wenn Fotos die Dateien wegbewegen). Eine häufige und bessere Alternative zu "
65
- "Photon ist die Verwendung von <a href='http://tracking.maxcdn.com/"
66
- "c/97349/3982/378'>MaxCDN</a> (sehr beliebt), CloudFlare oder Fastly."
67
-
68
- #: classes/admin.php:121 classes/dashboard.php:14
69
- msgid "Perfect Images"
70
- msgstr "Perfekte Bilder"
71
-
72
- #: classes/core.php:572
73
- msgid "N/A"
74
- msgstr "N/A"
75
-
76
- #: classes/core.php:643
77
- msgid "PRO VERSION ONLY"
78
- msgstr "NUR PRO VERSION"
79
-
80
- #: classes/core.php:682
81
- msgid ""
82
- "The metadata is broken! This is not related to the retina plugin. You should "
83
- "probably use a plugin to re-generate the missing metadata and images."
84
- msgstr ""
85
- "Die Metadaten sind defekt! Dies hat nichts mit dem Retina-Plugin zu tun. Sie "
86
- "sollten wahrscheinlich ein Plugin verwenden, um die fehlenden Metadaten und "
87
- "Bilder neu zu generieren."
88
-
89
- #: classes/core.php:686
90
- #, php-format
91
- msgid ""
92
- "The image size '%s' could not be found. You probably changed your image "
93
- "sizes but this specific image was not re-build. This is not related to the "
94
- "retina plugin. You should probably use a plugin to re-generate the missing "
95
- "metadata and images."
96
- msgstr ""
97
- "Die Bildgröße'%s' konnte nicht gefunden werden. Sie haben wahrscheinlich "
98
- "Ihre Bildgrößen geändert, aber dieses spezielle Bild wurde nicht neu "
99
- "erstellt. Dies hat nichts mit dem Retina-Plugin zu tun. Sie sollten "
100
- "wahrscheinlich ein Plugin verwenden, um die fehlenden Metadaten und Bilder "
101
- "neu zu generieren."
102
-
103
- #: classes/core.php:704
104
- #, php-format
105
- msgid ""
106
- "The retina version of the Full-Size image is missing.<br />Full Size Retina "
107
- "has been checked in the Settings and this image is therefore required.<br /"
108
- ">Please drag & drop an image of at least <b>%dx%d</b> in the <b>Full-Size "
109
- "Retina Upload</b> column."
110
- msgstr ""
111
- "Die Retina-Version des Vollbildes fehlt.<br />Die Retina in voller Größe "
112
- "wurde in den Einstellungen überprüft und daher ist dieses Bild erforderlich."
113
- "<br />Bitte ziehen Sie ein Bild von mindestens <b>%dx%d</b> per Drag &amp; "
114
- "Drop in die Spalte <b>Full-Size Retina Upload</b>."
115
-
116
- #: classes/core.php:708
117
- #, php-format
118
- msgid ""
119
- "The Full-Size image is too small (<b>%dx%d</b>) and this size cannot be "
120
- "generated.<br />Please upload an image of at least <b>%dx%d</b>."
121
- msgstr ""
122
- "Das Bild in voller Größe ist zu klein<b> (%dx%d</b>) und diese Größe kann "
123
- "nicht erzeugt werden.<br />Bitte lade ein Bild von mindestens <b>%dx%d</b> "
124
- "hoch."
125
-
126
- #: classes/core.php:718
127
- msgid "The retina image can be created. Please use the 'GENERATE' button."
128
- msgstr ""
129
- "Das Netzhautbild kann erstellt werden. Bitte verwenden Sie die "
130
- "Schaltfläche'GENERIEREN'."
131
-
132
- #: classes/core.php:723
133
- msgid "The standard image normally created by WordPress is missing."
134
- msgstr "Das normalerweise von WordPress erstellte Standardbild fehlt."
135
-
136
- #: classes/core.php:728
137
- msgid "This size is ignored by your retina settings."
138
- msgstr "Diese Größe wird von deinen Netzhaut-Einstellungen ignoriert."
139
-
140
- #: classes/dashboard.php:15
141
- #, php-format
142
- msgid "Perfect Images %s"
143
- msgstr "Perfekte Bilder %s"
144
-
145
- #: classes/rest.php:319 premium/rest.php:43 premium/rest.php:119
146
- msgid "You do not have permission to upload files."
147
- msgstr "Sie haben keine Berechtigung zum Dateiupload."
148
-
149
- #: common/admin.php:68
150
- #, php-format
151
- msgid "<a href=\"admin.php?page=%s_settings\">Settings</a>"
152
- msgstr "<a href=\"admin.php?page=%s_settings\">Einstellungen</a>"
153
-
154
- #: common/admin.php:71
155
- msgid "Pro Version"
156
- msgstr "Pro Version"
157
-
158
- #: common/admin.php:72
159
- msgid "License Issue"
160
- msgstr "Lizenz-Ausgabe"
161
-
162
- #: common/admin.php:72
163
- msgid ""
164
- "<a target=\"_blank\" href=\"https://store.meowapps.com\">Get the <u>Pro "
165
- "Version</u></a>"
166
- msgstr ""
167
- "<a target=\"_blank\" href=\"https://store.meowapps.com\">Holen Sie sich die "
168
- "<u>Pro-Version</u></a>"
169
-
170
- #: common/admin.php:103
171
- #, php-format
172
- msgid ""
173
- "<p>It looks like you are using the free version of the plugin (<b>%s</b>) "
174
- "but a license for the Pro version was also found. The Pro version might have "
175
- "been replaced by the Free version during an update (might be caused by a "
176
- "temporarily issue). If it is the case, <b>please download it again</b> from "
177
- "the <a target=\"_blank\" href=\"https://store.meowapps.com\">Meow Store</a>. "
178
- "If you wish to continue using the free version and clear this message, click "
179
- "on this button."
180
- msgstr ""
181
- "<p>Es sieht so aus, als ob Sie die freie Version des Plugins<b> (%s)</b> "
182
- "verwenden, aber es wurde auch eine Lizenz für die Pro-Version gefunden. Die "
183
- "Pro-Version könnte während eines Updates durch die kostenlose Version "
184
- "ersetzt worden sein (könnte durch ein vorübergehendes Problem verursacht "
185
- "worden sein). Wenn dies der Fall ist, <b>laden Sie es bitte erneut</b> aus "
186
- "dem <a target=\"_blank\" href=\"https://store.meowapps.com\">Meow Store</a> "
187
- "<b>herunter</b>. Wenn Sie die kostenlose Version weiter verwenden und diese "
188
- "Meldung löschen möchten, klicken Sie auf diese Schaltfläche."
189
-
190
- #: common/admin.php:109
191
- msgid "Remove the license"
192
- msgstr "Entfernen Sie die Lizenz"
193
-
194
- #: common/admin.php:138
195
- msgid ""
196
- "<label>Hide <b>Meow Apps</b> Menu</label><br /><small>Hide Meow Apps menu "
197
- "and all its components, for a cleaner admin. This option will be reset if a "
198
- "new Meow Apps plugin is installed. <b>Once activated, an option will be "
199
- "added in your General settings to display it again.</b></small>"
200
- msgstr ""
201
- "<label>Menü für <b>Meow Apps aus</b>blenden</label><br /><small>Hide Meow "
202
- "Apps Menü und alle seine Komponenten, für eine sauberere Verwaltung. Diese "
203
- "Option wird zurückgesetzt, wenn ein neues Meow Apps Plugin installiert ist. "
204
- "<b>Nach der Aktivierung wird in Ihren Allgemeinen Einstellungen eine Option "
205
- "hinzugefügt, um sie wieder anzuzeigen.</b></small>"
206
-
207
- #. translators: %1$s is the version of the interface; %2$s is a file path.
208
- #: common/admin.php:166
209
- #, php-format
210
- msgid ""
211
- "Thanks for using <a href=\"https://meowapps.com\">Meow Apps</a>! This is the "
212
- "Meow Admin %1$s <br /><i>Loaded from %2$s </i>"
213
- msgstr ""
214
- "Vielen Dank für die Verwendung von <a href=\"https://meowapps.com\">Meow "
215
- "Apps</a>! Dies ist der Meow Admin %1$s <br /><i>Geladen von %2$s </i>"
216
-
217
- #. translators: %1$s is a plugin nicename, %2$s is a short url (slug)
218
- #: common/classes/ratings.php:65
219
- #, php-format
220
- msgid ""
221
- "You have been using <b>%1$s</b> for some time now. Thank you! Could you "
222
- "kindly share your opinion with me, along with, maybe, features you would "
223
- "like to see implemented? Then, please <a style=\"font-weight: bold; color: "
224
- "#b926ff;\" target=\"_blank\" href=\"https://wordpress.org/support/plugin/"
225
- "%2$s/reviews/?rate=5#new-post\">write a little review</a>. That will also "
226
- "bring me joy and motivation! I will get back to you :)"
227
- msgstr ""
228
- "Sie benutzen <b>%1$s</b> schon seit einiger Zeit. Ich danke Ihnen! Könnten "
229
- "Sie mir freundlicherweise Ihre Meinung mitteilen, zusammen mit, vielleicht, "
230
- "Funktionen, die Sie gerne umgesetzt sehen würden? Dann <a style=\"font-"
231
- "weight: bold; color: #b926ff;\" target=\"_blank\" href=\"https://wordpress."
232
- "org/support/plugin/%2$s/reviews/?rate=5#new-post\">schreiben Sie</a> bitte "
233
- "<a style=\"font-weight: bold; color: #b926ff;\" target=\"_blank\" href="
234
- "\"https://wordpress.org/support/plugin/%2$s/reviews/?rate=5#new-post\">eine "
235
- "kleine Rezension</a>. Das wird mir auch Freude und Motivation bringen, und "
236
- "ich werde auf Sie zurückkommen :) Falls <u>Sie bereits eine Rezension "
237
- "geschrieben haben</u>, überprüfen Sie diese bitte noch einmal. Viele "
238
- "Rezensionen wurden kürzlich aus WordPress entfernt."
239
-
240
- #: common/classes/ratings.php:73
241
- msgid "Never remind me!"
242
- msgstr "Erinnern Sie mich nie daran!"
243
-
244
- #: common/classes/ratings.php:78
245
- msgid "Remind me in a few weeks..."
246
- msgstr "Erinnern Sie mich daran, dass ich in ein paar Wochen..."
247
-
248
- #: common/classes/ratings.php:83
249
- msgid "Yes, I did it!"
250
- msgstr "Ja, ich hab's geschafft!"
251
-
252
- #: common/classes/updater.php:228
253
- #, php-format
254
- msgid ""
255
- "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
256
- msgstr ""
257
- "Es ist eine neue Version von %1$s verfügbar. %2$sDetails zu Version %3$s "
258
- "ansehen%4$s."
259
-
260
- #: common/classes/updater.php:236
261
- #, php-format
262
- msgid ""
263
- "There is a new version of %1$s available. %2$sView version %3$s details%4$s "
264
- "or %5$supdate now%6$s."
265
- msgstr ""
266
- "Es ist eine neue Version von %1$s verfügbar. %2$sDetails zu Version %3$s "
267
- "ansehen%4$s oder %5$sjetzt aktualisieren%6$s."
268
-
269
- #: common/classes/updater.php:493
270
- msgid "You do not have permission to install plugin updates"
271
- msgstr "Sie haben keine Berechtigung, um Plugin-Updates zu installieren"
272
-
273
- #: common/classes/updater.php:493
274
- msgid "Error"
275
- msgstr "Fehler"
276
-
277
- #: premium/rest.php:125
278
- msgid "The file is not an image or the upload went wrong."
279
- msgstr "Die Datei ist kein Bild oder der Upload ist schief gelaufen."
280
-
281
- #: premium/rest.php:131
282
- msgid "You cannot use this file (wrong extension? wrong type?)."
283
- msgstr "Sie können diese Datei nicht hochladen (falscher Dateityp?)."
284
-
285
- #. Plugin Name of the plugin/theme
286
- msgid "Perfect Images + Retina (Pro)"
287
- msgstr "Dateien für hohe Auflösungen"
288
-
289
- #. Plugin URI of the plugin/theme
290
- #. Author URI of the plugin/theme
291
- msgid "https://meowapps.com"
292
- msgstr "https://meowapps.com"
293
-
294
- #. Description of the plugin/theme
295
- msgid ""
296
- "Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image "
297
- "Threshold and more."
298
- msgstr ""
299
- "Retina, Bilder ersetzen, Miniaturansichten regenerieren, Verwaltung der "
300
- "Bildgrößen, Bildschwelle und mehr."
301
-
302
- #. Author of the plugin/theme
303
- msgid "Jordy Meow"
304
- msgstr "Jordy Meow"
305
-
306
- #~ msgid ""
307
- #~ "Done. Please <a href='javascript:history.go(0)'>refresh</a> this page."
308
- #~ msgstr ""
309
- #~ "Erledigt. Bitte <a href='javascript:history.go(0)'>lade die Seite neu</a>."
310
-
311
- #~ msgid ""
312
- #~ "Done. You might want to <a href='?page=wp-"
313
- #~ "retina-2x&view=issues&refresh=true'>refresh</a> the issues."
314
- #~ msgstr ""
315
- #~ "fertig. Möchten Sie vielleicht die Seite <a href='?page=wp-"
316
- #~ "retina-2x&view=issues&refresh=true'>aktualisieren</a>?"
317
-
318
- #~ msgid "Please wait..."
319
- #~ msgstr "Bitte warten..."
320
-
321
- #~ msgid "Nothing to do ;)"
322
- #~ msgstr "Nichts zu tun ;)"
323
-
324
- #~ msgid "GENERATE"
325
- #~ msgstr "GENERIEREN"
326
-
327
- #~ msgid "The attachment ID is missing."
328
- #~ msgstr "Die Anhangs-ID fehlt."
329
-
330
- #~ msgid "Retina files deleted."
331
- #~ msgstr "Retina-Dateien gelöscht."
332
-
333
- #~ msgid "Retina files generated."
334
- #~ msgstr "Netzhautdateien generiert."
335
-
336
- #~ msgid "You don't have the rights to use a temporary directory."
337
- #~ msgstr ""
338
- #~ "Sie haben nicht die Rechte zur Verwendung eines temporären Verzeichnisses."
339
-
340
- #~ msgid "The temporary directory could not be created."
341
- #~ msgstr "Das temporäre Verzeichnis konnte nicht erstellt werden."
342
-
343
- #~ msgid "Replaced successfully."
344
- #~ msgstr "Erfolgreich ersetzt."
345
-
346
- #~ msgid "Retina images"
347
- #~ msgstr "Netzhautbilder"
348
-
349
- #, php-format
350
- #~ msgid "Retina %s"
351
- #~ msgstr "Netzhaut %s"
352
-
353
- #~ msgid "Delete all @2x"
354
- #~ msgstr "Alle (@2x) Dateien löschen"
355
-
356
- #~ msgid "Refresh issues"
357
- #~ msgstr "Fehler erneut lesen"
358
-
359
- #~ msgid "Issues has been refreshed."
360
- #~ msgstr "Probleme wurden neu gelesen."
361
-
362
- #~ msgid ""
363
- #~ "This screen allows you to check the media for which the retina files are "
364
- #~ "missing. You can then create the files independently for each media or "
365
- #~ "for all of them. You can also upload and replace the images by drag & "
366
- #~ "drop them on the grid."
367
- #~ msgstr ""
368
- #~ "Auf diesem Bildschirm können Sie die Bilder überprüfen, für die die "
369
- #~ "Retinadateien fehlen. Sie können die Dateien dann für jedes Medium oder "
370
- #~ "für alle unabhängig erstellen. Sie können die Bilder auch hochladen und "
371
- #~ "ersetzen, indem Sie sie ins Raster ziehen und ablegen."
372
-
373
- #~ msgid "Issues"
374
- #~ msgstr "Probleme"
375
-
376
- #~ msgid "Ignored"
377
- #~ msgstr "Ignorierte Dateien"
378
-
379
- #~ msgid "Title"
380
- #~ msgstr "Titel"
381
-
382
- #~ msgid "Actions"
383
- #~ msgstr "Aktion"
384
-
385
- #~ msgid "IGNORE"
386
- #~ msgstr "Ignorieren"
387
-
388
- #~ msgid "Current method:"
389
- #~ msgstr "Aktuelle Methode:"
390
-
391
- #~ msgid "Client side"
392
- #~ msgstr "Klient-Seitig"
393
-
394
- #~ msgid "Server side"
395
- #~ msgstr "Serverseitige Anwendung"
396
-
397
- #~ msgid ""
398
- #~ "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
399
- #~ "must edit your .htaccess manually and add '<b>RewriteRule ^files/(.+) wp-"
400
- #~ "content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as "
401
- #~ "the first RewriteRule if you want the server-side to work."
402
- #~ msgstr ""
403
- #~ "Übrigens, Sie verwenden eine <b>WordPress Multi-Site Installation</b>! "
404
- #~ "Sie müssen Ihren.htaccess manuell bearbeiten und<b> 'RewriteRule ^files/(."
405
- #~ "+) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&amp;file=$1[L]</"
406
- #~ "b>' als erste RewriteRule hinzufügen, wenn die Server-Seite funktionieren "
407
- #~ "soll."
408
-
409
- #~ msgid ""
410
- #~ "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
411
- #~ "must edit your .htaccess manually and add '<b>RewriteRule ^(wp-content/.+"
412
- #~ "\\.(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/wp-"
413
- #~ "retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as the first "
414
- #~ "RewriteRule if you want the server-side to work."
415
- #~ msgstr ""
416
- #~ "Übrigens, Sie verwenden eine <b>WordPress Multi-Site Installation</b>! "
417
- #~ "Sie müssen Ihren.htaccess manuell bearbeiten und<b> 'RewriteRule ^(wp-"
418
- #~ "content/.+\\.(png|gif|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP))) wp-content/"
419
- #~ "plugins/wp-retina-2x/wr2x_image.php?ms=true&amp;file=$1[L]</b>' als erste "
420
- #~ "RewriteRule hinzufügen, wenn Sie wollen, dass die Server-Seite "
421
- #~ "funktioniert."
422
-
423
- #~ msgid ""
424
- #~ "The permalinks are not enabled. They need to be enabled in order to use "
425
- #~ "the server-side method."
426
- #~ msgstr ""
427
- #~ "Die Permalinks sind nicht aktiviert. Sie müssen aktiviert werden, um die "
428
- #~ "serverseitige Methode nutzen zu können."
429
-
430
- #~ msgid "Basics"
431
- #~ msgstr "Grundlagen"
432
-
433
- #~ msgid "Advanced"
434
- #~ msgstr "Erweitert"
435
-
436
- #~ msgid "Disabled Sizes"
437
- #~ msgstr "Größen deaktivieren"
438
-
439
- #~ msgid "The checked sizes will not be generated for Retina displays."
440
- #~ msgstr "Die ausgewählten Größen werden für Retina-Displays nicht erzeugt."
441
-
442
- #~ msgid "Auto Generate"
443
- #~ msgstr "Automatisch erstellen"
444
-
445
- #~ msgid ""
446
- #~ "Generate Retina images automatically when images are uploaded to the "
447
- #~ "Media Library."
448
- #~ msgstr ""
449
- #~ "Retina Bildern werden automatisch erzeugt, wenn Bilder in die "
450
- #~ "Medienbibliothek hochgeladen werden."
451
-
452
- #~ msgid "Method"
453
- #~ msgstr "Methode"
454
-
455
- #~ msgid ""
456
- #~ "<br />\n"
457
- #~ " \t\tThe <b>HTML Rewrite method</b> is probably the best, "
458
- #~ "especially when used with Cloudflare or Google PageSpeed Service! You "
459
- #~ "cannot use a basic HTML caching plugin with it (or you have to hack the "
460
- #~ "options properly). <br /><br />\n"
461
- #~ " \t\tThe <b>Server-side method</b> is very fast and "
462
- #~ "efficient. However, depending on the hosting and cache system you are "
463
- #~ "using (including services like Cloudflare) you might encounter issues."
464
- #~ "<br /><br />\n"
465
- #~ " \t\tThe <b>Client-side method</b> is fail-safe and only "
466
- #~ "uses a JavaScript file. When a Retina Display is detected, requests for "
467
- #~ "every images on the page will be sent to the server and a high resolution "
468
- #~ "image will be retrieved if available. It requires more bandwidth.\n"
469
- #~ " \t"
470
- #~ msgstr ""
471
- #~ "<br>Die <b>HTML-Rewrite-Methode</b> ist wahrscheinlich die beste, "
472
- #~ "besonders wenn sie mit Cloudflare oder Google PageSpeed Service verwendet "
473
- #~ "wird! Sie können damit kein grundlegendes HTML-Caching-Plugin verwenden "
474
- #~ "(oder Sie müssen die Optionen richtig hacken).<br><br>Die <b>Server-Side-"
475
- #~ "Methode</b> ist sehr schnell und effizient. Je nach Hosting-und Cache-"
476
- #~ "System, das Sie verwenden (einschließlich Dienste wie Cloudflare), können "
477
- #~ "Sie jedoch auf Probleme stoßen.<br><br>Die <b>Client-Side-Methode</b> ist "
478
- #~ "ausfallsicher und verwendet nur eine JavaScript-Datei. Wenn ein Retina-"
479
- #~ "Display erkannt wird, werden Anfragen für jedes Bild auf der Seite an den "
480
- #~ "Server gesendet und ein hochauflösendes Bild wird abgerufen, wenn "
481
- #~ "verfügbar. Es erfordert mehr Bandbreite "
482
-
483
- #~ msgid "HTML Rewrite"
484
- #~ msgstr "HTML Neuschreiben"
485
-
486
- #~ msgid "None"
487
- #~ msgstr "Keine"
488
-
489
- #~ msgid "Quality"
490
- #~ msgstr "Qualität"
491
-
492
- #~ msgid "Image Compression quality (between 0 and 100)."
493
- #~ msgstr "Bilder Kompressionsqualität (zwischen 0 und 100)."
494
-
495
- #~ msgid "Debug Mode"
496
- #~ msgstr "Debug Modus"
497
-
498
- #~ msgid ""
499
- #~ "If checked, the client will be always served Retina images. Convenient "
500
- #~ "for testing."
501
- #~ msgstr ""
502
- #~ "Wenn diese Option aktiviert ist, werden dem Client immer Retina-Bilder "
503
- #~ "gesendet. Praktisch zum Testen."
504
-
505
- #~ msgid "Hide 'Retina' column"
506
- #~ msgstr "Retina Spalte nicht anzeigen"
507
-
508
- #~ msgid "Will hide the 'Retina Column' from the Media Library."
509
- #~ msgstr "Versteckt die Retina Spalte in der Mediathek."
510
-
511
- #~ msgid "Hide Retina Dashboard"
512
- #~ msgstr "Retina Spalte nicht anzeigen"
513
-
514
- #~ msgid "Doesn't show the Retina Dashboard menu and tools."
515
- #~ msgstr "Das Retina Dashboard-Menü und die Tools werden nicht angezeigt."
516
-
517
- #~ msgid "Ignore Mobile"
518
- #~ msgstr "Mobilgeräte Ignorieren"
519
-
520
- #~ msgid "Doesn't deliver Retina images to mobiles."
521
- #~ msgstr "Retina Bilder werden nicht an Mobile ausgeliefert"
522
-
523
- #~ msgid "Titre"
524
- #~ msgstr "Titre"
525
-
526
- #~ msgid ""
527
- #~ "Current method: <u>Server-side</u>.</span> Oh, and don't forget to check "
528
- #~ "the tutorial of this plugin on <a href='http://www.totorotimes.com/news/"
529
- #~ "retina-display-wordpress-plugin'>Totoro Times</a>."
530
- #~ msgstr ""
531
- #~ "Méthode sélectionnée: <u>Server-side</u>.</span> Oh, n'oubliez pas de "
532
- #~ "lire mon tutoriel sur ce plugin sur <a href='http://www.totorotimes.com/"
533
- #~ "news/retina-display-wordpress-plugin'>Totoro Times</a>."
534
-
535
- #~ msgid "Done."
536
- #~ msgstr "Terminé."
537
-
538
- #~ msgid "ERROR"
539
- #~ msgstr "ERREUR"
540
-
541
- #~ msgid "Not created yet."
542
- #~ msgstr "Pas encore créé."
543
-
544
- #~ msgid "Generate for all files"
545
- #~ msgstr "Générer tous les fichiers"
546
-
547
- #~ msgid ""
548
- #~ "By the way, you are also using a <b>WordPress Network installation</b>. "
549
- #~ "The server-side might not work for you, so <b>please try the client-side "
550
- #~ "method instead</b>. If you really want to use this method, you will have "
551
- #~ "to work on your .htaccess manually."
552
- #~ msgstr ""
553
- #~ "Vous utilisez une version de WordPress <b>Multisite</b>. Il est possible "
554
- #~ "que la méthode côté serveur ne fonctionne pas, alors dans ce cas essayé "
555
- #~ "la méthode <b>côté client</b>. Si vous voulez vraiment utiliser cette "
556
- #~ "méthode, vous aurez peut-être besoin de bidouiller votre .htaccess "
557
- #~ "manuellement."
558
-
559
- #~ msgid ""
560
- #~ "This plugin supports and uses the <a href='http://wordpress.org/extend/"
561
- #~ "plugins/enable-media-replace/'>Enable Media Replace</a> plugin if "
562
- #~ "available. A 'Replace' button will appear in case your images are too "
563
- #~ "small. It is strongly recommended to install it."
564
- #~ msgstr ""
565
- #~ "WP Retina 2x peut automatiquement utiliser le plugin <a href='http://"
566
- #~ "wordpress.org/extend/plugins/enable-media-replace/'>Enable Media Replace</"
567
- #~ "a> si il est installé. Un bouton 'Réuploader' apparaîtra alors lorsque "
568
- #~ "l'image originale est trop petite."
569
-
570
- #~ msgid ""
571
- #~ "This plugin is actively developped and maintained by <a href='https://"
572
- #~ "plus.google.com/106075761239802324012'>Jordy Meow</a>.<br />Please visit "
573
- #~ "me at <a href='http://www.totorotimes.com'>Totoro Times</a>, a website "
574
- #~ "about Japan, photography and abandoned places.<br />And thanks for "
575
- #~ "linking us on <a href='https://www.facebook.com/totorotimes'>Facebook</a> "
576
- #~ "and <a href='https://plus.google.com/106832157268594698217'>Google+</a> :)"
577
- #~ msgstr ""
578
- #~ "Ce plugin est activement développé et maintenu par <a href='https://plus."
579
- #~ "google.com/106075761239802324012'>Jordy Meow</a>.<br />Merci de me "
580
- #~ "visiter sur <a href='http://www.totorotimes.fr'>Totoro Times</a>, un site "
581
- #~ "sur le Japan, la photographie et les endroits abandonnés.<br />Et merci "
582
- #~ "de nous adorer sur <a href='https://www.facebook.com/"
583
- #~ "totorotimes'>Facebook</a> et <a href='https://plus.google."
584
- #~ "com/106832157268594698217'>Google+</a> :)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/wp-retina-2x-fr_FR.mo DELETED
Binary file
trunk/languages/wp-retina-2x-fr_FR.po DELETED
@@ -1,711 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: WP Retina 2x\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-06-23 15:58+0900\n"
6
- "PO-Revision-Date: 2015-06-23 16:19+0900\n"
7
- "Last-Translator: Jordy Meow <work@meow.fr>\n"
8
- "Language-Team: Jordy Meow <work@meow.fr>\n"
9
- "Language: fr_FR\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _e;__\n"
14
- "X-Poedit-Basepath: ../\n"
15
- "X-Generator: Poedit 1.8.1\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-SearchPath-0: .\n"
18
-
19
- #: wp-retina-2x.php:354
20
- msgid "N/A"
21
- msgstr "N/A"
22
-
23
- #: wp-retina-2x.php:387
24
- msgid ""
25
- "PRO VERSION ONLY<br /><br />You can buy a serial from here: <a "
26
- "target='_blank' href='http://apps.meow.fr/wp-retina-2x/'>WP Retina 2x</a>."
27
- "<br />Then add this serial in the settings. That's all! :)<br />Thanks a lot "
28
- "for your support."
29
- msgstr ""
30
- "PRO VERSION SEULEMENT<br /><br />Vous pouvez obtenir un serial code ici : <a "
31
- "target='_blank' href='http://apps.meow.fr/wp-retina-2x/'>WP Retina 2x</a>."
32
- "<br />Ajouter le ensuite dans les paramètres de Retina.<br />Merci beaucoup "
33
- "pour votre support :)"
34
-
35
- #: wp-retina-2x.php:422
36
- msgid ""
37
- "The metadata is broken! This is not related to the retina plugin. You should "
38
- "probably use a plugin to re-generate the missing metadata and images."
39
- msgstr ""
40
-
41
- #: wp-retina-2x.php:426
42
- #, php-format
43
- msgid ""
44
- "The image size '%s' could not be found. You probably changed your image "
45
- "sizes but this specific image was not re-build. This is not related to the "
46
- "retina plugin. You should probably use a plugin to re-generate the missing "
47
- "metadata and images."
48
- msgstr ""
49
-
50
- #: wp-retina-2x.php:444
51
- #, php-format
52
- msgid ""
53
- "The retina version of the Full-Size image is missing.<br />Full Size Retina "
54
- "has been checked in the Settings and this image is therefore required.<br /"
55
- ">Please drag & drop an image of at least <b>%dx%d</b> in the <b>Full-Size "
56
- "Retina Upload</b> column."
57
- msgstr ""
58
-
59
- #: wp-retina-2x.php:448
60
- #, php-format
61
- msgid ""
62
- "The Full-Size image is too small (<b>%dx%d</b>) and this size cannot be "
63
- "generated.<br />Please upload an image of at least <b>%dx%d</b>."
64
- msgstr ""
65
-
66
- #: wp-retina-2x.php:458
67
- msgid "The retina image can be created. Please use the 'GENERATE' button."
68
- msgstr ""
69
-
70
- #: wp-retina-2x.php:463
71
- msgid "The standard image normally created by WordPress is missing."
72
- msgstr ""
73
-
74
- #: wp-retina-2x.php:468
75
- msgid "This size is ignored by your retina settings."
76
- msgstr "Cette taille est ignorée par vos paramètres."
77
-
78
- #: wp-retina-2x.php:952
79
- msgid "Your serial does not seem right."
80
- msgstr ""
81
-
82
- #: wp-retina-2x.php:955
83
- msgid "Your subscription is not active."
84
- msgstr "Votre plugin n'est pas enregistré."
85
-
86
- #: wp-retina-2x.php:958
87
- msgid "Too many URLs are linked to your subscription."
88
- msgstr ""
89
-
90
- #: wp-retina-2x.php:970
91
- msgid "Your subscription is enabled."
92
- msgstr "Votre plugin est enregistré."
93
-
94
- #: wr2x_ajax.php:30
95
- msgid ""
96
- "<a href='?page=wp-retina-2x&view=issues&refresh=true'>Refresh</a> this page."
97
- msgstr ""
98
-
99
- #: wr2x_ajax.php:58 wr2x_ajax.php:105
100
- msgid "Wait..."
101
- msgstr "Patientez..."
102
-
103
- #: wr2x_ajax.php:66
104
- msgid "Nothing to do ;)"
105
- msgstr "Rien à faire ;)"
106
-
107
- #: wr2x_ajax.php:112 wr2x_retina-dashboard.php:251
108
- msgid "GENERATE"
109
- msgstr "GÉNÉRER"
110
-
111
- #: wr2x_ajax.php:356 wr2x_ajax.php:392 wr2x_ajax.php:425 wr2x_ajax.php:449
112
- msgid "The attachment ID is missing."
113
- msgstr "The attachment ID is missing."
114
-
115
- #: wr2x_ajax.php:380
116
- msgid "Full retina file deleted."
117
- msgstr ""
118
-
119
- #: wr2x_ajax.php:414
120
- msgid "Retina files deleted."
121
- msgstr "Les images Retina ont été supprimées."
122
-
123
- #: wr2x_ajax.php:437
124
- msgid "Details retrieved."
125
- msgstr "Détails téléchargés."
126
-
127
- #: wr2x_ajax.php:467
128
- msgid "Retina files generated."
129
- msgstr "Les images Retina ont été générées."
130
-
131
- #: wr2x_ajax.php:477
132
- msgid "You do not have permission to upload files."
133
- msgstr "Vous n'avez pas la permission d'uploader des fichiers."
134
-
135
- #: wr2x_ajax.php:499
136
- msgid "The temporary directory could not be created."
137
- msgstr "The temporary directory could not be created."
138
-
139
- #: wr2x_ajax.php:515
140
- msgid "The file is not an image or the upload went wrong."
141
- msgstr ""
142
- "Ce fichier n'est pas une image ou alors il y a eu un problème durant "
143
- "l'upload."
144
-
145
- #: wr2x_ajax.php:525
146
- msgid "You cannot use this file (wrong extension? wrong type?)."
147
- msgstr "Vous ne pouvez pas utiliser ce fichier (mauvaise extension ou type ?)."
148
-
149
- #: wr2x_ajax.php:568
150
- msgid "Uploaded successfully."
151
- msgstr "Mise à jour réussie."
152
-
153
- #: wr2x_ajax.php:619
154
- msgid "Replaced successfully."
155
- msgstr "Remplacé avec succès."
156
-
157
- #: wr2x_retina-dashboard.php:26
158
- msgid "Retina images"
159
- msgstr "Images Retina"
160
-
161
- #: wr2x_retina-dashboard.php:27
162
- #, php-format
163
- msgid "Retina %s"
164
- msgstr "Retina %s"
165
-
166
- #: wr2x_retina-dashboard.php:138
167
- msgid "Refresh"
168
- msgstr "Rafraîchir"
169
-
170
- #: wr2x_retina-dashboard.php:152
171
- msgid "Bulk Delete"
172
- msgstr "Tout Supprimer"
173
-
174
- #: wr2x_retina-dashboard.php:155
175
- msgid "Bulk Generate"
176
- msgstr "Tout Générer"
177
-
178
- #: wr2x_retina-dashboard.php:166
179
- msgid "The logs have been cleared."
180
- msgstr "Les logs ont été supprimés."
181
-
182
- #: wr2x_retina-dashboard.php:190
183
- #, php-format
184
- msgid ""
185
- "The full-size images should have a resolution of <b>%d×%d</b> at least for "
186
- "the plugin to be able generate the <b>%d retina images</b> required by your "
187
- "website."
188
- msgstr ""
189
- "Les images Full-Size images doivent avoir une résolution d'au moins <b>%d×"
190
- "%d</b> pour que le plugin puisse générer les <b>%d images retina</b>."
191
-
192
- #: wr2x_retina-dashboard.php:191
193
- #, php-format
194
- msgid ""
195
- "You <b>also need</b> to upload a retina image for the Full-Size image (might "
196
- "be <b>%d×%d</b>)."
197
- msgstr ""
198
-
199
- #: wr2x_retina-dashboard.php:192
200
- msgid "You can upload or replace the images by drag & drop."
201
- msgstr ""
202
-
203
- #: wr2x_retina-dashboard.php:193
204
- #, php-format
205
- msgid "Your PHP configuration allows uploads of <b>%dMB</b> maximum."
206
- msgstr ""
207
-
208
- #: wr2x_retina-dashboard.php:197
209
- #, php-format
210
- msgid ""
211
- "The <a target=\"_blank\" href=\"%s/wp-retina-2x.log\">log file</a> is "
212
- "available. You can also <a href=\"?page=wp-"
213
- "retina-2x&view=issues&clearlogs=true\">clear</a> it."
214
- msgstr ""
215
-
216
- #: wr2x_retina-dashboard.php:215
217
- msgid "All"
218
- msgstr "Tous"
219
-
220
- #: wr2x_retina-dashboard.php:216
221
- msgid "Issues"
222
- msgstr "Problèmes"
223
-
224
- #: wr2x_retina-dashboard.php:217
225
- msgid "Ignored"
226
- msgstr "Ignorés"
227
-
228
- #: wr2x_retina-dashboard.php:223
229
- msgid "Base image"
230
- msgstr ""
231
-
232
- #: wr2x_retina-dashboard.php:224
233
- msgid "Media Sizes<br />Retina-ized"
234
- msgstr ""
235
-
236
- #: wr2x_retina-dashboard.php:225
237
- msgid "Full-Size<br/><b>Replace</b>"
238
- msgstr ""
239
-
240
- #: wr2x_retina-dashboard.php:226
241
- msgid "Full-Size Retina"
242
- msgstr ""
243
-
244
- #: wr2x_retina-dashboard.php:227
245
- msgid "Full-Size Retina<br/><b>Upload</b>"
246
- msgstr ""
247
-
248
- #: wr2x_retina-dashboard.php:253
249
- msgid "IGNORE"
250
- msgstr "IGNORER"
251
-
252
- #: wr2x_retina-dashboard.php:254
253
- msgid "DETAILS"
254
- msgstr "DETAILS"
255
-
256
- #: wr2x_settings.php:21 wr2x_settings.php:24 wr2x_settings.php:27
257
- msgid "Current method:"
258
- msgstr "Methode utilisée :"
259
-
260
- #: wr2x_settings.php:21
261
- msgid "Client side"
262
- msgstr "Client side"
263
-
264
- #: wr2x_settings.php:24
265
- msgid "PictureFill"
266
- msgstr "PictureFill"
267
-
268
- #: wr2x_settings.php:27
269
- msgid "Server side"
270
- msgstr "Server side"
271
-
272
- #: wr2x_settings.php:32
273
- msgid ""
274
- "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
275
- "must edit your .htaccess manually and add '<b>RewriteRule ^files/(.+) wp-"
276
- "content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as the "
277
- "first RewriteRule if you want the server-side to work."
278
- msgstr ""
279
- "Vous avez une <b>installation Multi-Site de WordPress</b> ! Vous devez "
280
- "éditer votre .htaccess manuellement et rajouter '<b>RewriteRule ^files/(.+."
281
- "(?:jpe?g|gif|png)) wp-content/plugins/wp-retina-2x/wr2x_image.php?"
282
- "ms=true&file=$1 [L]</b>' en tant que première RewriteRule si vous voulez que "
283
- "le Client side fonctionne."
284
-
285
- #: wr2x_settings.php:35
286
- msgid ""
287
- "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
288
- "must edit your .htaccess manually and add '<b>RewriteRule ^(wp-content/.+\\."
289
- "(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/wp-retina-2x/"
290
- "wr2x_image.php?ms=true&file=$1 [L]</b>' as the first RewriteRule if you want "
291
- "the server-side to work."
292
- msgstr ""
293
- "Vous avez une <b>installation Multi-Site de WordPress</b> ! Vous devez "
294
- "éditer votre .htaccess manuellement et rajouter '<b>RewriteRule ^(wp-"
295
- "content/.+\\.(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/"
296
- "wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' en tant que première "
297
- "RewriteRule si vous voulez que le Client side fonctionne."
298
-
299
- #: wr2x_settings.php:39
300
- msgid ""
301
- "The permalinks are not enabled. They need to be enabled in order to use the "
302
- "server-side method."
303
- msgstr ""
304
- "Les permaliens n'étant pas activés, la méthode côté serveur ne pourra pas "
305
- "fonctionner."
306
-
307
- #: wr2x_settings.php:85
308
- msgid "Basics"
309
- msgstr "Basic"
310
-
311
- #: wr2x_settings.php:89
312
- msgid "Advanced"
313
- msgstr "Avancé"
314
-
315
- #: wr2x_settings.php:93
316
- msgid "Pro"
317
- msgstr "Pro"
318
-
319
- #: wr2x_settings.php:111
320
- msgid "Disabled Sizes"
321
- msgstr "Tailles désactivés"
322
-
323
- #: wr2x_settings.php:112
324
- msgid ""
325
- "<br />The selected sizes will not have their retina equivalent generated."
326
- msgstr ""
327
-
328
- #: wr2x_settings.php:118
329
- msgid "Auto Generate"
330
- msgstr "Auto-Génération"
331
-
332
- #: wr2x_settings.php:119
333
- msgid ""
334
- "Generate retina images automatically when images are uploaded or re-"
335
- "generated.<br />The 'Disabled Sizes' will be skipped."
336
- msgstr ""
337
-
338
- #: wr2x_settings.php:125
339
- msgid "Full Size Retina (Pro)"
340
- msgstr ""
341
-
342
- #: wr2x_settings.php:126
343
- msgid ""
344
- "Retina for the full-size image will be considered required.<br />Checks and "
345
- "upload feature are available."
346
- msgstr ""
347
-
348
- #: wr2x_settings.php:134
349
- msgid "Method"
350
- msgstr "Méthode"
351
-
352
- #: wr2x_settings.php:135
353
- msgid ""
354
- "<br />Check the <a href=\"http://apps.meow.fr/wp-retina-2x/\">plugin "
355
- "official page</a> if you want to know more about the methods to deliver the "
356
- "retina images."
357
- msgstr ""
358
-
359
- #: wr2x_settings.php:139
360
- msgid "Picturefill (Recommended)"
361
- msgstr ""
362
-
363
- #: wr2x_settings.php:140
364
- msgid "Retina.js"
365
- msgstr "Retina.js"
366
-
367
- #: wr2x_settings.php:141
368
- msgid "IMG Rewrite"
369
- msgstr ""
370
-
371
- #: wr2x_settings.php:142
372
- msgid "Retina-Images"
373
- msgstr "Retina-Images"
374
-
375
- #: wr2x_settings.php:143
376
- msgid "None"
377
- msgstr "Aucune"
378
-
379
- #: wr2x_settings.php:148
380
- msgid "Quality"
381
- msgstr "Qualité"
382
-
383
- #: wr2x_settings.php:149
384
- msgid ""
385
- "<br />Image Compression quality (between 0 and 100).<br />That doesn't "
386
- "always actually work depending on your hosting service."
387
- msgstr ""
388
-
389
- #: wr2x_settings.php:155
390
- msgid "Debug Mode"
391
- msgstr "Mode Debug"
392
-
393
- #: wr2x_settings.php:156
394
- msgid ""
395
- "If checked, the client will be always served Retina images. <br />Please use "
396
- "it for testing purposes. It creates a <a href=\""
397
- msgstr ""
398
-
399
- #: wr2x_settings.php:162
400
- msgid "Custom CDN Domain (Pro)"
401
- msgstr ""
402
-
403
- #: wr2x_settings.php:163
404
- msgid ""
405
- "<br />If not empty, your site domain will be replaced with this CDN domain "
406
- "(PictureFill and HTML Rewrite only)."
407
- msgstr ""
408
-
409
- #: wr2x_settings.php:170
410
- msgid "<h2>For PictureFill</h2>"
411
- msgstr ""
412
-
413
- #: wr2x_settings.php:175
414
- msgid "Keep IMG SRC (Pro)"
415
- msgstr ""
416
-
417
- #: wr2x_settings.php:176
418
- msgid ""
419
- "With PictureFill, <b>src</b> tags are replaced by <b>src-set</b> tags and "
420
- "consequently search engines might not be able to find and reference those "
421
- "images. Keeping it will load images twice for retina devices on old browsers."
422
- msgstr ""
423
-
424
- #: wr2x_settings.php:182
425
- msgid "Use Lazysizes (Pro)"
426
- msgstr ""
427
-
428
- #: wr2x_settings.php:183
429
- msgid ""
430
- "HTML will be rewritten to support the lazysizes and the script will be also "
431
- "loaded. The images will be loaded in a lazy way (when the visitor is getting "
432
- "close to them)."
433
- msgstr ""
434
-
435
- #: wr2x_settings.php:189
436
- msgid "No Picturefill Script"
437
- msgstr ""
438
-
439
- #: wr2x_settings.php:190
440
- msgid ""
441
- "The script for Picturefill will not be loaded. Only the browsers with src-"
442
- "set support (e.g. Chrome) will display images. You can also load the "
443
- "Picturefill script manually."
444
- msgstr ""
445
-
446
- #: wr2x_settings.php:197
447
- msgid "<h2>Admin Screens</h2>"
448
- msgstr ""
449
-
450
- #: wr2x_settings.php:202
451
- msgid "Hide 'Retina' column"
452
- msgstr "Cacher la colonne 'Retina'"
453
-
454
- #: wr2x_settings.php:203
455
- msgid "Will hide the 'Retina Column' from the Media Library."
456
- msgstr "La colonne Retina ne s'affichera plus dans la Bibliothèque."
457
-
458
- #: wr2x_settings.php:209
459
- msgid "Hide Retina Dashboard"
460
- msgstr "Cacher le Retina Dashboard"
461
-
462
- #: wr2x_settings.php:210
463
- msgid "Doesn't show the Retina Dashboard menu and tools."
464
- msgstr "Le Retina Dashboard ne s'affichera plus dans les menus."
465
-
466
- #: wr2x_settings.php:216
467
- msgid "Admin in Retina"
468
- msgstr ""
469
-
470
- #: wr2x_settings.php:217
471
- msgid ""
472
- "If checked, the WordPress Admin will also be Retina. Some plugins (like "
473
- "NextGen) do not like Retina enabled in the admin."
474
- msgstr ""
475
-
476
- #: wr2x_settings.php:224
477
- msgid "<h2>Mobiles</h2>"
478
- msgstr ""
479
-
480
- #: wr2x_settings.php:229
481
- msgid "Ignore Mobile"
482
- msgstr "Ignorer Mobiles"
483
-
484
- #: wr2x_settings.php:230
485
- msgid ""
486
- "Doesn't deliver Retina images to mobiles.<br />PictureFill doesn't support "
487
- "it and cache will also prevent it from working."
488
- msgstr ""
489
-
490
- #: wr2x_settings.php:244
491
- msgid "Serial"
492
- msgstr ""
493
-
494
- #: wr2x_settings.php:245
495
- msgid ""
496
- "<br />Enter your serial or subscription ID here. If you don't have one yet, "
497
- "get one <a target=\"_blank\" href=\"http://apps.meow.fr/wp-retina-2x/"
498
- "\">right here</a>."
499
- msgstr ""
500
-
501
- #~ msgid ""
502
- #~ "Done. Please <a href='javascript:history.go(0)'>refresh</a> this page."
503
- #~ msgstr ""
504
- #~ "Fait. <a href='javascript:history.go(0)'>Rafraîchissez</a> cette page."
505
-
506
- #~ msgid ""
507
- #~ "Done. You might want to <a href='?page=wp-"
508
- #~ "retina-2x&view=issues&refresh=true'>refresh</a> the issues."
509
- #~ msgstr ""
510
- #~ "Fait. Vous devriez peut-être <a href='?page=wp-"
511
- #~ "retina-2x&view=issues&refresh=true'>rafraîchir</a> la liste des problèmes."
512
-
513
- #~ msgid "Please wait..."
514
- #~ msgstr "Patientez SVP..."
515
-
516
- #~ msgid "You don't have the rights to use a temporary directory."
517
- #~ msgstr "Vous n'avez pas la permission d'utiliser un répertoire temporaire."
518
-
519
- #~ msgid "WP Retina 2x %s"
520
- #~ msgstr "WP Retina 2x %s"
521
-
522
- #~ msgid "Generate"
523
- #~ msgstr "Générer"
524
-
525
- #~ msgid "Delete all @2x"
526
- #~ msgstr "Tout supprimer (@2x)"
527
-
528
- #~ msgid "Refresh issues"
529
- #~ msgstr "Rafraîchir"
530
-
531
- #~ msgid "Issues has been refreshed."
532
- #~ msgstr "La liste des problèmes a été rafraîchie."
533
-
534
- #~ msgid ""
535
- #~ "This screen allows you to check the media for which the retina files are "
536
- #~ "missing. You can then create the files independently for each media or "
537
- #~ "for all of them. You can also upload and replace the images by drag & "
538
- #~ "drop them on the grid."
539
- #~ msgstr ""
540
- #~ "Cet écran vous permet de vérifier pour quels médias les fichiers Retina "
541
- #~ "n'ont pas encore été créés. Vous pouvez ensuite créer les fichiers "
542
- #~ "indépendemment ou pour l'ensemble d'entre-eux. Vous pouvez aussi glisser "
543
- #~ "& déposer les nouveaux fichiers dans le tableau."
544
-
545
- #~ msgid "Title"
546
- #~ msgstr "Titre"
547
-
548
- #~ msgid "Actions"
549
- #~ msgstr "Actions"
550
-
551
- #~ msgid "The checked sizes will not be generated for Retina displays."
552
- #~ msgstr ""
553
- #~ "Les tailles sélectionnés ne seront pas prises en compte pour Retina."
554
-
555
- #~ msgid ""
556
- #~ "Generate Retina images automatically when images are uploaded to the "
557
- #~ "Media Library."
558
- #~ msgstr ""
559
- #~ "Génération automatique des fichiers Retina dès que vous uploadez ou "
560
- #~ "remplacez des médias."
561
-
562
- #~ msgid ""
563
- #~ "<br />\n"
564
- #~ " The <b>HTML srcset method</b> is the best. The "
565
- #~ "HTML will be rewritten with <a href=\"http://www.w3.org/html/wg/drafts/"
566
- #~ "srcset/w3c-srcset/\">the srcset attribute</a> added to the img tags. "
567
- #~ "Works with caching. Unfortunately, not all the browsers support it yet."
568
- #~ "<br /><br />\n"
569
- #~ " \t\tThe <b>HTML Rewrite method</b> is one of the best "
570
- #~ "methods. It replaces the images by the retina images - if available - in "
571
- #~ "the HTML directly. It's tricky to use HTML caching with it however.<br /"
572
- #~ "><br /> \t\t\n"
573
- #~ " \t\tThe <b>Retina.js method</b> is fail-safe and only "
574
- #~ "uses one <a href=\"https://github.com/imulus/retinajs/\">JavaScript file</"
575
- #~ "a>. When a Retina Display is detected, requests for every images on the "
576
- #~ "page will be sent to the server and the retina images will be retrieved "
577
- #~ "if available. Requires a lot of bandwidth.<br /><br />\n"
578
- #~ " The <b>Retina-Images method</b> is efficient. The "
579
- #~ "images will go through the <a href=\"https://github.com/Retina-Images/"
580
- #~ "Retina-Images/\">Retina-Images</a> handler. Caching systems might be an "
581
- #~ "issue.\n"
582
- #~ " \t"
583
- #~ msgstr ""
584
- #~ "<br />\n"
585
- #~ " The <b>HTML srcset method</b> is the best. The "
586
- #~ "HTML will be rewritten with <a href=\"http://www.w3.org/html/wg/drafts/"
587
- #~ "srcset/w3c-srcset/\">the srcset attribute</a> added to the img tags. "
588
- #~ "Works with caching. Unfortunately, not all the browsers support it yet."
589
- #~ "<br /><br />\n"
590
- #~ " \t\tThe <b>HTML Rewrite method</b> is one of the best "
591
- #~ "methods. It replaces the images by the retina images - if available - in "
592
- #~ "the HTML directly. It's tricky to use HTML caching with it however.<br /"
593
- #~ "><br /> \t\t\n"
594
- #~ " \t\tThe <b>Retina.js method</b> is fail-safe and only "
595
- #~ "uses one <a href=\"https://github.com/imulus/retinajs/\">JavaScript file</"
596
- #~ "a>. When a Retina Display is detected, requests for every images on the "
597
- #~ "page will be sent to the server and the retina images will be retrieved "
598
- #~ "if available. Requires a lot of bandwidth.<br /><br />\n"
599
- #~ " The <b>Retina-Images method</b> is efficient. The "
600
- #~ "images will go through the <a href=\"https://github.com/Retina-Images/"
601
- #~ "Retina-Images/\">Retina-Images</a> handler. Caching systems might be an "
602
- #~ "issue.\n"
603
- #~ " \t"
604
-
605
- #~ msgid "HTML srcset (W3C Draft)"
606
- #~ msgstr "HTML srcset (W3C Draft)"
607
-
608
- #~ msgid "HTML Rewrite"
609
- #~ msgstr "HTML Rewrite"
610
-
611
- #~ msgid "Image Compression quality (between 0 and 100)."
612
- #~ msgstr "Qualité de compression (entre 0 et 100)."
613
-
614
- #~ msgid ""
615
- #~ "If checked, the client will be always served Retina images. Convenient "
616
- #~ "for testing."
617
- #~ msgstr ""
618
- #~ "Si sélectionné, les images Retina seront toujours délivrées. Idéal pour "
619
- #~ "vos tests."
620
-
621
- #~ msgid "Doesn't deliver Retina images to mobiles."
622
- #~ msgstr "Pas de retina pour les mobiles."
623
-
624
- #~ msgid ""
625
- #~ "<br />\n"
626
- #~ " \t\tThe <b>HTML Rewrite method</b> is probably the best, "
627
- #~ "especially when used with Cloudflare or Google PageSpeed Service! You "
628
- #~ "cannot use a basic HTML caching plugin with it (or you have to hack the "
629
- #~ "options properly). <br /><br />\n"
630
- #~ " \t\tThe <b>Server-side method</b> is very fast and "
631
- #~ "efficient. However, depending on the hosting and cache system you are "
632
- #~ "using (including services like Cloudflare) you might encounter issues."
633
- #~ "<br /><br />\n"
634
- #~ " \t\tThe <b>Client-side method</b> is fail-safe and only "
635
- #~ "uses a JavaScript file. When a Retina Display is detected, requests for "
636
- #~ "every images on the page will be sent to the server and a high resolution "
637
- #~ "image will be retrieved if available. It requires more bandwidth.\n"
638
- #~ " \t"
639
- #~ msgstr ""
640
- #~ "La <b>méthode HTML Rewrite</b> est la meilleure, surtout si utilisée "
641
- #~ "conjointement à Cloudflare ou encore mieux, du Google PageSpeed Service. "
642
- #~ "Désactivez vos plugins de cache HTML (ou alors il vous faudra hacker les "
643
- #~ "options).<br /><br />La <b>méthode côté serveur</b> est rapide et "
644
- #~ "optimale. Cependant, selon votre système de caching (Cloudflare inclus), "
645
- #~ "ça ne fonctionnera peut-être pas correctement.<br /><br />La <b>méthode "
646
- #~ "côté client</b> est fiable, fonctionne dans tous les cas et utilise "
647
- #~ "seulement un JavaScript. C'est une méthode moins rapide et performante "
648
- #~ "mais néanmoins la méthode utilisée sur le site d'Apple."
649
-
650
- #~ msgid "Titre"
651
- #~ msgstr "Titre"
652
-
653
- #~ msgid ""
654
- #~ "Current method: <u>Server-side</u>.</span> Oh, and don't forget to check "
655
- #~ "the tutorial of this plugin on <a href='http://www.totorotimes.com/news/"
656
- #~ "retina-display-wordpress-plugin'>Totoro Times</a>."
657
- #~ msgstr ""
658
- #~ "Méthode sélectionnée: <u>Server-side</u>.</span> Oh, n'oubliez pas de "
659
- #~ "lire mon tutoriel sur ce plugin sur <a href='http://www.totorotimes.com/"
660
- #~ "news/retina-display-wordpress-plugin'>Totoro Times</a>."
661
-
662
- #~ msgid "Done."
663
- #~ msgstr "Terminé."
664
-
665
- #~ msgid "ERROR"
666
- #~ msgstr "ERREUR"
667
-
668
- #~ msgid "Not created yet."
669
- #~ msgstr "Pas encore créé."
670
-
671
- #~ msgid "Generate for all files"
672
- #~ msgstr "Générer tous les fichiers"
673
-
674
- #~ msgid ""
675
- #~ "By the way, you are also using a <b>WordPress Network installation</b>. "
676
- #~ "The server-side might not work for you, so <b>please try the client-side "
677
- #~ "method instead</b>. If you really want to use this method, you will have "
678
- #~ "to work on your .htaccess manually."
679
- #~ msgstr ""
680
- #~ "Vous utilisez une version de WordPress <b>Multisite</b>. Il est possible "
681
- #~ "que la méthode côté serveur ne fonctionne pas, alors dans ce cas essayé "
682
- #~ "la méthode <b>côté client</b>. Si vous voulez vraiment utiliser cette "
683
- #~ "méthode, vous aurez peut-être besoin de bidouiller votre .htaccess "
684
- #~ "manuellement."
685
-
686
- #~ msgid ""
687
- #~ "This plugin supports and uses the <a href='http://wordpress.org/extend/"
688
- #~ "plugins/enable-media-replace/'>Enable Media Replace</a> plugin if "
689
- #~ "available. A 'Replace' button will appear in case your images are too "
690
- #~ "small. It is strongly recommended to install it."
691
- #~ msgstr ""
692
- #~ "WP Retina 2x peut automatiquement utiliser le plugin <a href='http://"
693
- #~ "wordpress.org/extend/plugins/enable-media-replace/'>Enable Media Replace</"
694
- #~ "a> si il est installé. Un bouton 'Réuploader' apparaîtra alors lorsque "
695
- #~ "l'image originale est trop petite."
696
-
697
- #~ msgid ""
698
- #~ "This plugin is actively developped and maintained by <a href='https://"
699
- #~ "plus.google.com/106075761239802324012'>Jordy Meow</a>.<br />Please visit "
700
- #~ "me at <a href='http://www.totorotimes.com'>Totoro Times</a>, a website "
701
- #~ "about Japan, photography and abandoned places.<br />And thanks for "
702
- #~ "linking us on <a href='https://www.facebook.com/totorotimes'>Facebook</a> "
703
- #~ "and <a href='https://plus.google.com/106832157268594698217'>Google+</a> :)"
704
- #~ msgstr ""
705
- #~ "Ce plugin est activement développé et maintenu par <a href='https://plus."
706
- #~ "google.com/106075761239802324012'>Jordy Meow</a>.<br />Merci de me "
707
- #~ "visiter sur <a href='http://www.totorotimes.fr'>Totoro Times</a>, un site "
708
- #~ "sur le Japan, la photographie et les endroits abandonnés.<br />Et merci "
709
- #~ "de nous adorer sur <a href='https://www.facebook.com/"
710
- #~ "totorotimes'>Facebook</a> et <a href='https://plus.google."
711
- #~ "com/106832157268594698217'>Google+</a> :)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/wp-retina-2x-it_IT.mo DELETED
Binary file
trunk/languages/wp-retina-2x-it_IT.po DELETED
@@ -1,305 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: wp-retina-2x\n"
4
- "POT-Creation-Date: 2013-08-02 11:53+0900\n"
5
- "PO-Revision-Date: 2013-08-02 11:53+0900\n"
6
- "Last-Translator: Jordy Meow <work@meow.fr>\n"
7
- "Language-Team: \n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Generator: Poedit 1.5.5\n"
12
- "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e;_n:1,2;_n_noop:1,2;"
13
- "_nx:1,2\n"
14
- "X-Poedit-Basepath: .\n"
15
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-SearchPath-0: ..\n"
18
- "X-Poedit-SearchPath-1: .\n"
19
-
20
- #: ../wr2x_ajax.php:39
21
- msgid "Done. Please <a href='javascript:history.go(0)'>refresh</a> this page."
22
- msgstr ""
23
- "Fatto. <a href='javascript:history.go(0)'>Aggiornare</a> questa pagina."
24
-
25
- #: ../wr2x_ajax.php:42
26
- msgid ""
27
- "Done. You might want to <a href='?page=wp-"
28
- "retina-2x&view=issues&refresh=true'>refresh</a> the issues."
29
- msgstr ""
30
- "Fatto. Si consiglia di <a href='?page=wp-"
31
- "retina-2x&view=issues&refresh=true'>aggiornare</a> i problemi."
32
-
33
- #: ../wr2x_ajax.php:52 ../wr2x_ajax.php:103
34
- msgid "Please wait..."
35
- msgstr "Attendere..."
36
-
37
- #: ../wr2x_ajax.php:60
38
- msgid "Nothing to do ;)"
39
- msgstr "Niente altro da fare ;)"
40
-
41
- #: ../wr2x_ajax.php:110 ../wr2x_retina-dashboard.php:247
42
- msgid "GENERATE"
43
- msgstr "GENERA"
44
-
45
- #: ../wr2x_ajax.php:258 ../wr2x_ajax.php:287
46
- msgid "The attachment ID is missing."
47
- msgstr ""
48
-
49
- #: ../wr2x_ajax.php:275
50
- msgid "Retina files deleted."
51
- msgstr "File Retina cancellati."
52
-
53
- #: ../wr2x_ajax.php:305
54
- msgid "Retina files generated."
55
- msgstr "File Retina generati."
56
-
57
- #: ../wr2x_ajax.php:316
58
- msgid "You do not have permission to upload files."
59
- msgstr "Non si hanno permessi sufficienti per caricare file."
60
-
61
- #: ../wr2x_ajax.php:332
62
- #, fuzzy
63
- msgid "You don't have the rights to use a temporary directory."
64
- msgstr "Non si hanno permessi sufficienti per caricare file."
65
-
66
- #: ../wr2x_ajax.php:337
67
- msgid "The temporary directory could not be created."
68
- msgstr ""
69
-
70
- #: ../wr2x_ajax.php:352
71
- msgid "The file is not an image or the upload went wrong."
72
- msgstr "Il file non è un'immagine o l'upload è fallito."
73
-
74
- #: ../wr2x_ajax.php:362
75
- msgid "You cannot use this file (wrong extension? wrong type?)."
76
- msgstr "Non si può utilizzare questo file (estensione errata? tipo errato?)."
77
-
78
- #: ../wr2x_ajax.php:411
79
- msgid "Replaced successfully."
80
- msgstr "Sostituzione avvenuta con successo."
81
-
82
- #: ../wr2x_retina-dashboard.php:19
83
- msgid "Retina images"
84
- msgstr "Immagini Retina"
85
-
86
- #: ../wr2x_retina-dashboard.php:20
87
- #, php-format
88
- msgid "Retina %s"
89
- msgstr "Retina %s"
90
-
91
- #: ../wr2x_retina-dashboard.php:132
92
- msgid "Generate"
93
- msgstr "Genera"
94
-
95
- #: ../wr2x_retina-dashboard.php:146
96
- msgid "Delete all @2x"
97
- msgstr "Cancella tutti i @2x"
98
-
99
- #: ../wr2x_retina-dashboard.php:149
100
- msgid "Refresh issues"
101
- msgstr "Aggiorna i problemi"
102
-
103
- #: ../wr2x_retina-dashboard.php:159
104
- msgid "Issues has been refreshed."
105
- msgstr "Problemi aggiornati con successo."
106
-
107
- #: ../wr2x_retina-dashboard.php:164
108
- msgid ""
109
- "This screen allows you to check the media for which the retina files are "
110
- "missing. You can then create the files independently for each media or for "
111
- "all of them. You can also upload and replace the images by drag & drop them "
112
- "on the grid."
113
- msgstr ""
114
- "Questa schermata consente di controllare i media per i quali mancano i file "
115
- "retina. È possibile creare i file indipendentemente per ciascun media o "
116
- "insieme per tutti. È anche possibile caricare e sostituire le immagini "
117
- "trascinandole sulla griglia."
118
-
119
- #: ../wr2x_retina-dashboard.php:179
120
- msgid "All"
121
- msgstr "Tutti"
122
-
123
- #: ../wr2x_retina-dashboard.php:180
124
- msgid "Issues"
125
- msgstr "Problemi"
126
-
127
- #: ../wr2x_retina-dashboard.php:181
128
- msgid "Ignored"
129
- msgstr "Ignorati"
130
-
131
- #: ../wr2x_retina-dashboard.php:187
132
- msgid "Title"
133
- msgstr "Titolo"
134
-
135
- #: ../wr2x_retina-dashboard.php:195
136
- msgid "Actions"
137
- msgstr "Azioni"
138
-
139
- #: ../wr2x_retina-dashboard.php:250
140
- msgid "IGNORE"
141
- msgstr "IGNORA"
142
-
143
- #: ../wr2x_settings.php:18 ../wr2x_settings.php:21
144
- msgid "Current method:"
145
- msgstr "Metodo corrente:"
146
-
147
- #: ../wr2x_settings.php:18 ../wr2x_settings.php:106
148
- msgid "Client side"
149
- msgstr "Lato client"
150
-
151
- #: ../wr2x_settings.php:21 ../wr2x_settings.php:107
152
- msgid "Server side"
153
- msgstr "Lato server"
154
-
155
- #: ../wr2x_settings.php:26
156
- msgid ""
157
- "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
158
- "must edit your .htaccess manually and add '<b>RewriteRule ^files/(.+) wp-"
159
- "content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as the "
160
- "first RewriteRule if you want the server-side to work."
161
- msgstr ""
162
- "A proposito, è in uso un'<b>installazione WordPress Multi-Site</b>! È "
163
- "necessario modificare manualmente .htaccess e aggiungere '<b>RewriteRule "
164
- "^files/(.+) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 "
165
- "[L]</b>' come la prima RewriteRule se si vuol far funzionare il metodo lato-"
166
- "server."
167
-
168
- #: ../wr2x_settings.php:29
169
- #, fuzzy
170
- msgid ""
171
- "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
172
- "must edit your .htaccess manually and add '<b>RewriteRule ^(wp-content/.+\\."
173
- "(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/wp-retina-2x/"
174
- "wr2x_image.php?ms=true&file=$1 [L]</b>' as the first RewriteRule if you want "
175
- "the server-side to work."
176
- msgstr ""
177
- "A proposito, è in uso un'<b>installazione WordPress Multi-Site</b>! È "
178
- "necessario modificare manualmente .htaccess e aggiungere '<b>RewriteRule "
179
- "^files/(.+) wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 "
180
- "[L]</b>' come la prima RewriteRule se si vuol far funzionare il metodo lato-"
181
- "server."
182
-
183
- #: ../wr2x_settings.php:33
184
- msgid ""
185
- "The permalinks are not enabled. They need to be enabled in order to use the "
186
- "server-side method."
187
- msgstr ""
188
- "I permalink non sono abilitati. È necessario abilitarli per poter usare il "
189
- "metodo lato-server."
190
-
191
- #: ../wr2x_settings.php:62
192
- msgid "Basics"
193
- msgstr "Generale"
194
-
195
- #: ../wr2x_settings.php:66
196
- msgid "Advanced"
197
- msgstr "Avanzate"
198
-
199
- #: ../wr2x_settings.php:79
200
- msgid "Disabled Sizes"
201
- msgstr "Dimensioni Disabilitate"
202
-
203
- #: ../wr2x_settings.php:80
204
- msgid "The checked sizes will not be generated for Retina displays."
205
- msgstr "Le dimensioni selezionate non verranno generate per i display Retina."
206
-
207
- #: ../wr2x_settings.php:86
208
- msgid "Auto Generate"
209
- msgstr "Generazione Automatica"
210
-
211
- #: ../wr2x_settings.php:87
212
- msgid ""
213
- "Generate Retina images automatically when images are uploaded to the Media "
214
- "Library."
215
- msgstr ""
216
- "Genera automaticamente immagini Retina quando sono caricate nella Libreria "
217
- "Media "
218
-
219
- #: ../wr2x_settings.php:95
220
- msgid "Method"
221
- msgstr "Metodo"
222
-
223
- #: ../wr2x_settings.php:97
224
- #, fuzzy
225
- msgid ""
226
- "<br />\n"
227
- " \t\tThe <b>HTML Rewrite method</b> is probably the best, "
228
- "especially when used with Cloudflare or Google PageSpeed Service! You cannot "
229
- "use a basic HTML caching plugin with it (or you have to hack the options "
230
- "properly). <br /><br />\n"
231
- " \t\tThe <b>Server-side method</b> is very fast and "
232
- "efficient. However, depending on the hosting and cache system you are using "
233
- "(including services like Cloudflare) you might encounter issues.<br /><br /"
234
- ">\n"
235
- " \t\tThe <b>Client-side method</b> is fail-safe and only uses "
236
- "a JavaScript file. When a Retina Display is detected, requests for every "
237
- "images on the page will be sent to the server and a high resolution image "
238
- "will be retrieved if available. It requires more bandwidth.\n"
239
- " \t"
240
- msgstr ""
241
- "<br />Il <b>metodo lato-server</b> è molto veloce ed efficiente. Comunque, "
242
- "in base all'hosting e al sistema di cache che si usano (inclusi servizi come "
243
- "Cloudflare), si potrebbero avere dei problemi.\n"
244
- " <br /><br />Il <b>metodo lato-client</b> è a prova di errore "
245
- "e usa soltanto un file JavaScript. Ogni volta che viente rilevato un display "
246
- "Retina, le richieste per ogni immagine sulla pagina verranno inviate al "
247
- "server che ricercherà e, se disponibile, invierà un'immagine ad alta "
248
- "risoluzione. La maggior parte dei siti web (per esempio la Apple) usa questo "
249
- "metodo."
250
-
251
- #: ../wr2x_settings.php:105
252
- msgid "HTML Rewrite"
253
- msgstr "HTML Rewrite"
254
-
255
- #: ../wr2x_settings.php:108
256
- msgid "None"
257
- msgstr "Nessuno"
258
-
259
- #: ../wr2x_settings.php:113
260
- msgid "Quality"
261
- msgstr ""
262
-
263
- #: ../wr2x_settings.php:114
264
- msgid "Image Compression quality (between 0 and 100)."
265
- msgstr ""
266
-
267
- #: ../wr2x_settings.php:120
268
- msgid "Debug Mode"
269
- msgstr "Modalità debug"
270
-
271
- #: ../wr2x_settings.php:121
272
- msgid ""
273
- "If checked, the client will be always served Retina images. Convenient for "
274
- "testing."
275
- msgstr ""
276
- "Se selezionato, al client saranno sempre servite immagini Retina. Utile per "
277
- "eseguire test. "
278
-
279
- #: ../wr2x_settings.php:127
280
- msgid "Hide 'Retina' column"
281
- msgstr "Nascondi colonna 'Retina'"
282
-
283
- #: ../wr2x_settings.php:128
284
- msgid "Will hide the 'Retina Column' from the Media Library."
285
- msgstr "Nasconderà la colonna 'Retina' dalla Libreria Media. "
286
-
287
- #: ../wr2x_settings.php:134
288
- msgid "Hide Retina Dashboard"
289
- msgstr "Nascondi Bacheca Retina"
290
-
291
- #: ../wr2x_settings.php:135
292
- msgid "Doesn't show the Retina Dashboard menu and tools."
293
- msgstr "Nasconde i menu e gli strumenti della bacheca Retina."
294
-
295
- #: ../wr2x_settings.php:141
296
- #, fuzzy
297
- msgid "Ignore Mobile"
298
- msgstr "Ignorati"
299
-
300
- #: ../wr2x_settings.php:142
301
- msgid "Doesn't deliver Retina images to mobiles."
302
- msgstr ""
303
-
304
- #~ msgid "Titre"
305
- #~ msgstr "Titolo"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/wp-retina-2x-sv_SE.mo DELETED
Binary file
trunk/languages/wp-retina-2x-sv_SE.po DELETED
@@ -1,363 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: WP Retina 2x\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-08-12 16:42+0200\n"
6
- "PO-Revision-Date: 2013-08-12 16:51+0200\n"
7
- "Last-Translator: Marcus Forsberg <info@marcusforsberg.net>\n"
8
- "Language-Team: Jordy Meow <work@meow.fr>\n"
9
- "Language: fr_FR\n"
10
- "MIME-Version: 1.0\n"
11
- "Content-Type: text/plain; charset=UTF-8\n"
12
- "Content-Transfer-Encoding: 8bit\n"
13
- "X-Poedit-KeywordsList: _e;__\n"
14
- "X-Poedit-Basepath: ../\n"
15
- "X-Generator: Poedit 1.5.7\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-SearchPath-0: .\n"
18
-
19
- #: wr2x_ajax.php:39
20
- msgid "Done. Please <a href='javascript:history.go(0)'>refresh</a> this page."
21
- msgstr ""
22
- "Färdigt. Vänligen <a href='javascript:history.go(0)'>ladda om</a> denna sida."
23
-
24
- #: wr2x_ajax.php:42
25
- msgid ""
26
- "Done. You might want to <a href='?page=wp-"
27
- "retina-2x&view=issues&refresh=true'>refresh</a> the issues."
28
- msgstr ""
29
- "Färdigt. Du kanske vill <a href='?page=wp-"
30
- "retina-2x&view=issues&refresh=true'>ladda om</a> problemen."
31
-
32
- #: wr2x_ajax.php:52 wr2x_ajax.php:103
33
- msgid "Please wait..."
34
- msgstr "Var god vänta..."
35
-
36
- #: wr2x_ajax.php:60
37
- msgid "Nothing to do ;)"
38
- msgstr "Inget att göra ;)"
39
-
40
- #: wr2x_ajax.php:110 wr2x_retina-dashboard.php:247
41
- msgid "GENERATE"
42
- msgstr "GENERERA"
43
-
44
- #: wr2x_ajax.php:258 wr2x_ajax.php:287
45
- msgid "The attachment ID is missing."
46
- msgstr "ID för den bifogade filen saknas."
47
-
48
- #: wr2x_ajax.php:275
49
- msgid "Retina files deleted."
50
- msgstr "Retinafilder raderade."
51
-
52
- #: wr2x_ajax.php:305
53
- msgid "Retina files generated."
54
- msgstr "Retinafiler genererade."
55
-
56
- #: wr2x_ajax.php:316
57
- msgid "You do not have permission to upload files."
58
- msgstr "Du har inte rätt att ladda upp filer."
59
-
60
- #: wr2x_ajax.php:332
61
- msgid "You don't have the rights to use a temporary directory."
62
- msgstr "Du har inte rättigheterna som krävs för att använda en temporär mapp."
63
-
64
- #: wr2x_ajax.php:337
65
- msgid "The temporary directory could not be created."
66
- msgstr "Den temporära mappen kunde inte skapas."
67
-
68
- #: wr2x_ajax.php:352
69
- msgid "The file is not an image or the upload went wrong."
70
- msgstr "Filen är inte en bild eller så gick uppladdningen fel."
71
-
72
- #: wr2x_ajax.php:362
73
- msgid "You cannot use this file (wrong extension? wrong type?)."
74
- msgstr "Du kan inte använda den här filen (fel filtyp?)."
75
-
76
- #: wr2x_ajax.php:411
77
- msgid "Replaced successfully."
78
- msgstr "Ersattes uttan problem."
79
-
80
- #: wr2x_retina-dashboard.php:19
81
- msgid "Retina images"
82
- msgstr "Retinabilder"
83
-
84
- #: wr2x_retina-dashboard.php:20
85
- #, php-format
86
- msgid "Retina %s"
87
- msgstr "Retina %s"
88
-
89
- #: wr2x_retina-dashboard.php:132
90
- msgid "Generate"
91
- msgstr "Generera"
92
-
93
- #: wr2x_retina-dashboard.php:146
94
- msgid "Delete all @2x"
95
- msgstr "Radera alla @2x"
96
-
97
- #: wr2x_retina-dashboard.php:149
98
- msgid "Refresh issues"
99
- msgstr "Ladda om problem"
100
-
101
- #: wr2x_retina-dashboard.php:159
102
- msgid "Issues has been refreshed."
103
- msgstr "Problemen har laddats om."
104
-
105
- #: wr2x_retina-dashboard.php:164
106
- msgid ""
107
- "This screen allows you to check the media for which the retina files are "
108
- "missing. You can then create the files independently for each media or for "
109
- "all of them. You can also upload and replace the images by drag & drop them "
110
- "on the grid."
111
- msgstr ""
112
- "Den här sidan låter dig undersöka vilka mediafiler som saknar retinaversion. "
113
- "Du kan sedan skapa retinafiler för individuella objekt eller för alla på en "
114
- "gång. Du kan också ladda upp och ersätta bilderna genom att dra och släppa "
115
- "dem på rutnätet."
116
-
117
- #: wr2x_retina-dashboard.php:179
118
- msgid "All"
119
- msgstr "Alla"
120
-
121
- #: wr2x_retina-dashboard.php:180
122
- msgid "Issues"
123
- msgstr "Problem"
124
-
125
- #: wr2x_retina-dashboard.php:181
126
- msgid "Ignored"
127
- msgstr "Ignorerade"
128
-
129
- #: wr2x_retina-dashboard.php:187
130
- msgid "Title"
131
- msgstr "Titel"
132
-
133
- #: wr2x_retina-dashboard.php:195
134
- msgid "Actions"
135
- msgstr "Handlingar"
136
-
137
- #: wr2x_retina-dashboard.php:250
138
- msgid "IGNORE"
139
- msgstr "IGNORERA"
140
-
141
- #: wr2x_settings.php:18 wr2x_settings.php:21
142
- msgid "Current method:"
143
- msgstr "Nuvarande metod:"
144
-
145
- #: wr2x_settings.php:18 wr2x_settings.php:106
146
- msgid "Client side"
147
- msgstr "Klientmetod"
148
-
149
- #: wr2x_settings.php:21 wr2x_settings.php:107
150
- msgid "Server side"
151
- msgstr "Servermetod"
152
-
153
- #: wr2x_settings.php:26
154
- msgid ""
155
- "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
156
- "must edit your .htaccess manually and add '<b>RewriteRule ^files/(.+) wp-"
157
- "content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' as the "
158
- "first RewriteRule if you want the server-side to work."
159
- msgstr ""
160
- "Förresten, du använder en <b>WordPress Multi-Site-installation</b! Du måste "
161
- "manuellt ändra din .htaccess-fil och lägga till '<b>RewriteRule ^files/(.+) "
162
- "wp-content/plugins/wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' som "
163
- "första RewriteRule om du vill att servermetoden ska fungera."
164
-
165
- #: wr2x_settings.php:29
166
- msgid ""
167
- "By the way, you are using a <b>WordPress Multi-Site installation</b>! You "
168
- "must edit your .htaccess manually and add '<b>RewriteRule ^(wp-content/.+\\."
169
- "(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/wp-retina-2x/"
170
- "wr2x_image.php?ms=true&file=$1 [L]</b>' as the first RewriteRule if you want "
171
- "the server-side to work."
172
- msgstr ""
173
- "Förresten, du använder en <b>WordPress Multi-Site-installation</b! Du måste "
174
- "manuellt ändra din .htaccess-fil och lägga till '<b>RewriteRule ^(wp-"
175
- "content/.+\\.(png|gif|jpg|jpeg|bmp|PNG|GIF|JPG|JPEG|BMP)) wp-content/plugins/"
176
- "wp-retina-2x/wr2x_image.php?ms=true&file=$1 [L]</b>' som första RewriteRule "
177
- "om du vill att servermetoden ska fungera."
178
-
179
- #: wr2x_settings.php:33
180
- msgid ""
181
- "The permalinks are not enabled. They need to be enabled in order to use the "
182
- "server-side method."
183
- msgstr ""
184
- "Permalänkarna är inte aktiverade. De måste vara aktiva för att servermetoden "
185
- "ska fungera."
186
-
187
- #: wr2x_settings.php:62
188
- msgid "Basics"
189
- msgstr "Grundläggande"
190
-
191
- #: wr2x_settings.php:66
192
- msgid "Advanced"
193
- msgstr "Avancerat"
194
-
195
- #: wr2x_settings.php:79
196
- msgid "Disabled Sizes"
197
- msgstr "Inaktiverade storlekar"
198
-
199
- #: wr2x_settings.php:80
200
- msgid "The checked sizes will not be generated for Retina displays."
201
- msgstr "De markerade storlekarna kommer inte att generera retinabilder."
202
-
203
- #: wr2x_settings.php:86
204
- msgid "Auto Generate"
205
- msgstr "Generera automatiskt"
206
-
207
- #: wr2x_settings.php:87
208
- msgid ""
209
- "Generate Retina images automatically when images are uploaded to the Media "
210
- "Library."
211
- msgstr ""
212
- "Generera retinabilder automatiskt när bilder laddas upp till "
213
- "mediabiblioteket."
214
-
215
- #: wr2x_settings.php:95
216
- msgid "Method"
217
- msgstr "Metod"
218
-
219
- #: wr2x_settings.php:97
220
- msgid ""
221
- "<br />\n"
222
- " \t\tThe <b>HTML Rewrite method</b> is probably the best, "
223
- "especially when used with Cloudflare or Google PageSpeed Service! You cannot "
224
- "use a basic HTML caching plugin with it (or you have to hack the options "
225
- "properly). <br /><br />\n"
226
- " \t\tThe <b>Server-side method</b> is very fast and "
227
- "efficient. However, depending on the hosting and cache system you are using "
228
- "(including services like Cloudflare) you might encounter issues.<br /><br /"
229
- ">\n"
230
- " \t\tThe <b>Client-side method</b> is fail-safe and only uses "
231
- "a JavaScript file. When a Retina Display is detected, requests for every "
232
- "images on the page will be sent to the server and a high resolution image "
233
- "will be retrieved if available. It requires more bandwidth.\n"
234
- " \t"
235
- msgstr ""
236
- "<br />\n"
237
- " \t\tMetoden <b>Skriv om HTML</b> är troligen bäst, speciellt "
238
- "om du använder den tillsammans med Cloudflare eller Google PageSpeed "
239
- "Service! Du kan inte använda något grundläggande HTML-cache-tillägg med "
240
- "denna metod (om du inte ändrar inställningarna rätt). <br /><br />\n"
241
- " \t\t<b>Servermetoden</b> är väldigt snabb och effektiv. Men "
242
- "beroende på ditt webbhotell och cachesystem (inklusive tjänster som "
243
- "Cloudflare) kan du komma att råka på problem.<br /><br />\n"
244
- " \t\t<b>Klientmetoden</b> är felsäker och använder bara en "
245
- "JavaScript-fil. När en Retinaskärm upptäcks skickas en förfrågan för varje "
246
- "bild på sidan till servern och en högupplöst bild hämtas om någon finns "
247
- "tillgänglig. Detta kräver högre bandbredd.\n"
248
- " \t"
249
-
250
- #: wr2x_settings.php:105
251
- msgid "HTML Rewrite"
252
- msgstr "Skriv om HTML"
253
-
254
- #: wr2x_settings.php:108
255
- msgid "None"
256
- msgstr "Ingen"
257
-
258
- #: wr2x_settings.php:113
259
- msgid "Quality"
260
- msgstr "Kvalitet"
261
-
262
- #: wr2x_settings.php:114
263
- msgid "Image Compression quality (between 0 and 100)."
264
- msgstr "Kvalitet på bildkomprimering (mellan 0 och 100)"
265
-
266
- #: wr2x_settings.php:120
267
- msgid "Debug Mode"
268
- msgstr "Felsökningsläge"
269
-
270
- #: wr2x_settings.php:121
271
- msgid ""
272
- "If checked, the client will be always served Retina images. Convenient for "
273
- "testing."
274
- msgstr ""
275
- "När detta är markerat skickas alltid retinabilder till klienten. Användbart "
276
- "för att testa."
277
-
278
- #: wr2x_settings.php:127
279
- msgid "Hide 'Retina' column"
280
- msgstr "Dölj \"Retina\"-kolumn"
281
-
282
- #: wr2x_settings.php:128
283
- msgid "Will hide the 'Retina Column' from the Media Library."
284
- msgstr "Döljer 'retinakolumnen' från mediabiblioteket."
285
-
286
- #: wr2x_settings.php:134
287
- msgid "Hide Retina Dashboard"
288
- msgstr "Dölj retinapanel"
289
-
290
- #: wr2x_settings.php:135
291
- msgid "Doesn't show the Retina Dashboard menu and tools."
292
- msgstr "Visar inte retinapanelen eller verktygen."
293
-
294
- #: wr2x_settings.php:141
295
- msgid "Ignore Mobile"
296
- msgstr "Ignorera mobiler"
297
-
298
- #: wr2x_settings.php:142
299
- msgid "Doesn't deliver Retina images to mobiles."
300
- msgstr "Leverar inte retinabilder till mobiler."
301
-
302
- #~ msgid "Titre"
303
- #~ msgstr "Titre"
304
-
305
- #~ msgid ""
306
- #~ "Current method: <u>Server-side</u>.</span> Oh, and don't forget to check "
307
- #~ "the tutorial of this plugin on <a href='http://www.totorotimes.com/news/"
308
- #~ "retina-display-wordpress-plugin'>Totoro Times</a>."
309
- #~ msgstr ""
310
- #~ "Méthode sélectionnée: <u>Server-side</u>.</span> Oh, n'oubliez pas de "
311
- #~ "lire mon tutoriel sur ce plugin sur <a href='http://www.totorotimes.com/"
312
- #~ "news/retina-display-wordpress-plugin'>Totoro Times</a>."
313
-
314
- #~ msgid "Done."
315
- #~ msgstr "Terminé."
316
-
317
- #~ msgid "ERROR"
318
- #~ msgstr "ERREUR"
319
-
320
- #~ msgid "Not created yet."
321
- #~ msgstr "Pas encore créé."
322
-
323
- #~ msgid "Generate for all files"
324
- #~ msgstr "Générer tous les fichiers"
325
-
326
- #~ msgid ""
327
- #~ "By the way, you are also using a <b>WordPress Network installation</b>. "
328
- #~ "The server-side might not work for you, so <b>please try the client-side "
329
- #~ "method instead</b>. If you really want to use this method, you will have "
330
- #~ "to work on your .htaccess manually."
331
- #~ msgstr ""
332
- #~ "Vous utilisez une version de WordPress <b>Multisite</b>. Il est possible "
333
- #~ "que la méthode côté serveur ne fonctionne pas, alors dans ce cas essayé "
334
- #~ "la méthode <b>côté client</b>. Si vous voulez vraiment utiliser cette "
335
- #~ "méthode, vous aurez peut-être besoin de bidouiller votre .htaccess "
336
- #~ "manuellement."
337
-
338
- #~ msgid ""
339
- #~ "This plugin supports and uses the <a href='http://wordpress.org/extend/"
340
- #~ "plugins/enable-media-replace/'>Enable Media Replace</a> plugin if "
341
- #~ "available. A 'Replace' button will appear in case your images are too "
342
- #~ "small. It is strongly recommended to install it."
343
- #~ msgstr ""
344
- #~ "WP Retina 2x peut automatiquement utiliser le plugin <a href='http://"
345
- #~ "wordpress.org/extend/plugins/enable-media-replace/'>Enable Media Replace</"
346
- #~ "a> si il est installé. Un bouton 'Réuploader' apparaîtra alors lorsque "
347
- #~ "l'image originale est trop petite."
348
-
349
- #~ msgid ""
350
- #~ "This plugin is actively developped and maintained by <a href='https://"
351
- #~ "plus.google.com/106075761239802324012'>Jordy Meow</a>.<br />Please visit "
352
- #~ "me at <a href='http://www.totorotimes.com'>Totoro Times</a>, a website "
353
- #~ "about Japan, photography and abandoned places.<br />And thanks for "
354
- #~ "linking us on <a href='https://www.facebook.com/totorotimes'>Facebook</a> "
355
- #~ "and <a href='https://plus.google.com/106832157268594698217'>Google+</a> :)"
356
- #~ msgstr ""
357
- #~ "Ce plugin est activement développé et maintenu par <a href='https://plus."
358
- #~ "google.com/106075761239802324012'>Jordy Meow</a>.<br />Merci de me "
359
- #~ "visiter sur <a href='http://www.totorotimes.fr'>Totoro Times</a>, un site "
360
- #~ "sur le Japan, la photographie et les endroits abandonnés.<br />Et merci "
361
- #~ "de nous adorer sur <a href='https://www.facebook.com/"
362
- #~ "totorotimes'>Facebook</a> et <a href='https://plus.google."
363
- #~ "com/106832157268594698217'>Google+</a> :)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/readme.txt DELETED
@@ -1,415 +0,0 @@
1
- === Perfect Images (Retina, Thumbnails, Replace, CDN) ===
2
- Contributors: TigrouMeow
3
- Tags: retina, images, replace, size, thumbnail, regenerate, sizes, high-dpi
4
- Donate link: https://meowapps.com/donation/
5
- Requires at least: 5.0
6
- Tested up to: 6.0
7
- Requires PHP: 7.0
8
- Stable tag: 6.2.7
9
-
10
- Retina, Regenerate Thumbnails, Image Sizes Management, Replace Images, 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
- * CDN (Image Optimization with EWWW)
21
- * Replace Images
22
-
23
- === Retina Images ===
24
- 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/wp-retina-2x/).
25
-
26
- === Image Sizes Management ===
27
- 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.
28
-
29
- === Disable Image Threshold ===
30
- 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.
31
-
32
- === Regenerate Thumbnails ===
33
- 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.
34
-
35
- === Replace Images ===
36
- If you wish to replace an image by another one, you can do it very quickly and easily with this plugin.
37
-
38
- === Optimized ===
39
- The plugin is very fast and optimized. It doesn't create anything in the database.
40
-
41
- === Pro Version ===
42
- The Pro version adds support for Retina for full-size, support for lazy-loading for your responsive images and various options. And it supports my work :)
43
-
44
- === CSS & Background Images ===
45
- The plugin cannot inject CSS to handles the images added through CSS, that's both too dangerous and potentially very incorrect. However, in its Pro version and with PictureFill, you get an option to replace the inline CSS background image by their retina equivalent.
46
-
47
- = Quickstart =
48
-
49
- 1. Set your option (for instance, you probably don't need retina images for every sizes set-up in your WP).
50
- 2. Generate the retina images (required only the first time, then images are generated automatically).
51
- 3. Check if it works! - if it doesn't, read the FAQ, the tutorial, and check the forums.
52
-
53
- == Changelog ==
54
-
55
- = 6.2.6 (2022/06/16) =
56
- * Fix: Security fix.
57
- * Update: Remove all the notifications as they probably don't needed anymore.
58
-
59
- = 6.2.4 (2022/04/14) =
60
- * Fix: The Refresh Stats button should not reset the list of ignored entries.
61
- * Info: If you enjoy this plugin, please share some love by [writing a little review here](https://wordpress.org/support/plugin/wp-retina-2x/reviews/?rate=5#new-post). And since I read them all, don't hesitate to drop a few remarks and feature requests in those reviews. Thank you :)
62
-
63
- = 6.2.3 (2022/03/19) =
64
- * Update: Latest version of the framework and admin.
65
-
66
- = 6.2.2 (2022/01/28) =
67
- * Update: Better compatibility with latest version of WP.
68
- * Fix: There was an useless error message about a modal.
69
-
70
- = 6.2.1 (2021/12/07) =
71
- * Fix: Avoid displaying the PHP Info logo in the Meow Apps Dashboard.
72
- * Update: Composer version.
73
-
74
- = 6.2.0 (2021/11/10) =
75
- * Fix: Hide the Dashboard button in the header if the hide dashboard option is checked.
76
-
77
- = 6.1.9 (2021/10/12) =
78
- * Fix: Removed a JS issue which was showing an alert for no reason.
79
-
80
- = 6.1.8 (2021/09/23) =
81
- * Update: Common libs 3.6.
82
-
83
- = 6.1.7 (2021/09/17) =
84
- * Fix: Was trying to add a Retina image in the srcset even if it was non-existent (when used with a CDN).
85
- * Update: Better sanitization in the common library.
86
-
87
- = 6.1.6 (2021/08/31) =
88
- * Update: Enhanced security.
89
-
90
- = 6.1.5 (2021/08/31) =
91
- * Update: New common library.
92
- * Update: Better security (but we will add even enhanced it more in the next update).
93
- * Update: Tiny UI enhancements.
94
-
95
- = 6.1.4 (2021/07/06) =
96
- * Update: Lot of enhancements in the UI.
97
-
98
- = 6.1.3 (2021/04/29) =
99
- * Fix: Little issue with some network sites.
100
- * Fix: Now use the default jpeg_quality set in WP.
101
- * Fix: The "Build Automatically" feature is now available even if no Retina Method is used.
102
-
103
- = 6.1.2 =
104
- * Fix: Avoid double slashes in the URLs of the scripts.
105
- * Fix: Updated admin, which works better with PHP Error Logs.
106
- * Add: Better paging.
107
-
108
- = 6.1.1 =
109
- * Annoucement: Partnership with Easy IO! Probably the best deal on the market to optimize your images :)
110
- * Fix: Some variables should be initialized as arrays instead of booleans.
111
- * Fix: The CDN domain could not be modifed.
112
-
113
- = 6.1.0 =
114
- * Fix: PictureFill was not being ran, the Responsive Images method was instead.
115
-
116
- = 6.0.8 =
117
- * Fix: Avoid crashing the Retina Dashboard when there are no Retina images at all.
118
-
119
- = 6.0.7 =
120
- * Update: Much better dashboard.
121
- * Fix: Upload New Retina Image.
122
- * Add: Dashboard search.
123
- * Add: Ignore button.
124
- * Update: Upload in directly in the dashboard.
125
-
126
- = 6.0.5 =
127
- * Add: Implementation of Easy IO (CDN + Image Optimization).
128
- * Add: Versioning for images, when they are replaced (that helps CDNs to refresh themselves).
129
-
130
- = 6.0.4 =
131
- * Fix: The dashboard was crashing when a non-image was being shown.
132
- * Update: Removed the unused code from the plugin.
133
- * Update: Optimized the way data is loaded in the dashboard.
134
-
135
- = 6.0.3 =
136
- * Fix: The API wasn't accessible anymore.
137
- * Fix: Lazysizes was only working with PictureFill.
138
- * Fix: Avoid the JS of common admin to load more than once.
139
-
140
- = 6.0.2 =
141
- * Update: A lot of new features: Image Sizes Management, Disable Image Threshold, Regenerate Thumbnails, Replace Images.
142
- * Update: Completely new UI for the Dashboard and the Settings.
143
-
144
- = 5.6.1 =
145
- * Update: Lazysize from 5.1.1 to 5.2.2.
146
- * Update: PHP Simple Dom updated to 1.9.1.
147
-
148
- = 5.6.0 =
149
- * Add: Option to remove the image size threshold (which is set to 2560 since WordPress 5.3).
150
-
151
- = 5.5.7 =
152
- * Fix: Background CSS wasn't working properly in a few cases.
153
- * Update: Lazysizes updated to 5.1.1 (from 5.0.0).
154
- * Update: Parser optimized.
155
-
156
- = 5.5.6 =
157
- * Update: Lazysizes updated to 5.1.0 (from 4.0.4).
158
-
159
- = 5.5.5 =
160
- * Fix: Display Full-Size Retina uploader only if the option is active.
161
-
162
- = 5.5.4 =
163
- * Add: Filter for cropping plugins.
164
-
165
- = 5.5.3 =
166
- * Fix: Usage of Composer.
167
- * Update: If available, will use the Full-Size Retina for generating Retina thumbnails.
168
- * Fix: New version of HtmlDomParser.
169
- * Update: New dashboard.
170
-
171
- = 5.5.1 =
172
- * Fix: Uploading a PNG as a Retina was turning its transparency into black.
173
- * Fix: Now LazyLoad used with Keep SRC only loads one image, the right one (instead of two before). Thanks to Shane Bishop, the creator of EWWW (https://wordpress.org/plugins/ewww-image-optimizer/).
174
-
175
- = 5.4.3 =
176
- * Add: New hooks: wr2x_before_regenerate, wr2x_before_generate_thumbnails, wr2x_generate_thumbnails, wr2x_regenerate and wr2x_upload_retina.
177
- * Fix: Issues where happening with a few themes (actually the pagebuilder they use) after the last update.
178
- * Update: Lazysizes 4.0.4.
179
-
180
- = 5.4.1 =
181
- * Fix: Issues where happening with a few themes (actually the pagebuilder they use) after the last update.
182
- * Update: Lazysizes 4.0.4.
183
-
184
- = 5.4.0 =
185
- * Update: Removed annoying message that could appear by mistake in the admin.
186
- * Add: Direct upload of Retina for Full-Size (for Pro).
187
-
188
- = 5.2.9 =
189
- * Add: New option to Regenerate Thumbnails.
190
- * Fix: Tiny CSS fix, and update fix.
191
- * Important: A few options will be removed in the near future. Have a look at this: https://wordpress.org/support/topic/simplifying-wp-retina-2x-by-removing-options/.
192
-
193
- = 5.2.8 =
194
- * Fix: Security update.
195
- * Update: Lazysizes 4.0.3.
196
-
197
- = 5.2.6 =
198
- * Fix: Avoid re-generating non-retina thumbnails when Generate is used.
199
- * Fix: Use ___DIR___ to include plugin's files.
200
- * Fix: Better explanation.
201
-
202
- = 5.2.3 =
203
- * Fix: Sanitization to avoid cross-site scripting.
204
- * Fix: Additional security fixes.
205
-
206
- = 5.2.0 =
207
- * Fix: When metadata is broken, displays a message.
208
- * Fix: A few icons weren't displayed nicely.
209
- * Fix: When metadata is broken, displays a message.
210
- * Update: From Lazysizes 3.0 to 4.0.1.
211
- * Add: Option for forcing SSL Verify.
212
-
213
- = 5.1.4 =
214
- * Add: wr2x_retina_extension, wr2x_delete_attachment, wr2x_get_pathinfo_from_image_src, wr2x_picture_rewrite in the API.
215
-
216
- = 5.0.5 =
217
- * Fix: There was a issue with the .htaccess rewriting (Class ‘Meow_Admin’ not found).
218
- * Update: Core was totally re-organized and cleaned. Ready for nice updates.
219
- * Update: LazyLoading from version 2.0 to 3.0.
220
- * Info: There will be an important warning showing up during this update. It is an important annoucement.
221
-
222
- = 4.8.0 =
223
- * Add: Retina Image Quality for JPG (between 0 and 100). I know this little setting was really wanted :)
224
- * Fix: Disabled sizes weren't really disabled in the UI.
225
- * Fix: Notices about Ignore appearing in other screens.
226
- * Add: Handles incompatibility with JetPack's Photon.
227
-
228
- = 4.7.7 =
229
- * Add: The Generate button (and the bulk Generate) will now also Re-Generate the thumbnails as well (like the Renerate Thumbnails plugin). If you are interested in a option to disable this behavior, please say so in the WP forums.
230
-
231
- = 4.7.6 =
232
- * Fix: Issue with Pro being non-Pro outside of WP Admin.
233
- * Fix: Retina debugging file was not being created properly.
234
-
235
- = 4.7.5 =
236
- * Fix: Don't delete the full-size Retina if we re-generate.
237
- * Fix: Little issue with Ignore.
238
- * Update: Additional debugging.
239
- * Info: Please write a review for the plugin if you are happy with it. I am trying my best to make this plugin to work with every kind of WP install and system :)
240
-
241
- = 4.7.4 =
242
- * Update: Retina was moved into a new Meow Apps menu. The whole Meow Apps menu can be then hidden. For a nicer WP admin. The whole admin UI was updated.
243
- * Add: New PictureFill option: inline CSS background can be now replaced by Retina images (excellent for sliders for example).
244
- * Add: Over HTTP Check option: check for retina image remotely, for example if you are using images from a different website or server, it will check for the Retina version. Works with the PictureFill method.
245
- * Change: Mobile detection was completely turned off as I don't think it should be used, but let's see if some of yours still need it. Ideally I would like to remove it from the code.
246
- * Fix: Check if the CDN is already present before modifying/adding.
247
-
248
- = 4.6.0 =
249
- * Fix: Button Details was not working properly.
250
- * Fix: Removed the beta Retina Uploader which is not working yet (was included by mistake).
251
- * Update: Added the info screen available in the Retina Dashboard in the Media Library as well and improved the UI a tiny bit (it was a bit messy if you had a lot of image sizes.)
252
-
253
- = 4.5.8 =
254
- * Update: LazyLoad 2.0.3
255
- * Fix: Don't display Retina information for a media that is not an image.
256
- * Update: Retina.js 2.0.0
257
- * Fix: Drag & Drop upload was a bit buggy, it now has been improved a lot!
258
- * Add: Option to hide the ads, flatter and message about the Pro.
259
- * Update: Options styles.
260
-
261
- = 4.4.6 =
262
- * Update: LazyLoad 1.5
263
- * Update: Retina.js 1.4
264
- * Update: PictureFill JS 3.0.2
265
- * Fix: LazyLoad was not playing well when WordPress creates the src-set by itself.
266
- * Fix: Get the right max-upload size when using HHVM.
267
- * Fix: Displays an error in the dashboard when the server-side fails to process uploads.
268
- * Update: During bulk, doesn't stop in case of errors anymore but display an errors counter.
269
- * Update: Ignore Responsive Images support if the media ID is not existent (in case of broken HTML).
270
-
271
- = 4.4.0 =
272
- * Info: Please read my blog post about WP 4.4 + Retina on https://meowapps.com/wordpress-4-4-retina/.
273
- * Add: New "Responsive Images" method.
274
- * Add: Lot more information is available in the Retina settings, to help the newbies :)
275
- * Update: Headers are compliant to WP 4.4.
276
- * Update: Dashboard has been revamped for Pro users. Standard users can still use Bulk functions.
277
- * Update: Support for WP 4.4.
278
-
279
- = 3.5.2 =
280
- * Fix: Search string not null but empty induces error.
281
- * Change: User Agent used for Pro authentication.
282
- * Fix: Issues with class containing trailing spaces. Fixed in in SimpleHTMLDOM.
283
- * Fix: Used to show weird numbers when using 9999 as width or height.
284
- * Add: Filter and default filter to avoid certain IMG SRC to be checked/parsed by the plugin while rendering.
285
-
286
- = 3.4.2 =
287
- * Fix: Full-Size Retina wasn't removed when the original file was deleted from WP.
288
- * Fix: Images set up with a 0x0 size must be skipped.
289
- * Fix: There was an issue if the class starts with a space (broken HTML), plugin automatically fix it on the fly.
290
- * Fix: Full-Size image had the wrong path in the Details screen.
291
- * Fix: Option Auto Generate was wrongly show unchecked even though it is active by default.
292
- * Update: Moved the filters to allow developers to use files hosted on another server.
293
- * Update: Translation strings. If you want to translate the plugin in your language, please contact me :)
294
-
295
- = 3.3.6 =
296
- * Fix: There was an issue with local path for a few installs.
297
- * Add: Introduced $wr2x_extra_debug for extra developer debug (might be handy).
298
- * Fix: Issues with retina images outside the uploads directory.
299
- * Add: Custom CDN Domain support (check the "Custom CDN Domain" option).
300
- * Fix: Removed a console.log that was forgotten ;)
301
- * Change: different way of getting the temporary folder to write files (might help in a few cases).
302
-
303
- = 3.1.0 =
304
- * Add: Lazy-loading option for PictureFill.
305
- * Fix: For the Pro users having the IXR_client error.
306
- * Fix: Plugin now works even behind a proxy.
307
- * Fix: Little UI bug while uploading a new image.
308
- * Add: In the dashboard, added tooltips showing the sizes of the little squares on hover.
309
- * Fix: The plugin was not compatible with Polylang, now it works.
310
-
311
- = 3.0.0 =
312
- * Add: Link to logs from the dashboard (if logs are available), and possibility to clear it directly.
313
- * Add: Replace the Full-Size directly by drag & drop in the box.
314
- * Add: Support for WPML Media.
315
- * Change: Picturefill script to 'v2.2.0 - 2014-02-03'.
316
- * Change: Enhanced logs (in debug mode), much easier to read.
317
- * Change: Dashboard enhanced, more clear, possibility of having many image sizes on the screen.
318
- * Fix: Better handing of non-image media and image detection.
319
- * Fix: Rounding issues always been present, they are now fixed with an 2px error margin.
320
- * Fix: Warnings and issues in case of broken metadata and images.
321
- * Add: (PRO) New pop-up screen with detailed information.
322
- * Add: (PRO) Added Retina for Full-Size with upload feature. Please note that Full-Size Retina also works with the normal version but you will have to manually resize and upload them.
323
- * Add: (PRO) Option to avoid removing img's src when using PictureFill.
324
- * Info: The serial for the Pro version can be bought at https://meowapps.com/wp-retina-2x. Thanks for all your support, the plugin is going to be 3 years old this year! :)
325
-
326
- = 2.6.0 =
327
- * Add: Support Manual Image Crop, resize the @2x as the user manually cropped them (that's cool!).
328
- * Change: Name will change little by little to WP Retina X and menus simplified to simply "Retina".
329
- * Change: Simplification of the dashboard (more is coming).
330
- * Change: PictureFill updated to 'v2.2.0 - 2014-12-19'.
331
- * Fix: Issue with the upload directory on some installs.
332
- * Info: Way more is coming soon to the dashboard, thanks for your patience :)
333
- * Info: Manual Image Crop received a Pull Request from me to support the Retina cropping but it is not part of their current version yet (1.07). For a version of Manual Image Crop that includes this change, you can use my forked version: https://github.com/tigroumeow/wp-manual-image-crop.
334
-
335
- = 1.6.0 =
336
- * Add: HTML srcset method.
337
-
338
- = 1.0.0 =
339
- * Change: enhancement of the Retina Dashboard.
340
- * Change: better management of the 'issues'.
341
- * Change: handle images with technical problems.
342
- * Fix: random little fixes again.
343
- * Change: upload is now HTML5, by drag and drop in the Retina Dashboard!
344
-
345
- = 0.9.4 =
346
- * Fix: esthetical issue related to the icons in the Retina dashboard.
347
- * Fix: warnings when uploading/replacing an image file.
348
- * Change: Media Replace is not used anymore, the code has been embedded in the plugin directly.
349
- * Update: to the new version of Retina.js (client-method).
350
- * Fix: updated rewrite-rule (server-method) that works with multi-site.
351
- * Fix: support for Network install (multi-site). Thanks to Jeremy (Retina-Images).
352
-
353
- = 0.3.0 =
354
- * Fix: was not generating the images properly on multisite WordPress installs.
355
- * Add: warning message if using the server-side method without the pretty permalinks.
356
- * Add: warning message if using the server-side method on a multisite WordPress install.
357
- * Change: the client-method (retina.js) is now used by default.
358
- * Fix: simplified version of the .htaccess directive.
359
- * Fix: new version of the client-side method (Retina.js), works 100x faster.
360
- * Fix: SQL optimization & memory usage huge improvement.
361
-
362
- = 0.2.2 =
363
- * Fix: the recommended resolution shown wasn't the most adequate one.
364
- * Fix: in a few cases, the .htaccess wasn't properly generated.
365
- * Fix: files were renamed to avoid conflicts.
366
- * Add: paging for the Retina Dashboard.
367
- * Add: 'Generate for all files' handles and shows if there are errors.
368
- * Add: the Retina Dashboard.
369
- * Add: can now generate Retina files in bulk.
370
- * Fix: the cropped images were not 'cropped'.
371
- * Add: The Retina Dashboard and the Media Library's column can be disabled via the settings.
372
- * Fix: resolved more PHP warning and notices.
373
-
374
- = 0.1 =
375
- * Very first release.
376
-
377
- == Installation ==
378
-
379
- Quick and easy installation:
380
-
381
- 1. Upload the folder `wp-retina-2x` to the `/wp-content/plugins/` directory.
382
- 2. Activate the plugin through the 'Plugins' menu in WordPress.
383
- 3. Check the settings of WP Retina 2x in the WordPress administration screen.
384
- 4. Check the Retina Dashboard.
385
- 6. Read the tutorial about the plugin: <a href='https://meowapps.com/wp-retina-2x/tutorial/'>WP Retina 2x Tutorial</a>.
386
-
387
- == Frequently Asked Questions ==
388
-
389
- Users, you will find the FAQ here: https://meowapps.com/wp-retina-2x/faq/.
390
-
391
- Developers, WP Retina 2x has a little API. Here are a few filters and actions you might want to use.
392
-
393
- = Functions =
394
- * wr2x_get_retina_from_url( $url ): return the URL of the retina image (empty string if not found)
395
- * wr2x_get_retina( $syspath ): return the system path of the retina image (null if not found)
396
-
397
- = Actions =
398
- * wr2x_retina_file_added: called when a new retina file is created, 1st argument is $attachment_id (of the media) and second is the $retina_filepath
399
- * wr2x_retina_file_removed: called when a new retina file is removed, 1st argument is $attachment_id (of the media) and second is the $retina_filepath
400
-
401
- = Filters =
402
- * wr2x_img_url: you can check and potentially override the $wr2x_img_url (normal/original image from the src) that will be used in the srcset for 1x
403
- * wr2x_img_retina_url: you can check and potentially override the $wr2x_img_retina_url (retina image) that will be used in the srcset for 2x
404
- * wr2x_img_src: you can check and potentially override the $wr2x_img_src that will be used in the img's src (only used in Pro version)
405
- * wr2x_validate_src: the img src is passed; return it if it is valid, return null if it should be skipped
406
-
407
- == Upgrade Notice ==
408
-
409
- None.
410
-
411
- == Screenshots ==
412
-
413
- 1. Retina Dashboard
414
- 2. Basic Settings
415
- 3. Advanced Settings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/autoload.php DELETED
@@ -1,12 +0,0 @@
1
- <?php
2
-
3
- // autoload.php @generated by Composer
4
-
5
- if (PHP_VERSION_ID < 50600) {
6
- echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
7
- exit(1);
8
- }
9
-
10
- require_once __DIR__ . '/composer/autoload_real.php';
11
-
12
- return ComposerAutoloaderInitb9bf34057faa00506d10ad6aac0e9f05::getLoader();
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/ClassLoader.php DELETED
@@ -1,572 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer\Autoload;
14
-
15
- /**
16
- * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
- *
18
- * $loader = new \Composer\Autoload\ClassLoader();
19
- *
20
- * // register classes with namespaces
21
- * $loader->add('Symfony\Component', __DIR__.'/component');
22
- * $loader->add('Symfony', __DIR__.'/framework');
23
- *
24
- * // activate the autoloader
25
- * $loader->register();
26
- *
27
- * // to enable searching the include path (eg. for PEAR packages)
28
- * $loader->setUseIncludePath(true);
29
- *
30
- * In this example, if you try to use a class in the Symfony\Component
31
- * namespace or one of its children (Symfony\Component\Console for instance),
32
- * the autoloader will first look for the class under the component/
33
- * directory, and it will then fallback to the framework/ directory if not
34
- * found before giving up.
35
- *
36
- * This class is loosely based on the Symfony UniversalClassLoader.
37
- *
38
- * @author Fabien Potencier <fabien@symfony.com>
39
- * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see https://www.php-fig.org/psr/psr-0/
41
- * @see https://www.php-fig.org/psr/psr-4/
42
- */
43
- class ClassLoader
44
- {
45
- /** @var ?string */
46
- private $vendorDir;
47
-
48
- // PSR-4
49
- /**
50
- * @var array[]
51
- * @psalm-var array<string, array<string, int>>
52
- */
53
- private $prefixLengthsPsr4 = array();
54
- /**
55
- * @var array[]
56
- * @psalm-var array<string, array<int, string>>
57
- */
58
- private $prefixDirsPsr4 = array();
59
- /**
60
- * @var array[]
61
- * @psalm-var array<string, string>
62
- */
63
- private $fallbackDirsPsr4 = array();
64
-
65
- // PSR-0
66
- /**
67
- * @var array[]
68
- * @psalm-var array<string, array<string, string[]>>
69
- */
70
- private $prefixesPsr0 = array();
71
- /**
72
- * @var array[]
73
- * @psalm-var array<string, string>
74
- */
75
- private $fallbackDirsPsr0 = array();
76
-
77
- /** @var bool */
78
- private $useIncludePath = false;
79
-
80
- /**
81
- * @var string[]
82
- * @psalm-var array<string, string>
83
- */
84
- private $classMap = array();
85
-
86
- /** @var bool */
87
- private $classMapAuthoritative = false;
88
-
89
- /**
90
- * @var bool[]
91
- * @psalm-var array<string, bool>
92
- */
93
- private $missingClasses = array();
94
-
95
- /** @var ?string */
96
- private $apcuPrefix;
97
-
98
- /**
99
- * @var self[]
100
- */
101
- private static $registeredLoaders = array();
102
-
103
- /**
104
- * @param ?string $vendorDir
105
- */
106
- public function __construct($vendorDir = null)
107
- {
108
- $this->vendorDir = $vendorDir;
109
- }
110
-
111
- /**
112
- * @return string[]
113
- */
114
- public function getPrefixes()
115
- {
116
- if (!empty($this->prefixesPsr0)) {
117
- return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118
- }
119
-
120
- return array();
121
- }
122
-
123
- /**
124
- * @return array[]
125
- * @psalm-return array<string, array<int, string>>
126
- */
127
- public function getPrefixesPsr4()
128
- {
129
- return $this->prefixDirsPsr4;
130
- }
131
-
132
- /**
133
- * @return array[]
134
- * @psalm-return array<string, string>
135
- */
136
- public function getFallbackDirs()
137
- {
138
- return $this->fallbackDirsPsr0;
139
- }
140
-
141
- /**
142
- * @return array[]
143
- * @psalm-return array<string, string>
144
- */
145
- public function getFallbackDirsPsr4()
146
- {
147
- return $this->fallbackDirsPsr4;
148
- }
149
-
150
- /**
151
- * @return string[] Array of classname => path
152
- * @psalm-return array<string, string>
153
- */
154
- public function getClassMap()
155
- {
156
- return $this->classMap;
157
- }
158
-
159
- /**
160
- * @param string[] $classMap Class to filename map
161
- * @psalm-param array<string, string> $classMap
162
- *
163
- * @return void
164
- */
165
- public function addClassMap(array $classMap)
166
- {
167
- if ($this->classMap) {
168
- $this->classMap = array_merge($this->classMap, $classMap);
169
- } else {
170
- $this->classMap = $classMap;
171
- }
172
- }
173
-
174
- /**
175
- * Registers a set of PSR-0 directories for a given prefix, either
176
- * appending or prepending to the ones previously set for this prefix.
177
- *
178
- * @param string $prefix The prefix
179
- * @param string[]|string $paths The PSR-0 root directories
180
- * @param bool $prepend Whether to prepend the directories
181
- *
182
- * @return void
183
- */
184
- public function add($prefix, $paths, $prepend = false)
185
- {
186
- if (!$prefix) {
187
- if ($prepend) {
188
- $this->fallbackDirsPsr0 = array_merge(
189
- (array) $paths,
190
- $this->fallbackDirsPsr0
191
- );
192
- } else {
193
- $this->fallbackDirsPsr0 = array_merge(
194
- $this->fallbackDirsPsr0,
195
- (array) $paths
196
- );
197
- }
198
-
199
- return;
200
- }
201
-
202
- $first = $prefix[0];
203
- if (!isset($this->prefixesPsr0[$first][$prefix])) {
204
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
205
-
206
- return;
207
- }
208
- if ($prepend) {
209
- $this->prefixesPsr0[$first][$prefix] = array_merge(
210
- (array) $paths,
211
- $this->prefixesPsr0[$first][$prefix]
212
- );
213
- } else {
214
- $this->prefixesPsr0[$first][$prefix] = array_merge(
215
- $this->prefixesPsr0[$first][$prefix],
216
- (array) $paths
217
- );
218
- }
219
- }
220
-
221
- /**
222
- * Registers a set of PSR-4 directories for a given namespace, either
223
- * appending or prepending to the ones previously set for this namespace.
224
- *
225
- * @param string $prefix The prefix/namespace, with trailing '\\'
226
- * @param string[]|string $paths The PSR-4 base directories
227
- * @param bool $prepend Whether to prepend the directories
228
- *
229
- * @throws \InvalidArgumentException
230
- *
231
- * @return void
232
- */
233
- public function addPsr4($prefix, $paths, $prepend = false)
234
- {
235
- if (!$prefix) {
236
- // Register directories for the root namespace.
237
- if ($prepend) {
238
- $this->fallbackDirsPsr4 = array_merge(
239
- (array) $paths,
240
- $this->fallbackDirsPsr4
241
- );
242
- } else {
243
- $this->fallbackDirsPsr4 = array_merge(
244
- $this->fallbackDirsPsr4,
245
- (array) $paths
246
- );
247
- }
248
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
249
- // Register directories for a new namespace.
250
- $length = strlen($prefix);
251
- if ('\\' !== $prefix[$length - 1]) {
252
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
253
- }
254
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
255
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
256
- } elseif ($prepend) {
257
- // Prepend directories for an already registered namespace.
258
- $this->prefixDirsPsr4[$prefix] = array_merge(
259
- (array) $paths,
260
- $this->prefixDirsPsr4[$prefix]
261
- );
262
- } else {
263
- // Append directories for an already registered namespace.
264
- $this->prefixDirsPsr4[$prefix] = array_merge(
265
- $this->prefixDirsPsr4[$prefix],
266
- (array) $paths
267
- );
268
- }
269
- }
270
-
271
- /**
272
- * Registers a set of PSR-0 directories for a given prefix,
273
- * replacing any others previously set for this prefix.
274
- *
275
- * @param string $prefix The prefix
276
- * @param string[]|string $paths The PSR-0 base directories
277
- *
278
- * @return void
279
- */
280
- public function set($prefix, $paths)
281
- {
282
- if (!$prefix) {
283
- $this->fallbackDirsPsr0 = (array) $paths;
284
- } else {
285
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
286
- }
287
- }
288
-
289
- /**
290
- * Registers a set of PSR-4 directories for a given namespace,
291
- * replacing any others previously set for this namespace.
292
- *
293
- * @param string $prefix The prefix/namespace, with trailing '\\'
294
- * @param string[]|string $paths The PSR-4 base directories
295
- *
296
- * @throws \InvalidArgumentException
297
- *
298
- * @return void
299
- */
300
- public function setPsr4($prefix, $paths)
301
- {
302
- if (!$prefix) {
303
- $this->fallbackDirsPsr4 = (array) $paths;
304
- } else {
305
- $length = strlen($prefix);
306
- if ('\\' !== $prefix[$length - 1]) {
307
- throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
308
- }
309
- $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
310
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
311
- }
312
- }
313
-
314
- /**
315
- * Turns on searching the include path for class files.
316
- *
317
- * @param bool $useIncludePath
318
- *
319
- * @return void
320
- */
321
- public function setUseIncludePath($useIncludePath)
322
- {
323
- $this->useIncludePath = $useIncludePath;
324
- }
325
-
326
- /**
327
- * Can be used to check if the autoloader uses the include path to check
328
- * for classes.
329
- *
330
- * @return bool
331
- */
332
- public function getUseIncludePath()
333
- {
334
- return $this->useIncludePath;
335
- }
336
-
337
- /**
338
- * Turns off searching the prefix and fallback directories for classes
339
- * that have not been registered with the class map.
340
- *
341
- * @param bool $classMapAuthoritative
342
- *
343
- * @return void
344
- */
345
- public function setClassMapAuthoritative($classMapAuthoritative)
346
- {
347
- $this->classMapAuthoritative = $classMapAuthoritative;
348
- }
349
-
350
- /**
351
- * Should class lookup fail if not found in the current class map?
352
- *
353
- * @return bool
354
- */
355
- public function isClassMapAuthoritative()
356
- {
357
- return $this->classMapAuthoritative;
358
- }
359
-
360
- /**
361
- * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
- *
363
- * @param string|null $apcuPrefix
364
- *
365
- * @return void
366
- */
367
- public function setApcuPrefix($apcuPrefix)
368
- {
369
- $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370
- }
371
-
372
- /**
373
- * The APCu prefix in use, or null if APCu caching is not enabled.
374
- *
375
- * @return string|null
376
- */
377
- public function getApcuPrefix()
378
- {
379
- return $this->apcuPrefix;
380
- }
381
-
382
- /**
383
- * Registers this instance as an autoloader.
384
- *
385
- * @param bool $prepend Whether to prepend the autoloader or not
386
- *
387
- * @return void
388
- */
389
- public function register($prepend = false)
390
- {
391
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392
-
393
- if (null === $this->vendorDir) {
394
- return;
395
- }
396
-
397
- if ($prepend) {
398
- self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
- } else {
400
- unset(self::$registeredLoaders[$this->vendorDir]);
401
- self::$registeredLoaders[$this->vendorDir] = $this;
402
- }
403
- }
404
-
405
- /**
406
- * Unregisters this instance as an autoloader.
407
- *
408
- * @return void
409
- */
410
- public function unregister()
411
- {
412
- spl_autoload_unregister(array($this, 'loadClass'));
413
-
414
- if (null !== $this->vendorDir) {
415
- unset(self::$registeredLoaders[$this->vendorDir]);
416
- }
417
- }
418
-
419
- /**
420
- * Loads the given class or interface.
421
- *
422
- * @param string $class The name of the class
423
- * @return true|null True if loaded, null otherwise
424
- */
425
- public function loadClass($class)
426
- {
427
- if ($file = $this->findFile($class)) {
428
- includeFile($file);
429
-
430
- return true;
431
- }
432
-
433
- return null;
434
- }
435
-
436
- /**
437
- * Finds the path to the file where the class is defined.
438
- *
439
- * @param string $class The name of the class
440
- *
441
- * @return string|false The path if found, false otherwise
442
- */
443
- public function findFile($class)
444
- {
445
- // class map lookup
446
- if (isset($this->classMap[$class])) {
447
- return $this->classMap[$class];
448
- }
449
- if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
450
- return false;
451
- }
452
- if (null !== $this->apcuPrefix) {
453
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
454
- if ($hit) {
455
- return $file;
456
- }
457
- }
458
-
459
- $file = $this->findFileWithExtension($class, '.php');
460
-
461
- // Search for Hack files if we are running on HHVM
462
- if (false === $file && defined('HHVM_VERSION')) {
463
- $file = $this->findFileWithExtension($class, '.hh');
464
- }
465
-
466
- if (null !== $this->apcuPrefix) {
467
- apcu_add($this->apcuPrefix.$class, $file);
468
- }
469
-
470
- if (false === $file) {
471
- // Remember that this class does not exist.
472
- $this->missingClasses[$class] = true;
473
- }
474
-
475
- return $file;
476
- }
477
-
478
- /**
479
- * Returns the currently registered loaders indexed by their corresponding vendor directories.
480
- *
481
- * @return self[]
482
- */
483
- public static function getRegisteredLoaders()
484
- {
485
- return self::$registeredLoaders;
486
- }
487
-
488
- /**
489
- * @param string $class
490
- * @param string $ext
491
- * @return string|false
492
- */
493
- private function findFileWithExtension($class, $ext)
494
- {
495
- // PSR-4 lookup
496
- $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497
-
498
- $first = $class[0];
499
- if (isset($this->prefixLengthsPsr4[$first])) {
500
- $subPath = $class;
501
- while (false !== $lastPos = strrpos($subPath, '\\')) {
502
- $subPath = substr($subPath, 0, $lastPos);
503
- $search = $subPath . '\\';
504
- if (isset($this->prefixDirsPsr4[$search])) {
505
- $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
506
- foreach ($this->prefixDirsPsr4[$search] as $dir) {
507
- if (file_exists($file = $dir . $pathEnd)) {
508
- return $file;
509
- }
510
- }
511
- }
512
- }
513
- }
514
-
515
- // PSR-4 fallback dirs
516
- foreach ($this->fallbackDirsPsr4 as $dir) {
517
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
518
- return $file;
519
- }
520
- }
521
-
522
- // PSR-0 lookup
523
- if (false !== $pos = strrpos($class, '\\')) {
524
- // namespaced class name
525
- $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
526
- . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
527
- } else {
528
- // PEAR-like class name
529
- $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
530
- }
531
-
532
- if (isset($this->prefixesPsr0[$first])) {
533
- foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
534
- if (0 === strpos($class, $prefix)) {
535
- foreach ($dirs as $dir) {
536
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
537
- return $file;
538
- }
539
- }
540
- }
541
- }
542
- }
543
-
544
- // PSR-0 fallback dirs
545
- foreach ($this->fallbackDirsPsr0 as $dir) {
546
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
547
- return $file;
548
- }
549
- }
550
-
551
- // PSR-0 include paths.
552
- if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
553
- return $file;
554
- }
555
-
556
- return false;
557
- }
558
- }
559
-
560
- /**
561
- * Scope isolated include.
562
- *
563
- * Prevents access to $this/self from included files.
564
- *
565
- * @param string $file
566
- * @return void
567
- * @private
568
- */
569
- function includeFile($file)
570
- {
571
- include $file;
572
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/InstalledVersions.php DELETED
@@ -1,352 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * This file is part of Composer.
5
- *
6
- * (c) Nils Adermann <naderman@naderman.de>
7
- * Jordi Boggiano <j.boggiano@seld.be>
8
- *
9
- * For the full copyright and license information, please view the LICENSE
10
- * file that was distributed with this source code.
11
- */
12
-
13
- namespace Composer;
14
-
15
- use Composer\Autoload\ClassLoader;
16
- use Composer\Semver\VersionParser;
17
-
18
- /**
19
- * This class is copied in every Composer installed project and available to all
20
- *
21
- * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
- *
23
- * To require its presence, you can require `composer-runtime-api ^2.0`
24
- *
25
- * @final
26
- */
27
- class InstalledVersions
28
- {
29
- /**
30
- * @var mixed[]|null
31
- * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
32
- */
33
- private static $installed;
34
-
35
- /**
36
- * @var bool|null
37
- */
38
- private static $canGetVendors;
39
-
40
- /**
41
- * @var array[]
42
- * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
43
- */
44
- private static $installedByVendor = array();
45
-
46
- /**
47
- * Returns a list of all package names which are present, either by being installed, replaced or provided
48
- *
49
- * @return string[]
50
- * @psalm-return list<string>
51
- */
52
- public static function getInstalledPackages()
53
- {
54
- $packages = array();
55
- foreach (self::getInstalled() as $installed) {
56
- $packages[] = array_keys($installed['versions']);
57
- }
58
-
59
- if (1 === \count($packages)) {
60
- return $packages[0];
61
- }
62
-
63
- return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
64
- }
65
-
66
- /**
67
- * Returns a list of all package names with a specific type e.g. 'library'
68
- *
69
- * @param string $type
70
- * @return string[]
71
- * @psalm-return list<string>
72
- */
73
- public static function getInstalledPackagesByType($type)
74
- {
75
- $packagesByType = array();
76
-
77
- foreach (self::getInstalled() as $installed) {
78
- foreach ($installed['versions'] as $name => $package) {
79
- if (isset($package['type']) && $package['type'] === $type) {
80
- $packagesByType[] = $name;
81
- }
82
- }
83
- }
84
-
85
- return $packagesByType;
86
- }
87
-
88
- /**
89
- * Checks whether the given package is installed
90
- *
91
- * This also returns true if the package name is provided or replaced by another package
92
- *
93
- * @param string $packageName
94
- * @param bool $includeDevRequirements
95
- * @return bool
96
- */
97
- public static function isInstalled($packageName, $includeDevRequirements = true)
98
- {
99
- foreach (self::getInstalled() as $installed) {
100
- if (isset($installed['versions'][$packageName])) {
101
- return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
102
- }
103
- }
104
-
105
- return false;
106
- }
107
-
108
- /**
109
- * Checks whether the given package satisfies a version constraint
110
- *
111
- * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
112
- *
113
- * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
114
- *
115
- * @param VersionParser $parser Install composer/semver to have access to this class and functionality
116
- * @param string $packageName
117
- * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
118
- * @return bool
119
- */
120
- public static function satisfies(VersionParser $parser, $packageName, $constraint)
121
- {
122
- $constraint = $parser->parseConstraints($constraint);
123
- $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124
-
125
- return $provided->matches($constraint);
126
- }
127
-
128
- /**
129
- * Returns a version constraint representing all the range(s) which are installed for a given package
130
- *
131
- * It is easier to use this via isInstalled() with the $constraint argument if you need to check
132
- * whether a given version of a package is installed, and not just whether it exists
133
- *
134
- * @param string $packageName
135
- * @return string Version constraint usable with composer/semver
136
- */
137
- public static function getVersionRanges($packageName)
138
- {
139
- foreach (self::getInstalled() as $installed) {
140
- if (!isset($installed['versions'][$packageName])) {
141
- continue;
142
- }
143
-
144
- $ranges = array();
145
- if (isset($installed['versions'][$packageName]['pretty_version'])) {
146
- $ranges[] = $installed['versions'][$packageName]['pretty_version'];
147
- }
148
- if (array_key_exists('aliases', $installed['versions'][$packageName])) {
149
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
150
- }
151
- if (array_key_exists('replaced', $installed['versions'][$packageName])) {
152
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
153
- }
154
- if (array_key_exists('provided', $installed['versions'][$packageName])) {
155
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
156
- }
157
-
158
- return implode(' || ', $ranges);
159
- }
160
-
161
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
162
- }
163
-
164
- /**
165
- * @param string $packageName
166
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
167
- */
168
- public static function getVersion($packageName)
169
- {
170
- foreach (self::getInstalled() as $installed) {
171
- if (!isset($installed['versions'][$packageName])) {
172
- continue;
173
- }
174
-
175
- if (!isset($installed['versions'][$packageName]['version'])) {
176
- return null;
177
- }
178
-
179
- return $installed['versions'][$packageName]['version'];
180
- }
181
-
182
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
183
- }
184
-
185
- /**
186
- * @param string $packageName
187
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
188
- */
189
- public static function getPrettyVersion($packageName)
190
- {
191
- foreach (self::getInstalled() as $installed) {
192
- if (!isset($installed['versions'][$packageName])) {
193
- continue;
194
- }
195
-
196
- if (!isset($installed['versions'][$packageName]['pretty_version'])) {
197
- return null;
198
- }
199
-
200
- return $installed['versions'][$packageName]['pretty_version'];
201
- }
202
-
203
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
204
- }
205
-
206
- /**
207
- * @param string $packageName
208
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
209
- */
210
- public static function getReference($packageName)
211
- {
212
- foreach (self::getInstalled() as $installed) {
213
- if (!isset($installed['versions'][$packageName])) {
214
- continue;
215
- }
216
-
217
- if (!isset($installed['versions'][$packageName]['reference'])) {
218
- return null;
219
- }
220
-
221
- return $installed['versions'][$packageName]['reference'];
222
- }
223
-
224
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
225
- }
226
-
227
- /**
228
- * @param string $packageName
229
- * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
230
- */
231
- public static function getInstallPath($packageName)
232
- {
233
- foreach (self::getInstalled() as $installed) {
234
- if (!isset($installed['versions'][$packageName])) {
235
- continue;
236
- }
237
-
238
- return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
239
- }
240
-
241
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
242
- }
243
-
244
- /**
245
- * @return array
246
- * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
247
- */
248
- public static function getRootPackage()
249
- {
250
- $installed = self::getInstalled();
251
-
252
- return $installed[0]['root'];
253
- }
254
-
255
- /**
256
- * Returns the raw installed.php data for custom implementations
257
- *
258
- * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
259
- * @return array[]
260
- * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
261
- */
262
- public static function getRawData()
263
- {
264
- @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
265
-
266
- if (null === self::$installed) {
267
- // only require the installed.php file if this file is loaded from its dumped location,
268
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
269
- if (substr(__DIR__, -8, 1) !== 'C') {
270
- self::$installed = include __DIR__ . '/installed.php';
271
- } else {
272
- self::$installed = array();
273
- }
274
- }
275
-
276
- return self::$installed;
277
- }
278
-
279
- /**
280
- * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
- *
282
- * @return array[]
283
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
284
- */
285
- public static function getAllRawData()
286
- {
287
- return self::getInstalled();
288
- }
289
-
290
- /**
291
- * Lets you reload the static array from another file
292
- *
293
- * This is only useful for complex integrations in which a project needs to use
294
- * this class but then also needs to execute another project's autoloader in process,
295
- * and wants to ensure both projects have access to their version of installed.php.
296
- *
297
- * A typical case would be PHPUnit, where it would need to make sure it reads all
298
- * the data it needs from this class, then call reload() with
299
- * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
300
- * the project in which it runs can then also use this class safely, without
301
- * interference between PHPUnit's dependencies and the project's dependencies.
302
- *
303
- * @param array[] $data A vendor/composer/installed.php data set
304
- * @return void
305
- *
306
- * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
307
- */
308
- public static function reload($data)
309
- {
310
- self::$installed = $data;
311
- self::$installedByVendor = array();
312
- }
313
-
314
- /**
315
- * @return array[]
316
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
317
- */
318
- private static function getInstalled()
319
- {
320
- if (null === self::$canGetVendors) {
321
- self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
322
- }
323
-
324
- $installed = array();
325
-
326
- if (self::$canGetVendors) {
327
- foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
328
- if (isset(self::$installedByVendor[$vendorDir])) {
329
- $installed[] = self::$installedByVendor[$vendorDir];
330
- } elseif (is_file($vendorDir.'/composer/installed.php')) {
331
- $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
332
- if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333
- self::$installed = $installed[count($installed) - 1];
334
- }
335
- }
336
- }
337
- }
338
-
339
- if (null === self::$installed) {
340
- // only require the installed.php file if this file is loaded from its dumped location,
341
- // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342
- if (substr(__DIR__, -8, 1) !== 'C') {
343
- self::$installed = require __DIR__ . '/installed.php';
344
- } else {
345
- self::$installed = array();
346
- }
347
- }
348
- $installed[] = self::$installed;
349
-
350
- return $installed;
351
- }
352
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/LICENSE DELETED
@@ -1,21 +0,0 @@
1
-
2
- Copyright (c) Nils Adermann, Jordi Boggiano
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is furnished
9
- to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
21
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_classmap.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- // autoload_classmap.php @generated by Composer
4
-
5
- $vendorDir = dirname(__DIR__);
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
- );
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_namespaces.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- // autoload_namespaces.php @generated by Composer
4
-
5
- $vendorDir = dirname(__DIR__);
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- 'KubAT\\PhpSimple\\HtmlDomParser' => array($vendorDir . '/kub-at/php-simple-html-dom-parser/src'),
10
- );
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_psr4.php DELETED
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- // autoload_psr4.php @generated by Composer
4
-
5
- $vendorDir = dirname(__DIR__);
6
- $baseDir = dirname($vendorDir);
7
-
8
- return array(
9
- );
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_real.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
-
3
- // autoload_real.php @generated by Composer
4
-
5
- class ComposerAutoloaderInitb9bf34057faa00506d10ad6aac0e9f05
6
- {
7
- private static $loader;
8
-
9
- public static function loadClassLoader($class)
10
- {
11
- if ('Composer\Autoload\ClassLoader' === $class) {
12
- require __DIR__ . '/ClassLoader.php';
13
- }
14
- }
15
-
16
- /**
17
- * @return \Composer\Autoload\ClassLoader
18
- */
19
- public static function getLoader()
20
- {
21
- if (null !== self::$loader) {
22
- return self::$loader;
23
- }
24
-
25
- require __DIR__ . '/platform_check.php';
26
-
27
- spl_autoload_register(array('ComposerAutoloaderInitb9bf34057faa00506d10ad6aac0e9f05', 'loadClassLoader'), true, true);
28
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
- spl_autoload_unregister(array('ComposerAutoloaderInitb9bf34057faa00506d10ad6aac0e9f05', 'loadClassLoader'));
30
-
31
- require __DIR__ . '/autoload_static.php';
32
- call_user_func(\Composer\Autoload\ComposerStaticInitb9bf34057faa00506d10ad6aac0e9f05::getInitializer($loader));
33
-
34
- $loader->register(true);
35
-
36
- return $loader;
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/autoload_static.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
-
3
- // autoload_static.php @generated by Composer
4
-
5
- namespace Composer\Autoload;
6
-
7
- class ComposerStaticInitb9bf34057faa00506d10ad6aac0e9f05
8
- {
9
- public static $prefixesPsr0 = array (
10
- 'K' =>
11
- array (
12
- 'KubAT\\PhpSimple\\HtmlDomParser' =>
13
- array (
14
- 0 => __DIR__ . '/..' . '/kub-at/php-simple-html-dom-parser/src',
15
- ),
16
- ),
17
- );
18
-
19
- public static $classMap = array (
20
- 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
21
- );
22
-
23
- public static function getInitializer(ClassLoader $loader)
24
- {
25
- return \Closure::bind(function () use ($loader) {
26
- $loader->prefixesPsr0 = ComposerStaticInitb9bf34057faa00506d10ad6aac0e9f05::$prefixesPsr0;
27
- $loader->classMap = ComposerStaticInitb9bf34057faa00506d10ad6aac0e9f05::$classMap;
28
-
29
- }, null, ClassLoader::class);
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/installed.json DELETED
@@ -1,55 +0,0 @@
1
- {
2
- "packages": [
3
- {
4
- "name": "kub-at/php-simple-html-dom-parser",
5
- "version": "1.9.1",
6
- "version_normalized": "1.9.1.0",
7
- "source": {
8
- "type": "git",
9
- "url": "https://github.com/Kub-AT/php-simple-html-dom-parser.git",
10
- "reference": "ff22f98bfd9235115c128059076f3eb740d66913"
11
- },
12
- "dist": {
13
- "type": "zip",
14
- "url": "https://api.github.com/repos/Kub-AT/php-simple-html-dom-parser/zipball/ff22f98bfd9235115c128059076f3eb740d66913",
15
- "reference": "ff22f98bfd9235115c128059076f3eb740d66913",
16
- "shasum": ""
17
- },
18
- "require": {
19
- "php": ">=5.3.2"
20
- },
21
- "time": "2019-10-25T12:34:43+00:00",
22
- "type": "library",
23
- "installation-source": "dist",
24
- "autoload": {
25
- "psr-0": {
26
- "KubAT\\PhpSimple\\HtmlDomParser": "src/"
27
- }
28
- },
29
- "notification-url": "https://packagist.org/downloads/",
30
- "license": [
31
- "MIT"
32
- ],
33
- "authors": [
34
- {
35
- "name": "S.C. Chen",
36
- "email": "me578022@gmail.com"
37
- },
38
- {
39
- "name": "Jakub Stawowy",
40
- "email": "Kub-AT@users.noreply.github.com"
41
- }
42
- ],
43
- "description": "PHP Simple HTML DOM Parser with namespace and PHP 7.3 compatible",
44
- "homepage": "http://simplehtmldom.sourceforge.net/",
45
- "keywords": [
46
- "Simple",
47
- "dom",
48
- "html"
49
- ],
50
- "install-path": "../kub-at/php-simple-html-dom-parser"
51
- }
52
- ],
53
- "dev": true,
54
- "dev-package-names": []
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/installed.php DELETED
@@ -1,32 +0,0 @@
1
- <?php return array(
2
- 'root' => array(
3
- 'pretty_version' => 'dev-master',
4
- 'version' => 'dev-master',
5
- 'type' => 'library',
6
- 'install_path' => __DIR__ . '/../../',
7
- 'aliases' => array(),
8
- 'reference' => 'd3d1d42874842c11d8310ee82c7d02b0b3bbf0a9',
9
- 'name' => '__root__',
10
- 'dev' => true,
11
- ),
12
- 'versions' => array(
13
- '__root__' => array(
14
- 'pretty_version' => 'dev-master',
15
- 'version' => 'dev-master',
16
- 'type' => 'library',
17
- 'install_path' => __DIR__ . '/../../',
18
- 'aliases' => array(),
19
- 'reference' => 'd3d1d42874842c11d8310ee82c7d02b0b3bbf0a9',
20
- 'dev_requirement' => false,
21
- ),
22
- 'kub-at/php-simple-html-dom-parser' => array(
23
- 'pretty_version' => '1.9.1',
24
- 'version' => '1.9.1.0',
25
- 'type' => 'library',
26
- 'install_path' => __DIR__ . '/../kub-at/php-simple-html-dom-parser',
27
- 'aliases' => array(),
28
- 'reference' => 'ff22f98bfd9235115c128059076f3eb740d66913',
29
- 'dev_requirement' => false,
30
- ),
31
- ),
32
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/composer/platform_check.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- // platform_check.php @generated by Composer
4
-
5
- $issues = array();
6
-
7
- if (!(PHP_VERSION_ID >= 50302)) {
8
- $issues[] = 'Your Composer dependencies require a PHP version ">= 5.3.2". You are running ' . PHP_VERSION . '.';
9
- }
10
-
11
- if ($issues) {
12
- if (!headers_sent()) {
13
- header('HTTP/1.1 500 Internal Server Error');
14
- }
15
- if (!ini_get('display_errors')) {
16
- if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
- fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
- } elseif (!headers_sent()) {
19
- echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
- }
21
- }
22
- trigger_error(
23
- 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
- E_USER_ERROR
25
- );
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/kub-at/php-simple-html-dom-parser/CONTRIBUTING.md DELETED
@@ -1,3 +0,0 @@
1
- # Contributing
2
-
3
- I'm not the maintainer of the PHP Simple HTML DOM Parser project (https://sourceforge.net/projects/simplehtmldom/)
 
 
 
trunk/vendor/kub-at/php-simple-html-dom-parser/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Jakub Stawowy
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/kub-at/php-simple-html-dom-parser/README.md DELETED
@@ -1,29 +0,0 @@
1
- php-simple-html-dom-parser
2
- ==========================
3
-
4
- Version 1.9.1 - PHP 7.3 compatible
5
- PHP Simple HTML DOM Parser changelog: https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.9.1/
6
-
7
-
8
- Install
9
- -------
10
-
11
- ```
12
- composer require kub-at/php-simple-html-dom-parser
13
- ```
14
-
15
- Usage
16
- -----
17
-
18
- ```php
19
- use KubAT\PhpSimple\HtmlDomParser;
20
-
21
- ...
22
- $dom = HtmlDomParser::str_get_html( $str );
23
- or
24
- $dom = HtmlDomParser::file_get_html( $file_name );
25
-
26
- $elems = $dom->find($elem_name);
27
- ...
28
-
29
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/kub-at/php-simple-html-dom-parser/composer.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "name": "kub-at/php-simple-html-dom-parser",
3
- "description": "PHP Simple HTML DOM Parser with namespace and PHP 7.3 compatible",
4
- "keywords": ["html", "dom", "simple"],
5
- "homepage": "http://simplehtmldom.sourceforge.net/",
6
- "type": "library",
7
- "license": "MIT",
8
- "authors": [
9
- {
10
- "name": "S.C. Chen",
11
- "email": "me578022@gmail.com"
12
- },
13
- {
14
- "name": "Jakub Stawowy",
15
- "email": "Kub-AT@users.noreply.github.com"
16
- }
17
- ],
18
- "require": {
19
- "php": ">=5.3.2"
20
- },
21
- "autoload": {
22
- "psr-0": { "KubAT\\PhpSimple\\HtmlDomParser": "src/" }
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/HtmlDomParser.php DELETED
@@ -1,16 +0,0 @@
1
- <?php
2
- namespace KubAT\PhpSimple;
3
-
4
- require 'lib'.DIRECTORY_SEPARATOR.'simple_html_dom.php';
5
-
6
-
7
- class HtmlDomParser {
8
-
9
- static public function file_get_html() {
10
- return call_user_func_array('\simple_html_dom\file_get_html' , func_get_args());
11
- }
12
-
13
- static public function str_get_html() {
14
- return call_user_func_array('\simple_html_dom\str_get_html' , func_get_args());
15
- }
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/vendor/kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php DELETED
@@ -1,2355 +0,0 @@
1
- <?php
2
- namespace simple_html_dom;
3
-
4
- /**
5
- * Website: http://sourceforge.net/projects/simplehtmldom/
6
- * Additional projects: http://sourceforge.net/projects/debugobject/
7
- * Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/)
8
- *
9
- * Licensed under The MIT License
10
- * See the LICENSE file in the project root for more information.
11
- *
12
- * Authors:
13
- * S.C. Chen
14
- * John Schlick
15
- * Rus Carroll
16
- * logmanoriginal
17
- *
18
- * Contributors:
19
- * Yousuke Kumakura
20
- * Vadim Voituk
21
- * Antcs
22
- *
23
- * Version Rev. 1.9.1 (291)
24
- */
25
-
26
- define('HDOM_TYPE_ELEMENT', 1);
27
- define('HDOM_TYPE_COMMENT', 2);
28
- define('HDOM_TYPE_TEXT', 3);
29
- define('HDOM_TYPE_ENDTAG', 4);
30
- define('HDOM_TYPE_ROOT', 5);
31
- define('HDOM_TYPE_UNKNOWN', 6);
32
- define('HDOM_QUOTE_DOUBLE', 0);
33
- define('HDOM_QUOTE_SINGLE', 1);
34
- define('HDOM_QUOTE_NO', 3);
35
- define('HDOM_INFO_BEGIN', 0);
36
- define('HDOM_INFO_END', 1);
37
- define('HDOM_INFO_QUOTE', 2);
38
- define('HDOM_INFO_SPACE', 3);
39
- define('HDOM_INFO_TEXT', 4);
40
- define('HDOM_INFO_INNER', 5);
41
- define('HDOM_INFO_OUTER', 6);
42
- define('HDOM_INFO_ENDSPACE', 7);
43
-
44
- defined('DEFAULT_TARGET_CHARSET') || define('DEFAULT_TARGET_CHARSET', 'UTF-8');
45
- defined('DEFAULT_BR_TEXT') || define('DEFAULT_BR_TEXT', "\r\n");
46
- defined('DEFAULT_SPAN_TEXT') || define('DEFAULT_SPAN_TEXT', ' ');
47
- defined('MAX_FILE_SIZE') || define('MAX_FILE_SIZE', 600000);
48
- define('HDOM_SMARTY_AS_TEXT', 1);
49
-
50
- function file_get_html(
51
- $url,
52
- $use_include_path = false,
53
- $context = null,
54
- $offset = 0,
55
- $maxLen = -1,
56
- $lowercase = true,
57
- $forceTagsClosed = true,
58
- $target_charset = DEFAULT_TARGET_CHARSET,
59
- $stripRN = true,
60
- $defaultBRText = DEFAULT_BR_TEXT,
61
- $defaultSpanText = DEFAULT_SPAN_TEXT)
62
- {
63
- if($maxLen <= 0) { $maxLen = MAX_FILE_SIZE; }
64
-
65
- $dom = new simple_html_dom(
66
- null,
67
- $lowercase,
68
- $forceTagsClosed,
69
- $target_charset,
70
- $stripRN,
71
- $defaultBRText,
72
- $defaultSpanText
73
- );
74
-
75
- /**
76
- * For sourceforge users: uncomment the next line and comment the
77
- * retrieve_url_contents line 2 lines down if it is not already done.
78
- */
79
- $contents = file_get_contents(
80
- $url,
81
- $use_include_path,
82
- $context,
83
- $offset,
84
- $maxLen
85
- );
86
- // $contents = retrieve_url_contents($url);
87
-
88
- if (empty($contents) || strlen($contents) > $maxLen) {
89
- $dom->clear();
90
- return false;
91
- }
92
-
93
- return $dom->load($contents, $lowercase, $stripRN);
94
- }
95
-
96
- function str_get_html(
97
- $str,
98
- $lowercase = true,
99
- $forceTagsClosed = true,
100
- $target_charset = DEFAULT_TARGET_CHARSET,
101
- $stripRN = true,
102
- $defaultBRText = DEFAULT_BR_TEXT,
103
- $defaultSpanText = DEFAULT_SPAN_TEXT)
104
- {
105
- $dom = new simple_html_dom(
106
- null,
107
- $lowercase,
108
- $forceTagsClosed,
109
- $target_charset,
110
- $stripRN,
111
- $defaultBRText,
112
- $defaultSpanText
113
- );
114
-
115
- if (empty($str) || strlen($str) > MAX_FILE_SIZE) {
116
- $dom->clear();
117
- return false;
118
- }
119
-
120
- return $dom->load($str, $lowercase, $stripRN);
121
- }
122
-
123
- function dump_html_tree($node, $show_attr = true, $deep = 0)
124
- {
125
- $node->dump($node);
126
- }
127
-
128
- class simple_html_dom_node
129
- {
130
- public $nodetype = HDOM_TYPE_TEXT;
131
- public $tag = 'text';
132
- public $attr = array();
133
- public $children = array();
134
- public $nodes = array();
135
- public $parent = null;
136
- public $_ = array();
137
- public $tag_start = 0;
138
- private $dom = null;
139
-
140
- function __construct($dom)
141
- {
142
- $this->dom = $dom;
143
- $dom->nodes[] = $this;
144
- }
145
-
146
- function __destruct()
147
- {
148
- $this->clear();
149
- }
150
-
151
- function __toString()
152
- {
153
- return $this->outertext();
154
- }
155
-
156
- function clear()
157
- {
158
- $this->dom = null;
159
- $this->nodes = null;
160
- $this->parent = null;
161
- $this->children = null;
162
- }
163
-
164
- function dump($show_attr = true, $depth = 0)
165
- {
166
- echo str_repeat("\t", $depth) . $this->tag;
167
-
168
- if ($show_attr && count($this->attr) > 0) {
169
- echo '(';
170
- foreach ($this->attr as $k => $v) {
171
- echo "[$k]=>\"$v\", ";
172
- }
173
- echo ')';
174
- }
175
-
176
- echo "\n";
177
-
178
- if ($this->nodes) {
179
- foreach ($this->nodes as $node) {
180
- $node->dump($show_attr, $depth + 1);
181
- }
182
- }
183
- }
184
-
185
- function dump_node($echo = true)
186
- {
187
- $string = $this->tag;
188
-
189
- if (count($this->attr) > 0) {
190
- $string .= '(';
191
- foreach ($this->attr as $k => $v) {
192
- $string .= "[$k]=>\"$v\", ";
193
- }
194
- $string .= ')';
195
- }
196
-
197
- if (count($this->_) > 0) {
198
- $string .= ' $_ (';
199
- foreach ($this->_ as $k => $v) {
200
- if (is_array($v)) {
201
- $string .= "[$k]=>(";
202
- foreach ($v as $k2 => $v2) {
203
- $string .= "[$k2]=>\"$v2\", ";
204
- }
205
- $string .= ')';
206
- } else {
207
- $string .= "[$k]=>\"$v\", ";
208
- }
209
- }
210
- $string .= ')';
211
- }
212
-
213
- if (isset($this->text)) {
214
- $string .= " text: ({$this->text})";
215
- }
216
-
217
- $string .= ' HDOM_INNER_INFO: ';
218
-
219
- if (isset($node->_[HDOM_INFO_INNER])) {
220
- $string .= "'" . $node->_[HDOM_INFO_INNER] . "'";
221
- } else {
222
- $string .= ' NULL ';
223
- }
224
-
225
- $string .= ' children: ' . count($this->children);
226
- $string .= ' nodes: ' . count($this->nodes);
227
- $string .= ' tag_start: ' . $this->tag_start;
228
- $string .= "\n";
229
-
230
- if ($echo) {
231
- echo $string;
232
- return;
233
- } else {
234
- return $string;
235
- }
236
- }
237
-
238
- function parent($parent = null)
239
- {
240
- // I am SURE that this doesn't work properly.
241
- // It fails to unset the current node from it's current parents nodes or
242
- // children list first.
243
- if ($parent !== null) {
244
- $this->parent = $parent;
245
- $this->parent->nodes[] = $this;
246
- $this->parent->children[] = $this;
247
- }
248
-
249
- return $this->parent;
250
- }
251
-
252
- function has_child()
253
- {
254
- return !empty($this->children);
255
- }
256
-
257
- function children($idx = -1)
258
- {
259
- if ($idx === -1) {
260
- return $this->children;
261
- }
262
-
263
- if (isset($this->children[$idx])) {
264
- return $this->children[$idx];
265
- }
266
-
267
- return null;
268
- }
269
-
270
- function first_child()
271
- {
272
- if (count($this->children) > 0) {
273
- return $this->children[0];
274
- }
275
- return null;
276
- }
277
-
278
- function last_child()
279
- {
280
- if (count($this->children) > 0) {
281
- return end($this->children);
282
- }
283
- return null;
284
- }
285
-
286
- function next_sibling()
287
- {
288
- if ($this->parent === null) {
289
- return null;
290
- }
291
-
292
- $idx = array_search($this, $this->parent->children, true);
293
-
294
- if ($idx !== false && isset($this->parent->children[$idx + 1])) {
295
- return $this->parent->children[$idx + 1];
296
- }
297
-
298
- return null;
299
- }
300
-
301
- function prev_sibling()
302
- {
303
- if ($this->parent === null) {
304
- return null;
305
- }
306
-
307
- $idx = array_search($this, $this->parent->children, true);
308
-
309
- if ($idx !== false && $idx > 0) {
310
- return $this->parent->children[$idx - 1];
311
- }
312
-
313
- return null;
314
- }
315
-
316
- function find_ancestor_tag($tag)
317
- {
318
- global $debug_object;
319
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
320
-
321
- if ($this->parent === null) {
322
- return null;
323
- }
324
-
325
- $ancestor = $this->parent;
326
-
327
- while (!is_null($ancestor)) {
328
- if (is_object($debug_object)) {
329
- $debug_object->debug_log(2, 'Current tag is: ' . $ancestor->tag);
330
- }
331
-
332
- if ($ancestor->tag === $tag) {
333
- break;
334
- }
335
-
336
- $ancestor = $ancestor->parent;
337
- }
338
-
339
- return $ancestor;
340
- }
341
-
342
- function innertext()
343
- {
344
- if (isset($this->_[HDOM_INFO_INNER])) {
345
- return $this->_[HDOM_INFO_INNER];
346
- }
347
-
348
- if (isset($this->_[HDOM_INFO_TEXT])) {
349
- return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);
350
- }
351
-
352
- $ret = '';
353
-
354
- foreach ($this->nodes as $n) {
355
- $ret .= $n->outertext();
356
- }
357
-
358
- return $ret;
359
- }
360
-
361
- function outertext()
362
- {
363
- global $debug_object;
364
-
365
- if (is_object($debug_object)) {
366
- $text = '';
367
-
368
- if ($this->tag === 'text') {
369
- if (!empty($this->text)) {
370
- $text = ' with text: ' . $this->text;
371
- }
372
- }
373
-
374
- $debug_object->debug_log(1, 'Innertext of tag: ' . $this->tag . $text);
375
- }
376
-
377
- if ($this->tag === 'root') {
378
- return $this->innertext();
379
- }
380
-
381
- // todo: What is the use of this callback? Remove?
382
- if ($this->dom && $this->dom->callback !== null) {
383
- call_user_func_array($this->dom->callback, array($this));
384
- }
385
-
386
- if (isset($this->_[HDOM_INFO_OUTER])) {
387
- return $this->_[HDOM_INFO_OUTER];
388
- }
389
-
390
- if (isset($this->_[HDOM_INFO_TEXT])) {
391
- return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);
392
- }
393
-
394
- $ret = '';
395
-
396
- if ($this->dom && $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]) {
397
- $ret = $this->dom->nodes[$this->_[HDOM_INFO_BEGIN]]->makeup();
398
- }
399
-
400
- if (isset($this->_[HDOM_INFO_INNER])) {
401
- // todo: <br> should either never have HDOM_INFO_INNER or always
402
- if ($this->tag !== 'br') {
403
- $ret .= $this->_[HDOM_INFO_INNER];
404
- }
405
- } elseif ($this->nodes) {
406
- foreach ($this->nodes as $n) {
407
- $ret .= $this->convert_text($n->outertext());
408
- }
409
- }
410
-
411
- if (isset($this->_[HDOM_INFO_END]) && $this->_[HDOM_INFO_END] != 0) {
412
- $ret .= '</' . $this->tag . '>';
413
- }
414
-
415
- return $ret;
416
- }
417
-
418
- function text()
419
- {
420
- if (isset($this->_[HDOM_INFO_INNER])) {
421
- return $this->_[HDOM_INFO_INNER];
422
- }
423
-
424
- switch ($this->nodetype) {
425
- case HDOM_TYPE_TEXT: return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);
426
- case HDOM_TYPE_COMMENT: return '';
427
- case HDOM_TYPE_UNKNOWN: return '';
428
- }
429
-
430
- if (strcasecmp($this->tag, 'script') === 0) { return ''; }
431
- if (strcasecmp($this->tag, 'style') === 0) { return ''; }
432
-
433
- $ret = '';
434
-
435
- // In rare cases, (always node type 1 or HDOM_TYPE_ELEMENT - observed
436
- // for some span tags, and some p tags) $this->nodes is set to NULL.
437
- // NOTE: This indicates that there is a problem where it's set to NULL
438
- // without a clear happening.
439
- // WHY is this happening?
440
- if (!is_null($this->nodes)) {
441
- foreach ($this->nodes as $n) {
442
- // Start paragraph after a blank line
443
- if ($n->tag === 'p') {
444
- $ret = trim($ret) . "\n\n";
445
- }
446
-
447
- $ret .= $this->convert_text($n->text());
448
-
449
- // If this node is a span... add a space at the end of it so
450
- // multiple spans don't run into each other. This is plaintext
451
- // after all.
452
- if ($n->tag === 'span') {
453
- $ret .= $this->dom->default_span_text;
454
- }
455
- }
456
- }
457
- return $ret;
458
- }
459
-
460
- function xmltext()
461
- {
462
- $ret = $this->innertext();
463
- $ret = str_ireplace('<![CDATA[', '', $ret);
464
- $ret = str_replace(']]>', '', $ret);
465
- return $ret;
466
- }
467
-
468
- function makeup()
469
- {
470
- // text, comment, unknown
471
- if (isset($this->_[HDOM_INFO_TEXT])) {
472
- return $this->dom->restore_noise($this->_[HDOM_INFO_TEXT]);
473
- }
474
-
475
- $ret = '<' . $this->tag;
476
- $i = -1;
477
-
478
- foreach ($this->attr as $key => $val) {
479
- ++$i;
480
-
481
- // skip removed attribute
482
- if ($val === null || $val === false) { continue; }
483
-
484
- $ret .= $this->_[HDOM_INFO_SPACE][$i][0];
485
-
486
- //no value attr: nowrap, checked selected...
487
- if ($val === true) {
488
- $ret .= $key;
489
- } else {
490
- switch ($this->_[HDOM_INFO_QUOTE][$i])
491
- {
492
- case HDOM_QUOTE_DOUBLE: $quote = '"'; break;
493
- case HDOM_QUOTE_SINGLE: $quote = '\''; break;
494
- default: $quote = '';
495
- }
496
-
497
- $ret .= $key
498
- . $this->_[HDOM_INFO_SPACE][$i][1]
499
- . '='
500
- . $this->_[HDOM_INFO_SPACE][$i][2]
501
- . $quote
502
- . $val
503
- . $quote;
504
- }
505
- }
506
-
507
- $ret = $this->dom->restore_noise($ret);
508
- return $ret . $this->_[HDOM_INFO_ENDSPACE] . '>';
509
- }
510
-
511
- function find($selector, $idx = null, $lowercase = false)
512
- {
513
- $selectors = $this->parse_selector($selector);
514
- if (($count = count($selectors)) === 0) { return array(); }
515
- $found_keys = array();
516
-
517
- // find each selector
518
- for ($c = 0; $c < $count; ++$c) {
519
- // The change on the below line was documented on the sourceforge
520
- // code tracker id 2788009
521
- // used to be: if (($levle=count($selectors[0]))===0) return array();
522
- if (($levle = count($selectors[$c])) === 0) { return array(); }
523
- if (!isset($this->_[HDOM_INFO_BEGIN])) { return array(); }
524
-
525
- $head = array($this->_[HDOM_INFO_BEGIN] => 1);
526
- $cmd = ' '; // Combinator
527
-
528
- // handle descendant selectors, no recursive!
529
- for ($l = 0; $l < $levle; ++$l) {
530
- $ret = array();
531
-
532
- foreach ($head as $k => $v) {
533
- $n = ($k === -1) ? $this->dom->root : $this->dom->nodes[$k];
534
- //PaperG - Pass this optional parameter on to the seek function.
535
- $n->seek($selectors[$c][$l], $ret, $cmd, $lowercase);
536
- }
537
-
538
- $head = $ret;
539
- $cmd = $selectors[$c][$l][4]; // Next Combinator
540
- }
541
-
542
- foreach ($head as $k => $v) {
543
- if (!isset($found_keys[$k])) {
544
- $found_keys[$k] = 1;
545
- }
546
- }
547
- }
548
-
549
- // sort keys
550
- ksort($found_keys);
551
-
552
- $found = array();
553
- foreach ($found_keys as $k => $v) {
554
- $found[] = $this->dom->nodes[$k];
555
- }
556
-
557
- // return nth-element or array
558
- if (is_null($idx)) { return $found; }
559
- elseif ($idx < 0) { $idx = count($found) + $idx; }
560
- return (isset($found[$idx])) ? $found[$idx] : null;
561
- }
562
-
563
- protected function seek($selector, &$ret, $parent_cmd, $lowercase = false)
564
- {
565
- global $debug_object;
566
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
567
-
568
- list($tag, $id, $class, $attributes, $cmb) = $selector;
569
- $nodes = array();
570
-
571
- if ($parent_cmd === ' ') { // Descendant Combinator
572
- // Find parent closing tag if the current element doesn't have a closing
573
- // tag (i.e. void element)
574
- $end = (!empty($this->_[HDOM_INFO_END])) ? $this->_[HDOM_INFO_END] : 0;
575
- if ($end == 0) {
576
- $parent = $this->parent;
577
- while (!isset($parent->_[HDOM_INFO_END]) && $parent !== null) {
578
- $end -= 1;
579
- $parent = $parent->parent;
580
- }
581
- $end += $parent->_[HDOM_INFO_END];
582
- }
583
-
584
- // Get list of target nodes
585
- $nodes_start = $this->_[HDOM_INFO_BEGIN] + 1;
586
- $nodes_count = $end - $nodes_start;
587
- $nodes = array_slice($this->dom->nodes, $nodes_start, $nodes_count, true);
588
- } elseif ($parent_cmd === '>') { // Child Combinator
589
- $nodes = $this->children;
590
- } elseif ($parent_cmd === '+'
591
- && $this->parent
592
- && in_array($this, $this->parent->children)) { // Next-Sibling Combinator
593
- $index = array_search($this, $this->parent->children, true) + 1;
594
- if ($index < count($this->parent->children))
595
- $nodes[] = $this->parent->children[$index];
596
- } elseif ($parent_cmd === '~'
597
- && $this->parent
598
- && in_array($this, $this->parent->children)) { // Subsequent Sibling Combinator
599
- $index = array_search($this, $this->parent->children, true);
600
- $nodes = array_slice($this->parent->children, $index);
601
- }
602
-
603
- // Go throgh each element starting at this element until the end tag
604
- // Note: If this element is a void tag, any previous void element is
605
- // skipped.
606
- foreach($nodes as $node) {
607
- $pass = true;
608
-
609
- // Skip root nodes
610
- if(!$node->parent) {
611
- $pass = false;
612
- }
613
-
614
- // Handle 'text' selector
615
- if($pass && $tag === 'text' && $node->tag === 'text') {
616
- $ret[array_search($node, $this->dom->nodes, true)] = 1;
617
- unset($node);
618
- continue;
619
- }
620
-
621
- // Skip if node isn't a child node (i.e. text nodes)
622
- if($pass && !in_array($node, $node->parent->children, true)) {
623
- $pass = false;
624
- }
625
-
626
- // Skip if tag doesn't match
627
- if ($pass && $tag !== '' && $tag !== $node->tag && $tag !== '*') {
628
- $pass = false;
629
- }
630
-
631
- // Skip if ID doesn't exist
632
- if ($pass && $id !== '' && !isset($node->attr['id'])) {
633
- $pass = false;
634
- }
635
-
636
- // Check if ID matches
637
- if ($pass && $id !== '' && isset($node->attr['id'])) {
638
- // Note: Only consider the first ID (as browsers do)
639
- $node_id = explode(' ', trim($node->attr['id']))[0];
640
-
641
- if($id !== $node_id) { $pass = false; }
642
- }
643
-
644
- // Check if all class(es) exist
645
- if ($pass && $class !== '' && is_array($class) && !empty($class)) {
646
- if (isset($node->attr['class'])) {
647
- $node_classes = explode(' ', $node->attr['class']);
648
-
649
- if ($lowercase) {
650
- $node_classes = array_map('strtolower', $node_classes);
651
- }
652
-
653
- foreach($class as $c) {
654
- if(!in_array($c, $node_classes)) {
655
- $pass = false;
656
- break;
657
- }
658
- }
659
- } else {
660
- $pass = false;
661
- }
662
- }
663
-
664
- // Check attributes
665
- if ($pass
666
- && $attributes !== ''
667
- && is_array($attributes)
668
- && !empty($attributes)) {
669
- foreach($attributes as $a) {
670
- list (
671
- $att_name,
672
- $att_expr,
673
- $att_val,
674
- $att_inv,
675
- $att_case_sensitivity
676
- ) = $a;
677
-
678
- // Handle indexing attributes (i.e. "[2]")
679
- /**
680
- * Note: This is not supported by the CSS Standard but adds
681
- * the ability to select items compatible to XPath (i.e.
682
- * the 3rd element within it's parent).
683
- *
684
- * Note: This doesn't conflict with the CSS Standard which
685
- * doesn't work on numeric attributes anyway.
686
- */
687
- if (is_numeric($att_name)
688
- && $att_expr === ''
689
- && $att_val === '') {
690
- $count = 0;
691
-
692
- // Find index of current element in parent
693
- foreach ($node->parent->children as $c) {
694
- if ($c->tag === $node->tag) ++$count;
695
- if ($c === $node) break;
696
- }
697
-
698
- // If this is the correct node, continue with next
699
- // attribute
700
- if ($count === (int)$att_name) continue;
701
- }
702
-
703
- // Check attribute availability
704
- if ($att_inv) { // Attribute should NOT be set
705
- if (isset($node->attr[$att_name])) {
706
- $pass = false;
707
- break;
708
- }
709
- } else { // Attribute should be set
710
- // todo: "plaintext" is not a valid CSS selector!
711
- if ($att_name !== 'plaintext'
712
- && !isset($node->attr[$att_name])) {
713
- $pass = false;
714
- break;
715
- }
716
- }
717
-
718
- // Continue with next attribute if expression isn't defined
719
- if ($att_expr === '') continue;
720
-
721
- // If they have told us that this is a "plaintext"
722
- // search then we want the plaintext of the node - right?
723
- // todo "plaintext" is not a valid CSS selector!
724
- if ($att_name === 'plaintext') {
725
- $nodeKeyValue = $node->text();
726
- } else {
727
- $nodeKeyValue = $node->attr[$att_name];
728
- }
729
-
730
- if (is_object($debug_object)) {
731
- $debug_object->debug_log(2,
732
- 'testing node: '
733
- . $node->tag
734
- . ' for attribute: '
735
- . $att_name
736
- . $att_expr
737
- . $att_val
738
- . ' where nodes value is: '
739
- . $nodeKeyValue
740
- );
741
- }
742
-
743
- // If lowercase is set, do a case insensitive test of
744
- // the value of the selector.
745
- if ($lowercase) {
746
- $check = $this->match(
747
- $att_expr,
748
- strtolower($att_val),
749
- strtolower($nodeKeyValue),
750
- $att_case_sensitivity
751
- );
752
- } else {
753
- $check = $this->match(
754
- $att_expr,
755
- $att_val,
756
- $nodeKeyValue,
757
- $att_case_sensitivity
758
- );
759
- }
760
-
761
- if (is_object($debug_object)) {
762
- $debug_object->debug_log(2,
763
- 'after match: '
764
- . ($check ? 'true' : 'false')
765
- );
766
- }
767
-
768
- if (!$check) {
769
- $pass = false;
770
- break;
771
- }
772
- }
773
- }
774
-
775
- // Found a match. Add to list and clear node
776
- if ($pass) $ret[$node->_[HDOM_INFO_BEGIN]] = 1;
777
- unset($node);
778
- }
779
- // It's passed by reference so this is actually what this function returns.
780
- if (is_object($debug_object)) {
781
- $debug_object->debug_log(1, 'EXIT - ret: ', $ret);
782
- }
783
- }
784
-
785
- protected function match($exp, $pattern, $value, $case_sensitivity)
786
- {
787
- global $debug_object;
788
- if (is_object($debug_object)) {$debug_object->debug_log_entry(1);}
789
-
790
- if ($case_sensitivity === 'i') {
791
- $pattern = strtolower($pattern);
792
- $value = strtolower($value);
793
- }
794
-
795
- switch ($exp) {
796
- case '=':
797
- return ($value === $pattern);
798
- case '!=':
799
- return ($value !== $pattern);
800
- case '^=':
801
- return preg_match('/^' . preg_quote($pattern, '/') . '/', $value);
802
- case '$=':
803
- return preg_match('/' . preg_quote($pattern, '/') . '$/', $value);
804
- case '*=':
805
- return preg_match('/' . preg_quote($pattern, '/') . '/', $value);
806
- case '|=':
807
- /**
808
- * [att|=val]
809
- *
810
- * Represents an element with the att attribute, its value
811
- * either being exactly "val" or beginning with "val"
812
- * immediately followed by "-" (U+002D).
813
- */
814
- return strpos($value, $pattern) === 0;
815
- case '~=':
816
- /**
817
- * [att~=val]
818
- *
819
- * Represents an element with the att attribute whose value is a
820
- * whitespace-separated list of words, one of which is exactly
821
- * "val". If "val" contains whitespace, it will never represent
822
- * anything (since the words are separated by spaces). Also if
823
- * "val" is the empty string, it will never represent anything.
824
- */
825
- return in_array($pattern, explode(' ', trim($value)), true);
826
- }
827
- return false;
828
- }
829
-
830
- protected function parse_selector($selector_string)
831
- {
832
- global $debug_object;
833
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
834
-
835
- /**
836
- * Pattern of CSS selectors, modified from mootools (https://mootools.net/)
837
- *
838
- * Paperg: Add the colon to the attribute, so that it properly finds
839
- * <tag attr:ibute="something" > like google does.
840
- *
841
- * Note: if you try to look at this attribute, you MUST use getAttribute
842
- * since $dom->x:y will fail the php syntax check.
843
- *
844
- * Notice the \[ starting the attribute? and the @? following? This
845
- * implies that an attribute can begin with an @ sign that is not
846
- * captured. This implies that an html attribute specifier may start
847
- * with an @ sign that is NOT captured by the expression. Farther study
848
- * is required to determine of this should be documented or removed.
849
- *
850
- * Matches selectors in this order:
851
- *
852
- * [0] - full match
853
- *
854
- * [1] - tag name
855
- * ([\w:\*-]*)
856
- * Matches the tag name consisting of zero or more words, colons,
857
- * asterisks and hyphens.
858
- *
859
- * [2] - id name
860
- * (?:\#([\w-]+))
861
- * Optionally matches a id name, consisting of an "#" followed by
862
- * the id name (one or more words and hyphens).
863
- *
864
- * [3] - class names (including dots)
865
- * (?:\.([\w\.-]+))?
866
- * Optionally matches a list of classs, consisting of an "."
867
- * followed by the class name (one or more words and hyphens)
868
- * where multiple classes can be chained (i.e. ".foo.bar.baz")
869
- *
870
- * [4] - attributes
871
- * ((?:\[@?(?:!?[\w:-]+)(?:(?:[!*^$|~]?=)[\"']?(?:.*?)[\"']?)?(?:\s*?(?:[iIsS])?)?\])+)?
872
- * Optionally matches the attributes list
873
- *
874
- * [5] - separator
875
- * ([\/, >+~]+)
876
- * Matches the selector list separator
877
- */
878
- // phpcs:ignore Generic.Files.LineLength
879
- $pattern = "/([\w:\*-]*)(?:\#([\w-]+))?(?:|\.([\w\.-]+))?((?:\[@?(?:!?[\w:-]+)(?:(?:[!*^$|~]?=)[\"']?(?:.*?)[\"']?)?(?:\s*?(?:[iIsS])?)?\])+)?([\/, >+~]+)/is";
880
-
881
- preg_match_all(
882
- $pattern,
883
- trim($selector_string) . ' ', // Add final ' ' as pseudo separator
884
- $matches,
885
- PREG_SET_ORDER
886
- );
887
-
888
- if (is_object($debug_object)) {
889
- $debug_object->debug_log(2, 'Matches Array: ', $matches);
890
- }
891
-
892
- $selectors = array();
893
- $result = array();
894
-
895
- foreach ($matches as $m) {
896
- $m[0] = trim($m[0]);
897
-
898
- // Skip NoOps
899
- if ($m[0] === '' || $m[0] === '/' || $m[0] === '//') { continue; }
900
-
901
- // Convert to lowercase
902
- if ($this->dom->lowercase) {
903
- $m[1] = strtolower($m[1]);
904
- }
905
-
906
- // Extract classes
907
- if ($m[3] !== '') { $m[3] = explode('.', $m[3]); }
908
-
909
- /* Extract attributes (pattern based on the pattern above!)
910
-
911
- * [0] - full match
912
- * [1] - attribute name
913
- * [2] - attribute expression
914
- * [3] - attribute value
915
- * [4] - case sensitivity
916
- *
917
- * Note: Attributes can be negated with a "!" prefix to their name
918
- */
919
- if($m[4] !== '') {
920
- preg_match_all(
921
- "/\[@?(!?[\w:-]+)(?:([!*^$|~]?=)[\"']?(.*?)[\"']?)?(?:\s+?([iIsS])?)?\]/is",
922
- trim($m[4]),
923
- $attributes,
924
- PREG_SET_ORDER
925
- );
926
-
927
- // Replace element by array
928
- $m[4] = array();
929
-
930
- foreach($attributes as $att) {
931
- // Skip empty matches
932
- if(trim($att[0]) === '') { continue; }
933
-
934
- $inverted = (isset($att[1][0]) && $att[1][0] === '!');
935
- $m[4][] = array(
936
- $inverted ? substr($att[1], 1) : $att[1], // Name
937
- (isset($att[2])) ? $att[2] : '', // Expression
938
- (isset($att[3])) ? $att[3] : '', // Value
939
- $inverted, // Inverted Flag
940
- (isset($att[4])) ? strtolower($att[4]) : '', // Case-Sensitivity
941
- );
942
- }
943
- }
944
-
945
- // Sanitize Separator
946
- if ($m[5] !== '' && trim($m[5]) === '') { // Descendant Separator
947
- $m[5] = ' ';
948
- } else { // Other Separator
949
- $m[5] = trim($m[5]);
950
- }
951
-
952
- // Clear Separator if it's a Selector List
953
- if ($is_list = ($m[5] === ',')) { $m[5] = ''; }
954
-
955
- // Remove full match before adding to results
956
- array_shift($m);
957
- $result[] = $m;
958
-
959
- if ($is_list) { // Selector List
960
- $selectors[] = $result;
961
- $result = array();
962
- }
963
- }
964
-
965
- if (count($result) > 0) { $selectors[] = $result; }
966
- return $selectors;
967
- }
968
-
969
- function __get($name)
970
- {
971
- if (isset($this->attr[$name])) {
972
- return $this->convert_text($this->attr[$name]);
973
- }
974
- switch ($name) {
975
- case 'outertext': return $this->outertext();
976
- case 'innertext': return $this->innertext();
977
- case 'plaintext': return $this->text();
978
- case 'xmltext': return $this->xmltext();
979
- default: return array_key_exists($name, $this->attr);
980
- }
981
- }
982
-
983
- function __set($name, $value)
984
- {
985
- global $debug_object;
986
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
987
-
988
- switch ($name) {
989
- case 'outertext': return $this->_[HDOM_INFO_OUTER] = $value;
990
- case 'innertext':
991
- if (isset($this->_[HDOM_INFO_TEXT])) {
992
- return $this->_[HDOM_INFO_TEXT] = $value;
993
- }
994
- return $this->_[HDOM_INFO_INNER] = $value;
995
- }
996
-
997
- if (!isset($this->attr[$name])) {
998
- $this->_[HDOM_INFO_SPACE][] = array(' ', '', '');
999
- $this->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_DOUBLE;
1000
- }
1001
-
1002
- $this->attr[$name] = $value;
1003
- }
1004
-
1005
- function __isset($name)
1006
- {
1007
- switch ($name) {
1008
- case 'outertext': return true;
1009
- case 'innertext': return true;
1010
- case 'plaintext': return true;
1011
- }
1012
- //no value attr: nowrap, checked selected...
1013
- return (array_key_exists($name, $this->attr)) ? true : isset($this->attr[$name]);
1014
- }
1015
-
1016
- function __unset($name)
1017
- {
1018
- if (isset($this->attr[$name])) { unset($this->attr[$name]); }
1019
- }
1020
-
1021
- function convert_text($text)
1022
- {
1023
- global $debug_object;
1024
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
1025
-
1026
- $converted_text = $text;
1027
-
1028
- $sourceCharset = '';
1029
- $targetCharset = '';
1030
-
1031
- if ($this->dom) {
1032
- $sourceCharset = strtoupper($this->dom->_charset);
1033
- $targetCharset = strtoupper($this->dom->_target_charset);
1034
- }
1035
-
1036
- if (is_object($debug_object)) {
1037
- $debug_object->debug_log(3,
1038
- 'source charset: '
1039
- . $sourceCharset
1040
- . ' target charaset: '
1041
- . $targetCharset
1042
- );
1043
- }
1044
-
1045
- if (!empty($sourceCharset)
1046
- && !empty($targetCharset)
1047
- && (strcasecmp($sourceCharset, $targetCharset) != 0)) {
1048
- // Check if the reported encoding could have been incorrect and the text is actually already UTF-8
1049
- if ((strcasecmp($targetCharset, 'UTF-8') == 0)
1050
- && ($this->is_utf8($text))) {
1051
- $converted_text = $text;
1052
- } else {
1053
- $converted_text = iconv($sourceCharset, $targetCharset, $text);
1054
- }
1055
- }
1056
-
1057
- // Lets make sure that we don't have that silly BOM issue with any of the utf-8 text we output.
1058
- if ($targetCharset === 'UTF-8') {
1059
- if (substr($converted_text, 0, 3) === "\xef\xbb\xbf") {
1060
- $converted_text = substr($converted_text, 3);
1061
- }
1062
-
1063
- if (substr($converted_text, -3) === "\xef\xbb\xbf") {
1064
- $converted_text = substr($converted_text, 0, -3);
1065
- }
1066
- }
1067
-
1068
- return $converted_text;
1069
- }
1070
-
1071
- static function is_utf8($str)
1072
- {
1073
- $c = 0; $b = 0;
1074
- $bits = 0;
1075
- $len = strlen($str);
1076
- for($i = 0; $i < $len; $i++) {
1077
- $c = ord($str[$i]);
1078
- if($c > 128) {
1079
- if(($c >= 254)) { return false; }
1080
- elseif($c >= 252) { $bits = 6; }
1081
- elseif($c >= 248) { $bits = 5; }
1082
- elseif($c >= 240) { $bits = 4; }
1083
- elseif($c >= 224) { $bits = 3; }
1084
- elseif($c >= 192) { $bits = 2; }
1085
- else { return false; }
1086
- if(($i + $bits) > $len) { return false; }
1087
- while($bits > 1) {
1088
- $i++;
1089
- $b = ord($str[$i]);
1090
- if($b < 128 || $b > 191) { return false; }
1091
- $bits--;
1092
- }
1093
- }
1094
- }
1095
- return true;
1096
- }
1097
-
1098
- function get_display_size()
1099
- {
1100
- global $debug_object;
1101
-
1102
- $width = -1;
1103
- $height = -1;
1104
-
1105
- if ($this->tag !== 'img') {
1106
- return false;
1107
- }
1108
-
1109
- // See if there is aheight or width attribute in the tag itself.
1110
- if (isset($this->attr['width'])) {
1111
- $width = $this->attr['width'];
1112
- }
1113
-
1114
- if (isset($this->attr['height'])) {
1115
- $height = $this->attr['height'];
1116
- }
1117
-
1118
- // Now look for an inline style.
1119
- if (isset($this->attr['style'])) {
1120
- // Thanks to user gnarf from stackoverflow for this regular expression.
1121
- $attributes = array();
1122
-
1123
- preg_match_all(
1124
- '/([\w-]+)\s*:\s*([^;]+)\s*;?/',
1125
- $this->attr['style'],
1126
- $matches,
1127
- PREG_SET_ORDER
1128
- );
1129
-
1130
- foreach ($matches as $match) {
1131
- $attributes[$match[1]] = $match[2];
1132
- }
1133
-
1134
- // If there is a width in the style attributes:
1135
- if (isset($attributes['width']) && $width == -1) {
1136
- // check that the last two characters are px (pixels)
1137
- if (strtolower(substr($attributes['width'], -2)) === 'px') {
1138
- $proposed_width = substr($attributes['width'], 0, -2);
1139
- // Now make sure that it's an integer and not something stupid.
1140
- if (filter_var($proposed_width, FILTER_VALIDATE_INT)) {
1141
- $width = $proposed_width;
1142
- }
1143
- }
1144
- }
1145
-
1146
- // If there is a width in the style attributes:
1147
- if (isset($attributes['height']) && $height == -1) {
1148
- // check that the last two characters are px (pixels)
1149
- if (strtolower(substr($attributes['height'], -2)) == 'px') {
1150
- $proposed_height = substr($attributes['height'], 0, -2);
1151
- // Now make sure that it's an integer and not something stupid.
1152
- if (filter_var($proposed_height, FILTER_VALIDATE_INT)) {
1153
- $height = $proposed_height;
1154
- }
1155
- }
1156
- }
1157
-
1158
- }
1159
-
1160
- // Future enhancement:
1161
- // Look in the tag to see if there is a class or id specified that has
1162
- // a height or width attribute to it.
1163
-
1164
- // Far future enhancement
1165
- // Look at all the parent tags of this image to see if they specify a
1166
- // class or id that has an img selector that specifies a height or width
1167
- // Note that in this case, the class or id will have the img subselector
1168
- // for it to apply to the image.
1169
-
1170
- // ridiculously far future development
1171
- // If the class or id is specified in a SEPARATE css file thats not on
1172
- // the page, go get it and do what we were just doing for the ones on
1173
- // the page.
1174
-
1175
- $result = array(
1176
- 'height' => $height,
1177
- 'width' => $width
1178
- );
1179
-
1180
- return $result;
1181
- }
1182
-
1183
- function save($filepath = '')
1184
- {
1185
- $ret = $this->outertext();
1186
-
1187
- if ($filepath !== '') {
1188
- file_put_contents($filepath, $ret, LOCK_EX);
1189
- }
1190
-
1191
- return $ret;
1192
- }
1193
-
1194
- function addClass($class)
1195
- {
1196
- if (is_string($class)) {
1197
- $class = explode(' ', $class);
1198
- }
1199
-
1200
- if (is_array($class)) {
1201
- foreach($class as $c) {
1202
- if (isset($this->class)) {
1203
- if ($this->hasClass($c)) {
1204
- continue;
1205
- } else {
1206
- $this->class .= ' ' . $c;
1207
- }
1208
- } else {
1209
- $this->class = $c;
1210
- }
1211
- }
1212
- } else {
1213
- if (is_object($debug_object)) {
1214
- $debug_object->debug_log(2, 'Invalid type: ', gettype($class));
1215
- }
1216
- }
1217
- }
1218
-
1219
- function hasClass($class)
1220
- {
1221
- if (is_string($class)) {
1222
- if (isset($this->class)) {
1223
- return in_array($class, explode(' ', $this->class), true);
1224
- }
1225
- } else {
1226
- if (is_object($debug_object)) {
1227
- $debug_object->debug_log(2, 'Invalid type: ', gettype($class));
1228
- }
1229
- }
1230
-
1231
- return false;
1232
- }
1233
-
1234
- function removeClass($class = null)
1235
- {
1236
- if (!isset($this->class)) {
1237
- return;
1238
- }
1239
-
1240
- if (is_null($class)) {
1241
- $this->removeAttribute('class');
1242
- return;
1243
- }
1244
-
1245
- if (is_string($class)) {
1246
- $class = explode(' ', $class);
1247
- }
1248
-
1249
- if (is_array($class)) {
1250
- $class = array_diff(explode(' ', $this->class), $class);
1251
- if (empty($class)) {
1252
- $this->removeAttribute('class');
1253
- } else {
1254
- $this->class = implode(' ', $class);
1255
- }
1256
- }
1257
- }
1258
-
1259
- function getAllAttributes()
1260
- {
1261
- return $this->attr;
1262
- }
1263
-
1264
- function getAttribute($name)
1265
- {
1266
- return $this->__get($name);
1267
- }
1268
-
1269
- function setAttribute($name, $value)
1270
- {
1271
- $this->__set($name, $value);
1272
- }
1273
-
1274
- function hasAttribute($name)
1275
- {
1276
- return $this->__isset($name);
1277
- }
1278
-
1279
- function removeAttribute($name)
1280
- {
1281
- $this->__set($name, null);
1282
- }
1283
-
1284
- function remove()
1285
- {
1286
- if ($this->parent) {
1287
- $this->parent->removeChild($this);
1288
- }
1289
- }
1290
-
1291
- function removeChild($node)
1292
- {
1293
- $nidx = array_search($node, $this->nodes, true);
1294
- $cidx = array_search($node, $this->children, true);
1295
- $didx = array_search($node, $this->dom->nodes, true);
1296
-
1297
- if ($nidx !== false && $cidx !== false && $didx !== false) {
1298
-
1299
- foreach($node->children as $child) {
1300
- $node->removeChild($child);
1301
- }
1302
-
1303
- foreach($node->nodes as $entity) {
1304
- $enidx = array_search($entity, $node->nodes, true);
1305
- $edidx = array_search($entity, $node->dom->nodes, true);
1306
-
1307
- if ($enidx !== false && $edidx !== false) {
1308
- unset($node->nodes[$enidx]);
1309
- unset($node->dom->nodes[$edidx]);
1310
- }
1311
- }
1312
-
1313
- unset($this->nodes[$nidx]);
1314
- unset($this->children[$cidx]);
1315
- unset($this->dom->nodes[$didx]);
1316
-
1317
- $node->clear();
1318
-
1319
- }
1320
- }
1321
-
1322
- function getElementById($id)
1323
- {
1324
- return $this->find("#$id", 0);
1325
- }
1326
-
1327
- function getElementsById($id, $idx = null)
1328
- {
1329
- return $this->find("#$id", $idx);
1330
- }
1331
-
1332
- function getElementByTagName($name)
1333
- {
1334
- return $this->find($name, 0);
1335
- }
1336
-
1337
- function getElementsByTagName($name, $idx = null)
1338
- {
1339
- return $this->find($name, $idx);
1340
- }
1341
-
1342
- function parentNode()
1343
- {
1344
- return $this->parent();
1345
- }
1346
-
1347
- function childNodes($idx = -1)
1348
- {
1349
- return $this->children($idx);
1350
- }
1351
-
1352
- function firstChild()
1353
- {
1354
- return $this->first_child();
1355
- }
1356
-
1357
- function lastChild()
1358
- {
1359
- return $this->last_child();
1360
- }
1361
-
1362
- function nextSibling()
1363
- {
1364
- return $this->next_sibling();
1365
- }
1366
-
1367
- function previousSibling()
1368
- {
1369
- return $this->prev_sibling();
1370
- }
1371
-
1372
- function hasChildNodes()
1373
- {
1374
- return $this->has_child();
1375
- }
1376
-
1377
- function nodeName()
1378
- {
1379
- return $this->tag;
1380
- }
1381
-
1382
- function appendChild($node)
1383
- {
1384
- $node->parent($this);
1385
- return $node;
1386
- }
1387
-
1388
- }
1389
-
1390
- class simple_html_dom
1391
- {
1392
- public $root = null;
1393
- public $nodes = array();
1394
- public $callback = null;
1395
- public $lowercase = false;
1396
- public $original_size;
1397
- public $size;
1398
-
1399
- protected $pos;
1400
- protected $doc;
1401
- protected $char;
1402
-
1403
- protected $cursor;
1404
- protected $parent;
1405
- protected $noise = array();
1406
- protected $token_blank = " \t\r\n";
1407
- protected $token_equal = ' =/>';
1408
- protected $token_slash = " />\r\n\t";
1409
- protected $token_attr = ' >';
1410
-
1411
- public $_charset = '';
1412
- public $_target_charset = '';
1413
-
1414
- protected $default_br_text = '';
1415
-
1416
- public $default_span_text = '';
1417
-
1418
- protected $self_closing_tags = array(
1419
- 'area' => 1,
1420
- 'base' => 1,
1421
- 'br' => 1,
1422
- 'col' => 1,
1423
- 'embed' => 1,
1424
- 'hr' => 1,
1425
- 'img' => 1,
1426
- 'input' => 1,
1427
- 'link' => 1,
1428
- 'meta' => 1,
1429
- 'param' => 1,
1430
- 'source' => 1,
1431
- 'track' => 1,
1432
- 'wbr' => 1
1433
- );
1434
- protected $block_tags = array(
1435
- 'body' => 1,
1436
- 'div' => 1,
1437
- 'form' => 1,
1438
- 'root' => 1,
1439
- 'span' => 1,
1440
- 'table' => 1
1441
- );
1442
- protected $optional_closing_tags = array(
1443
- // Not optional, see
1444
- // https://www.w3.org/TR/html/textlevel-semantics.html#the-b-element
1445
- 'b' => array('b' => 1),
1446
- 'dd' => array('dd' => 1, 'dt' => 1),
1447
- // Not optional, see
1448
- // https://www.w3.org/TR/html/grouping-content.html#the-dl-element
1449
- 'dl' => array('dd' => 1, 'dt' => 1),
1450
- 'dt' => array('dd' => 1, 'dt' => 1),
1451
- 'li' => array('li' => 1),
1452
- 'optgroup' => array('optgroup' => 1, 'option' => 1),
1453
- 'option' => array('optgroup' => 1, 'option' => 1),
1454
- 'p' => array('p' => 1),
1455
- 'rp' => array('rp' => 1, 'rt' => 1),
1456
- 'rt' => array('rp' => 1, 'rt' => 1),
1457
- 'td' => array('td' => 1, 'th' => 1),
1458
- 'th' => array('td' => 1, 'th' => 1),
1459
- 'tr' => array('td' => 1, 'th' => 1, 'tr' => 1),
1460
- );
1461
-
1462
- function __construct(
1463
- $str = null,
1464
- $lowercase = true,
1465
- $forceTagsClosed = true,
1466
- $target_charset = DEFAULT_TARGET_CHARSET,
1467
- $stripRN = true,
1468
- $defaultBRText = DEFAULT_BR_TEXT,
1469
- $defaultSpanText = DEFAULT_SPAN_TEXT,
1470
- $options = 0)
1471
- {
1472
- if ($str) {
1473
- if (preg_match('/^http:\/\//i', $str) || is_file($str)) {
1474
- $this->load_file($str);
1475
- } else {
1476
- $this->load(
1477
- $str,
1478
- $lowercase,
1479
- $stripRN,
1480
- $defaultBRText,
1481
- $defaultSpanText,
1482
- $options
1483
- );
1484
- }
1485
- }
1486
- // Forcing tags to be closed implies that we don't trust the html, but
1487
- // it can lead to parsing errors if we SHOULD trust the html.
1488
- if (!$forceTagsClosed) {
1489
- $this->optional_closing_array = array();
1490
- }
1491
-
1492
- $this->_target_charset = $target_charset;
1493
- }
1494
-
1495
- function __destruct()
1496
- {
1497
- $this->clear();
1498
- }
1499
-
1500
- function load(
1501
- $str,
1502
- $lowercase = true,
1503
- $stripRN = true,
1504
- $defaultBRText = DEFAULT_BR_TEXT,
1505
- $defaultSpanText = DEFAULT_SPAN_TEXT,
1506
- $options = 0)
1507
- {
1508
- global $debug_object;
1509
-
1510
- // prepare
1511
- $this->prepare($str, $lowercase, $defaultBRText, $defaultSpanText);
1512
-
1513
- // Per sourceforge http://sourceforge.net/tracker/?func=detail&aid=2949097&group_id=218559&atid=1044037
1514
- // Script tags removal now preceeds style tag removal.
1515
- // strip out <script> tags
1516
- $this->remove_noise("'<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>'is");
1517
- $this->remove_noise("'<\s*script\s*>(.*?)<\s*/\s*script\s*>'is");
1518
-
1519
- // strip out the \r \n's if we are told to.
1520
- if ($stripRN) {
1521
- $this->doc = str_replace("\r", ' ', $this->doc);
1522
- $this->doc = str_replace("\n", ' ', $this->doc);
1523
-
1524
- // set the length of content since we have changed it.
1525
- $this->size = strlen($this->doc);
1526
- }
1527
-
1528
- // strip out cdata
1529
- $this->remove_noise("'<!\[CDATA\[(.*?)\]\]>'is", true);
1530
- // strip out comments
1531
- $this->remove_noise("'<!--(.*?)-->'is");
1532
- // strip out <style> tags
1533
- $this->remove_noise("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is");
1534
- $this->remove_noise("'<\s*style\s*>(.*?)<\s*/\s*style\s*>'is");
1535
- // strip out preformatted tags
1536
- $this->remove_noise("'<\s*(?:code)[^>]*>(.*?)<\s*/\s*(?:code)\s*>'is");
1537
- // strip out server side scripts
1538
- $this->remove_noise("'(<\?)(.*?)(\?>)'s", true);
1539
-
1540
- if($options & HDOM_SMARTY_AS_TEXT) { // Strip Smarty scripts
1541
- $this->remove_noise("'(\{\w)(.*?)(\})'s", true);
1542
- }
1543
-
1544
- // parsing
1545
- $this->parse();
1546
- // end
1547
- $this->root->_[HDOM_INFO_END] = $this->cursor;
1548
- $this->parse_charset();
1549
-
1550
- // make load function chainable
1551
- return $this;
1552
- }
1553
-
1554
- function load_file()
1555
- {
1556
- $args = func_get_args();
1557
-
1558
- if(($doc = call_user_func_array('file_get_contents', $args)) !== false) {
1559
- $this->load($doc, true);
1560
- } else {
1561
- return false;
1562
- }
1563
- }
1564
-
1565
- function set_callback($function_name)
1566
- {
1567
- $this->callback = $function_name;
1568
- }
1569
-
1570
- function remove_callback()
1571
- {
1572
- $this->callback = null;
1573
- }
1574
-
1575
- function save($filepath = '')
1576
- {
1577
- $ret = $this->root->innertext();
1578
- if ($filepath !== '') { file_put_contents($filepath, $ret, LOCK_EX); }
1579
- return $ret;
1580
- }
1581
-
1582
- function find($selector, $idx = null, $lowercase = false)
1583
- {
1584
- return $this->root->find($selector, $idx, $lowercase);
1585
- }
1586
-
1587
- function clear()
1588
- {
1589
- if (isset($this->nodes)) {
1590
- foreach ($this->nodes as $n) {
1591
- $n->clear();
1592
- $n = null;
1593
- }
1594
- }
1595
-
1596
- // This add next line is documented in the sourceforge repository.
1597
- // 2977248 as a fix for ongoing memory leaks that occur even with the
1598
- // use of clear.
1599
- if (isset($this->children)) {
1600
- foreach ($this->children as $n) {
1601
- $n->clear();
1602
- $n = null;
1603
- }
1604
- }
1605
-
1606
- if (isset($this->parent)) {
1607
- $this->parent->clear();
1608
- unset($this->parent);
1609
- }
1610
-
1611
- if (isset($this->root)) {
1612
- $this->root->clear();
1613
- unset($this->root);
1614
- }
1615
-
1616
- unset($this->doc);
1617
- unset($this->noise);
1618
- }
1619
-
1620
- function dump($show_attr = true)
1621
- {
1622
- $this->root->dump($show_attr);
1623
- }
1624
-
1625
- protected function prepare(
1626
- $str, $lowercase = true,
1627
- $defaultBRText = DEFAULT_BR_TEXT,
1628
- $defaultSpanText = DEFAULT_SPAN_TEXT)
1629
- {
1630
- $this->clear();
1631
-
1632
- $this->doc = trim($str);
1633
- $this->size = strlen($this->doc);
1634
- $this->original_size = $this->size; // original size of the html
1635
- $this->pos = 0;
1636
- $this->cursor = 1;
1637
- $this->noise = array();
1638
- $this->nodes = array();
1639
- $this->lowercase = $lowercase;
1640
- $this->default_br_text = $defaultBRText;
1641
- $this->default_span_text = $defaultSpanText;
1642
- $this->root = new simple_html_dom_node($this);
1643
- $this->root->tag = 'root';
1644
- $this->root->_[HDOM_INFO_BEGIN] = -1;
1645
- $this->root->nodetype = HDOM_TYPE_ROOT;
1646
- $this->parent = $this->root;
1647
- if ($this->size > 0) { $this->char = $this->doc[0]; }
1648
- }
1649
-
1650
- protected function parse()
1651
- {
1652
- while (true) {
1653
- // Read next tag if there is no text between current position and the
1654
- // next opening tag.
1655
- if (($s = $this->copy_until_char('<')) === '') {
1656
- if($this->read_tag()) {
1657
- continue;
1658
- } else {
1659
- return true;
1660
- }
1661
- }
1662
-
1663
- // Add a text node for text between tags
1664
- $node = new simple_html_dom_node($this);
1665
- ++$this->cursor;
1666
- $node->_[HDOM_INFO_TEXT] = $s;
1667
- $this->link_nodes($node, false);
1668
- }
1669
- }
1670
-
1671
- protected function parse_charset()
1672
- {
1673
- global $debug_object;
1674
-
1675
- $charset = null;
1676
-
1677
- if (function_exists('get_last_retrieve_url_contents_content_type')) {
1678
- $contentTypeHeader = get_last_retrieve_url_contents_content_type();
1679
- $success = preg_match('/charset=(.+)/', $contentTypeHeader, $matches);
1680
- if ($success) {
1681
- $charset = $matches[1];
1682
- if (is_object($debug_object)) {
1683
- $debug_object->debug_log(2,
1684
- 'header content-type found charset of: '
1685
- . $charset
1686
- );
1687
- }
1688
- }
1689
- }
1690
-
1691
- if (empty($charset)) {
1692
- // https://www.w3.org/TR/html/document-metadata.html#statedef-http-equiv-content-type
1693
- $el = $this->root->find('meta[http-equiv=Content-Type]', 0, true);
1694
-
1695
- if (!empty($el)) {
1696
- $fullvalue = $el->content;
1697
- if (is_object($debug_object)) {
1698
- $debug_object->debug_log(2,
1699
- 'meta content-type tag found'
1700
- . $fullvalue
1701
- );
1702
- }
1703
-
1704
- if (!empty($fullvalue)) {
1705
- $success = preg_match(
1706
- '/charset=(.+)/i',
1707
- $fullvalue,
1708
- $matches
1709
- );
1710
-
1711
- if ($success) {
1712
- $charset = $matches[1];
1713
- } else {
1714
- // If there is a meta tag, and they don't specify the
1715
- // character set, research says that it's typically
1716
- // ISO-8859-1
1717
- if (is_object($debug_object)) {
1718
- $debug_object->debug_log(2,
1719
- 'meta content-type tag couldn\'t be parsed. using iso-8859 default.'
1720
- );
1721
- }
1722
-
1723
- $charset = 'ISO-8859-1';
1724
- }
1725
- }
1726
- }
1727
- }
1728
-
1729
- if (empty($charset)) {
1730
- // https://www.w3.org/TR/html/document-metadata.html#character-encoding-declaration
1731
- if ($meta = $this->root->find('meta[charset]', 0)) {
1732
- $charset = $meta->charset;
1733
- if (is_object($debug_object)) {
1734
- $debug_object->debug_log(2, 'meta charset: ' . $charset);
1735
- }
1736
- }
1737
- }
1738
-
1739
- if (empty($charset)) {
1740
- // Try to guess the charset based on the content
1741
- // Requires Multibyte String (mbstring) support (optional)
1742
- if (function_exists('mb_detect_encoding')) {
1743
- /**
1744
- * mb_detect_encoding() is not intended to distinguish between
1745
- * charsets, especially single-byte charsets. Its primary
1746
- * purpose is to detect which multibyte encoding is in use,
1747
- * i.e. UTF-8, UTF-16, shift-JIS, etc.
1748
- *
1749
- * -- https://bugs.php.net/bug.php?id=38138
1750
- *
1751
- * Adding both CP1251/ISO-8859-5 and CP1252/ISO-8859-1 will
1752
- * always result in CP1251/ISO-8859-5 and vice versa.
1753
- *
1754
- * Thus, only detect if it's either UTF-8 or CP1252/ISO-8859-1
1755
- * to stay compatible.
1756
- */
1757
- $encoding = mb_detect_encoding(
1758
- $this->doc,
1759
- array( 'UTF-8', 'CP1252', 'ISO-8859-1' )
1760
- );
1761
-
1762
- if ($encoding === 'CP1252' || $encoding === 'ISO-8859-1') {
1763
- // Due to a limitation of mb_detect_encoding
1764
- // 'CP1251'/'ISO-8859-5' will be detected as
1765
- // 'CP1252'/'ISO-8859-1'. This will cause iconv to fail, in
1766
- // which case we can simply assume it is the other charset.
1767
- if (!@iconv('CP1252', 'UTF-8', $this->doc)) {
1768
- $encoding = 'CP1251';
1769
- }
1770
- }
1771
-
1772
- if ($encoding !== false) {
1773
- $charset = $encoding;
1774
- if (is_object($debug_object)) {
1775
- $debug_object->debug_log(2, 'mb_detect: ' . $charset);
1776
- }
1777
- }
1778
- }
1779
- }
1780
-
1781
- if (empty($charset)) {
1782
- // Assume it's UTF-8 as it is the most likely charset to be used
1783
- $charset = 'UTF-8';
1784
- if (is_object($debug_object)) {
1785
- $debug_object->debug_log(2, 'No match found, assume ' . $charset);
1786
- }
1787
- }
1788
-
1789
- // Since CP1252 is a superset, if we get one of it's subsets, we want
1790
- // it instead.
1791
- if ((strtolower($charset) == 'iso-8859-1')
1792
- || (strtolower($charset) == 'latin1')
1793
- || (strtolower($charset) == 'latin-1')) {
1794
- $charset = 'CP1252';
1795
- if (is_object($debug_object)) {
1796
- $debug_object->debug_log(2,
1797
- 'replacing ' . $charset . ' with CP1252 as its a superset'
1798
- );
1799
- }
1800
- }
1801
-
1802
- if (is_object($debug_object)) {
1803
- $debug_object->debug_log(1, 'EXIT - ' . $charset);
1804
- }
1805
-
1806
- return $this->_charset = $charset;
1807
- }
1808
-
1809
- protected function read_tag()
1810
- {
1811
- // Set end position if no further tags found
1812
- if ($this->char !== '<') {
1813
- $this->root->_[HDOM_INFO_END] = $this->cursor;
1814
- return false;
1815
- }
1816
-
1817
- $begin_tag_pos = $this->pos;
1818
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
1819
-
1820
- // end tag
1821
- if ($this->char === '/') {
1822
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
1823
-
1824
- // Skip whitespace in end tags (i.e. in "</ html>")
1825
- $this->skip($this->token_blank);
1826
- $tag = $this->copy_until_char('>');
1827
-
1828
- // Skip attributes in end tags
1829
- if (($pos = strpos($tag, ' ')) !== false) {
1830
- $tag = substr($tag, 0, $pos);
1831
- }
1832
-
1833
- $parent_lower = strtolower($this->parent->tag);
1834
- $tag_lower = strtolower($tag);
1835
-
1836
- // The end tag is supposed to close the parent tag. Handle situations
1837
- // when it doesn't
1838
- if ($parent_lower !== $tag_lower) {
1839
- // Parent tag does not have to be closed necessarily (optional closing tag)
1840
- // Current tag is a block tag, so it may close an ancestor
1841
- if (isset($this->optional_closing_tags[$parent_lower])
1842
- && isset($this->block_tags[$tag_lower])) {
1843
-
1844
- $this->parent->_[HDOM_INFO_END] = 0;
1845
- $org_parent = $this->parent;
1846
-
1847
- // Traverse ancestors to find a matching opening tag
1848
- // Stop at root node
1849
- while (($this->parent->parent)
1850
- && strtolower($this->parent->tag) !== $tag_lower
1851
- ){
1852
- $this->parent = $this->parent->parent;
1853
- }
1854
-
1855
- // If we don't have a match add current tag as text node
1856
- if (strtolower($this->parent->tag) !== $tag_lower) {
1857
- $this->parent = $org_parent; // restore origonal parent
1858
-
1859
- if ($this->parent->parent) {
1860
- $this->parent = $this->parent->parent;
1861
- }
1862
-
1863
- $this->parent->_[HDOM_INFO_END] = $this->cursor;
1864
- return $this->as_text_node($tag);
1865
- }
1866
- } elseif (($this->parent->parent)
1867
- && isset($this->block_tags[$tag_lower])
1868
- ) {
1869
- // Grandparent exists and current tag is a block tag, so our
1870
- // parent doesn't have an end tag
1871
- $this->parent->_[HDOM_INFO_END] = 0; // No end tag
1872
- $org_parent = $this->parent;
1873
-
1874
- // Traverse ancestors to find a matching opening tag
1875
- // Stop at root node
1876
- while (($this->parent->parent)
1877
- && strtolower($this->parent->tag) !== $tag_lower
1878
- ) {
1879
- $this->parent = $this->parent->parent;
1880
- }
1881
-
1882
- // If we don't have a match add current tag as text node
1883
- if (strtolower($this->parent->tag) !== $tag_lower) {
1884
- $this->parent = $org_parent; // restore origonal parent
1885
- $this->parent->_[HDOM_INFO_END] = $this->cursor;
1886
- return $this->as_text_node($tag);
1887
- }
1888
- } elseif (($this->parent->parent)
1889
- && strtolower($this->parent->parent->tag) === $tag_lower
1890
- ) { // Grandparent exists and current tag closes it
1891
- $this->parent->_[HDOM_INFO_END] = 0;
1892
- $this->parent = $this->parent->parent;
1893
- } else { // Random tag, add as text node
1894
- return $this->as_text_node($tag);
1895
- }
1896
- }
1897
-
1898
- // Set end position of parent tag to current cursor position
1899
- $this->parent->_[HDOM_INFO_END] = $this->cursor;
1900
-
1901
- if ($this->parent->parent) {
1902
- $this->parent = $this->parent->parent;
1903
- }
1904
-
1905
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
1906
- return true;
1907
- }
1908
-
1909
- // start tag
1910
- $node = new simple_html_dom_node($this);
1911
- $node->_[HDOM_INFO_BEGIN] = $this->cursor;
1912
- ++$this->cursor;
1913
- $tag = $this->copy_until($this->token_slash); // Get tag name
1914
- $node->tag_start = $begin_tag_pos;
1915
-
1916
- // doctype, cdata & comments...
1917
- // <!DOCTYPE html>
1918
- // <![CDATA[ ... ]]>
1919
- // <!-- Comment -->
1920
- if (isset($tag[0]) && $tag[0] === '!') {
1921
- $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until_char('>');
1922
-
1923
- if (isset($tag[2]) && $tag[1] === '-' && $tag[2] === '-') { // Comment ("<!--")
1924
- $node->nodetype = HDOM_TYPE_COMMENT;
1925
- $node->tag = 'comment';
1926
- } else { // Could be doctype or CDATA but we don't care
1927
- $node->nodetype = HDOM_TYPE_UNKNOWN;
1928
- $node->tag = 'unknown';
1929
- }
1930
-
1931
- if ($this->char === '>') { $node->_[HDOM_INFO_TEXT] .= '>'; }
1932
-
1933
- $this->link_nodes($node, true);
1934
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
1935
- return true;
1936
- }
1937
-
1938
- // The start tag cannot contain another start tag, if so add as text
1939
- // i.e. "<<html>"
1940
- if ($pos = strpos($tag, '<') !== false) {
1941
- $tag = '<' . substr($tag, 0, -1);
1942
- $node->_[HDOM_INFO_TEXT] = $tag;
1943
- $this->link_nodes($node, false);
1944
- $this->char = $this->doc[--$this->pos]; // prev
1945
- return true;
1946
- }
1947
-
1948
- // Handle invalid tag names (i.e. "<html#doc>")
1949
- if (!preg_match('/^\w[\w:-]*$/', $tag)) {
1950
- $node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');
1951
-
1952
- // Next char is the beginning of a new tag, don't touch it.
1953
- if ($this->char === '<') {
1954
- $this->link_nodes($node, false);
1955
- return true;
1956
- }
1957
-
1958
- // Next char closes current tag, add and be done with it.
1959
- if ($this->char === '>') { $node->_[HDOM_INFO_TEXT] .= '>'; }
1960
- $this->link_nodes($node, false);
1961
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
1962
- return true;
1963
- }
1964
-
1965
- // begin tag, add new node
1966
- $node->nodetype = HDOM_TYPE_ELEMENT;
1967
- $tag_lower = strtolower($tag);
1968
- $node->tag = ($this->lowercase) ? $tag_lower : $tag;
1969
-
1970
- // handle optional closing tags
1971
- if (isset($this->optional_closing_tags[$tag_lower])) {
1972
- // Traverse ancestors to close all optional closing tags
1973
- while (isset($this->optional_closing_tags[$tag_lower][strtolower($this->parent->tag)])) {
1974
- $this->parent->_[HDOM_INFO_END] = 0;
1975
- $this->parent = $this->parent->parent;
1976
- }
1977
- $node->parent = $this->parent;
1978
- }
1979
-
1980
- $guard = 0; // prevent infinity loop
1981
-
1982
- // [0] Space between tag and first attribute
1983
- $space = array($this->copy_skip($this->token_blank), '', '');
1984
-
1985
- // attributes
1986
- do {
1987
- // Everything until the first equal sign should be the attribute name
1988
- $name = $this->copy_until($this->token_equal);
1989
-
1990
- if ($name === '' && $this->char !== null && $space[0] === '') {
1991
- break;
1992
- }
1993
-
1994
- if ($guard === $this->pos) { // Escape infinite loop
1995
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
1996
- continue;
1997
- }
1998
-
1999
- $guard = $this->pos;
2000
-
2001
- // handle endless '<'
2002
- // Out of bounds before the tag ended
2003
- if ($this->pos >= $this->size - 1 && $this->char !== '>') {
2004
- $node->nodetype = HDOM_TYPE_TEXT;
2005
- $node->_[HDOM_INFO_END] = 0;
2006
- $node->_[HDOM_INFO_TEXT] = '<' . $tag . $space[0] . $name;
2007
- $node->tag = 'text';
2008
- $this->link_nodes($node, false);
2009
- return true;
2010
- }
2011
-
2012
- // handle mismatch '<'
2013
- // Attributes cannot start after opening tag
2014
- if ($this->doc[$this->pos - 1] == '<') {
2015
- $node->nodetype = HDOM_TYPE_TEXT;
2016
- $node->tag = 'text';
2017
- $node->attr = array();
2018
- $node->_[HDOM_INFO_END] = 0;
2019
- $node->_[HDOM_INFO_TEXT] = substr(
2020
- $this->doc,
2021
- $begin_tag_pos,
2022
- $this->pos - $begin_tag_pos - 1
2023
- );
2024
- $this->pos -= 2;
2025
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2026
- $this->link_nodes($node, false);
2027
- return true;
2028
- }
2029
-
2030
- if ($name !== '/' && $name !== '') { // this is a attribute name
2031
- // [1] Whitespace after attribute name
2032
- $space[1] = $this->copy_skip($this->token_blank);
2033
-
2034
- $name = $this->restore_noise($name); // might be a noisy name
2035
-
2036
- if ($this->lowercase) { $name = strtolower($name); }
2037
-
2038
- if ($this->char === '=') { // attribute with value
2039
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2040
- $this->parse_attr($node, $name, $space); // get attribute value
2041
- } else {
2042
- //no value attr: nowrap, checked selected...
2043
- $node->_[HDOM_INFO_QUOTE][] = HDOM_QUOTE_NO;
2044
- $node->attr[$name] = true;
2045
- if ($this->char != '>') { $this->char = $this->doc[--$this->pos]; } // prev
2046
- }
2047
-
2048
- $node->_[HDOM_INFO_SPACE][] = $space;
2049
-
2050
- // prepare for next attribute
2051
- $space = array(
2052
- $this->copy_skip($this->token_blank),
2053
- '',
2054
- ''
2055
- );
2056
- } else { // no more attributes
2057
- break;
2058
- }
2059
- } while ($this->char !== '>' && $this->char !== '/'); // go until the tag ended
2060
-
2061
- $this->link_nodes($node, true);
2062
- $node->_[HDOM_INFO_ENDSPACE] = $space[0];
2063
-
2064
- // handle empty tags (i.e. "<div/>")
2065
- if ($this->copy_until_char('>') === '/') {
2066
- $node->_[HDOM_INFO_ENDSPACE] .= '/';
2067
- $node->_[HDOM_INFO_END] = 0;
2068
- } else {
2069
- // reset parent
2070
- if (!isset($this->self_closing_tags[strtolower($node->tag)])) {
2071
- $this->parent = $node;
2072
- }
2073
- }
2074
-
2075
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2076
-
2077
- // If it's a BR tag, we need to set it's text to the default text.
2078
- // This way when we see it in plaintext, we can generate formatting that the user wants.
2079
- // since a br tag never has sub nodes, this works well.
2080
- if ($node->tag === 'br') {
2081
- $node->_[HDOM_INFO_INNER] = $this->default_br_text;
2082
- }
2083
-
2084
- return true;
2085
- }
2086
-
2087
- protected function parse_attr($node, $name, &$space)
2088
- {
2089
- $is_duplicate = isset($node->attr[$name]);
2090
-
2091
- if (!$is_duplicate) // Copy whitespace between "=" and value
2092
- $space[2] = $this->copy_skip($this->token_blank);
2093
-
2094
- switch ($this->char) {
2095
- case '"':
2096
- $quote_type = HDOM_QUOTE_DOUBLE;
2097
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2098
- $value = $this->copy_until_char('"');
2099
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2100
- break;
2101
- case '\'':
2102
- $quote_type = HDOM_QUOTE_SINGLE;
2103
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2104
- $value = $this->copy_until_char('\'');
2105
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2106
- break;
2107
- default:
2108
- $quote_type = HDOM_QUOTE_NO;
2109
- $value = $this->copy_until($this->token_attr);
2110
- }
2111
-
2112
- $value = $this->restore_noise($value);
2113
-
2114
- // PaperG: Attributes should not have \r or \n in them, that counts as
2115
- // html whitespace.
2116
- $value = str_replace("\r", '', $value);
2117
- $value = str_replace("\n", '', $value);
2118
-
2119
- // PaperG: If this is a "class" selector, lets get rid of the preceeding
2120
- // and trailing space since some people leave it in the multi class case.
2121
- if ($name === 'class') {
2122
- $value = trim($value);
2123
- }
2124
-
2125
- if (!$is_duplicate) {
2126
- $node->_[HDOM_INFO_QUOTE][] = $quote_type;
2127
- $node->attr[$name] = $value;
2128
- }
2129
- }
2130
-
2131
- protected function link_nodes(&$node, $is_child)
2132
- {
2133
- $node->parent = $this->parent;
2134
- $this->parent->nodes[] = $node;
2135
- if ($is_child) {
2136
- $this->parent->children[] = $node;
2137
- }
2138
- }
2139
-
2140
- protected function as_text_node($tag)
2141
- {
2142
- $node = new simple_html_dom_node($this);
2143
- ++$this->cursor;
2144
- $node->_[HDOM_INFO_TEXT] = '</' . $tag . '>';
2145
- $this->link_nodes($node, false);
2146
- $this->char = (++$this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2147
- return true;
2148
- }
2149
-
2150
- protected function skip($chars)
2151
- {
2152
- $this->pos += strspn($this->doc, $chars, $this->pos);
2153
- $this->char = ($this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2154
- }
2155
-
2156
- protected function copy_skip($chars)
2157
- {
2158
- $pos = $this->pos;
2159
- $len = strspn($this->doc, $chars, $pos);
2160
- $this->pos += $len;
2161
- $this->char = ($this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2162
- if ($len === 0) { return ''; }
2163
- return substr($this->doc, $pos, $len);
2164
- }
2165
-
2166
- protected function copy_until($chars)
2167
- {
2168
- $pos = $this->pos;
2169
- $len = strcspn($this->doc, $chars, $pos);
2170
- $this->pos += $len;
2171
- $this->char = ($this->pos < $this->size) ? $this->doc[$this->pos] : null; // next
2172
- return substr($this->doc, $pos, $len);
2173
- }
2174
-
2175
- protected function copy_until_char($char)
2176
- {
2177
- if ($this->char === null) { return ''; }
2178
-
2179
- if (($pos = strpos($this->doc, $char, $this->pos)) === false) {
2180
- $ret = substr($this->doc, $this->pos, $this->size - $this->pos);
2181
- $this->char = null;
2182
- $this->pos = $this->size;
2183
- return $ret;
2184
- }
2185
-
2186
- if ($pos === $this->pos) { return ''; }
2187
-
2188
- $pos_old = $this->pos;
2189
- $this->char = $this->doc[$pos];
2190
- $this->pos = $pos;
2191
- return substr($this->doc, $pos_old, $pos - $pos_old);
2192
- }
2193
-
2194
- protected function remove_noise($pattern, $remove_tag = false)
2195
- {
2196
- global $debug_object;
2197
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
2198
-
2199
- $count = preg_match_all(
2200
- $pattern,
2201
- $this->doc,
2202
- $matches,
2203
- PREG_SET_ORDER | PREG_OFFSET_CAPTURE
2204
- );
2205
-
2206
- for ($i = $count - 1; $i > -1; --$i) {
2207
- $key = '___noise___' . sprintf('% 5d', count($this->noise) + 1000);
2208
-
2209
- if (is_object($debug_object)) {
2210
- $debug_object->debug_log(2, 'key is: ' . $key);
2211
- }
2212
-
2213
- $idx = ($remove_tag) ? 0 : 1; // 0 = entire match, 1 = submatch
2214
- $this->noise[$key] = $matches[$i][$idx][0];
2215
- $this->doc = substr_replace($this->doc, $key, $matches[$i][$idx][1], strlen($matches[$i][$idx][0]));
2216
- }
2217
-
2218
- // reset the length of content
2219
- $this->size = strlen($this->doc);
2220
-
2221
- if ($this->size > 0) {
2222
- $this->char = $this->doc[0];
2223
- }
2224
- }
2225
-
2226
- function restore_noise($text)
2227
- {
2228
- global $debug_object;
2229
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
2230
-
2231
- while (($pos = strpos($text, '___noise___')) !== false) {
2232
- // Sometimes there is a broken piece of markup, and we don't GET the
2233
- // pos+11 etc... token which indicates a problem outside of us...
2234
-
2235
- // todo: "___noise___1000" (or any number with four or more digits)
2236
- // in the DOM causes an infinite loop which could be utilized by
2237
- // malicious software
2238
- if (strlen($text) > $pos + 15) {
2239
- $key = '___noise___'
2240
- . $text[$pos + 11]
2241
- . $text[$pos + 12]
2242
- . $text[$pos + 13]
2243
- . $text[$pos + 14]
2244
- . $text[$pos + 15];
2245
-
2246
- if (is_object($debug_object)) {
2247
- $debug_object->debug_log(2, 'located key of: ' . $key);
2248
- }
2249
-
2250
- if (isset($this->noise[$key])) {
2251
- $text = substr($text, 0, $pos)
2252
- . $this->noise[$key]
2253
- . substr($text, $pos + 16);
2254
- } else {
2255
- // do this to prevent an infinite loop.
2256
- $text = substr($text, 0, $pos)
2257
- . 'UNDEFINED NOISE FOR KEY: '
2258
- . $key
2259
- . substr($text, $pos + 16);
2260
- }
2261
- } else {
2262
- // There is no valid key being given back to us... We must get
2263
- // rid of the ___noise___ or we will have a problem.
2264
- $text = substr($text, 0, $pos)
2265
- . 'NO NUMERIC NOISE KEY'
2266
- . substr($text, $pos + 11);
2267
- }
2268
- }
2269
- return $text;
2270
- }
2271
-
2272
- function search_noise($text)
2273
- {
2274
- global $debug_object;
2275
- if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }
2276
-
2277
- foreach($this->noise as $noiseElement) {
2278
- if (strpos($noiseElement, $text) !== false) {
2279
- return $noiseElement;
2280
- }
2281
- }
2282
- }
2283
-
2284
- function __toString()
2285
- {
2286
- return $this->root->innertext();
2287
- }
2288
-
2289
- function __get($name)
2290
- {
2291
- switch ($name) {
2292
- case 'outertext':
2293
- return $this->root->innertext();
2294
- case 'innertext':
2295
- return $this->root->innertext();
2296
- case 'plaintext':
2297
- return $this->root->text();
2298
- case 'charset':
2299
- return $this->_charset;
2300
- case 'target_charset':
2301
- return $this->_target_charset;
2302
- }
2303
- }
2304
-
2305
- function childNodes($idx = -1)
2306
- {
2307
- return $this->root->childNodes($idx);
2308
- }
2309
-
2310
- function firstChild()
2311
- {
2312
- return $this->root->first_child();
2313
- }
2314
-
2315
- function lastChild()
2316
- {
2317
- return $this->root->last_child();
2318
- }
2319
-
2320
- function createElement($name, $value = null)
2321
- {
2322
- return @str_get_html("<$name>$value</$name>")->firstChild();
2323
- }
2324
-
2325
- function createTextNode($value)
2326
- {
2327
- return @end(str_get_html($value)->nodes);
2328
- }
2329
-
2330
- function getElementById($id)
2331
- {
2332
- return $this->find("#$id", 0);
2333
- }
2334
-
2335
- function getElementsById($id, $idx = null)
2336
- {
2337
- return $this->find("#$id", $idx);
2338
- }
2339
-
2340
- function getElementByTagName($name)
2341
- {
2342
- return $this->find($name, 0);
2343
- }
2344
-
2345
- function getElementsByTagName($name, $idx = -1)
2346
- {
2347
- return $this->find($name, $idx);
2348
- }
2349
-
2350
- function loadFile()
2351
- {
2352
- $args = func_get_args();
2353
- $this->load_file($args);
2354
- }
2355
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/wp-retina-2x.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: Perfect Images (Retina, Thumbnails, Replace)
4
- Plugin URI: https://meowapps.com
5
- Description: Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image Threshold and more.
6
- Version: 6.2.7
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 ( !defined( 'WR2X_VERSION' ) ) {
18
- define( 'WR2X_VERSION', '6.2.7' );
19
- define( 'WR2X_PREFIX', 'wr2x' );
20
- define( 'WR2X_DOMAIN', ' wp-retina-2x' );
21
- define( 'WR2X_ENTRY', __FILE__ );
22
- define( 'WR2X_PATH', dirname( __FILE__ ) );
23
- define( 'WR2X_URL', plugin_dir_url( __FILE__ ) );
24
- define( 'WR2X_VERSION_RETINAJS', '5.6.1' );
25
- define( 'WR2X_VERSION_PICTUREFILL', '3.0.2' );
26
- define( 'WR2X_VERSION_LAZYSIZES', '5.1.0' );
27
- define( 'WR2X_VERSION_RETINA_IMAGES', '1.7.2' );
28
- define( 'WR2X_BASENAME', plugin_basename( __FILE__ ) );
29
- }
30
-
31
- require_once( 'classes/init.php');
32
-
33
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-retina-2x.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Perfect Images (Retina, Thumbnails, Replace)
4
  Plugin URI: https://meowapps.com
5
  Description: Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image Threshold and more.
6
- Version: 6.2.6
7
  Author: Jordy Meow
8
  Author URI: https://meowapps.com
9
  Text Domain: wp-retina-2x
@@ -15,7 +15,7 @@ Originally developed for two of my websites:
15
  */
16
 
17
  if ( !defined( 'WR2X_VERSION' ) ) {
18
- define( 'WR2X_VERSION', '6.2.6' );
19
  define( 'WR2X_PREFIX', 'wr2x' );
20
  define( 'WR2X_DOMAIN', ' wp-retina-2x' );
21
  define( 'WR2X_ENTRY', __FILE__ );
3
  Plugin Name: Perfect Images (Retina, Thumbnails, Replace)
4
  Plugin URI: https://meowapps.com
5
  Description: Retina, Replace Images, Regenerate Thumbnails, Image Sizes Management, Image Threshold and more.
6
+ Version: 6.2.8
7
  Author: Jordy Meow
8
  Author URI: https://meowapps.com
9
  Text Domain: wp-retina-2x
15
  */
16
 
17
  if ( !defined( 'WR2X_VERSION' ) ) {
18
+ define( 'WR2X_VERSION', '6.2.8' );
19
  define( 'WR2X_PREFIX', 'wr2x' );
20
  define( 'WR2X_DOMAIN', ' wp-retina-2x' );
21
  define( 'WR2X_ENTRY', __FILE__ );