Version Description
(2022-01-04) =
* [Changed]
Modal when deactivating plugin
Download this release
Release Info
Developer | mateuszgbiorczyk |
Plugin | Converter for Media – Optimize images | Convert WebP & AVIF |
Version | 4.0.5 |
Comparing to | |
See all releases |
Code changes from version 4.0.4 to 4.0.5
- assets/build/css/styles.css +1 -1
- assets/build/js/scripts.js +1 -1
- changelog.txt +3 -0
- readme.txt +3 -0
- src/Conversion/Cron/Schedules.php +2 -2
- src/Conversion/Endpoint/EndpointInterface.php +1 -1
- src/Conversion/Endpoint/PathsEndpoint.php +1 -1
- src/Conversion/Endpoint/RegenerateEndpoint.php +1 -1
- src/Conversion/Method/RemoteMethod.php +2 -2
- src/Plugin/Deactivation/Modal.php +0 -102
- src/PluginInfo.php +4 -0
- src/Service/DeactivationModalGenerator.php +151 -0
- src/Settings/PluginOptions.php +4 -4
- src/WebpConverter.php +2 -1
- templates/views/deactivation-modal.php +0 -62
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +141 -14
- vendor/composer/InstalledVersions.php +19 -6
- vendor/composer/autoload_classmap.php +15 -1
- vendor/composer/autoload_real.php +6 -6
- vendor/composer/autoload_static.php +19 -5
- vendor/composer/installed.json +76 -1
- vendor/composer/installed.php +11 -2
- vendor_prefixed/assets/build/css/styles.css +1 -0
- vendor_prefixed/assets/build/js/scripts.js +1 -0
- vendor_prefixed/src/Exception/DuplicatedFormOptionKeyException.php +10 -0
- vendor_prefixed/src/Exception/DuplicatedFormValueKeyException.php +10 -0
- vendor_prefixed/src/Exception/UnknownFormOptionKeyException.php +10 -0
- vendor_prefixed/src/Hookable.php +13 -0
- vendor_prefixed/src/Modal.php +49 -0
- vendor_prefixed/src/Model/FormOption.php +104 -0
- vendor_prefixed/src/Model/FormOptions.php +73 -0
- vendor_prefixed/src/Model/FormTemplate.php +74 -0
- vendor_prefixed/src/Model/FormValue.php +35 -0
- vendor_prefixed/src/Model/FormValues.php +37 -0
- vendor_prefixed/src/Model/RequestData.php +75 -0
- vendor_prefixed/src/Service/AssetsPrinterService.php +55 -0
- vendor_prefixed/src/Service/TemplateGeneratorService.php +52 -0
- vendor_prefixed/templates/modal.php +142 -0
- webp-converter-for-media.php +2 -2
assets/build/css/styles.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:400;src:url(../../fonts/Exo2/Exo2-Regular.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-Regular.woff) format("woff"),url(../../fonts/Exo2/Exo2-Regular.ttf) format("truetype")}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:500;src:url(../../fonts/Exo2/Exo2-SemiBold.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-SemiBold.woff) format("woff"),url(../../fonts/Exo2/Exo2-SemiBold.ttf) format("truetype")}.webpModal [hidden]{display:none!important}.webpModal *,.webpModal :after,.webpModal :before{box-sizing:border-box;margin:0;padding:0}.webpModal__outer{background-color:rgba(0,0,0,.75);height:100%;left:0;position:fixed;top:0;width:100%;z-index:9999}.webpModal__form{background-color:#fff;font-family:Exo\ 2,sans-serif;font-size:0;left:50%;max-width:calc(100vw - 40px);padding:20px 30px;position:absolute;top:50%;transform:translate(-50%,-50%);width:600px}.webpModal__headline{font-size:16px;font-weight:500;line-height:1.5;padding:4px 0}.webpModal__desc{font-size:14px;line-height:1.5714285714;padding:4px 0}.webpModal__options{padding:10px 0}.webpModal__textarea{border:1px solid #b4b9be!important;border-radius:0;display:none;font-size:14px;line-height:1.5714285714;margin-top:10px;padding:4px 10px;width:100%}.webpModal__textarea[placeholder]{display:block}.webpModal__textarea[placeholder=""]{display:none}.webpModal__buttons{align-items:center;display:flex;flex-wrap:wrap;margin:0 -5px;padding:5px 0}.webpModal__button{padding:5px;width:50%}.webpModal__buttonInner{width:100%}.webpPage{color:#444;font-family:Exo\ 2,sans-serif;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#46b450;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#0073aa;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a0a5aa}.webpPage__widgetTitle--error{background-color:#dc3232}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#0073aa;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #a0a5aa;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #a0a5aa;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#46b450;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#0073aa;color:#0073aa!important}.webpButton--blue:after{background-color:#0073aa}.webpButton--green{border-color:#46b450;color:#46b450!important}.webpButton--green:after{background-color:#46b450}.webpButton--red{border-color:#dc3232;color:#dc3232!important}.webpButton--red:after{background-color:#dc3232}.webpContent{font-family:Exo\ 2,sans-serif;padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#0073aa;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p,.webpInput+p{margin-top:0}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #b4b9be}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#46b450;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#46b450;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:hsla(210,7%,73%,.5);border:1px solid #b4b9be;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#46b450}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #b4b9be!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#46b450;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#dc3232}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#46b450;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#dc3232}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__size{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__sizeProgress{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#46b450;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#46b450;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #a0a5aa;margin-top:20px}.webpLoader__errorsTitle{background-color:#a0a5aa;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#dc3232;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border:1px solid #a0a5aa;border-left:0;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpModal__button{width:100%}.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #a0a5aa}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #a0a5aa;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border:0}}
|
1 |
+
@charset "UTF-8";@keyframes dotsLoading{0%,to{content:"..."}25%{content:" .."}50%{content:". ."}75%{content:".. "}}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:400;src:url(../../fonts/Exo2/Exo2-Regular.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-Regular.woff) format("woff"),url(../../fonts/Exo2/Exo2-Regular.ttf) format("truetype")}@font-face{font-family:Exo\ 2;font-style:"normal";font-weight:500;src:url(../../fonts/Exo2/Exo2-SemiBold.woff2) format("woff2"),url(../../fonts/Exo2/Exo2-SemiBold.woff) format("woff"),url(../../fonts/Exo2/Exo2-SemiBold.ttf) format("truetype")}.webpPage{color:#444;font-family:Exo\ 2,sans-serif;margin:0;overflow:hidden;padding:0 20px 0 0}.webpPage *,.webpPage :after,.webpPage :before{box-sizing:border-box;margin:0;padding:0}.webpPage [hidden]{display:none!important}.webpPage .webpPage__headline{font-size:24px;line-height:1.2083333333;margin:0;padding:15px 0 23px}.webpPage__alert{background-color:#46b450;color:#fff;font-size:14px;line-height:1.5714285714;margin-bottom:30px;padding:15px 20px}.webpPage__columns{margin:0 -30px;overflow:hidden}.webpPage__column{float:left;padding:0 30px}.webpPage__column--large{width:66.666%}.webpPage__column--small{width:33.333%}.webpPage__widget{background-color:#fff}.webpPage__widget+.webpPage__widget{margin-top:60px}.webpPage__widgetTitle{background-color:#0073aa;color:#fff;font-size:16px;font-weight:400;line-height:1.5;padding:14px 30px}.webpPage__widgetTitle--second{background-color:#a0a5aa}.webpPage__widgetTitle--error{background-color:#dc3232}.webpPage__widgetRow{padding-bottom:10px}.webpPage__widgetRow:last-child{padding-bottom:0}.webpPage__widgetRow .webpButton{margin:10px 0}.webpPage__widgetColumns{display:flex;flex-wrap:wrap;margin:0 -10px}.webpPage__widgetColumn{padding:0 10px;width:50%}.webpPage__widgetColumn:first-child:last-child{flex:1}.webpPage__widgetColumnNotice{background-color:#0073aa;margin:10px 0;padding:10px 20px}.webpPage__widgetColumnNotice p{color:#fff;font-size:1.2rem}.webpPage__widgetColumnNotice p+p{margin-top:0}.webpPage__widgetColumnNotice p a{color:inherit;font-weight:500;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.webpPage__quality{border:1px solid #a0a5aa;display:flex;flex-wrap:wrap;margin:10px 0}.webpPage__qualityItem{border-left:1px solid #a0a5aa;flex:1;margin-left:-1px;text-align:center}.webpPage__qualityItemInput{display:none!important}.webpPage__qualityItemLabel{display:block;font-size:14px;line-height:1.5714285714;padding:14px 20px;position:relative;transition:color .3s,background-color .3s}.webpPage__qualityItemInput:checked+.webpPage__qualityItemLabel{background-color:#46b450;color:#fff;margin:-1px;padding:15px 21px}.webpPage__qualityItemInput[disabled]+.webpPage__qualityItemLabel{opacity:0;pointer-events:none}.notice[data-notice=webp-converter]{margin-top:20px;padding:0}.webpButton{background-color:#fff;border:1px solid transparent;box-shadow:none!important;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:500;line-height:1.5714285714;min-width:180px;opacity:1!important;outline:none!important;padding:9px 30px;position:relative;text-align:center;text-decoration:none;text-decoration:none!important;transition:color .3s!important;z-index:10}p>.webpButton{margin:6px 0}.webpButton:before{float:left;font-family:dashicons;font-size:20px;line-height:1.1;margin-right:10px}.webpButton:after{content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0;z-index:-1}.webpButton:hover:after{width:100%}.webpButton[disabled]{opacity:.5!important;pointer-events:none}.webpButton--blue:hover,.webpButton--green:hover,.webpButton--red:hover{color:#fff!important}.webpButton--blue{border-color:#0073aa;color:#0073aa!important}.webpButton--blue:after{background-color:#0073aa}.webpButton--green{border-color:#46b450;color:#46b450!important}.webpButton--green:after{background-color:#46b450}.webpButton--red{border-color:#dc3232;color:#dc3232!important}.webpButton--red:after{background-color:#dc3232}.webpContent{font-family:Exo\ 2,sans-serif;padding:20px 30px}.webpContent p{font-size:14px;line-height:1.5714285714;max-width:800px}.webpContent p.center{text-align:center}.webpContent--wide p{max-width:100%}.webpContent a{box-shadow:none;color:#0073aa;outline:none;text-decoration:underline;transition:opacity .3s}.webpContent a:hover{opacity:.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6{font-size:16px;font-weight:500;line-height:1.5}.webpContent h1,.webpContent h2,.webpContent h3,.webpContent h4,.webpContent h5,.webpContent h6,.webpContent p{margin:10px 0 0;padding:4px 0}.webpContent h1:first-child,.webpContent h2:first-child,.webpContent h3:first-child,.webpContent h4:first-child,.webpContent h5:first-child,.webpContent h6:first-child,.webpContent p:first-child,.webpContent p>p,.webpInput+p{margin-top:0}.webpContent h1+p,.webpContent h2+p,.webpContent h3+p,.webpContent h4+p,.webpContent h5+p,.webpContent h6+p{font-size:12px;line-height:1.75;margin-top:0}.webpContent--notice h1+p,.webpContent--notice h2+p,.webpContent--notice h3+p,.webpContent--notice h4+p,.webpContent--notice h5+p,.webpContent--notice h6+p{font-size:14px;line-height:1.5714285714}.webpContent__buttons{margin-top:-10px;overflow:hidden;padding:10px 0}.webpContent__button{float:left;margin:20px 20px 0 0}.webpContent__button:last-child{margin-right:0}.webpField{display:flex;padding:10px 0}.webpField+.webpField{margin-top:-12px}.webpField__input{display:none!important}.webpField__input+label{display:inline-block;position:relative}.webpField__input[disabled]+label{pointer-events:none}.webpField__input[disabled]+label:after,.webpField__input[disabled]+label:before{opacity:.25}.webpField__input--checkbox+label,.webpField__input--radio+label{height:22px;width:22px}.webpField__input--checkbox+label:after,.webpField__input--checkbox+label:before,.webpField__input--radio+label:after,.webpField__input--radio+label:before{align-items:center;content:"";display:flex;height:22px;justify-content:center;left:0;position:absolute;top:0;width:22px}.webpField__input--checkbox+label:before,.webpField__input--radio+label:before{border:1px solid #b4b9be}.webpField__input--checkbox+label:after,.webpField__input--radio+label:after{position:absolute;transform:scale(0);transition:transform .3s}.webpField__input--checkbox:checked+label:after,.webpField__input--radio:checked+label:after{transform:scale(1)}.webpField__input--checkbox+label:after{color:#46b450;content:"\f147";font-family:dashicons;font-size:20px;line-height:1}.webpField__input--radio+label:before{border-radius:50%}.webpField__input--radio+label:after{background-color:#46b450;border-radius:50%;content:"";height:6px;left:8px;top:8px;width:6px}.webpField__input--toggle+label{height:22px;width:44px}.webpField__input--toggle+label:after,.webpField__input--toggle+label:before{content:"";position:absolute}.webpField__input--toggle+label:before{background-color:hsla(210,7%,73%,.5);border:1px solid #b4b9be;border-radius:11px;height:22px;left:0;top:0;transition:background-color .3s;width:44px}.webpField__input--toggle+label:after{background-color:#fff;border-radius:50%;height:16px;left:3px;position:absolute;top:3px;transition:transform .3s;width:16px}.webpField__input--toggle:checked+label:before{background-color:#46b450}.webpField__input--toggle:checked+label:after{transform:translateX(22px)}.webpField__label{display:block;flex:1;font-size:14px;line-height:1.5714285714;margin-left:20px;max-width:650px;position:relative}.webpInput{align-items:center;display:flex;padding:10px 0}.webpInput__field{border:1px solid #b4b9be!important;border-radius:0!important;box-shadow:none!important;flex:1;font-size:14px!important;line-height:1.5714285714!important;padding:9px 15px!important}.webpInput__button{margin:0 0 0 10px!important}.webpLoader__status{padding:20px 0 10px;position:relative}.webpLoader__bar--hidden{display:none}.webpLoader__barProgress{font-size:0;height:21px;line-height:0;position:relative}.webpLoader__barProgress:before{background-color:#46b450;content:"";height:100%;left:0;position:absolute;top:0;transition:width .3s;width:0}.webpLoader__barProgress--error:before{background-color:#dc3232}.webpLoader__barProgress[data-percent="0"]:before{width:0}.webpLoader__barProgress[data-percent="1"]:before{width:1%}.webpLoader__barProgress[data-percent="2"]:before{width:2%}.webpLoader__barProgress[data-percent="3"]:before{width:3%}.webpLoader__barProgress[data-percent="4"]:before{width:4%}.webpLoader__barProgress[data-percent="5"]:before{width:5%}.webpLoader__barProgress[data-percent="6"]:before{width:6%}.webpLoader__barProgress[data-percent="7"]:before{width:7%}.webpLoader__barProgress[data-percent="8"]:before{width:8%}.webpLoader__barProgress[data-percent="9"]:before{width:9%}.webpLoader__barProgress[data-percent="10"]:before{width:10%}.webpLoader__barProgress[data-percent="11"]:before{width:11%}.webpLoader__barProgress[data-percent="12"]:before{width:12%}.webpLoader__barProgress[data-percent="13"]:before{width:13%}.webpLoader__barProgress[data-percent="14"]:before{width:14%}.webpLoader__barProgress[data-percent="15"]:before{width:15%}.webpLoader__barProgress[data-percent="16"]:before{width:16%}.webpLoader__barProgress[data-percent="17"]:before{width:17%}.webpLoader__barProgress[data-percent="18"]:before{width:18%}.webpLoader__barProgress[data-percent="19"]:before{width:19%}.webpLoader__barProgress[data-percent="20"]:before{width:20%}.webpLoader__barProgress[data-percent="21"]:before{width:21%}.webpLoader__barProgress[data-percent="22"]:before{width:22%}.webpLoader__barProgress[data-percent="23"]:before{width:23%}.webpLoader__barProgress[data-percent="24"]:before{width:24%}.webpLoader__barProgress[data-percent="25"]:before{width:25%}.webpLoader__barProgress[data-percent="26"]:before{width:26%}.webpLoader__barProgress[data-percent="27"]:before{width:27%}.webpLoader__barProgress[data-percent="28"]:before{width:28%}.webpLoader__barProgress[data-percent="29"]:before{width:29%}.webpLoader__barProgress[data-percent="30"]:before{width:30%}.webpLoader__barProgress[data-percent="31"]:before{width:31%}.webpLoader__barProgress[data-percent="32"]:before{width:32%}.webpLoader__barProgress[data-percent="33"]:before{width:33%}.webpLoader__barProgress[data-percent="34"]:before{width:34%}.webpLoader__barProgress[data-percent="35"]:before{width:35%}.webpLoader__barProgress[data-percent="36"]:before{width:36%}.webpLoader__barProgress[data-percent="37"]:before{width:37%}.webpLoader__barProgress[data-percent="38"]:before{width:38%}.webpLoader__barProgress[data-percent="39"]:before{width:39%}.webpLoader__barProgress[data-percent="40"]:before{width:40%}.webpLoader__barProgress[data-percent="41"]:before{width:41%}.webpLoader__barProgress[data-percent="42"]:before{width:42%}.webpLoader__barProgress[data-percent="43"]:before{width:43%}.webpLoader__barProgress[data-percent="44"]:before{width:44%}.webpLoader__barProgress[data-percent="45"]:before{width:45%}.webpLoader__barProgress[data-percent="46"]:before{width:46%}.webpLoader__barProgress[data-percent="47"]:before{width:47%}.webpLoader__barProgress[data-percent="48"]:before{width:48%}.webpLoader__barProgress[data-percent="49"]:before{width:49%}.webpLoader__barProgress[data-percent="50"]:before{width:50%}.webpLoader__barProgress[data-percent="51"]:before{width:51%}.webpLoader__barProgress[data-percent="52"]:before{width:52%}.webpLoader__barProgress[data-percent="53"]:before{width:53%}.webpLoader__barProgress[data-percent="54"]:before{width:54%}.webpLoader__barProgress[data-percent="55"]:before{width:55%}.webpLoader__barProgress[data-percent="56"]:before{width:56%}.webpLoader__barProgress[data-percent="57"]:before{width:57%}.webpLoader__barProgress[data-percent="58"]:before{width:58%}.webpLoader__barProgress[data-percent="59"]:before{width:59%}.webpLoader__barProgress[data-percent="60"]:before{width:60%}.webpLoader__barProgress[data-percent="61"]:before{width:61%}.webpLoader__barProgress[data-percent="62"]:before{width:62%}.webpLoader__barProgress[data-percent="63"]:before{width:63%}.webpLoader__barProgress[data-percent="64"]:before{width:64%}.webpLoader__barProgress[data-percent="65"]:before{width:65%}.webpLoader__barProgress[data-percent="66"]:before{width:66%}.webpLoader__barProgress[data-percent="67"]:before{width:67%}.webpLoader__barProgress[data-percent="68"]:before{width:68%}.webpLoader__barProgress[data-percent="69"]:before{width:69%}.webpLoader__barProgress[data-percent="70"]:before{width:70%}.webpLoader__barProgress[data-percent="71"]:before{width:71%}.webpLoader__barProgress[data-percent="72"]:before{width:72%}.webpLoader__barProgress[data-percent="73"]:before{width:73%}.webpLoader__barProgress[data-percent="74"]:before{width:74%}.webpLoader__barProgress[data-percent="75"]:before{width:75%}.webpLoader__barProgress[data-percent="76"]:before{width:76%}.webpLoader__barProgress[data-percent="77"]:before{width:77%}.webpLoader__barProgress[data-percent="78"]:before{width:78%}.webpLoader__barProgress[data-percent="79"]:before{width:79%}.webpLoader__barProgress[data-percent="80"]:before{width:80%}.webpLoader__barProgress[data-percent="81"]:before{width:81%}.webpLoader__barProgress[data-percent="82"]:before{width:82%}.webpLoader__barProgress[data-percent="83"]:before{width:83%}.webpLoader__barProgress[data-percent="84"]:before{width:84%}.webpLoader__barProgress[data-percent="85"]:before{width:85%}.webpLoader__barProgress[data-percent="86"]:before{width:86%}.webpLoader__barProgress[data-percent="87"]:before{width:87%}.webpLoader__barProgress[data-percent="88"]:before{width:88%}.webpLoader__barProgress[data-percent="89"]:before{width:89%}.webpLoader__barProgress[data-percent="90"]:before{width:90%}.webpLoader__barProgress[data-percent="91"]:before{width:91%}.webpLoader__barProgress[data-percent="92"]:before{width:92%}.webpLoader__barProgress[data-percent="93"]:before{width:93%}.webpLoader__barProgress[data-percent="94"]:before{width:94%}.webpLoader__barProgress[data-percent="95"]:before{width:95%}.webpLoader__barProgress[data-percent="96"]:before{width:96%}.webpLoader__barProgress[data-percent="97"]:before{width:97%}.webpLoader__barProgress[data-percent="98"]:before{width:98%}.webpLoader__barProgress[data-percent="99"]:before{width:99%}.webpLoader__barProgress[data-percent="100"]:before{width:100%}.webpLoader__barCount{background-color:#46b450;color:#fff;display:inline-block;font-family:monospace;font-size:12px;line-height:1.75;padding:0 5px;position:relative}.webpLoader__barProgress--error .webpLoader__barCount{background-color:#dc3232}.webpLoader__barCount:after{animation:dotsLoading 1s linear infinite;content:"...";margin-left:5px}.webpLoader__barProgress--error .webpLoader__barCount:after,.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:after{display:none}.webpLoader__barProgress[data-percent="0"] .webpLoader__barCount:before{content:"0%"}.webpLoader__barProgress[data-percent="1"] .webpLoader__barCount:before{content:"1%"}.webpLoader__barProgress[data-percent="2"] .webpLoader__barCount:before{content:"2%"}.webpLoader__barProgress[data-percent="3"] .webpLoader__barCount:before{content:"3%"}.webpLoader__barProgress[data-percent="4"] .webpLoader__barCount:before{content:"4%"}.webpLoader__barProgress[data-percent="5"] .webpLoader__barCount:before{content:"5%"}.webpLoader__barProgress[data-percent="6"] .webpLoader__barCount:before{content:"6%"}.webpLoader__barProgress[data-percent="7"] .webpLoader__barCount:before{content:"7%"}.webpLoader__barProgress[data-percent="8"] .webpLoader__barCount:before{content:"8%"}.webpLoader__barProgress[data-percent="9"] .webpLoader__barCount:before{content:"9%"}.webpLoader__barProgress[data-percent="10"] .webpLoader__barCount:before{content:"10%"}.webpLoader__barProgress[data-percent="11"] .webpLoader__barCount:before{content:"11%"}.webpLoader__barProgress[data-percent="12"] .webpLoader__barCount:before{content:"12%"}.webpLoader__barProgress[data-percent="13"] .webpLoader__barCount:before{content:"13%"}.webpLoader__barProgress[data-percent="14"] .webpLoader__barCount:before{content:"14%"}.webpLoader__barProgress[data-percent="15"] .webpLoader__barCount:before{content:"15%"}.webpLoader__barProgress[data-percent="16"] .webpLoader__barCount:before{content:"16%"}.webpLoader__barProgress[data-percent="17"] .webpLoader__barCount:before{content:"17%"}.webpLoader__barProgress[data-percent="18"] .webpLoader__barCount:before{content:"18%"}.webpLoader__barProgress[data-percent="19"] .webpLoader__barCount:before{content:"19%"}.webpLoader__barProgress[data-percent="20"] .webpLoader__barCount:before{content:"20%"}.webpLoader__barProgress[data-percent="21"] .webpLoader__barCount:before{content:"21%"}.webpLoader__barProgress[data-percent="22"] .webpLoader__barCount:before{content:"22%"}.webpLoader__barProgress[data-percent="23"] .webpLoader__barCount:before{content:"23%"}.webpLoader__barProgress[data-percent="24"] .webpLoader__barCount:before{content:"24%"}.webpLoader__barProgress[data-percent="25"] .webpLoader__barCount:before{content:"25%"}.webpLoader__barProgress[data-percent="26"] .webpLoader__barCount:before{content:"26%"}.webpLoader__barProgress[data-percent="27"] .webpLoader__barCount:before{content:"27%"}.webpLoader__barProgress[data-percent="28"] .webpLoader__barCount:before{content:"28%"}.webpLoader__barProgress[data-percent="29"] .webpLoader__barCount:before{content:"29%"}.webpLoader__barProgress[data-percent="30"] .webpLoader__barCount:before{content:"30%"}.webpLoader__barProgress[data-percent="31"] .webpLoader__barCount:before{content:"31%"}.webpLoader__barProgress[data-percent="32"] .webpLoader__barCount:before{content:"32%"}.webpLoader__barProgress[data-percent="33"] .webpLoader__barCount:before{content:"33%"}.webpLoader__barProgress[data-percent="34"] .webpLoader__barCount:before{content:"34%"}.webpLoader__barProgress[data-percent="35"] .webpLoader__barCount:before{content:"35%"}.webpLoader__barProgress[data-percent="36"] .webpLoader__barCount:before{content:"36%"}.webpLoader__barProgress[data-percent="37"] .webpLoader__barCount:before{content:"37%"}.webpLoader__barProgress[data-percent="38"] .webpLoader__barCount:before{content:"38%"}.webpLoader__barProgress[data-percent="39"] .webpLoader__barCount:before{content:"39%"}.webpLoader__barProgress[data-percent="40"] .webpLoader__barCount:before{content:"40%"}.webpLoader__barProgress[data-percent="41"] .webpLoader__barCount:before{content:"41%"}.webpLoader__barProgress[data-percent="42"] .webpLoader__barCount:before{content:"42%"}.webpLoader__barProgress[data-percent="43"] .webpLoader__barCount:before{content:"43%"}.webpLoader__barProgress[data-percent="44"] .webpLoader__barCount:before{content:"44%"}.webpLoader__barProgress[data-percent="45"] .webpLoader__barCount:before{content:"45%"}.webpLoader__barProgress[data-percent="46"] .webpLoader__barCount:before{content:"46%"}.webpLoader__barProgress[data-percent="47"] .webpLoader__barCount:before{content:"47%"}.webpLoader__barProgress[data-percent="48"] .webpLoader__barCount:before{content:"48%"}.webpLoader__barProgress[data-percent="49"] .webpLoader__barCount:before{content:"49%"}.webpLoader__barProgress[data-percent="50"] .webpLoader__barCount:before{content:"50%"}.webpLoader__barProgress[data-percent="51"] .webpLoader__barCount:before{content:"51%"}.webpLoader__barProgress[data-percent="52"] .webpLoader__barCount:before{content:"52%"}.webpLoader__barProgress[data-percent="53"] .webpLoader__barCount:before{content:"53%"}.webpLoader__barProgress[data-percent="54"] .webpLoader__barCount:before{content:"54%"}.webpLoader__barProgress[data-percent="55"] .webpLoader__barCount:before{content:"55%"}.webpLoader__barProgress[data-percent="56"] .webpLoader__barCount:before{content:"56%"}.webpLoader__barProgress[data-percent="57"] .webpLoader__barCount:before{content:"57%"}.webpLoader__barProgress[data-percent="58"] .webpLoader__barCount:before{content:"58%"}.webpLoader__barProgress[data-percent="59"] .webpLoader__barCount:before{content:"59%"}.webpLoader__barProgress[data-percent="60"] .webpLoader__barCount:before{content:"60%"}.webpLoader__barProgress[data-percent="61"] .webpLoader__barCount:before{content:"61%"}.webpLoader__barProgress[data-percent="62"] .webpLoader__barCount:before{content:"62%"}.webpLoader__barProgress[data-percent="63"] .webpLoader__barCount:before{content:"63%"}.webpLoader__barProgress[data-percent="64"] .webpLoader__barCount:before{content:"64%"}.webpLoader__barProgress[data-percent="65"] .webpLoader__barCount:before{content:"65%"}.webpLoader__barProgress[data-percent="66"] .webpLoader__barCount:before{content:"66%"}.webpLoader__barProgress[data-percent="67"] .webpLoader__barCount:before{content:"67%"}.webpLoader__barProgress[data-percent="68"] .webpLoader__barCount:before{content:"68%"}.webpLoader__barProgress[data-percent="69"] .webpLoader__barCount:before{content:"69%"}.webpLoader__barProgress[data-percent="70"] .webpLoader__barCount:before{content:"70%"}.webpLoader__barProgress[data-percent="71"] .webpLoader__barCount:before{content:"71%"}.webpLoader__barProgress[data-percent="72"] .webpLoader__barCount:before{content:"72%"}.webpLoader__barProgress[data-percent="73"] .webpLoader__barCount:before{content:"73%"}.webpLoader__barProgress[data-percent="74"] .webpLoader__barCount:before{content:"74%"}.webpLoader__barProgress[data-percent="75"] .webpLoader__barCount:before{content:"75%"}.webpLoader__barProgress[data-percent="76"] .webpLoader__barCount:before{content:"76%"}.webpLoader__barProgress[data-percent="77"] .webpLoader__barCount:before{content:"77%"}.webpLoader__barProgress[data-percent="78"] .webpLoader__barCount:before{content:"78%"}.webpLoader__barProgress[data-percent="79"] .webpLoader__barCount:before{content:"79%"}.webpLoader__barProgress[data-percent="80"] .webpLoader__barCount:before{content:"80%"}.webpLoader__barProgress[data-percent="81"] .webpLoader__barCount:before{content:"81%"}.webpLoader__barProgress[data-percent="82"] .webpLoader__barCount:before{content:"82%"}.webpLoader__barProgress[data-percent="83"] .webpLoader__barCount:before{content:"83%"}.webpLoader__barProgress[data-percent="84"] .webpLoader__barCount:before{content:"84%"}.webpLoader__barProgress[data-percent="85"] .webpLoader__barCount:before{content:"85%"}.webpLoader__barProgress[data-percent="86"] .webpLoader__barCount:before{content:"86%"}.webpLoader__barProgress[data-percent="87"] .webpLoader__barCount:before{content:"87%"}.webpLoader__barProgress[data-percent="88"] .webpLoader__barCount:before{content:"88%"}.webpLoader__barProgress[data-percent="89"] .webpLoader__barCount:before{content:"89%"}.webpLoader__barProgress[data-percent="90"] .webpLoader__barCount:before{content:"90%"}.webpLoader__barProgress[data-percent="91"] .webpLoader__barCount:before{content:"91%"}.webpLoader__barProgress[data-percent="92"] .webpLoader__barCount:before{content:"92%"}.webpLoader__barProgress[data-percent="93"] .webpLoader__barCount:before{content:"93%"}.webpLoader__barProgress[data-percent="94"] .webpLoader__barCount:before{content:"94%"}.webpLoader__barProgress[data-percent="95"] .webpLoader__barCount:before{content:"95%"}.webpLoader__barProgress[data-percent="96"] .webpLoader__barCount:before{content:"96%"}.webpLoader__barProgress[data-percent="97"] .webpLoader__barCount:before{content:"97%"}.webpLoader__barProgress[data-percent="98"] .webpLoader__barCount:before{content:"98%"}.webpLoader__barProgress[data-percent="99"] .webpLoader__barCount:before{content:"99%"}.webpLoader__barProgress[data-percent="100"] .webpLoader__barCount:before{content:"100%"}.webpLoader__size{font-size:14px;line-height:1.5714285714;margin-bottom:-10px;padding:4px 0}.webpLoader__sizeProgress{font-weight:500}.webpLoader__success{margin-top:20px;padding:4px 0 4px 20px;position:relative}.webpLoader__success:before{background-color:#46b450;content:"";height:100%;left:0;position:absolute;top:0;width:2px}.webpLoader__successContent{color:#46b450;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__successContent a{color:inherit}.webpLoader__errors{border-left:2px solid #a0a5aa;margin-top:20px}.webpLoader__errorsTitle{background-color:#a0a5aa;color:#fff;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 22px}.webpLoader__errorsContent{padding:10px 0 10px 20px}.webpLoader__errorsContent>p{font-size:12px;line-height:1.75;margin:0;max-width:100%}.webpLoader__errorsContent>p.webpLoader__errorsContentError{color:#dc3232;font-size:14px;font-weight:500;line-height:1.5714285714}.webpLoader__errorsContent pre{font-size:12px;line-height:1.75;white-space:normal}.webpLoader__button--disabled{opacity:.25!important;pointer-events:none}.webpPopup{margin-top:20px}.webpPopup__inner{background-color:#fff;display:flex;flex-wrap:wrap}.webpPopup__image{background-image:url(../../img/author.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover;width:152px}.webpPopup__content{border:1px solid #a0a5aa;border-left:0;flex:1;padding:10px 20px}.webpServerInfo{color:#222;text-align:center}.webpServerInfo pre{font-family:monospace;margin:0}.webpServerInfo h1,.webpServerInfo h2{display:none}.webpServerInfo p{max-width:100%}.webpServerInfo table{border:0;border-collapse:collapse;margin:10px auto;width:100%}.webpServerInfo td,.webpServerInfo th{border:1px solid #666;font-size:12px;line-height:1.75;padding:4px 5px;text-align:center;vertical-align:baseline}.webpServerInfo .p{text-align:left}.webpServerInfo .e{background-color:#ccf;font-weight:700;width:300px}.webpServerInfo .h{background-color:#99c;font-weight:700}.webpServerInfo .v{word-wrap:break-word;background-color:#ddd;max-width:300px;overflow-x:auto}.webpServerInfo .v i{color:#999}.webpServerInfo img{border:0;float:right}@media screen and (max-width:1024px){.webpPage__column--large{width:100%}.webpPage__column--small{margin-top:40px;width:100%}.webpPage__widget+.webpPage__widget{margin-top:40px}.webpPage__widgetColumns{display:block}.webpPage__widgetColumn{width:100%}}@media screen and (max-width:782px){.webpPage{padding-right:0}.webpPage__quality{display:block}.webpPage__qualityItem{border-left:0}.webpPage__qualityItem+.webpPage__qualityItem{border-top:1px solid #a0a5aa}.webpInput{display:block}.webpInput__field{width:100%}.webpInput__button{margin:10px 0 0!important}.webpPopup__inner{border:1px solid #a0a5aa;display:block}.webpPopup__image{height:152px;margin:20px auto 0}.webpPopup__content{border:0}}
|
assets/build/js/scripts.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){var e,t={669:function(e,t,r){e.exports=r(609)},448:function(e,t,r){"use strict";var n=r(867),o=r(26),i=r(372),s=r(327),a=r(97),u=r(109),c=r(985),f=r(61);e.exports=function(e){return new Promise((function(t,r){var l=e.data,h=e.headers,d=e.responseType;n.isFormData(l)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(m+":"+v)}var g=a(e.baseURL,e.url);function _(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,i={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,r,i),p=null}}if(p.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=_:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(_)},p.onabort=function(){p&&(r(f("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(f("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(h[e.xsrfHeaderName]=b)}"setRequestHeader"in p&&n.forEach(h,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),d&&"json"!==d&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),l||(l=null),p.send(l)}))}},609:function(e,t,r){"use strict";var n=r(867),o=r(849),i=r(321),s=r(185);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(655));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.all=function(e){return Promise.all(e)},u.spread=r(713),u.isAxiosError=r(268),e.exports=u,e.exports.default=u},263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:function(e,t,r){"use strict";var n=r(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,r){"use strict";var n=r(867),o=r(327),i=r(782),s=r(572),a=r(185),u=r(875),c=u.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var f=[s,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=e;r.length;){var h=r.shift(),d=r.shift();try{l=h(l)}catch(e){d(e);break}}try{o=s(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=f},782:function(e,t,r){"use strict";var n=r(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:function(e,t,r){"use strict";var n=r(793),o=r(303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},61:function(e,t,r){"use strict";var n=r(481);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},572:function(e,t,r){"use strict";var n=r(867),o=r(527),i=r(502),s=r(655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,c),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var f=o.concat(i).concat(s).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,c),r}},26:function(e,t,r){"use strict";var n=r(61);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:function(e,t,r){"use strict";var n=r(867),o=r(655);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},655:function(e,t,r){"use strict";var n=r(155),o=r(867),i=r(16),s=r(481),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(c=r(448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(u(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(t||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){f.headers[e]=o.merge(a)})),e.exports=f},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},327:function(e,t,r){"use strict";var n=r(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:function(e,t,r){"use strict";var n=r(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:function(e,t,r){"use strict";var n=r(593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=n.version.split(".");function a(e,t){for(var r=t?t.split("."):s,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);return function(s,a,u){if(!1===e)throw new Error(function(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(a," has been removed in "+t));return o&&!i[a]&&(i[a]=!0),!e||e(s,a,u)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},867:function(e,t,r){"use strict";var n=r(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},80:function(e,t,r){"use strict";var n=r(669),o=r.n(n);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.section=document.querySelector("[data-calculate-widget]"),this.section)return this.button=this.section.querySelector("[data-calculate-widget-button]"),this.loading=this.section.querySelector("[data-calculate-widget-loading]"),this.output=this.section.querySelector("[data-calculate-widget-output]"),this.settings={ajax:{url_calculation:this.section.getAttribute("data-calculate-widget-api")}},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_calculation.bind(this))}},{key:"init_calculation",value:function(e){e.preventDefault(),this.button.setAttribute("hidden","hidden"),this.loading.removeAttribute("hidden"),this.send_request_for_calculation()}},{key:"send_request_for_calculation",value:function(){var e=this,t=this.settings.ajax.url_calculation;o()({method:"POST",url:t}).then((function(t){e.loading.setAttribute("hidden","hidden"),e.output.innerText=t.data.value_output,e.output.removeAttribute("hidden","hidden")})).catch((function(t){e.button.removeAttribute("hidden"),e.loading.setAttribute("hidden","hidden")}))}}])&&i(t.prototype,r),n&&i(t,n),e}();function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.button_open=document.querySelector('[data-slug="webp-converter-for-media"] a[href*="action=deactivate"]'),this.modal=document.querySelector(".webpModal"),this.button_open&&this.modal)return this.outer=this.modal.querySelector(".webpModal__outer"),this.form=this.outer.querySelector(".webpModal__form"),this.form_options=this.form.querySelectorAll('[name="webpc_reason"]'),this.form_comment=this.form.querySelector('[name="webpc_comment"]'),this.button_submit=this.form.querySelector('button[type="submit"]'),this.button_cancel=this.form.querySelector('button[type="button"]'),this.events={open_modal:this.open_modal.bind(this)},this.atts={option_placeholder:"data-placeholder"},this.status={is_sent:!1},!0}},{key:"set_events",value:function(){var e=this;this.button_open.addEventListener("click",this.events.open_modal),this.button_submit.addEventListener("click",this.submit_form.bind(this)),this.button_cancel.addEventListener("click",this.cancel_form.bind(this)),this.outer.addEventListener("click",this.close_modal.bind(this)),this.form.addEventListener("click",(function(e){e.stopPropagation()}));for(var t=this.form_options.length,r=function(t){e.form_options[t].addEventListener("change",(function(){e.set_current_option(t)}))},n=0;n<t;n++)r(n)}},{key:"open_modal",value:function(e){e.preventDefault(),this.button_open.removeEventListener("click",this.events.open_modal),this.modal.removeAttribute("hidden")}},{key:"close_modal",value:function(){this.modal.setAttribute("hidden","hidden")}},{key:"submit_form",value:function(e){var t=this;e.preventDefault(),this.close_modal(),this.status.is_sent||(this.status.is_sent=!0,setTimeout((function(){t.send_request(),t.button_open.click()}),0))}},{key:"send_request",value:function(){var e=new FormData(this.form),t=this.form.getAttribute("action");o()({method:"POST",url:t,data:e})}},{key:"cancel_form",value:function(e){var t=this;e.preventDefault(),this.close_modal(),setTimeout((function(){t.button_open.click()}),0)}},{key:"set_current_option",value:function(e){this.form_comment.value="";var t=this.form_options[e].getAttribute(this.atts.option_placeholder);this.form_comment.setAttribute("placeholder",t)}}])&&a(t.prototype,r),n&&a(t,n),e}();function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.notice=document.querySelector('.notice[data-notice="webp-converter-for-media"]'),this.notice)return this.settings={ajax_url:this.notice.getAttribute("data-url"),ajax_action:"webpc_notice",button_close_class:".notice-dismiss",button_hide_class:"[data-permanently]"},this.events={click_on_close:this.click_on_close.bind(this)},!0}},{key:"set_events",value:function(){this.notice.addEventListener("click",this.events.click_on_close)}},{key:"click_on_close",value:function(e){var t=this.settings,r=t.button_close_class,n=t.button_hide_class;this.notice.removeEventListener("click",this.events.click_on_close),e.target.matches(r)?this.hide_notice(!1):e.target.matches(n)&&this.hide_notice(!0)}},{key:"hide_notice",value:function(e){var t=this.settings.button_close_class;this.send_request(e),e&&this.notice.querySelector(t).click()}},{key:"send_request",value:function(e){var t=this.settings.ajax_url;o()({method:"POST",url:t,data:this.get_data_for_request(e)})}},{key:"get_data_for_request",value:function(e){var t=this.settings.ajax_action,r=new FormData;return r.append("action",t),r.append("is_permanently",e?1:0),r}}])&&c(t.prototype,r),n&&c(t,n),e}();function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.section=document.querySelector(".webpLoader"),this.section)return this.wrapper=this.section.querySelector(".webpLoader__status"),this.progress=this.wrapper.querySelector(".webpLoader__barProgress"),this.progress_size=this.section.querySelector(".webpLoader__sizeProgress"),this.errors=this.section.querySelector(".webpLoader__errors"),this.errors_inner=this.errors.querySelector(".webpLoader__errorsContent"),this.success=this.section.querySelector(".webpLoader__success"),this.success_popup=this.section.querySelector(".webpLoader__popup"),this.option_force=this.section.querySelector('input[name="regenerate_force"]'),this.button=this.section.querySelector(".webpLoader__button"),this.data={count:0,max:0,items:[],size:{before:0,after:0},errors:[]},this.settings={is_disabled:!1,ajax:{url_paths:this.section.getAttribute("data-api-paths"),url_regenerate:this.section.getAttribute("data-api-regenerate"),error_message:this.section.getAttribute("data-api-error-message")},units:["kB","MB","GB"]},this.atts={progress:"data-percent"},this.classes={progress_error:"webpLoader__barProgress--error",button_disabled:"webpLoader__button--disabled",error_message:"webpLoader__errorsContentError"},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_regeneration.bind(this))}},{key:"init_regeneration",value:function(e){e.preventDefault(),this.settings.is_disabled||(this.settings.is_disabled=!0,this.button.classList.add(this.classes.button_disabled),this.option_force.setAttribute("disabled","disabled"),this.wrapper.removeAttribute("hidden"),this.send_request_for_paths())}},{key:"send_request_for_paths",value:function(){var e=this,t=this.settings.ajax.url_paths;o()({method:"POST",url:t,data:{regenerate_force:this.option_force.checked?1:0}}).then((function(t){e.data.items=t.data,e.data.max=t.data.length,e.regenerate_next_images()})).catch((function(t){e.catch_request_error(t,!0)}))}},{key:"regenerate_next_images",value:function(){if(0===this.data.max&&this.update_progress(),!(this.data.count>=this.data.max)){var e=this.data.items[this.data.count];this.data.count++,this.send_request_for_regeneration(e)}}},{key:"send_request_for_regeneration",value:function(e){var t=this,r=this.settings.ajax.url_regenerate;o()({method:"POST",url:r,data:{regenerate_force:this.option_force.checked?1:0,paths:e}}).then((function(e){var r=e.data.is_fatal_error;t.update_errors(e.data.errors,r),r||(t.update_size(e.data.size.before,e.data.size.after),t.update_progress(),t.regenerate_next_images())})).catch((function(r){t.catch_request_error(r,!1,e),t.regenerate_next_images()}))}},{key:"update_errors",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;r<e.length;r++)this.print_error_message(e[r],t);t&&this.set_fatal_error()}},{key:"set_fatal_error",value:function(){this.progress.classList.add(this.classes.progress_error)}},{key:"catch_request_error",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&(this.print_error_message([this.settings.ajax.error_message],!0),this.set_fatal_error());var n=null!==r?'["'.concat(r.join('", "'),'"]'):"";this.print_error_message("".concat(e.response.status," - ").concat(e.response.statusText," (").concat(e.response.config.url,") ").concat(n),!0,!0)}},{key:"print_error_message",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("p");if(r){var o=document.createElement("pre");o.innerText=e,n.appendChild(o)}else n.innerHTML=e;t&&n.classList.add(this.classes.error_message),this.errors.removeAttribute("hidden"),this.errors_inner.appendChild(n)}},{key:"update_size",value:function(e,t){var r=this.data.size;r.before+=e,r.after+=t;var n=r.before-r.after;if(n<0&&(n=0),0!==n){var o=Math.round(100*(1-r.after/r.before));o<0&&(o=0);var i=-1;do{i++,n/=1024}while(n>1024);var s=n.toFixed(2),a=this.settings.units[i];this.progress_size.innerHTML="".concat(s," ").concat(a," (").concat(o,"%)")}}},{key:"update_progress",value:function(){var e=this.data.max>0?Math.floor(this.data.count/this.data.max*100):100;e>100&&(e=100),100===e&&(this.success.removeAttribute("hidden"),this.success_popup&&this.success_popup.removeAttribute("hidden")),this.progress.setAttribute(this.atts.progress,e.toString())}}])&&l(t.prototype,r),n&&l(t,n),e}();new function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new u,new f,new h,new s}},694:function(){},155:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,u=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=s(l);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},593:function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,e=[],n.O=function(t,r,o,i){if(!r){var s=1/0;for(f=0;f<e.length;f++){r=e[f][0],o=e[f][1],i=e[f][2];for(var a=!0,u=0;u<r.length;u++)(!1&i||s>=i)&&Object.keys(n.O).every((function(e){return n.O[e](r[u])}))?r.splice(u--,1):(a=!1,i<s&&(s=i));if(a){e.splice(f--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[r,o,i]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={794:0,505:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,i,s=r[0],a=r[1],u=r[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(u)var f=u(n)}for(t&&t(r);c<s.length;c++)i=s[c],n.o(e,i)&&e[i]&&e[i][0](),e[s[c]]=0;return n.O(f)},r=self.webpackChunkwebp_converter_for_media=self.webpackChunkwebp_converter_for_media||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),n.O(void 0,[505],(function(){return n(80)}));var o=n.O(void 0,[505],(function(){return n(694)}));o=n.O(o)}();
|
1 |
+
!function(){var e,t={669:function(e,t,r){e.exports=r(609)},448:function(e,t,r){"use strict";var n=r(867),o=r(26),i=r(372),s=r(327),a=r(97),u=r(109),c=r(985),f=r(61);e.exports=function(e){return new Promise((function(t,r){var l=e.data,d=e.headers,h=e.responseType;n.isFormData(l)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(m+":"+v)}var g=a(e.baseURL,e.url);function b(){if(p){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,i={data:h&&"text"!==h&&"json"!==h?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,r,i),p=null}}if(p.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(b)},p.onabort=function(){p&&(r(f("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(f("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(f(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var _=(e.withCredentials||c(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;_&&(d[e.xsrfHeaderName]=_)}"setRequestHeader"in p&&n.forEach(d,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),h&&"json"!==h&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),l||(l=null),p.send(l)}))}},609:function(e,t,r){"use strict";var n=r(867),o=r(849),i=r(321),s=r(185);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(655));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(263),u.CancelToken=r(972),u.isCancel=r(502),u.all=function(e){return Promise.all(e)},u.spread=r(713),u.isAxiosError=r(268),e.exports=u,e.exports.default=u},263:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},972:function(e,t,r){"use strict";var n=r(263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},502:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:function(e,t,r){"use strict";var n=r(867),o=r(327),i=r(782),s=r(572),a=r(185),u=r(875),c=u.validators;function f(e){this.defaults=e,this.interceptors={request:new i,response:new i}}f.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var f=[s,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(i),o=Promise.resolve(e);f.length;)o=o.then(f.shift(),f.shift());return o}for(var l=e;r.length;){var d=r.shift(),h=r.shift();try{l=d(l)}catch(e){h(e);break}}try{o=s(l)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},f.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){f.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){f.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=f},782:function(e,t,r){"use strict";var n=r(867);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},97:function(e,t,r){"use strict";var n=r(793),o=r(303);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},61:function(e,t,r){"use strict";var n=r(481);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},572:function(e,t,r){"use strict";var n=r(867),o=r(527),i=r(502),s=r(655);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},185:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,c),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var f=o.concat(i).concat(s).concat(a),l=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===f.indexOf(e)}));return n.forEach(l,c),r}},26:function(e,t,r){"use strict";var n=r(61);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},527:function(e,t,r){"use strict";var n=r(867),o=r(655);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},655:function(e,t,r){"use strict";var n=r(155),o=r(867),i=r(16),s=r(481),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,f={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(c=r(448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(u(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(t||JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],(function(e){f.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){f.headers[e]=o.merge(a)})),e.exports=f},849:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},327:function(e,t,r){"use strict";var n=r(867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},303:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},372:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},268:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},985:function(e,t,r){"use strict";var n=r(867);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},16:function(e,t,r){"use strict";var n=r(867);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:function(e,t,r){"use strict";var n=r(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},713:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},875:function(e,t,r){"use strict";var n=r(593),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=n.version.split(".");function a(e,t){for(var r=t?t.split("."):s,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);return function(s,a,u){if(!1===e)throw new Error(function(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}(a," has been removed in "+t));return o&&!i[a]&&(i[a]=!0),!e||e(s,a,u)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},867:function(e,t,r){"use strict";var n=r(849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},712:function(e,t,r){"use strict";var n=r(669),o=r.n(n);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.section=document.querySelector("[data-calculate-widget]"),this.section)return this.button=this.section.querySelector("[data-calculate-widget-button]"),this.loading=this.section.querySelector("[data-calculate-widget-loading]"),this.output=this.section.querySelector("[data-calculate-widget-output]"),this.settings={ajax:{url_calculation:this.section.getAttribute("data-calculate-widget-api")}},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_calculation.bind(this))}},{key:"init_calculation",value:function(e){e.preventDefault(),this.button.setAttribute("hidden","hidden"),this.loading.removeAttribute("hidden"),this.send_request_for_calculation()}},{key:"send_request_for_calculation",value:function(){var e=this,t=this.settings.ajax.url_calculation;o()({method:"POST",url:t}).then((function(t){e.loading.setAttribute("hidden","hidden"),e.output.innerText=t.data.value_output,e.output.removeAttribute("hidden","hidden")})).catch((function(t){e.button.removeAttribute("hidden"),e.loading.setAttribute("hidden","hidden")}))}}])&&i(t.prototype,r),n&&i(t,n),e}();function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.notice=document.querySelector('.notice[data-notice="webp-converter-for-media"]'),this.notice)return this.settings={ajax_url:this.notice.getAttribute("data-url"),ajax_action:"webpc_notice",button_close_class:".notice-dismiss",button_hide_class:"[data-permanently]"},this.events={click_on_close:this.click_on_close.bind(this)},!0}},{key:"set_events",value:function(){this.notice.addEventListener("click",this.events.click_on_close)}},{key:"click_on_close",value:function(e){var t=this.settings,r=t.button_close_class,n=t.button_hide_class;this.notice.removeEventListener("click",this.events.click_on_close),e.target.matches(r)?this.hide_notice(!1):e.target.matches(n)&&this.hide_notice(!0)}},{key:"hide_notice",value:function(e){var t=this.settings.button_close_class;this.send_request(e),e&&this.notice.querySelector(t).click()}},{key:"send_request",value:function(e){var t=this.settings.ajax_url;o()({method:"POST",url:t,data:this.get_data_for_request(e)})}},{key:"get_data_for_request",value:function(e){var t=this.settings.ajax_action,r=new FormData;return r.append("action",t),r.append("is_permanently",e?1:0),r}}])&&a(t.prototype,r),n&&a(t,n),e}();function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var t,r,n;return t=e,(r=[{key:"set_vars",value:function(){if(this.section=document.querySelector(".webpLoader"),this.section)return this.wrapper=this.section.querySelector(".webpLoader__status"),this.progress=this.wrapper.querySelector(".webpLoader__barProgress"),this.progress_size=this.section.querySelector(".webpLoader__sizeProgress"),this.errors=this.section.querySelector(".webpLoader__errors"),this.errors_inner=this.errors.querySelector(".webpLoader__errorsContent"),this.success=this.section.querySelector(".webpLoader__success"),this.success_popup=this.section.querySelector(".webpLoader__popup"),this.option_force=this.section.querySelector('input[name="regenerate_force"]'),this.button=this.section.querySelector(".webpLoader__button"),this.data={count:0,max:0,items:[],size:{before:0,after:0},errors:[]},this.settings={is_disabled:!1,ajax:{url_paths:this.section.getAttribute("data-api-paths"),url_regenerate:this.section.getAttribute("data-api-regenerate"),error_message:this.section.getAttribute("data-api-error-message")},units:["kB","MB","GB"]},this.atts={progress:"data-percent"},this.classes={progress_error:"webpLoader__barProgress--error",button_disabled:"webpLoader__button--disabled",error_message:"webpLoader__errorsContentError"},!0}},{key:"set_events",value:function(){this.button.addEventListener("click",this.init_regeneration.bind(this))}},{key:"init_regeneration",value:function(e){e.preventDefault(),this.settings.is_disabled||(this.settings.is_disabled=!0,this.button.classList.add(this.classes.button_disabled),this.option_force.setAttribute("disabled","disabled"),this.wrapper.removeAttribute("hidden"),this.send_request_for_paths())}},{key:"send_request_for_paths",value:function(){var e=this,t=this.settings.ajax.url_paths;o()({method:"POST",url:t,data:{regenerate_force:this.option_force.checked?1:0}}).then((function(t){e.data.items=t.data,e.data.max=t.data.length,e.regenerate_next_images()})).catch((function(t){e.catch_request_error(t,!0)}))}},{key:"regenerate_next_images",value:function(){if(0===this.data.max&&this.update_progress(),!(this.data.count>=this.data.max)){var e=this.data.items[this.data.count];this.data.count++,this.send_request_for_regeneration(e)}}},{key:"send_request_for_regeneration",value:function(e){var t=this,r=this.settings.ajax.url_regenerate;o()({method:"POST",url:r,data:{regenerate_force:this.option_force.checked?1:0,paths:e}}).then((function(e){var r=e.data.is_fatal_error;t.update_errors(e.data.errors,r),r||(t.update_size(e.data.size.before,e.data.size.after),t.update_progress(),t.regenerate_next_images())})).catch((function(r){t.catch_request_error(r,!1,e),t.regenerate_next_images()}))}},{key:"update_errors",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;r<e.length;r++)this.print_error_message(e[r],t);t&&this.set_fatal_error()}},{key:"set_fatal_error",value:function(){this.progress.classList.add(this.classes.progress_error)}},{key:"catch_request_error",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&(this.print_error_message([this.settings.ajax.error_message],!0),this.set_fatal_error());var n=null!==r?'["'.concat(r.join('", "'),'"]'):"";this.print_error_message("".concat(e.response.status," - ").concat(e.response.statusText," (").concat(e.response.config.url,") ").concat(n),!0,!0)}},{key:"print_error_message",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("p");if(r){var o=document.createElement("pre");o.innerText=e,n.appendChild(o)}else n.innerHTML=e;t&&n.classList.add(this.classes.error_message),this.errors.removeAttribute("hidden"),this.errors_inner.appendChild(n)}},{key:"update_size",value:function(e,t){var r=this.data.size;r.before+=e,r.after+=t;var n=r.before-r.after;if(n<0&&(n=0),0!==n){var o=Math.round(100*(1-r.after/r.before));o<0&&(o=0);var i=-1;do{i++,n/=1024}while(n>1024);var s=n.toFixed(2),a=this.settings.units[i];this.progress_size.innerHTML="".concat(s," ").concat(a," (").concat(o,"%)")}}},{key:"update_progress",value:function(){var e=this.data.max>0?Math.floor(this.data.count/this.data.max*100):100;e>100&&(e=100),100===e&&(this.success.removeAttribute("hidden"),this.success_popup&&this.success_popup.removeAttribute("hidden")),this.progress.setAttribute(this.atts.progress,e.toString())}}])&&c(t.prototype,r),n&&c(t,n),e}();new function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),new u,new f,new s}},694:function(){},155:function(e){var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,u=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&d())}function d(){if(!c){var e=s(l);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||c||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},593:function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,e=[],n.O=function(t,r,o,i){if(!r){var s=1/0;for(f=0;f<e.length;f++){r=e[f][0],o=e[f][1],i=e[f][2];for(var a=!0,u=0;u<r.length;u++)(!1&i||s>=i)&&Object.keys(n.O).every((function(e){return n.O[e](r[u])}))?r.splice(u--,1):(a=!1,i<s&&(s=i));if(a){e.splice(f--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[r,o,i]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={794:0,505:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var o,i,s=r[0],a=r[1],u=r[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(u)var f=u(n)}for(t&&t(r);c<s.length;c++)i=s[c],n.o(e,i)&&e[i]&&e[i][0](),e[s[c]]=0;return n.O(f)},r=self.webpackChunkwebp_converter_for_media=self.webpackChunkwebp_converter_for_media||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),n.O(void 0,[505],(function(){return n(712)}));var o=n.O(void 0,[505],(function(){return n(694)}));o=n.O(o)}();
|
changelog.txt
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
3 |
= 4.0.4 (2021-12-30) =
|
4 |
* `[Changed]` opcache.revalidate_freq parameter in PHP configuration to avoid problems while updating plugin
|
5 |
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 4.0.5 (2022-01-04) =
|
4 |
+
* `[Changed]` Modal when deactivating plugin
|
5 |
+
|
6 |
= 4.0.4 (2021-12-30) =
|
7 |
* `[Changed]` opcache.revalidate_freq parameter in PHP configuration to avoid problems while updating plugin
|
8 |
|
readme.txt
CHANGED
@@ -450,6 +450,9 @@ This is all very important to us and allows us to do even better things for you!
|
|
450 |
|
451 |
== Changelog ==
|
452 |
|
|
|
|
|
|
|
453 |
= 4.0.4 (2021-12-30) =
|
454 |
* `[Changed]` opcache.revalidate_freq parameter in PHP configuration to avoid problems while updating plugin
|
455 |
|
450 |
|
451 |
== Changelog ==
|
452 |
|
453 |
+
= 4.0.5 (2022-01-04) =
|
454 |
+
* `[Changed]` Modal when deactivating plugin
|
455 |
+
|
456 |
= 4.0.4 (2021-12-30) =
|
457 |
* `[Changed]` opcache.revalidate_freq parameter in PHP configuration to avoid problems while updating plugin
|
458 |
|
src/Conversion/Cron/Schedules.php
CHANGED
@@ -21,9 +21,9 @@ class Schedules implements HookableInterface {
|
|
21 |
/**
|
22 |
* Adds new cron schedule.
|
23 |
*
|
24 |
-
* @param
|
25 |
*
|
26 |
-
* @return
|
27 |
* @internal
|
28 |
*/
|
29 |
public function add_cron_interval( array $schedules ): array {
|
21 |
/**
|
22 |
* Adds new cron schedule.
|
23 |
*
|
24 |
+
* @param mixed[] $schedules Cron schedules.
|
25 |
*
|
26 |
+
* @return mixed[] Cron schedules.
|
27 |
* @internal
|
28 |
*/
|
29 |
public function add_cron_interval( array $schedules ): array {
|
src/Conversion/Endpoint/EndpointInterface.php
CHANGED
@@ -17,7 +17,7 @@ interface EndpointInterface {
|
|
17 |
/**
|
18 |
* Returns list of params for endpoint.
|
19 |
*
|
20 |
-
* @return
|
21 |
*/
|
22 |
public function get_route_args(): array;
|
23 |
|
17 |
/**
|
18 |
* Returns list of params for endpoint.
|
19 |
*
|
20 |
+
* @return mixed[] Params of endpoint.
|
21 |
*/
|
22 |
public function get_route_args(): array;
|
23 |
|
src/Conversion/Endpoint/PathsEndpoint.php
CHANGED
@@ -79,7 +79,7 @@ class PathsEndpoint extends EndpointAbstract {
|
|
79 |
*
|
80 |
* @param bool $skip_converted Skip converted images?
|
81 |
*
|
82 |
-
* @return
|
83 |
*/
|
84 |
public function get_paths( bool $skip_converted = false ): array {
|
85 |
$settings = $this->plugin_data->get_plugin_settings();
|
79 |
*
|
80 |
* @param bool $skip_converted Skip converted images?
|
81 |
*
|
82 |
+
* @return string[] Server paths of source images.
|
83 |
*/
|
84 |
public function get_paths( bool $skip_converted = false ): array {
|
85 |
$settings = $this->plugin_data->get_plugin_settings();
|
src/Conversion/Endpoint/RegenerateEndpoint.php
CHANGED
@@ -79,7 +79,7 @@ class RegenerateEndpoint extends EndpointAbstract {
|
|
79 |
* @param string[] $paths Server paths of source images.
|
80 |
* @param bool $regenerate_force .
|
81 |
*
|
82 |
-
* @return
|
83 |
*/
|
84 |
public function convert_images( array $paths, bool $regenerate_force ) {
|
85 |
$response = ( new MethodIntegrator( $this->plugin_data ) )->init_conversion( $paths, $regenerate_force );
|
79 |
* @param string[] $paths Server paths of source images.
|
80 |
* @param bool $regenerate_force .
|
81 |
*
|
82 |
+
* @return mixed[]|false Status of conversion.
|
83 |
*/
|
84 |
public function convert_images( array $paths, bool $regenerate_force ) {
|
85 |
$response = ( new MethodIntegrator( $this->plugin_data ) )->init_conversion( $paths, $regenerate_force );
|
src/Conversion/Method/RemoteMethod.php
CHANGED
@@ -217,10 +217,10 @@ class RemoteMethod extends MethodAbstract {
|
|
217 |
}
|
218 |
|
219 |
/**
|
220 |
-
* @param
|
221 |
* @param mixed[] $plugin_settings .
|
222 |
*
|
223 |
-
* @return
|
224 |
*
|
225 |
* @throws Exception\RemoteErrorResponseException
|
226 |
*/
|
217 |
}
|
218 |
|
219 |
/**
|
220 |
+
* @param mixed[] $source_paths .
|
221 |
* @param mixed[] $plugin_settings .
|
222 |
*
|
223 |
+
* @return mixed[]
|
224 |
*
|
225 |
* @throws Exception\RemoteErrorResponseException
|
226 |
*/
|
src/Plugin/Deactivation/Modal.php
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WebpConverter\Plugin\Deactivation;
|
4 |
-
|
5 |
-
use WebpConverter\HookableInterface;
|
6 |
-
use WebpConverter\PluginData;
|
7 |
-
use WebpConverter\PluginInfo;
|
8 |
-
use WebpConverter\Service\ViewLoader;
|
9 |
-
use WebpConverter\Settings\AdminAssets;
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Displays modal with poll in list of plugins when you try to deactivate plugin.
|
13 |
-
*/
|
14 |
-
class Modal implements HookableInterface {
|
15 |
-
|
16 |
-
const FEEDBACK_API_URL = 'https://feedback.gbiorczyk.pl/';
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @var PluginInfo
|
20 |
-
*/
|
21 |
-
private $plugin_info;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @var PluginData
|
25 |
-
*/
|
26 |
-
private $plugin_data;
|
27 |
-
|
28 |
-
public function __construct( PluginInfo $plugin_info, PluginData $plugin_data ) {
|
29 |
-
$this->plugin_info = $plugin_info;
|
30 |
-
$this->plugin_data = $plugin_data;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* {@inheritdoc}
|
35 |
-
*/
|
36 |
-
public function init_hooks() {
|
37 |
-
if ( basename( ( $_SERVER['SCRIPT_FILENAME'] ?? '' ), '.php' ) !== 'plugins' ) { // phpcs:ignore
|
38 |
-
return;
|
39 |
-
}
|
40 |
-
|
41 |
-
( new AdminAssets( $this->plugin_info ) )->init_hooks();
|
42 |
-
add_action( 'admin_footer', [ $this, 'load_deactivation_modal' ] );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Loads modal with poll when plugin is deactivated.
|
47 |
-
*
|
48 |
-
* @return void
|
49 |
-
*/
|
50 |
-
public function load_deactivation_modal() {
|
51 |
-
( new ViewLoader( $this->plugin_info ) )->load_view(
|
52 |
-
'views/deactivation-modal.php',
|
53 |
-
[
|
54 |
-
'errors' => apply_filters( 'webpc_server_errors', [] ),
|
55 |
-
'reasons' => $this->get_reasons(),
|
56 |
-
'settings' => $this->plugin_data->get_plugin_settings(),
|
57 |
-
'api_url' => self::FEEDBACK_API_URL,
|
58 |
-
'plugin_version' => $this->plugin_info->get_plugin_version(),
|
59 |
-
]
|
60 |
-
);
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Returns list of reasons for plugin deactivation.
|
65 |
-
*
|
66 |
-
* @return array[] Reasons for plugin deactivation.
|
67 |
-
*/
|
68 |
-
private function get_reasons(): array {
|
69 |
-
return [
|
70 |
-
[
|
71 |
-
'key' => 'server_config',
|
72 |
-
'label' => __( 'I have "Server configuration error" in plugin settings', 'webp-converter-for-media' ),
|
73 |
-
'placeholder' => esc_attr( __( 'What is your error? Have you been looking for solution to this issue?', 'webp-converter-for-media' ) ),
|
74 |
-
],
|
75 |
-
[
|
76 |
-
'key' => 'website_broken',
|
77 |
-
'label' => __( 'This plugin broke my website', 'webp-converter-for-media' ),
|
78 |
-
'placeholder' => esc_attr( __( 'What exactly happened?', 'webp-converter-for-media' ) ),
|
79 |
-
],
|
80 |
-
[
|
81 |
-
'key' => 'better_plugin',
|
82 |
-
'label' => __( 'I found a better plugin', 'webp-converter-for-media' ),
|
83 |
-
'placeholder' => esc_attr( __( 'What is name of this plugin? Why is it better?', 'webp-converter-for-media' ) ),
|
84 |
-
],
|
85 |
-
[
|
86 |
-
'key' => 'misunderstanding',
|
87 |
-
'label' => __( 'I do not understand how the plugin works', 'webp-converter-for-media' ),
|
88 |
-
'placeholder' => esc_attr( __( 'What is non-understandable to you? Did you search for this in plugin FAQ?', 'webp-converter-for-media' ) ),
|
89 |
-
],
|
90 |
-
[
|
91 |
-
'key' => 'temporary_deactivation',
|
92 |
-
'label' => __( 'This is a temporary deactivation', 'webp-converter-for-media' ),
|
93 |
-
'placeholder' => '',
|
94 |
-
],
|
95 |
-
[
|
96 |
-
'key' => 'other',
|
97 |
-
'label' => __( 'Other reason', 'webp-converter-for-media' ),
|
98 |
-
'placeholder' => esc_attr( __( 'What is reason? What can we improve for you?', 'webp-converter-for-media' ) ),
|
99 |
-
],
|
100 |
-
];
|
101 |
-
}
|
102 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/PluginInfo.php
CHANGED
@@ -56,6 +56,10 @@ class PluginInfo {
|
|
56 |
return $this->plugin_basename;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
59 |
public function get_plugin_directory_path(): string {
|
60 |
return $this->plugin_directory_path;
|
61 |
}
|
56 |
return $this->plugin_basename;
|
57 |
}
|
58 |
|
59 |
+
public function get_plugin_slug(): string {
|
60 |
+
return dirname( $this->plugin_basename );
|
61 |
+
}
|
62 |
+
|
63 |
public function get_plugin_directory_path(): string {
|
64 |
return $this->plugin_directory_path;
|
65 |
}
|
src/Service/DeactivationModalGenerator.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverter\Service;
|
4 |
+
|
5 |
+
use WebpConverter\Error\Notice\LibsNotInstalledNotice;
|
6 |
+
use WebpConverter\Error\Notice\LibsWithoutWebpSupportNotice;
|
7 |
+
use WebpConverter\PluginData;
|
8 |
+
use WebpConverter\PluginInfo;
|
9 |
+
use WebpConverter\Settings\Page\PageIntegration;
|
10 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Initiates the popup displayed when the plugin is deactivated.
|
14 |
+
*/
|
15 |
+
class DeactivationModalGenerator {
|
16 |
+
|
17 |
+
const API_URL = 'https://data.mattplugins.com/deactivations/%s';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var PluginInfo
|
21 |
+
*/
|
22 |
+
private $plugin_info;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var PluginData
|
26 |
+
*/
|
27 |
+
protected $plugin_data;
|
28 |
+
|
29 |
+
public function __construct( PluginInfo $plugin_info, PluginData $plugin_data ) {
|
30 |
+
$this->plugin_info = $plugin_info;
|
31 |
+
$this->plugin_data = $plugin_data;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @return void
|
36 |
+
* @throws DeactivationModal\Exception\DuplicatedFormOptionKeyException
|
37 |
+
* @throws DeactivationModal\Exception\DuplicatedFormValueKeyException
|
38 |
+
*/
|
39 |
+
public function load_modal() {
|
40 |
+
new DeactivationModal\Modal(
|
41 |
+
$this->plugin_info->get_plugin_slug(),
|
42 |
+
new DeactivationModal\Model\FormTemplate(
|
43 |
+
sprintf( self::API_URL, $this->plugin_info->get_plugin_slug() ),
|
44 |
+
__( 'We are sorry that you are leaving our plugin WebP Converter for Media', 'webp-converter-for-media' ),
|
45 |
+
__( 'Can you please take a moment to tell us why you are deactivating this plugin (anonymous answer)?', 'webp-converter-for-media' ),
|
46 |
+
__( 'Submit and Deactivate', 'webp-converter-for-media' ),
|
47 |
+
__( 'Skip and Deactivate', 'webp-converter-for-media' )
|
48 |
+
),
|
49 |
+
( new DeactivationModal\Model\FormOptions() )
|
50 |
+
->set_option(
|
51 |
+
new DeactivationModal\Model\FormOption(
|
52 |
+
'server_config',
|
53 |
+
10,
|
54 |
+
__( 'I have "Server configuration error" in plugin settings', 'webp-converter-for-media' ),
|
55 |
+
function () {
|
56 |
+
$errors = apply_filters( 'webpc_server_errors', [] );
|
57 |
+
if ( ! in_array( $errors, [ [ LibsWithoutWebpSupportNotice::ERROR_KEY ], [ LibsNotInstalledNotice::ERROR_KEY ] ] ) ) {
|
58 |
+
return null;
|
59 |
+
}
|
60 |
+
|
61 |
+
return sprintf(
|
62 |
+
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
63 |
+
__( 'If your server does not meet the technical requirements, you can use "Remote server" as "Conversion method", in %1$sthe plugin settings%2$s.', 'webp-converter-for-media' ),
|
64 |
+
'<a href="' . PageIntegration::get_settings_page_url() . '">',
|
65 |
+
'</a>'
|
66 |
+
);
|
67 |
+
},
|
68 |
+
__( 'What is your error? Have you been looking for solution to this issue?', 'webp-converter-for-media' )
|
69 |
+
)
|
70 |
+
)
|
71 |
+
->set_option(
|
72 |
+
new DeactivationModal\Model\FormOption(
|
73 |
+
'misunderstanding',
|
74 |
+
20,
|
75 |
+
__( 'Images are not displayed in WebP format', 'webp-converter-for-media' ),
|
76 |
+
function () {
|
77 |
+
return sprintf(
|
78 |
+
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
79 |
+
__( 'Check out %1$sour instructions%2$s and see how to check if the plugin is working properly.', 'webp-converter-for-media' ),
|
80 |
+
'<a href="https://wordpress.org/support/topic/how-can-i-check-if-the-plugin-is-working-properly/" target="_blank">',
|
81 |
+
'</a>'
|
82 |
+
);
|
83 |
+
},
|
84 |
+
__( 'Did you check the operation of the plugin in accordance with the instructions?', 'webp-converter-for-media' )
|
85 |
+
)
|
86 |
+
)
|
87 |
+
->set_option(
|
88 |
+
new DeactivationModal\Model\FormOption(
|
89 |
+
'website_broken',
|
90 |
+
30,
|
91 |
+
__( 'This plugin broke my website', 'webp-converter-for-media' ),
|
92 |
+
null,
|
93 |
+
__( 'What exactly happened?', 'webp-converter-for-media' )
|
94 |
+
)
|
95 |
+
)
|
96 |
+
->set_option(
|
97 |
+
new DeactivationModal\Model\FormOption(
|
98 |
+
'better_plugin',
|
99 |
+
40,
|
100 |
+
__( 'I found a better plugin', 'webp-converter-for-media' ),
|
101 |
+
null,
|
102 |
+
__( 'What is name of this plugin? Why is it better?', 'webp-converter-for-media' )
|
103 |
+
)
|
104 |
+
)
|
105 |
+
->set_option(
|
106 |
+
new DeactivationModal\Model\FormOption(
|
107 |
+
'temporary_deactivation',
|
108 |
+
50,
|
109 |
+
__( 'This is a temporary deactivation', 'webp-converter-for-media' ),
|
110 |
+
null,
|
111 |
+
null
|
112 |
+
)
|
113 |
+
)
|
114 |
+
->set_option(
|
115 |
+
new DeactivationModal\Model\FormOption(
|
116 |
+
'other',
|
117 |
+
60,
|
118 |
+
__( 'Other reason', 'webp-converter-for-media' ),
|
119 |
+
null,
|
120 |
+
__( 'What is reason? What can we improve for you?', 'webp-converter-for-media' )
|
121 |
+
)
|
122 |
+
),
|
123 |
+
( new DeactivationModal\Model\FormValues() )
|
124 |
+
->set_value(
|
125 |
+
new DeactivationModal\Model\FormValue(
|
126 |
+
'request_error_codes',
|
127 |
+
function () {
|
128 |
+
return implode( ',', apply_filters( 'webpc_server_errors', [] ) );
|
129 |
+
}
|
130 |
+
)
|
131 |
+
)
|
132 |
+
->set_value(
|
133 |
+
new DeactivationModal\Model\FormValue(
|
134 |
+
'request_plugin_settings',
|
135 |
+
function () {
|
136 |
+
$settings_json = json_encode( $this->plugin_data->get_plugin_settings() );
|
137 |
+
return base64_encode( $settings_json ?: '' ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions
|
138 |
+
}
|
139 |
+
)
|
140 |
+
)
|
141 |
+
->set_value(
|
142 |
+
new DeactivationModal\Model\FormValue(
|
143 |
+
'request_plugin_version',
|
144 |
+
function () {
|
145 |
+
return $this->plugin_info->get_plugin_version();
|
146 |
+
}
|
147 |
+
)
|
148 |
+
)
|
149 |
+
);
|
150 |
+
}
|
151 |
+
}
|
src/Settings/PluginOptions.php
CHANGED
@@ -24,9 +24,9 @@ class PluginOptions {
|
|
24 |
* Returns options of plugin settings.
|
25 |
*
|
26 |
* @param bool $is_debug Is debugging?
|
27 |
-
* @param
|
28 |
*
|
29 |
-
* @return
|
30 |
*/
|
31 |
public function get_options( bool $is_debug = false, array $posted_settings = null ): array {
|
32 |
$is_save = ( $posted_settings !== null );
|
@@ -43,9 +43,9 @@ class PluginOptions {
|
|
43 |
* Returns values of plugin settings.
|
44 |
*
|
45 |
* @param bool $is_debug Is debugging?
|
46 |
-
* @param
|
47 |
*
|
48 |
-
* @return
|
49 |
*/
|
50 |
public function get_values( bool $is_debug = false, array $posted_settings = null ): array {
|
51 |
$values = [];
|
24 |
* Returns options of plugin settings.
|
25 |
*
|
26 |
* @param bool $is_debug Is debugging?
|
27 |
+
* @param mixed[]|null $posted_settings Settings submitted in form.
|
28 |
*
|
29 |
+
* @return mixed[] Options of plugin settings.
|
30 |
*/
|
31 |
public function get_options( bool $is_debug = false, array $posted_settings = null ): array {
|
32 |
$is_save = ( $posted_settings !== null );
|
43 |
* Returns values of plugin settings.
|
44 |
*
|
45 |
* @param bool $is_debug Is debugging?
|
46 |
+
* @param mixed[]|null $posted_settings Settings submitted in form.
|
47 |
*
|
48 |
+
* @return mixed[] Values of plugin settings.
|
49 |
*/
|
50 |
public function get_values( bool $is_debug = false, array $posted_settings = null ): array {
|
51 |
$values = [];
|
src/WebpConverter.php
CHANGED
@@ -11,6 +11,7 @@ use WebpConverter\Error\ErrorDetectorAggregator;
|
|
11 |
use WebpConverter\Notice;
|
12 |
use WebpConverter\Plugin;
|
13 |
use WebpConverter\Repository\TokenRepository;
|
|
|
14 |
use WebpConverter\Settings\Page;
|
15 |
|
16 |
/**
|
@@ -44,7 +45,6 @@ class WebpConverter {
|
|
44 |
( new Media\Upload( $plugin_data ) )->init_hooks();
|
45 |
( new Plugin\Activation( $plugin_info ) )->init_hooks();
|
46 |
( new Plugin\Deactivation( $plugin_info ) )->init_hooks();
|
47 |
-
( new Plugin\Deactivation\Modal( $plugin_info, $plugin_data ) )->init_hooks();
|
48 |
( new Plugin\Links( $plugin_info ) )->init_hooks();
|
49 |
( new Plugin\Uninstall( $plugin_info ) )->init_hooks();
|
50 |
( new Plugin\Update( $plugin_info ) )->init_hooks();
|
@@ -52,5 +52,6 @@ class WebpConverter {
|
|
52 |
->set_page_integration( new Page\SettingsPage( $plugin_info, $plugin_data, $token_repository ) )
|
53 |
->set_page_integration( new Page\DebugPage( $plugin_info, $plugin_data ) )
|
54 |
->init_hooks();
|
|
|
55 |
}
|
56 |
}
|
11 |
use WebpConverter\Notice;
|
12 |
use WebpConverter\Plugin;
|
13 |
use WebpConverter\Repository\TokenRepository;
|
14 |
+
use WebpConverter\Service;
|
15 |
use WebpConverter\Settings\Page;
|
16 |
|
17 |
/**
|
45 |
( new Media\Upload( $plugin_data ) )->init_hooks();
|
46 |
( new Plugin\Activation( $plugin_info ) )->init_hooks();
|
47 |
( new Plugin\Deactivation( $plugin_info ) )->init_hooks();
|
|
|
48 |
( new Plugin\Links( $plugin_info ) )->init_hooks();
|
49 |
( new Plugin\Uninstall( $plugin_info ) )->init_hooks();
|
50 |
( new Plugin\Update( $plugin_info ) )->init_hooks();
|
52 |
->set_page_integration( new Page\SettingsPage( $plugin_info, $plugin_data, $token_repository ) )
|
53 |
->set_page_integration( new Page\DebugPage( $plugin_info, $plugin_data ) )
|
54 |
->init_hooks();
|
55 |
+
( new Service\DeactivationModalGenerator( $plugin_info, $plugin_data ) )->load_modal();
|
56 |
}
|
57 |
}
|
templates/views/deactivation-modal.php
DELETED
@@ -1,62 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Modal with poll displayed in list of plugins.
|
4 |
-
*
|
5 |
-
* @var string[] $errors List of errors detected by plugin.
|
6 |
-
* @var mixed[] $reasons Reasons for plugin deactivation.
|
7 |
-
* @var mixed[] $settings Plugin settings.
|
8 |
-
* @var string $api_url URL of API for feedback request.
|
9 |
-
* @var string $plugin_version .
|
10 |
-
* @package WebP Converter for Media
|
11 |
-
*/
|
12 |
-
|
13 |
-
?>
|
14 |
-
<div class="webpModal" hidden>
|
15 |
-
<div class="webpModal__outer">
|
16 |
-
<form action="<?php echo esc_url( $api_url ); ?>" method="POST" class="webpModal__form">
|
17 |
-
<h2 class="webpModal__headline">
|
18 |
-
<?php echo esc_html( __( 'We are sorry that you are leaving our plugin WebP Converter for Media', 'webp-converter-for-media' ) ); ?>
|
19 |
-
</h2>
|
20 |
-
<div class="webpModal__desc">
|
21 |
-
<?php echo esc_html( __( 'Can you please take a moment to tell us why you are deactivating this plugin (your answer is completely anonymous)?', 'webp-converter-for-media' ) ); ?>
|
22 |
-
</div>
|
23 |
-
<div class="webpModal__options">
|
24 |
-
<?php foreach ( $reasons as $index => $reason ) : ?>
|
25 |
-
<div class="webpField">
|
26 |
-
<input type="radio"
|
27 |
-
name="webpc_reason"
|
28 |
-
value="<?php echo esc_attr( $reason['key'] ); ?>"
|
29 |
-
id="webpc-option-<?php echo esc_attr( $index ); ?>"
|
30 |
-
class="webpField__input webpField__input--radio"
|
31 |
-
data-placeholder="<?php echo esc_attr( $reason['placeholder'] ); ?>"
|
32 |
-
>
|
33 |
-
<label for="webpc-option-<?php echo esc_attr( $index ); ?>"></label>
|
34 |
-
<span class="webpField__label"><?php echo esc_html( $reason['label'] ); ?></span>
|
35 |
-
</div>
|
36 |
-
<?php endforeach; ?>
|
37 |
-
</div>
|
38 |
-
<textarea class="webpModal__textarea" name="webpc_comment" rows="2"></textarea>
|
39 |
-
<ul class="webpModal__buttons">
|
40 |
-
<li class="webpModal__button">
|
41 |
-
<button type="submit" class="webpModal__buttonInner webpButton webpButton--green">
|
42 |
-
<?php echo esc_html( __( 'Submit and Deactivate', 'webp-converter-for-media' ) ); ?>
|
43 |
-
</button>
|
44 |
-
</li>
|
45 |
-
<li class="webpModal__button">
|
46 |
-
<button type="button" class="webpModal__buttonInner webpButton webpButton--blue">
|
47 |
-
<?php echo esc_html( __( 'Skip and Deactivate', 'webp-converter-for-media' ) ); ?>
|
48 |
-
</button>
|
49 |
-
</li>
|
50 |
-
</ul>
|
51 |
-
<input type="hidden" name="webpc_error_codes"
|
52 |
-
value="<?php echo esc_attr( implode( ',', $errors ) ); ?>"
|
53 |
-
>
|
54 |
-
<input type="hidden" name="webpc_plugin_settings"
|
55 |
-
value='<?php echo json_encode( $settings ); ?>'
|
56 |
-
>
|
57 |
-
<input type="hidden" name="webpc_plugin_version"
|
58 |
-
value="<?php echo esc_attr( $plugin_version ); ?>"
|
59 |
-
>
|
60 |
-
</form>
|
61 |
-
</div>
|
62 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit06bd0f8602a789a0b580aa412578d7f3::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -37,26 +37,80 @@ namespace Composer\Autoload;
|
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
-
* @see
|
41 |
-
* @see
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
|
|
|
|
|
|
45 |
// PSR-4
|
|
|
|
|
|
|
|
|
46 |
private $prefixLengthsPsr4 = array();
|
|
|
|
|
|
|
|
|
47 |
private $prefixDirsPsr4 = array();
|
|
|
|
|
|
|
|
|
48 |
private $fallbackDirsPsr4 = array();
|
49 |
|
50 |
// PSR-0
|
|
|
|
|
|
|
|
|
51 |
private $prefixesPsr0 = array();
|
|
|
|
|
|
|
|
|
52 |
private $fallbackDirsPsr0 = array();
|
53 |
|
|
|
54 |
private $useIncludePath = false;
|
|
|
|
|
|
|
|
|
|
|
55 |
private $classMap = array();
|
|
|
|
|
56 |
private $classMapAuthoritative = false;
|
|
|
|
|
|
|
|
|
|
|
57 |
private $missingClasses = array();
|
|
|
|
|
58 |
private $apcuPrefix;
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
@@ -66,28 +120,47 @@ class ClassLoader
|
|
66 |
return array();
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
69 |
public function getPrefixesPsr4()
|
70 |
{
|
71 |
return $this->prefixDirsPsr4;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
74 |
public function getFallbackDirs()
|
75 |
{
|
76 |
return $this->fallbackDirsPsr0;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
79 |
public function getFallbackDirsPsr4()
|
80 |
{
|
81 |
return $this->fallbackDirsPsr4;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
84 |
public function getClassMap()
|
85 |
{
|
86 |
return $this->classMap;
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
* @param
|
|
|
|
|
|
|
91 |
*/
|
92 |
public function addClassMap(array $classMap)
|
93 |
{
|
@@ -102,9 +175,11 @@ class ClassLoader
|
|
102 |
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
* appending or prepending to the ones previously set for this prefix.
|
104 |
*
|
105 |
-
* @param string
|
106 |
-
* @param
|
107 |
-
* @param bool
|
|
|
|
|
108 |
*/
|
109 |
public function add($prefix, $paths, $prepend = false)
|
110 |
{
|
@@ -147,11 +222,13 @@ class ClassLoader
|
|
147 |
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
* appending or prepending to the ones previously set for this namespace.
|
149 |
*
|
150 |
-
* @param string
|
151 |
-
* @param
|
152 |
-
* @param bool
|
153 |
*
|
154 |
* @throws \InvalidArgumentException
|
|
|
|
|
155 |
*/
|
156 |
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
{
|
@@ -195,8 +272,10 @@ class ClassLoader
|
|
195 |
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
* replacing any others previously set for this prefix.
|
197 |
*
|
198 |
-
* @param string
|
199 |
-
* @param
|
|
|
|
|
200 |
*/
|
201 |
public function set($prefix, $paths)
|
202 |
{
|
@@ -211,10 +290,12 @@ class ClassLoader
|
|
211 |
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
* replacing any others previously set for this namespace.
|
213 |
*
|
214 |
-
* @param string
|
215 |
-
* @param
|
216 |
*
|
217 |
* @throws \InvalidArgumentException
|
|
|
|
|
218 |
*/
|
219 |
public function setPsr4($prefix, $paths)
|
220 |
{
|
@@ -234,6 +315,8 @@ class ClassLoader
|
|
234 |
* Turns on searching the include path for class files.
|
235 |
*
|
236 |
* @param bool $useIncludePath
|
|
|
|
|
237 |
*/
|
238 |
public function setUseIncludePath($useIncludePath)
|
239 |
{
|
@@ -256,6 +339,8 @@ class ClassLoader
|
|
256 |
* that have not been registered with the class map.
|
257 |
*
|
258 |
* @param bool $classMapAuthoritative
|
|
|
|
|
259 |
*/
|
260 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
{
|
@@ -276,6 +361,8 @@ class ClassLoader
|
|
276 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
*
|
278 |
* @param string|null $apcuPrefix
|
|
|
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
@@ -296,25 +383,44 @@ class ClassLoader
|
|
296 |
* Registers this instance as an autoloader.
|
297 |
*
|
298 |
* @param bool $prepend Whether to prepend the autoloader or not
|
|
|
|
|
299 |
*/
|
300 |
public function register($prepend = false)
|
301 |
{
|
302 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
|
305 |
/**
|
306 |
* Unregisters this instance as an autoloader.
|
|
|
|
|
307 |
*/
|
308 |
public function unregister()
|
309 |
{
|
310 |
spl_autoload_unregister(array($this, 'loadClass'));
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
* Loads the given class or interface.
|
315 |
*
|
316 |
* @param string $class The name of the class
|
317 |
-
* @return
|
318 |
*/
|
319 |
public function loadClass($class)
|
320 |
{
|
@@ -323,6 +429,8 @@ class ClassLoader
|
|
323 |
|
324 |
return true;
|
325 |
}
|
|
|
|
|
326 |
}
|
327 |
|
328 |
/**
|
@@ -367,6 +475,21 @@ class ClassLoader
|
|
367 |
return $file;
|
368 |
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
private function findFileWithExtension($class, $ext)
|
371 |
{
|
372 |
// PSR-4 lookup
|
@@ -438,6 +561,10 @@ class ClassLoader
|
|
438 |
* Scope isolated include.
|
439 |
*
|
440 |
* Prevents access to $this/self from included files.
|
|
|
|
|
|
|
|
|
441 |
*/
|
442 |
function includeFile($file)
|
443 |
{
|
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)) {
|
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 |
{
|
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 |
{
|
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 |
{
|
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 |
{
|
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 |
{
|
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 |
{
|
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 |
{
|
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 |
{
|
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 |
{
|
429 |
|
430 |
return true;
|
431 |
}
|
432 |
+
|
433 |
+
return null;
|
434 |
}
|
435 |
|
436 |
/**
|
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
|
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 |
{
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -20,12 +20,25 @@ use Composer\Semver\VersionParser;
|
|
20 |
*
|
21 |
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22 |
*
|
23 |
-
* To require
|
24 |
*/
|
25 |
class InstalledVersions
|
26 |
{
|
|
|
|
|
|
|
|
|
27 |
private static $installed;
|
|
|
|
|
|
|
|
|
28 |
private static $canGetVendors;
|
|
|
|
|
|
|
|
|
|
|
29 |
private static $installedByVendor = array();
|
30 |
|
31 |
/**
|
@@ -228,7 +241,7 @@ class InstalledVersions
|
|
228 |
|
229 |
/**
|
230 |
* @return array
|
231 |
-
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
|
232 |
*/
|
233 |
public static function getRootPackage()
|
234 |
{
|
@@ -242,7 +255,7 @@ class InstalledVersions
|
|
242 |
*
|
243 |
* @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.
|
244 |
* @return array[]
|
245 |
-
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}
|
246 |
*/
|
247 |
public static function getRawData()
|
248 |
{
|
@@ -265,7 +278,7 @@ class InstalledVersions
|
|
265 |
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
266 |
*
|
267 |
* @return array[]
|
268 |
-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
|
269 |
*/
|
270 |
public static function getAllRawData()
|
271 |
{
|
@@ -288,7 +301,7 @@ class InstalledVersions
|
|
288 |
* @param array[] $data A vendor/composer/installed.php data set
|
289 |
* @return void
|
290 |
*
|
291 |
-
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data
|
292 |
*/
|
293 |
public static function reload($data)
|
294 |
{
|
@@ -298,7 +311,7 @@ class InstalledVersions
|
|
298 |
|
299 |
/**
|
300 |
* @return array[]
|
301 |
-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
|
302 |
*/
|
303 |
private static function getInstalled()
|
304 |
{
|
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 |
class InstalledVersions
|
26 |
{
|
27 |
+
/**
|
28 |
+
* @var mixed[]|null
|
29 |
+
* @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
|
30 |
+
*/
|
31 |
private static $installed;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @var bool|null
|
35 |
+
*/
|
36 |
private static $canGetVendors;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @var array[]
|
40 |
+
* @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}>}>
|
41 |
+
*/
|
42 |
private static $installedByVendor = array();
|
43 |
|
44 |
/**
|
241 |
|
242 |
/**
|
243 |
* @return array
|
244 |
+
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
245 |
*/
|
246 |
public static function getRootPackage()
|
247 |
{
|
255 |
*
|
256 |
* @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.
|
257 |
* @return array[]
|
258 |
+
* @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}>}
|
259 |
*/
|
260 |
public static function getRawData()
|
261 |
{
|
278 |
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
279 |
*
|
280 |
* @return array[]
|
281 |
+
* @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}>}>
|
282 |
*/
|
283 |
public static function getAllRawData()
|
284 |
{
|
301 |
* @param array[] $data A vendor/composer/installed.php data set
|
302 |
* @return void
|
303 |
*
|
304 |
+
* @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
|
305 |
*/
|
306 |
public static function reload($data)
|
307 |
{
|
311 |
|
312 |
/**
|
313 |
* @return array[]
|
314 |
+
* @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}>}>
|
315 |
*/
|
316 |
private static function getInstalled()
|
317 |
{
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -6,6 +6,20 @@ $vendorDir = dirname(dirname(__FILE__));
|
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
'WebpConverter\\Action\\ConvertAttachment' => $baseDir . '/src/Action/ConvertAttachment.php',
|
10 |
'WebpConverter\\Action\\ConvertDir' => $baseDir . '/src/Action/ConvertDir.php',
|
11 |
'WebpConverter\\Action\\ConvertPaths' => $baseDir . '/src/Action/ConvertPaths.php',
|
@@ -121,7 +135,6 @@ return array(
|
|
121 |
'WebpConverter\\Plugin\\Activation\\WebpDirectory' => $baseDir . '/src/Plugin/Activation/WebpDirectory.php',
|
122 |
'WebpConverter\\Plugin\\Deactivation' => $baseDir . '/src/Plugin/Deactivation.php',
|
123 |
'WebpConverter\\Plugin\\Deactivation\\CronReset' => $baseDir . '/src/Plugin/Deactivation/CronReset.php',
|
124 |
-
'WebpConverter\\Plugin\\Deactivation\\Modal' => $baseDir . '/src/Plugin/Deactivation/Modal.php',
|
125 |
'WebpConverter\\Plugin\\Deactivation\\RefreshLoader' => $baseDir . '/src/Plugin/Deactivation/RefreshLoader.php',
|
126 |
'WebpConverter\\Plugin\\Links' => $baseDir . '/src/Plugin/Links.php',
|
127 |
'WebpConverter\\Plugin\\Uninstall' => $baseDir . '/src/Plugin/Uninstall.php',
|
@@ -131,6 +144,7 @@ return array(
|
|
131 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => $baseDir . '/src/Plugin/Uninstall/WebpFiles.php',
|
132 |
'WebpConverter\\Plugin\\Update' => $baseDir . '/src/Plugin/Update.php',
|
133 |
'WebpConverter\\Repository\\TokenRepository' => $baseDir . '/src/Repository/TokenRepository.php',
|
|
|
134 |
'WebpConverter\\Service\\FileLoader' => $baseDir . '/src/Service/FileLoader.php',
|
135 |
'WebpConverter\\Service\\OptionsAccessManager' => $baseDir . '/src/Service/OptionsAccessManager.php',
|
136 |
'WebpConverter\\Service\\ServerConfigurator' => $baseDir . '/src/Service/ServerConfigurator.php',
|
6 |
$baseDir = dirname($vendorDir);
|
7 |
|
8 |
return array(
|
9 |
+
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
10 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Exception\\DuplicatedFormOptionKeyException' => $baseDir . '/vendor_prefixed/src/Exception/DuplicatedFormOptionKeyException.php',
|
11 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Exception\\DuplicatedFormValueKeyException' => $baseDir . '/vendor_prefixed/src/Exception/DuplicatedFormValueKeyException.php',
|
12 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Exception\\UnknownFormOptionKeyException' => $baseDir . '/vendor_prefixed/src/Exception/UnknownFormOptionKeyException.php',
|
13 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Hookable' => $baseDir . '/vendor_prefixed/src/Hookable.php',
|
14 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Modal' => $baseDir . '/vendor_prefixed/src/Modal.php',
|
15 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormOption' => $baseDir . '/vendor_prefixed/src/Model/FormOption.php',
|
16 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormOptions' => $baseDir . '/vendor_prefixed/src/Model/FormOptions.php',
|
17 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormTemplate' => $baseDir . '/vendor_prefixed/src/Model/FormTemplate.php',
|
18 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormValue' => $baseDir . '/vendor_prefixed/src/Model/FormValue.php',
|
19 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormValues' => $baseDir . '/vendor_prefixed/src/Model/FormValues.php',
|
20 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\RequestData' => $baseDir . '/vendor_prefixed/src/Model/RequestData.php',
|
21 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Service\\AssetsPrinterService' => $baseDir . '/vendor_prefixed/src/Service/AssetsPrinterService.php',
|
22 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Service\\TemplateGeneratorService' => $baseDir . '/vendor_prefixed/src/Service/TemplateGeneratorService.php',
|
23 |
'WebpConverter\\Action\\ConvertAttachment' => $baseDir . '/src/Action/ConvertAttachment.php',
|
24 |
'WebpConverter\\Action\\ConvertDir' => $baseDir . '/src/Action/ConvertDir.php',
|
25 |
'WebpConverter\\Action\\ConvertPaths' => $baseDir . '/src/Action/ConvertPaths.php',
|
135 |
'WebpConverter\\Plugin\\Activation\\WebpDirectory' => $baseDir . '/src/Plugin/Activation/WebpDirectory.php',
|
136 |
'WebpConverter\\Plugin\\Deactivation' => $baseDir . '/src/Plugin/Deactivation.php',
|
137 |
'WebpConverter\\Plugin\\Deactivation\\CronReset' => $baseDir . '/src/Plugin/Deactivation/CronReset.php',
|
|
|
138 |
'WebpConverter\\Plugin\\Deactivation\\RefreshLoader' => $baseDir . '/src/Plugin/Deactivation/RefreshLoader.php',
|
139 |
'WebpConverter\\Plugin\\Links' => $baseDir . '/src/Plugin/Links.php',
|
140 |
'WebpConverter\\Plugin\\Uninstall' => $baseDir . '/src/Plugin/Uninstall.php',
|
144 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => $baseDir . '/src/Plugin/Uninstall/WebpFiles.php',
|
145 |
'WebpConverter\\Plugin\\Update' => $baseDir . '/src/Plugin/Update.php',
|
146 |
'WebpConverter\\Repository\\TokenRepository' => $baseDir . '/src/Repository/TokenRepository.php',
|
147 |
+
'WebpConverter\\Service\\DeactivationModalGenerator' => $baseDir . '/src/Service/DeactivationModalGenerator.php',
|
148 |
'WebpConverter\\Service\\FileLoader' => $baseDir . '/src/Service/FileLoader.php',
|
149 |
'WebpConverter\\Service\\OptionsAccessManager' => $baseDir . '/src/Service/OptionsAccessManager.php',
|
150 |
'WebpConverter\\Service\\ServerConfigurator' => $baseDir . '/src/Service/ServerConfigurator.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit80287993f128e7a857f0f2db132eda4f
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
-
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit06bd0f8602a789a0b580aa412578d7f3
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit06bd0f8602a789a0b580aa412578d7f3', 'loadClassLoader'), true, true);
|
26 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit06bd0f8602a789a0b580aa412578d7f3', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
+
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit06bd0f8602a789a0b580aa412578d7f3::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
@@ -21,6 +21,20 @@ class ComposerStaticInit80287993f128e7a857f0f2db132eda4f
|
|
21 |
);
|
22 |
|
23 |
public static $classMap = array (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
'WebpConverter\\Action\\ConvertAttachment' => __DIR__ . '/../..' . '/src/Action/ConvertAttachment.php',
|
25 |
'WebpConverter\\Action\\ConvertDir' => __DIR__ . '/../..' . '/src/Action/ConvertDir.php',
|
26 |
'WebpConverter\\Action\\ConvertPaths' => __DIR__ . '/../..' . '/src/Action/ConvertPaths.php',
|
@@ -136,7 +150,6 @@ class ComposerStaticInit80287993f128e7a857f0f2db132eda4f
|
|
136 |
'WebpConverter\\Plugin\\Activation\\WebpDirectory' => __DIR__ . '/../..' . '/src/Plugin/Activation/WebpDirectory.php',
|
137 |
'WebpConverter\\Plugin\\Deactivation' => __DIR__ . '/../..' . '/src/Plugin/Deactivation.php',
|
138 |
'WebpConverter\\Plugin\\Deactivation\\CronReset' => __DIR__ . '/../..' . '/src/Plugin/Deactivation/CronReset.php',
|
139 |
-
'WebpConverter\\Plugin\\Deactivation\\Modal' => __DIR__ . '/../..' . '/src/Plugin/Deactivation/Modal.php',
|
140 |
'WebpConverter\\Plugin\\Deactivation\\RefreshLoader' => __DIR__ . '/../..' . '/src/Plugin/Deactivation/RefreshLoader.php',
|
141 |
'WebpConverter\\Plugin\\Links' => __DIR__ . '/../..' . '/src/Plugin/Links.php',
|
142 |
'WebpConverter\\Plugin\\Uninstall' => __DIR__ . '/../..' . '/src/Plugin/Uninstall.php',
|
@@ -146,6 +159,7 @@ class ComposerStaticInit80287993f128e7a857f0f2db132eda4f
|
|
146 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => __DIR__ . '/../..' . '/src/Plugin/Uninstall/WebpFiles.php',
|
147 |
'WebpConverter\\Plugin\\Update' => __DIR__ . '/../..' . '/src/Plugin/Update.php',
|
148 |
'WebpConverter\\Repository\\TokenRepository' => __DIR__ . '/../..' . '/src/Repository/TokenRepository.php',
|
|
|
149 |
'WebpConverter\\Service\\FileLoader' => __DIR__ . '/../..' . '/src/Service/FileLoader.php',
|
150 |
'WebpConverter\\Service\\OptionsAccessManager' => __DIR__ . '/../..' . '/src/Service/OptionsAccessManager.php',
|
151 |
'WebpConverter\\Service\\ServerConfigurator' => __DIR__ . '/../..' . '/src/Service/ServerConfigurator.php',
|
@@ -178,9 +192,9 @@ class ComposerStaticInit80287993f128e7a857f0f2db132eda4f
|
|
178 |
public static function getInitializer(ClassLoader $loader)
|
179 |
{
|
180 |
return \Closure::bind(function () use ($loader) {
|
181 |
-
$loader->prefixLengthsPsr4 =
|
182 |
-
$loader->prefixDirsPsr4 =
|
183 |
-
$loader->classMap =
|
184 |
|
185 |
}, null, ClassLoader::class);
|
186 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit06bd0f8602a789a0b580aa412578d7f3
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'W' =>
|
21 |
);
|
22 |
|
23 |
public static $classMap = array (
|
24 |
+
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
25 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Exception\\DuplicatedFormOptionKeyException' => __DIR__ . '/../..' . '/vendor_prefixed/src/Exception/DuplicatedFormOptionKeyException.php',
|
26 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Exception\\DuplicatedFormValueKeyException' => __DIR__ . '/../..' . '/vendor_prefixed/src/Exception/DuplicatedFormValueKeyException.php',
|
27 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Exception\\UnknownFormOptionKeyException' => __DIR__ . '/../..' . '/vendor_prefixed/src/Exception/UnknownFormOptionKeyException.php',
|
28 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Hookable' => __DIR__ . '/../..' . '/vendor_prefixed/src/Hookable.php',
|
29 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Modal' => __DIR__ . '/../..' . '/vendor_prefixed/src/Modal.php',
|
30 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormOption' => __DIR__ . '/../..' . '/vendor_prefixed/src/Model/FormOption.php',
|
31 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormOptions' => __DIR__ . '/../..' . '/vendor_prefixed/src/Model/FormOptions.php',
|
32 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormTemplate' => __DIR__ . '/../..' . '/vendor_prefixed/src/Model/FormTemplate.php',
|
33 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormValue' => __DIR__ . '/../..' . '/vendor_prefixed/src/Model/FormValue.php',
|
34 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\FormValues' => __DIR__ . '/../..' . '/vendor_prefixed/src/Model/FormValues.php',
|
35 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Model\\RequestData' => __DIR__ . '/../..' . '/vendor_prefixed/src/Model/RequestData.php',
|
36 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Service\\AssetsPrinterService' => __DIR__ . '/../..' . '/vendor_prefixed/src/Service/AssetsPrinterService.php',
|
37 |
+
'WebpConverterVendor\\MattPlugins\\DeactivationModal\\Service\\TemplateGeneratorService' => __DIR__ . '/../..' . '/vendor_prefixed/src/Service/TemplateGeneratorService.php',
|
38 |
'WebpConverter\\Action\\ConvertAttachment' => __DIR__ . '/../..' . '/src/Action/ConvertAttachment.php',
|
39 |
'WebpConverter\\Action\\ConvertDir' => __DIR__ . '/../..' . '/src/Action/ConvertDir.php',
|
40 |
'WebpConverter\\Action\\ConvertPaths' => __DIR__ . '/../..' . '/src/Action/ConvertPaths.php',
|
150 |
'WebpConverter\\Plugin\\Activation\\WebpDirectory' => __DIR__ . '/../..' . '/src/Plugin/Activation/WebpDirectory.php',
|
151 |
'WebpConverter\\Plugin\\Deactivation' => __DIR__ . '/../..' . '/src/Plugin/Deactivation.php',
|
152 |
'WebpConverter\\Plugin\\Deactivation\\CronReset' => __DIR__ . '/../..' . '/src/Plugin/Deactivation/CronReset.php',
|
|
|
153 |
'WebpConverter\\Plugin\\Deactivation\\RefreshLoader' => __DIR__ . '/../..' . '/src/Plugin/Deactivation/RefreshLoader.php',
|
154 |
'WebpConverter\\Plugin\\Links' => __DIR__ . '/../..' . '/src/Plugin/Links.php',
|
155 |
'WebpConverter\\Plugin\\Uninstall' => __DIR__ . '/../..' . '/src/Plugin/Uninstall.php',
|
159 |
'WebpConverter\\Plugin\\Uninstall\\WebpFiles' => __DIR__ . '/../..' . '/src/Plugin/Uninstall/WebpFiles.php',
|
160 |
'WebpConverter\\Plugin\\Update' => __DIR__ . '/../..' . '/src/Plugin/Update.php',
|
161 |
'WebpConverter\\Repository\\TokenRepository' => __DIR__ . '/../..' . '/src/Repository/TokenRepository.php',
|
162 |
+
'WebpConverter\\Service\\DeactivationModalGenerator' => __DIR__ . '/../..' . '/src/Service/DeactivationModalGenerator.php',
|
163 |
'WebpConverter\\Service\\FileLoader' => __DIR__ . '/../..' . '/src/Service/FileLoader.php',
|
164 |
'WebpConverter\\Service\\OptionsAccessManager' => __DIR__ . '/../..' . '/src/Service/OptionsAccessManager.php',
|
165 |
'WebpConverter\\Service\\ServerConfigurator' => __DIR__ . '/../..' . '/src/Service/ServerConfigurator.php',
|
192 |
public static function getInitializer(ClassLoader $loader)
|
193 |
{
|
194 |
return \Closure::bind(function () use ($loader) {
|
195 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit06bd0f8602a789a0b580aa412578d7f3::$prefixLengthsPsr4;
|
196 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit06bd0f8602a789a0b580aa412578d7f3::$prefixDirsPsr4;
|
197 |
+
$loader->classMap = ComposerStaticInit06bd0f8602a789a0b580aa412578d7f3::$classMap;
|
198 |
|
199 |
}, null, ClassLoader::class);
|
200 |
}
|
vendor/composer/installed.json
CHANGED
@@ -1 +1,76 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"packages": [
|
3 |
+
{
|
4 |
+
"name": "matt-plugins/deactivation-modal",
|
5 |
+
"version": "1.0.0",
|
6 |
+
"version_normalized": "1.0.0.0",
|
7 |
+
"source": {
|
8 |
+
"type": "git",
|
9 |
+
"url": "git@gitlab.com:matt-plugins/deactivation-modal.git",
|
10 |
+
"reference": "e4382cd530992d7fb4b6e0938eda06230e18e3b5"
|
11 |
+
},
|
12 |
+
"dist": {
|
13 |
+
"type": "zip",
|
14 |
+
"url": "https://gitlab.com/api/v4/projects/matt-plugins%2Fdeactivation-modal/repository/archive.zip?sha=e4382cd530992d7fb4b6e0938eda06230e18e3b5",
|
15 |
+
"reference": "e4382cd530992d7fb4b6e0938eda06230e18e3b5",
|
16 |
+
"shasum": ""
|
17 |
+
},
|
18 |
+
"require-dev": {
|
19 |
+
"10up/wp_mock": "*",
|
20 |
+
"phpcompatibility/php-compatibility": "^9.3",
|
21 |
+
"phpunit/phpunit": "<7",
|
22 |
+
"wp-coding-standards/wpcs": "^2.3"
|
23 |
+
},
|
24 |
+
"time": "2022-01-04T19:46:13+01:00",
|
25 |
+
"type": "library",
|
26 |
+
"extra": {
|
27 |
+
"assets-values": {
|
28 |
+
"plugin-slug": {
|
29 |
+
"search": "{__PLUGIN_SLUG__}",
|
30 |
+
"replace": "<?php echo $plugin_slug; ?>"
|
31 |
+
}
|
32 |
+
}
|
33 |
+
},
|
34 |
+
"installation-source": "dist",
|
35 |
+
"autoload": {
|
36 |
+
"psr-4": {
|
37 |
+
"MattPlugins\\DeactivationModal\\": "src"
|
38 |
+
}
|
39 |
+
},
|
40 |
+
"scripts": {
|
41 |
+
"build": [
|
42 |
+
"npm install && npm run prod"
|
43 |
+
],
|
44 |
+
"phpcs": [
|
45 |
+
"phpcs"
|
46 |
+
],
|
47 |
+
"phpunit-unit": [
|
48 |
+
"phpunit --configuration phpunit-unit.xml --coverage-text --colors=never --coverage-html=build-coverage"
|
49 |
+
],
|
50 |
+
"phpunit-unit-fast": [
|
51 |
+
"phpunit --configuration phpunit-unit.xml --no-coverage"
|
52 |
+
],
|
53 |
+
"post-install-cmd": [
|
54 |
+
"echo #!/bin/sh > .git/hooks/pre-commit",
|
55 |
+
"echo:>> .git/hooks/pre-commit",
|
56 |
+
"echo echo \"Building assets...\" >> .git/hooks/pre-commit",
|
57 |
+
"echo composer run build >> .git/hooks/pre-commit",
|
58 |
+
"echo git add assets/ >> .git/hooks/pre-commit"
|
59 |
+
]
|
60 |
+
},
|
61 |
+
"authors": [
|
62 |
+
{
|
63 |
+
"name": "Mateusz Gbiorczyk",
|
64 |
+
"email": "mateusz@gbiorczyk.pl"
|
65 |
+
}
|
66 |
+
],
|
67 |
+
"support": {
|
68 |
+
"source": "https://gitlab.com/matt-plugins/deactivation-modal/-/tree/1.0.0",
|
69 |
+
"issues": "https://gitlab.com/matt-plugins/deactivation-modal/-/issues"
|
70 |
+
},
|
71 |
+
"install-path": "../matt-plugins/deactivation-modal"
|
72 |
+
}
|
73 |
+
],
|
74 |
+
"dev": false,
|
75 |
+
"dev-package-names": []
|
76 |
+
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -16,7 +16,16 @@
|
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|
5 |
'type' => 'library',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '3038ea05f5df3bfcf1b2e575929e64a0c0ee14f7',
|
9 |
'name' => 'gbiorczyk/webp-converter-for-media',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '3038ea05f5df3bfcf1b2e575929e64a0c0ee14f7',
|
20 |
+
'dev_requirement' => false,
|
21 |
+
),
|
22 |
+
'matt-plugins/deactivation-modal' => array(
|
23 |
+
'pretty_version' => '1.0.0',
|
24 |
+
'version' => '1.0.0.0',
|
25 |
+
'type' => 'library',
|
26 |
+
'install_path' => __DIR__ . '/../matt-plugins/deactivation-modal',
|
27 |
+
'aliases' => array(),
|
28 |
+
'reference' => 'e4382cd530992d7fb4b6e0938eda06230e18e3b5',
|
29 |
'dev_requirement' => false,
|
30 |
),
|
31 |
),
|
vendor_prefixed/assets/build/css/styles.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] *,.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] :after,.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] :before{box-sizing:border-box;margin:0;padding:0}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__wrapper{align-items:center;background-color:rgba(0,0,0,.75);display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:99999}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__form{background-color:#fff;font-size:0;max-height:calc(100vh - 40px);max-width:calc(100vw - 40px);overflow-y:auto;padding:20px 30px;position:relative;width:750px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;font-size:20px;height:40px;position:absolute;right:0;top:0;transition:opacity .3s;width:40px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__close:hover{opacity:.5}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__headline{color:#101517;font-size:16px;font-weight:500;line-height:1.5;padding:4px 0}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__desc{color:#101517;font-size:14px;line-height:1.5714285714;padding:4px 0}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__options{padding:10px 0}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionInput{display:none}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionLabel{color:#101517;display:inline-block;font-size:14px;line-height:1.5714285714;padding:4px 0 4px 40px;position:relative}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionLabel:before{border:1px solid #c3c4c7;border-radius:50%;content:"";height:20px;left:0;position:absolute;top:5px;width:20px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionLabel:after{background-color:#2271b1;border-radius:50%;content:"";height:6px;left:7px;position:absolute;top:12px;transform:scale(0);transition:transform .3s;width:6px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionInput:checked+.mattDeactivationModal__optionLabel:after{transform:scale(1)}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionExtra{display:none}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionInput:checked~.mattDeactivationModal__optionExtra{display:block;margin-left:40px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionMessage{background-color:#f0f0f1;color:#101517;font-size:14px;line-height:1.5714285714;margin:10px 0;padding:9px 15px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionMessage:last-child{margin-bottom:0}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionTextarea{border:1px solid #c3c4c7;border-radius:0;box-shadow:none;color:#101517;font-size:14px;line-height:1.5714285714;margin:10px 0;padding:4px 10px;resize:vertical;width:100%}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionTextarea:-ms-input-placeholder{color:rgba(16,21,23,.75);opacity:1}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionTextarea::placeholder{color:rgba(16,21,23,.75);opacity:1}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__optionTextarea:last-child{margin-bottom:0}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttons{display:flex;flex-wrap:wrap;margin:0 -10px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__button{flex:1;padding:10px}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;color:#fff;cursor:pointer;display:block;font-size:14px;line-height:1.5714285714;padding:9px 20px;position:relative;width:100%;z-index:1}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner:before{content:"";height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .3s;width:100%;z-index:-1}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner:hover:before{opacity:1}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner--blue{background-color:#2271b1}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner--blue:before{background-color:#135e96}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner--gray{background-color:#c3c4c7}.mattDeactivationModal[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"] .mattDeactivationModal__buttonInner--gray:before{background-color:#a7aaad}
|
vendor_prefixed/assets/build/js/scripts.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(){"use strict";var t,e={808:function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var e=function(){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.set_vars()&&this.set_events()}var n,i,o;return n=e,i=[{key:"set_vars",value:function(){if(this.button_open=document.querySelector('[data-slug="<?php echo $plugin_slug; ?>"] a[href*="action=deactivate"]'),this.modal_wrapper=document.querySelector('[data-matt-deactivation-modal="<?php echo $plugin_slug; ?>"]'),this.button_open&&this.modal_wrapper)return this.button_close=this.modal_wrapper.querySelector("[data-matt-deactivation-modal-button-close]"),this.button_submit=this.modal_wrapper.querySelector("[data-matt-deactivation-modal-button-submit]"),this.button_skip=this.modal_wrapper.querySelector("[data-matt-deactivation-modal-button-skip]"),this.form_wrapper=this.modal_wrapper.querySelector("[data-matt-deactivation-modal-form]"),this.events={open_modal:this.open_modal.bind(this)},this.settings={delay_click_deactivate:10},this.status={is_sent:!1},!0}},{key:"set_events",value:function(){this.button_open.addEventListener("click",this.events.open_modal),this.modal_wrapper.addEventListener("click",this.close_modal.bind(this,!1)),this.button_close.addEventListener("click",this.close_modal.bind(this,!1)),this.button_skip.addEventListener("click",this.close_modal.bind(this,!0)),this.form_wrapper.addEventListener("click",(function(t){t.stopPropagation()})),this.form_wrapper.addEventListener("submit",this.init_form_submission.bind(this))}},{key:"open_modal",value:function(t){t.preventDefault(),this.button_open.removeEventListener("click",this.events.open_modal),this.modal_wrapper.removeAttribute("hidden")}},{key:"close_modal",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;n&&n.preventDefault();var i=this.settings.delay_click_deactivate;this.modal_wrapper.setAttribute("hidden","hidden"),t&&setTimeout((function(){e.button_open.click()}),i)}},{key:"init_form_submission",value:function(t){t.preventDefault(),this.form_wrapper.removeEventListener("submit",this.events.submit_form),this.close_modal(!0),setTimeout(this.submit_form.bind(this),0)}},{key:"submit_form",value:function(){if(!this.status.is_sent){this.status.is_sent=!0;var t=this.form_wrapper.getAttribute("action"),e=new XMLHttpRequest;e.open("POST",t,!0),e.send(new FormData(this.form_wrapper))}}}],i&&t(n.prototype,i),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}();function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}new(i((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),new e})))},109:function(){}},n={};function i(t){var o=n[t];if(void 0!==o)return o.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.m=e,t=[],i.O=function(e,n,o,r){if(!n){var a=1/0;for(c=0;c<t.length;c++){n=t[c][0],o=t[c][1],r=t[c][2];for(var s=!0,u=0;u<n.length;u++)(!1&r||a>=r)&&Object.keys(i.O).every((function(t){return i.O[t](n[u])}))?n.splice(u--,1):(s=!1,r<a&&(a=r));if(s){t.splice(c--,1);var l=o();void 0!==l&&(e=l)}}return e}r=r||0;for(var c=t.length;c>0&&t[c-1][2]>r;c--)t[c]=t[c-1];t[c]=[n,o,r]},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={861:0,33:0};i.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,r,a=n[0],s=n[1],u=n[2],l=0;if(a.some((function(e){return 0!==t[e]}))){for(o in s)i.o(s,o)&&(i.m[o]=s[o]);if(u)var c=u(i)}for(e&&e(n);l<a.length;l++)r=a[l],i.o(t,r)&&t[r]&&t[r][0](),t[a[l]]=0;return i.O(c)},n=self.webpackChunkmatt_plugins_deactivation_modal=self.webpackChunkmatt_plugins_deactivation_modal||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}(),i.O(void 0,[33],(function(){return i(808)}));var o=i.O(void 0,[33],(function(){return i(109)}));o=i.O(o)}();
|
vendor_prefixed/src/Exception/DuplicatedFormOptionKeyException.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Exception;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* .
|
7 |
+
*/
|
8 |
+
class DuplicatedFormOptionKeyException extends \Exception
|
9 |
+
{
|
10 |
+
}
|
vendor_prefixed/src/Exception/DuplicatedFormValueKeyException.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Exception;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* .
|
7 |
+
*/
|
8 |
+
class DuplicatedFormValueKeyException extends \Exception
|
9 |
+
{
|
10 |
+
}
|
vendor_prefixed/src/Exception/UnknownFormOptionKeyException.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Exception;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* .
|
7 |
+
*/
|
8 |
+
class UnknownFormOptionKeyException extends \Exception
|
9 |
+
{
|
10 |
+
}
|
vendor_prefixed/src/Hookable.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal;
|
4 |
+
|
5 |
+
interface Hookable
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* Init hooks (actions and filters).
|
9 |
+
*
|
10 |
+
* @return void
|
11 |
+
*/
|
12 |
+
public function hooks();
|
13 |
+
}
|
vendor_prefixed/src/Modal.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal;
|
4 |
+
|
5 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Model\FormOptions;
|
6 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Model\FormTemplate;
|
7 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Model\FormValues;
|
8 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Service\AssetsPrinterService;
|
9 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Service\TemplateGeneratorService;
|
10 |
+
/**
|
11 |
+
* Manages the modal displayed when the plugin is deactivated.
|
12 |
+
*/
|
13 |
+
class Modal
|
14 |
+
{
|
15 |
+
const MODAL_TEMPLATE_PATH = __DIR__ . '/../templates/modal.php';
|
16 |
+
const MODAL_ASSETS_PATH_CSS = __DIR__ . '/../assets/build/css/styles.css';
|
17 |
+
const MODAL_ASSETS_PATH_JS = __DIR__ . '/../assets/build/js/scripts.js';
|
18 |
+
/**
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $plugin_slug;
|
22 |
+
/**
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
private $form_template;
|
26 |
+
/**
|
27 |
+
* @var FormOptions
|
28 |
+
*/
|
29 |
+
private $form_options;
|
30 |
+
/**
|
31 |
+
* @var FormValues
|
32 |
+
*/
|
33 |
+
private $form_values;
|
34 |
+
/**
|
35 |
+
* @param string $plugin_slug Example: "plugin-name".
|
36 |
+
* @param FormTemplate $form_template Information about the deactivation modal template.
|
37 |
+
* @param FormOptions $form_options List of plugin deactivation reasons to choose from.
|
38 |
+
* @param FormValues $form_values Values sent in the request that reports the plugin deactivation.
|
39 |
+
*/
|
40 |
+
public function __construct(string $plugin_slug, FormTemplate $form_template, FormOptions $form_options, FormValues $form_values)
|
41 |
+
{
|
42 |
+
$this->plugin_slug = $plugin_slug;
|
43 |
+
$this->form_template = $form_template;
|
44 |
+
$this->form_options = $form_options;
|
45 |
+
$this->form_values = $form_values;
|
46 |
+
(new AssetsPrinterService($this->plugin_slug))->hooks();
|
47 |
+
(new TemplateGeneratorService($this->plugin_slug, $this->form_template, $this->form_options, $this->form_values))->hooks();
|
48 |
+
}
|
49 |
+
}
|
vendor_prefixed/src/Model/FormOption.php
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Model;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Stores information about the selectable reason of the plugin deactivation.
|
7 |
+
*/
|
8 |
+
class FormOption
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* @var string Key of the deactivation reason.
|
12 |
+
*/
|
13 |
+
private $key;
|
14 |
+
/**
|
15 |
+
* @var int Order priority (ascending).
|
16 |
+
*/
|
17 |
+
private $priority;
|
18 |
+
/**
|
19 |
+
* @var string Label of the reason option.
|
20 |
+
*/
|
21 |
+
private $label;
|
22 |
+
/**
|
23 |
+
* @var callable|null A function that returns a message visible after selecting the reason (may contain HTML).
|
24 |
+
*/
|
25 |
+
private $message;
|
26 |
+
/**
|
27 |
+
* @var string|null Label of additional question (visible after selecting the reason in the form).
|
28 |
+
*/
|
29 |
+
private $question;
|
30 |
+
/**
|
31 |
+
* @param string $key Key of the deactivation reason.
|
32 |
+
* @param int $priority Order priority (ascending).
|
33 |
+
* @param string $label Label of the reason option.
|
34 |
+
* @param callable $message A function that returns a message visible after selecting the reason (may contain
|
35 |
+
* HTML).
|
36 |
+
* @param string $question Label of additional question (visible after selecting the reason in the form).
|
37 |
+
*/
|
38 |
+
public function __construct(string $key, int $priority, string $label, callable $message = null, string $question = null)
|
39 |
+
{
|
40 |
+
$this->key = $key;
|
41 |
+
$this->priority = $priority;
|
42 |
+
$this->label = $label;
|
43 |
+
$this->message = $message;
|
44 |
+
$this->question = $question;
|
45 |
+
}
|
46 |
+
public function get_key() : string
|
47 |
+
{
|
48 |
+
return $this->key;
|
49 |
+
}
|
50 |
+
public function get_priority() : int
|
51 |
+
{
|
52 |
+
return $this->priority;
|
53 |
+
}
|
54 |
+
/**
|
55 |
+
* @param int $priority Order priority (ascending).
|
56 |
+
*/
|
57 |
+
public function set_priority(int $priority) : self
|
58 |
+
{
|
59 |
+
$this->priority = $priority;
|
60 |
+
return $this;
|
61 |
+
}
|
62 |
+
public function get_label() : string
|
63 |
+
{
|
64 |
+
return $this->label;
|
65 |
+
}
|
66 |
+
/**
|
67 |
+
* @param string $label Label of the reason option.
|
68 |
+
*/
|
69 |
+
public function set_label(string $label) : self
|
70 |
+
{
|
71 |
+
$this->label = $label;
|
72 |
+
return $this;
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* @return callable|null
|
76 |
+
*/
|
77 |
+
public function get_message()
|
78 |
+
{
|
79 |
+
return $this->message;
|
80 |
+
}
|
81 |
+
/**
|
82 |
+
* @param string|null $message Message visible after selecting the reason in the form (may contain HTML).
|
83 |
+
*/
|
84 |
+
public function set_message(string $message = null) : self
|
85 |
+
{
|
86 |
+
$this->message = $message;
|
87 |
+
return $this;
|
88 |
+
}
|
89 |
+
/**
|
90 |
+
* @return string|null
|
91 |
+
*/
|
92 |
+
public function get_question()
|
93 |
+
{
|
94 |
+
return $this->question;
|
95 |
+
}
|
96 |
+
/**
|
97 |
+
* @param string|null $question Label of additional question (visible after selecting the reason in the form).
|
98 |
+
*/
|
99 |
+
public function set_question(string $question = null) : self
|
100 |
+
{
|
101 |
+
$this->question = $question;
|
102 |
+
return $this;
|
103 |
+
}
|
104 |
+
}
|
vendor_prefixed/src/Model/FormOptions.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Model;
|
4 |
+
|
5 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Exception\DuplicatedFormOptionKeyException;
|
6 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Exception\UnknownFormOptionKeyException;
|
7 |
+
/**
|
8 |
+
* Manages the list of deactivation reason in the form.
|
9 |
+
*/
|
10 |
+
class FormOptions
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @var FormOption[]
|
14 |
+
*/
|
15 |
+
private $options = [];
|
16 |
+
/**
|
17 |
+
* @param FormOption $new_option .
|
18 |
+
*
|
19 |
+
* @throws DuplicatedFormOptionKeyException
|
20 |
+
*/
|
21 |
+
public function set_option(FormOption $new_option) : self
|
22 |
+
{
|
23 |
+
foreach ($this->options as $option) {
|
24 |
+
if ($option->get_key() === $new_option->get_key()) {
|
25 |
+
throw new DuplicatedFormOptionKeyException($new_option->get_key());
|
26 |
+
}
|
27 |
+
}
|
28 |
+
$this->options[] = $new_option;
|
29 |
+
return $this;
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* @param string $option_key .
|
33 |
+
*
|
34 |
+
* @throws UnknownFormOptionKeyException
|
35 |
+
*/
|
36 |
+
public function delete_option(string $option_key) : self
|
37 |
+
{
|
38 |
+
foreach ($this->options as $option_index => $option) {
|
39 |
+
if ($option->get_key() === $option_key) {
|
40 |
+
unset($this->options[$option_index]);
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
throw new UnknownFormOptionKeyException($option_key);
|
45 |
+
}
|
46 |
+
/**
|
47 |
+
* @param string $option_key .
|
48 |
+
* @param callable $update_callback Example: "function ( FormOption $option ) { }".
|
49 |
+
*
|
50 |
+
* @throws UnknownFormOptionKeyException
|
51 |
+
*/
|
52 |
+
public function update_option(string $option_key, callable $update_callback) : self
|
53 |
+
{
|
54 |
+
foreach ($this->options as $option) {
|
55 |
+
if ($option->get_key() === $option_key) {
|
56 |
+
\call_user_func($update_callback, $option);
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
throw new UnknownFormOptionKeyException($option_key);
|
61 |
+
}
|
62 |
+
/**
|
63 |
+
* @return FormOption[]
|
64 |
+
*/
|
65 |
+
public function get_options() : array
|
66 |
+
{
|
67 |
+
$options = $this->options;
|
68 |
+
\usort($options, function (FormOption $option_a, FormOption $option_b) {
|
69 |
+
return $option_a->get_priority() <=> $option_b->get_priority();
|
70 |
+
});
|
71 |
+
return $options;
|
72 |
+
}
|
73 |
+
}
|
vendor_prefixed/src/Model/FormTemplate.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Model;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Stores information about the deactivation modal template.
|
7 |
+
*/
|
8 |
+
class FormTemplate
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
private $api_url;
|
14 |
+
/**
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
private $form_title;
|
18 |
+
/**
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $form_desc;
|
22 |
+
/**
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
private $button_submit_label;
|
26 |
+
/**
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $button_skip_label;
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $field_name_reason = 'request_reason';
|
34 |
+
/**
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
private $field_name_comment = 'request_comment_%s';
|
38 |
+
public function __construct(string $api_url, string $form_title, string $form_desc, string $button_submit_label, string $button_skip_label)
|
39 |
+
{
|
40 |
+
$this->api_url = $api_url;
|
41 |
+
$this->form_title = $form_title;
|
42 |
+
$this->form_desc = $form_desc;
|
43 |
+
$this->button_submit_label = $button_submit_label;
|
44 |
+
$this->button_skip_label = $button_skip_label;
|
45 |
+
}
|
46 |
+
public function get_api_url() : string
|
47 |
+
{
|
48 |
+
return $this->api_url;
|
49 |
+
}
|
50 |
+
public function get_form_title() : string
|
51 |
+
{
|
52 |
+
return $this->form_title;
|
53 |
+
}
|
54 |
+
public function get_form_desc() : string
|
55 |
+
{
|
56 |
+
return $this->form_desc;
|
57 |
+
}
|
58 |
+
public function get_button_submit_label() : string
|
59 |
+
{
|
60 |
+
return $this->button_submit_label;
|
61 |
+
}
|
62 |
+
public function get_button_skip_label() : string
|
63 |
+
{
|
64 |
+
return $this->button_skip_label;
|
65 |
+
}
|
66 |
+
public function get_field_name_reason() : string
|
67 |
+
{
|
68 |
+
return $this->field_name_reason;
|
69 |
+
}
|
70 |
+
public function get_field_name_comment() : string
|
71 |
+
{
|
72 |
+
return $this->field_name_comment;
|
73 |
+
}
|
74 |
+
}
|
vendor_prefixed/src/Model/FormValue.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Model;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Stores information about the additional value sent in the request reporting plugin deactivation.
|
7 |
+
*/
|
8 |
+
class FormValue
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* @var string Key of the additional value.
|
12 |
+
*/
|
13 |
+
private $key;
|
14 |
+
/**
|
15 |
+
* @var callable A function that returns a text value.
|
16 |
+
*/
|
17 |
+
private $value_callback;
|
18 |
+
/**
|
19 |
+
* @param string $key Key of the additional value.
|
20 |
+
* @param callable $value_callback A function that returns a text value.
|
21 |
+
*/
|
22 |
+
public function __construct(string $key, callable $value_callback)
|
23 |
+
{
|
24 |
+
$this->key = $key;
|
25 |
+
$this->value_callback = $value_callback;
|
26 |
+
}
|
27 |
+
public function get_key() : string
|
28 |
+
{
|
29 |
+
return $this->key;
|
30 |
+
}
|
31 |
+
public function get_value_callback() : callable
|
32 |
+
{
|
33 |
+
return $this->value_callback;
|
34 |
+
}
|
35 |
+
}
|
vendor_prefixed/src/Model/FormValues.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Model;
|
4 |
+
|
5 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Exception\DuplicatedFormValueKeyException;
|
6 |
+
/**
|
7 |
+
* It manages the list of additional information sent in the request reporting plugin deactivation.
|
8 |
+
*/
|
9 |
+
class FormValues
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var FormValue[]
|
13 |
+
*/
|
14 |
+
private $values = [];
|
15 |
+
/**
|
16 |
+
* @param FormValue $new_value .
|
17 |
+
*
|
18 |
+
* @throws DuplicatedFormValueKeyException
|
19 |
+
*/
|
20 |
+
public function set_value(FormValue $new_value) : self
|
21 |
+
{
|
22 |
+
foreach ($this->values as $value) {
|
23 |
+
if ($value->get_key() === $new_value->get_key()) {
|
24 |
+
throw new DuplicatedFormValueKeyException($new_value->get_key());
|
25 |
+
}
|
26 |
+
}
|
27 |
+
$this->values[] = $new_value;
|
28 |
+
return $this;
|
29 |
+
}
|
30 |
+
/**
|
31 |
+
* @return FormValue[]
|
32 |
+
*/
|
33 |
+
public function get_values() : array
|
34 |
+
{
|
35 |
+
return $this->values;
|
36 |
+
}
|
37 |
+
}
|
vendor_prefixed/src/Model/RequestData.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Model;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Stores information containing request data reporting plugin deactivation.
|
7 |
+
*/
|
8 |
+
class RequestData
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
private $plugin_slug;
|
14 |
+
/**
|
15 |
+
* @var string|null
|
16 |
+
*/
|
17 |
+
private $reason_key = null;
|
18 |
+
/**
|
19 |
+
* @var string|null
|
20 |
+
*/
|
21 |
+
private $additional_info = null;
|
22 |
+
/**
|
23 |
+
* @var array
|
24 |
+
*/
|
25 |
+
private $additional_data = [];
|
26 |
+
/**
|
27 |
+
* @param string $plugin_slug .
|
28 |
+
*/
|
29 |
+
public function __construct(string $plugin_slug)
|
30 |
+
{
|
31 |
+
$this->plugin_slug = $plugin_slug;
|
32 |
+
}
|
33 |
+
public function get_plugin_slug() : string
|
34 |
+
{
|
35 |
+
return $this->plugin_slug;
|
36 |
+
}
|
37 |
+
public function set_reason_key(string $reason_key = null) : self
|
38 |
+
{
|
39 |
+
$this->reason_key = $reason_key;
|
40 |
+
return $this;
|
41 |
+
}
|
42 |
+
/**
|
43 |
+
* @return string|null
|
44 |
+
*/
|
45 |
+
public function get_reason_key()
|
46 |
+
{
|
47 |
+
return $this->reason_key;
|
48 |
+
}
|
49 |
+
public function set_additional_info(string $additional_info = null) : self
|
50 |
+
{
|
51 |
+
$this->additional_info = $additional_info;
|
52 |
+
return $this;
|
53 |
+
}
|
54 |
+
/**
|
55 |
+
* @return string|null
|
56 |
+
*/
|
57 |
+
public function get_additional_info()
|
58 |
+
{
|
59 |
+
return $this->additional_info;
|
60 |
+
}
|
61 |
+
public function set_additional_data(array $additional_data) : self
|
62 |
+
{
|
63 |
+
$this->additional_data = $additional_data;
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
public function set_additional_data_item(string $data_key, string $data_value) : self
|
67 |
+
{
|
68 |
+
$this->additional_data[$data_key] = $data_value;
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
public function get_additional_data() : array
|
72 |
+
{
|
73 |
+
return $this->additional_data;
|
74 |
+
}
|
75 |
+
}
|
vendor_prefixed/src/Service/AssetsPrinterService.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Service;
|
4 |
+
|
5 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Hookable;
|
6 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Modal;
|
7 |
+
/**
|
8 |
+
* Prints the needed contents of CSS and JS files on the plugin list page.
|
9 |
+
*/
|
10 |
+
class AssetsPrinterService implements Hookable
|
11 |
+
{
|
12 |
+
const PLUGIN_NAME_VARIABLE = '{__PLUGIN_SLUG__}';
|
13 |
+
/**
|
14 |
+
* @var string
|
15 |
+
*/
|
16 |
+
private $plugin_slug;
|
17 |
+
public function __construct(string $plugin_slug)
|
18 |
+
{
|
19 |
+
$this->plugin_slug = $plugin_slug;
|
20 |
+
}
|
21 |
+
/**
|
22 |
+
* {@inheritdoc}
|
23 |
+
*/
|
24 |
+
public function hooks()
|
25 |
+
{
|
26 |
+
add_action('admin_print_styles-plugins.php', [$this, 'load_styles']);
|
27 |
+
add_action('admin_print_footer_scripts-plugins.php', [$this, 'load_scripts']);
|
28 |
+
}
|
29 |
+
public function load_styles()
|
30 |
+
{
|
31 |
+
?>
|
32 |
+
<style id="deactivation-modal-css_<?php
|
33 |
+
echo esc_attr($this->plugin_slug);
|
34 |
+
?>">
|
35 |
+
<?php
|
36 |
+
$plugin_slug = $this->plugin_slug;
|
37 |
+
include_once Modal::MODAL_ASSETS_PATH_CSS;
|
38 |
+
?>
|
39 |
+
</style>
|
40 |
+
<?php
|
41 |
+
}
|
42 |
+
public function load_scripts()
|
43 |
+
{
|
44 |
+
?>
|
45 |
+
<script id="deactivation-modal-js_<?php
|
46 |
+
echo esc_attr($this->plugin_slug);
|
47 |
+
?>">
|
48 |
+
<?php
|
49 |
+
$plugin_slug = $this->plugin_slug;
|
50 |
+
include_once Modal::MODAL_ASSETS_PATH_JS;
|
51 |
+
?>
|
52 |
+
</script>
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
}
|
vendor_prefixed/src/Service/TemplateGeneratorService.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor\MattPlugins\DeactivationModal\Service;
|
4 |
+
|
5 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Hookable;
|
6 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Modal;
|
7 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Model\FormOptions;
|
8 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Model\FormTemplate;
|
9 |
+
use WebpConverterVendor\MattPlugins\DeactivationModal\Model\FormValues;
|
10 |
+
/**
|
11 |
+
* Prints the deactivation modal template on the plugin list page.
|
12 |
+
*/
|
13 |
+
class TemplateGeneratorService implements Hookable
|
14 |
+
{
|
15 |
+
/**
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $plugin_slug;
|
19 |
+
/**
|
20 |
+
* @var FormTemplate
|
21 |
+
*/
|
22 |
+
private $form_template;
|
23 |
+
/**
|
24 |
+
* @var FormOptions
|
25 |
+
*/
|
26 |
+
private $form_options;
|
27 |
+
/**
|
28 |
+
* @var FormValues
|
29 |
+
*/
|
30 |
+
private $form_values;
|
31 |
+
public function __construct(string $plugin_slug, FormTemplate $form_template, FormOptions $form_options, FormValues $form_values)
|
32 |
+
{
|
33 |
+
$this->plugin_slug = $plugin_slug;
|
34 |
+
$this->form_template = $form_template;
|
35 |
+
$this->form_options = $form_options;
|
36 |
+
$this->form_values = $form_values;
|
37 |
+
}
|
38 |
+
/**
|
39 |
+
* {@inheritdoc}
|
40 |
+
*/
|
41 |
+
public function hooks()
|
42 |
+
{
|
43 |
+
add_action('admin_print_footer_scripts-plugins.php', [$this, 'load_template'], 0);
|
44 |
+
}
|
45 |
+
public function load_template()
|
46 |
+
{
|
47 |
+
$params = ['plugin_slug' => $this->plugin_slug, 'form_template' => $this->form_template, 'form_options' => $this->form_options, 'form_values' => $this->form_values];
|
48 |
+
\extract($params);
|
49 |
+
// phpcs:ignore WordPress.PHP.DontExtract.extract_extract
|
50 |
+
require_once Modal::MODAL_TEMPLATE_PATH;
|
51 |
+
}
|
52 |
+
}
|
vendor_prefixed/templates/modal.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WebpConverterVendor;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @var string $plugin_slug .
|
7 |
+
* @var MattPlugins\DeactivationModal\Model\FormTemplate $form_template .
|
8 |
+
* @var MattPlugins\DeactivationModal\Model\FormOptions $form_options .
|
9 |
+
* @var MattPlugins\DeactivationModal\Model\FormValues $form_values .
|
10 |
+
*
|
11 |
+
* @package Gbiorczyk\DeactivationModal
|
12 |
+
*/
|
13 |
+
?>
|
14 |
+
|
15 |
+
<div class="mattDeactivationModal"
|
16 |
+
data-matt-deactivation-modal="<?php
|
17 |
+
echo esc_attr($plugin_slug);
|
18 |
+
?>"
|
19 |
+
hidden>
|
20 |
+
<div class="mattDeactivationModal__wrapper">
|
21 |
+
<form action="<?php
|
22 |
+
echo esc_url($form_template->get_api_url());
|
23 |
+
?>"
|
24 |
+
method="POST"
|
25 |
+
class="mattDeactivationModal__form"
|
26 |
+
data-matt-deactivation-modal-form>
|
27 |
+
<button type="button"
|
28 |
+
class="mattDeactivationModal__close dashicons dashicons-no"
|
29 |
+
data-matt-deactivation-modal-button-close></button>
|
30 |
+
|
31 |
+
<div class="mattDeactivationModal__headline">
|
32 |
+
<?php
|
33 |
+
echo wp_kses_post($form_template->get_form_title());
|
34 |
+
?>
|
35 |
+
</div>
|
36 |
+
<div class="mattDeactivationModal__desc">
|
37 |
+
<?php
|
38 |
+
echo wp_kses_post($form_template->get_form_desc());
|
39 |
+
?>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<ul class="mattDeactivationModal__options">
|
43 |
+
<?php
|
44 |
+
foreach ($form_options->get_options() as $option) {
|
45 |
+
?>
|
46 |
+
<li class="mattDeactivationModal__option">
|
47 |
+
<input type="radio"
|
48 |
+
name="<?php
|
49 |
+
echo esc_attr($form_template->get_field_name_reason());
|
50 |
+
?>"
|
51 |
+
value="<?php
|
52 |
+
echo esc_attr($option->get_key());
|
53 |
+
?>"
|
54 |
+
id="option-<?php
|
55 |
+
echo esc_attr($plugin_slug);
|
56 |
+
?>-<?php
|
57 |
+
echo esc_attr($option->get_key());
|
58 |
+
?>"
|
59 |
+
class="mattDeactivationModal__optionInput">
|
60 |
+
<label
|
61 |
+
for="option-<?php
|
62 |
+
echo esc_attr($plugin_slug);
|
63 |
+
?>-<?php
|
64 |
+
echo esc_attr($option->get_key());
|
65 |
+
?>"
|
66 |
+
class="mattDeactivationModal__optionLabel">
|
67 |
+
<?php
|
68 |
+
echo esc_html($option->get_label());
|
69 |
+
?>
|
70 |
+
</label>
|
71 |
+
<div class="mattDeactivationModal__optionExtra">
|
72 |
+
<?php
|
73 |
+
$message = $option->get_message() !== null ? \call_user_func($option->get_message()) : null;
|
74 |
+
if ($message !== null) {
|
75 |
+
?>
|
76 |
+
<div class="mattDeactivationModal__optionMessage">
|
77 |
+
<?php
|
78 |
+
echo wp_kses_post($message);
|
79 |
+
?>
|
80 |
+
</div>
|
81 |
+
<?php
|
82 |
+
}
|
83 |
+
?>
|
84 |
+
<?php
|
85 |
+
if ($option->get_question() !== null) {
|
86 |
+
?>
|
87 |
+
<textarea class="mattDeactivationModal__optionTextarea"
|
88 |
+
name="<?php
|
89 |
+
echo esc_attr(\sprintf($form_template->get_field_name_comment(), $option->get_key()));
|
90 |
+
?>"
|
91 |
+
placeholder="<?php
|
92 |
+
echo esc_attr($option->get_question());
|
93 |
+
?>"
|
94 |
+
rows="2"></textarea>
|
95 |
+
<?php
|
96 |
+
}
|
97 |
+
?>
|
98 |
+
</div>
|
99 |
+
</li>
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
</ul>
|
104 |
+
|
105 |
+
<ul class="mattDeactivationModal__buttons">
|
106 |
+
<li class="mattDeactivationModal__button">
|
107 |
+
<button type="submit"
|
108 |
+
class="mattDeactivationModal__buttonInner mattDeactivationModal__buttonInner--blue"
|
109 |
+
data-matt-deactivation-modal-button-submit>
|
110 |
+
<?php
|
111 |
+
echo esc_html($form_template->get_button_submit_label());
|
112 |
+
?>
|
113 |
+
</button>
|
114 |
+
</li>
|
115 |
+
<li class="mattDeactivationModal__button">
|
116 |
+
<button type="button"
|
117 |
+
class="mattDeactivationModal__buttonInner mattDeactivationModal__buttonInner--gray"
|
118 |
+
data-matt-deactivation-modal-button-skip>
|
119 |
+
<?php
|
120 |
+
echo esc_html($form_template->get_button_skip_label());
|
121 |
+
?>
|
122 |
+
</button>
|
123 |
+
</li>
|
124 |
+
</ul>
|
125 |
+
|
126 |
+
<?php
|
127 |
+
foreach ($form_values->get_values() as $form_value) {
|
128 |
+
?>
|
129 |
+
<input type="hidden"
|
130 |
+
name="<?php
|
131 |
+
echo esc_attr($form_value->get_key());
|
132 |
+
?>"
|
133 |
+
value="<?php
|
134 |
+
echo esc_attr(\call_user_func($form_value->get_value_callback()));
|
135 |
+
?>">
|
136 |
+
<?php
|
137 |
+
}
|
138 |
+
?>
|
139 |
+
</form>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
<?php
|
webp-converter-for-media.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
|
6 |
-
* Version: 4.0.
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://mattplugins.com/
|
9 |
* Text Domain: webp-converter-for-media
|
@@ -16,5 +16,5 @@ if ( ( ini_get( 'opcache.revalidate_freq' ) ?: 0 ) > 2 ) {
|
|
16 |
require_once __DIR__ . '/vendor/autoload.php';
|
17 |
|
18 |
new WebpConverter\WebpConverter(
|
19 |
-
new WebpConverter\PluginInfo( __FILE__, '4.0.
|
20 |
);
|
3 |
/**
|
4 |
* Plugin Name: WebP Converter for Media
|
5 |
* Description: Speed up your website by serving WebP and AVIF images instead of standard formats JPEG, PNG and GIF. Reduce image sizes just now!
|
6 |
+
* Version: 4.0.5
|
7 |
* Author: Mateusz Gbiorczyk
|
8 |
* Author URI: https://mattplugins.com/
|
9 |
* Text Domain: webp-converter-for-media
|
16 |
require_once __DIR__ . '/vendor/autoload.php';
|
17 |
|
18 |
new WebpConverter\WebpConverter(
|
19 |
+
new WebpConverter\PluginInfo( __FILE__, '4.0.5' )
|
20 |
);
|