Changeset 3179309
- Timestamp:
- 10/31/2024 09:24:44 AM (14 months ago)
- Location:
- staatic/trunk
- Files:
-
- 15 edited
-
assets/admin-rtl.css (modified) (1 diff)
-
assets/admin.asset.php (modified) (1 diff)
-
assets/admin.css (modified) (1 diff)
-
assets/admin.js (modified) (1 diff)
-
generated/container.php (modified) (3 diffs)
-
languages/staatic-nl_NL-staatic-admin.json (modified) (1 diff)
-
languages/staatic-nl_NL.mo (modified) (previous)
-
languages/staatic-nl_NL.po (modified) (7 diffs)
-
languages/staatic.pot (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
src/Bridge/CrawlProfile.php (modified) (1 diff)
-
src/Factory/UrlTransformerFactory.php (modified) (1 diff)
-
staatic.php (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (1 diff)
-
vendor/staatic/crawler/src/UrlTransformer/OfflineUrlTransformer.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
staatic/trunk/assets/admin-rtl.css
r3112562 r3179309 1 div.staatic-destination-url{display:flex;flex-direction:column;gap:1em;margin-bottom:1em;max-width:800px}div.staatic-destination-url fieldset{align-items:center;background-color:#fefefe;border:1px solid #9ca3af;display:flex;gap:1em;justify-content:space-between;padding:1em}.form-table .staatic_destination_url td fieldset label{margin:0!important}div.staatic-destination-url .staatic-field{display:flex;flex-direction:column;gap:.25em}div.staatic-destination-url .staatic- value{margin-top:.25em}div.staatic-github-status .staatic-success{color:#38a169}div.staatic-github-status .staatic-error{color:#e53e3e}div.staatic-github-status .staatic-detail{color:#718096;font-style:italic}div.staatic-netlify-status .staatic-success{color:#38a169}div.staatic-netlify-status .staatic-error{color:#e53e3e}div.staatic-netlify-status .staatic-detail{color:#718096;font-style:italic}div.staatic-publication-logs li{overflow:hidden;padding:0 .25em;text-overflow:ellipsis;white-space:nowrap}div.staatic-publication-logs span.staatic-date{color:#9ca3af;font-size:.8em}div.staatic-publication-logs .staatic-log-level-notice{background-color:#f3f4f6;padding:.25em}div.staatic-publication-logs .staatic-log-level-notice span.staatic-message{font-weight:700}div.staatic-publication-status .dashicon{margin-left:.25em}div.staatic-publication-status .staatic-maybe-stuck{color:#dd6b20}#staatic-settings div.staatic-redirect-item select{width:100px}div.staatic-s3-endpoint{align-items:center;display:inline-flex;justify-content:center;max-width:800px}div.staatic-s3-endpoint input{margin-right:.25rem}div.staatic-sftp-status .staatic-success{color:#38a169}div.staatic-sftp-status .staatic-error{color:#e53e3e}div.staatic-sftp-status .staatic-detail{color:#718096;font-style:italic}.dashicons.spin{animation:dashicons-spin 1s infinite;animation-timing-function:linear}@keyframes dashicons-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.staatic-progress-bar{background-color:#ccc;max-width:600px}.staatic-progress-bar-inner{background-color:#3182ce;color:#fff;height:24px}.staatic-progress-bar-inner span{display:inline-block;padding-right:5px;padding-top:2px;position:absolute}#staatic-publication-logs-widget ul{max-height:300px;overflow-x:hidden;overflow-y:scroll}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-label.staatic-publish{font-weight:600}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-loading:before{content:"";display:inline-block;top:2px}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-spin:before{animation:dashicons-spin 1s infinite;animation-timing-function:linear}.form-table.staatic-dense th{padding:10px 0 10px 10px}.form-table.staatic-dense td{padding:10px}div.staatic-max-length{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.staatic-max-lines{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}#staatic-settings{max-width:1000px}#staatic-settings div[data-staatic-component]{width:100%}#staatic-settings table.form-table{margin-top:0}#staatic-settings textarea{resize:both}#staatic-settings textarea.large-text{min-height:140px;width:100%}#staatic-settings fieldset>fieldset:not(:last-child){margin-bottom:1em}#staatic-settings a.nav-tab.staatic-premium{background:#059669;color:#fff}#staatic-settings a.nav-tab.staatic-premium:hover{background:#047857}#staatic-settings div.staatic-list{margin:0 0 .5em;max-height:400px;overflow-y:scroll;width:100%}#staatic-settings div.staatic-list-toggle{margin-bottom:.5em}#staatic-settings div.staatic-list-toggle a{color:#777;cursor:pointer;font-size:.9em;margin-left:1em}#staatic-settings div.staatic-list-toggle a:hover{color:#333}#staatic-settings div.staatic-list button.staatic-add{margin-top:.5em}#staatic-settings div.staatic-item{align-items:center;display:flex;gap:.25em;justify-content:space-between;margin-bottom:.25em}#staatic-settings div.staatic-item .staatic-value{flex:1;max-width:none;width:100%}#staatic-settings div.staatic-item .staatic-value.staatic-focused{flex:4}#staatic-settings div.staatic-item .staatic-disabled{opacity:.5}#staatic-settings div.staatic-item label{align-self:flex-start;margin:.35em 0 .5em;padding:0 .25em;white-space:nowrap}#staatic-settings div.staatic-item>button.staatic-delete{white-space:nowrap}.staatic-settings-welcome{display:flex}.staatic-settings-welcome p{max-width:800px}.staatic-settings-welcome svg.staatic-badge{width:300px}.staatic-settings-welcome .dashicons-welcome-learn-more:before{color:#0284c7}.staatic-settings-welcome .dashicons-star-filled:before{color:#ca8a04}.staatic-settings-premium .dashicons-superhero:before{color:#0891b2}.staatic-settings-premium .dashicons-heart:before{color:#dc2626}.staatic-settings-premium .dashicons-flag:before{color:#059669}.staatic-publication-error{word-wrap:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;margin:.5rem 0}.staatic-publication-error summary{margin-bottom:.5rem}.staatic-publication-error p{border-right:1px solid #ddd;color:#555;font-family:monospace;font-size:.7rem;padding:0 1rem}.staatic-log-level-warning span{color:#dd6b20}.staatic-log-level-critical span,.staatic-log-level-error span{color:#e53e3e}.staatic-log-break{color:#999;font-size:.8em;-webkit-user-select:none;-moz-user-select:none;user-select:none}span.staatic-log-debug{color:#999;font-size:.8em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.staatic-site-health-signature{color:#999;display:flex;font-size:12px;margin-top:1em}.staatic-site-health-signature-icon{margin-left:8px}1 div.staatic-destination-url{display:flex;flex-direction:column;gap:1em;margin-bottom:1em;max-width:800px}div.staatic-destination-url fieldset{align-items:center;background-color:#fefefe;border:1px solid #9ca3af;display:flex;gap:1em;justify-content:space-between;padding:1em}.form-table .staatic_destination_url td fieldset label{margin:0!important}div.staatic-destination-url .staatic-field{display:flex;flex-direction:column;gap:.25em}div.staatic-destination-url .staatic-offline-append-index,div.staatic-destination-url .staatic-value{margin-top:.25em}div.staatic-destination-url .staatic-offline-append-index .description{margin-top:.5em}div.staatic-github-status .staatic-success{color:#38a169}div.staatic-github-status .staatic-error{color:#e53e3e}div.staatic-github-status .staatic-detail{color:#718096;font-style:italic}div.staatic-netlify-status .staatic-success{color:#38a169}div.staatic-netlify-status .staatic-error{color:#e53e3e}div.staatic-netlify-status .staatic-detail{color:#718096;font-style:italic}div.staatic-publication-logs li{overflow:hidden;padding:0 .25em;text-overflow:ellipsis;white-space:nowrap}div.staatic-publication-logs span.staatic-date{color:#9ca3af;font-size:.8em}div.staatic-publication-logs .staatic-log-level-notice{background-color:#f3f4f6;padding:.25em}div.staatic-publication-logs .staatic-log-level-notice span.staatic-message{font-weight:700}div.staatic-publication-status .dashicon{margin-left:.25em}div.staatic-publication-status .staatic-maybe-stuck{color:#dd6b20}#staatic-settings div.staatic-redirect-item select{width:100px}div.staatic-s3-endpoint{align-items:center;display:inline-flex;justify-content:center;max-width:800px}div.staatic-s3-endpoint input{margin-right:.25rem}div.staatic-sftp-status .staatic-success{color:#38a169}div.staatic-sftp-status .staatic-error{color:#e53e3e}div.staatic-sftp-status .staatic-detail{color:#718096;font-style:italic}.dashicons.spin{animation:dashicons-spin 1s infinite;animation-timing-function:linear}@keyframes dashicons-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.staatic-progress-bar{background-color:#ccc;max-width:600px}.staatic-progress-bar-inner{background-color:#3182ce;color:#fff;height:24px}.staatic-progress-bar-inner span{display:inline-block;padding-right:5px;padding-top:2px;position:absolute}#staatic-publication-logs-widget ul{max-height:300px;overflow-x:hidden;overflow-y:scroll}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-label.staatic-publish{font-weight:600}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-loading:before{content:"";display:inline-block;top:2px}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-spin:before{animation:dashicons-spin 1s infinite;animation-timing-function:linear}.form-table.staatic-dense th{padding:10px 0 10px 10px}.form-table.staatic-dense td{padding:10px}div.staatic-max-length{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.staatic-max-lines{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}#staatic-settings{max-width:1000px}#staatic-settings div[data-staatic-component]{width:100%}#staatic-settings table.form-table{margin-top:0}#staatic-settings textarea{resize:both}#staatic-settings textarea.large-text{min-height:140px;width:100%}#staatic-settings fieldset>fieldset:not(:last-child){margin-bottom:1em}#staatic-settings a.nav-tab.staatic-premium{background:#059669;color:#fff}#staatic-settings a.nav-tab.staatic-premium:hover{background:#047857}#staatic-settings div.staatic-list{margin:0 0 .5em;max-height:400px;overflow-y:scroll;width:100%}#staatic-settings div.staatic-list-toggle{margin-bottom:.5em}#staatic-settings div.staatic-list-toggle a{color:#777;cursor:pointer;font-size:.9em;margin-left:1em}#staatic-settings div.staatic-list-toggle a:hover{color:#333}#staatic-settings div.staatic-list button.staatic-add{margin-top:.5em}#staatic-settings div.staatic-item{align-items:center;display:flex;gap:.25em;justify-content:space-between;margin-bottom:.25em}#staatic-settings div.staatic-item .staatic-value{flex:1;max-width:none;width:100%}#staatic-settings div.staatic-item .staatic-value.staatic-focused{flex:4}#staatic-settings div.staatic-item .staatic-disabled{opacity:.5}#staatic-settings div.staatic-item label{align-self:flex-start;margin:.35em 0 .5em;padding:0 .25em;white-space:nowrap}#staatic-settings div.staatic-item>button.staatic-delete{white-space:nowrap}.staatic-settings-welcome{display:flex}.staatic-settings-welcome p{max-width:800px}.staatic-settings-welcome svg.staatic-badge{width:300px}.staatic-settings-welcome .dashicons-welcome-learn-more:before{color:#0284c7}.staatic-settings-welcome .dashicons-star-filled:before{color:#ca8a04}.staatic-settings-premium .dashicons-superhero:before{color:#0891b2}.staatic-settings-premium .dashicons-heart:before{color:#dc2626}.staatic-settings-premium .dashicons-flag:before{color:#059669}.staatic-publication-error{word-wrap:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;margin:.5rem 0}.staatic-publication-error summary{margin-bottom:.5rem}.staatic-publication-error p{border-right:1px solid #ddd;color:#555;font-family:monospace;font-size:.7rem;padding:0 1rem}.staatic-log-level-warning span{color:#dd6b20}.staatic-log-level-critical span,.staatic-log-level-error span{color:#e53e3e}.staatic-log-break{color:#999;font-size:.8em;-webkit-user-select:none;-moz-user-select:none;user-select:none}span.staatic-log-debug{color:#999;font-size:.8em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.staatic-site-health-signature{color:#999;display:flex;font-size:12px;margin-top:1em}.staatic-site-health-signature-icon{margin-left:8px} -
staatic/trunk/assets/admin.asset.php
r3112562 r3179309 5 5 return array( 6 6 'dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 7 'version' => '7 7bdac4c454051833416'7 'version' => '7b513f460c842157a387' 8 8 ); -
staatic/trunk/assets/admin.css
r3112562 r3179309 1 div.staatic-destination-url{display:flex;flex-direction:column;gap:1em;margin-bottom:1em;max-width:800px}div.staatic-destination-url fieldset{align-items:center;background-color:#fefefe;border:1px solid #9ca3af;display:flex;gap:1em;justify-content:space-between;padding:1em}.form-table .staatic_destination_url td fieldset label{margin:0!important}div.staatic-destination-url .staatic-field{display:flex;flex-direction:column;gap:.25em}div.staatic-destination-url .staatic- value{margin-top:.25em}div.staatic-github-status .staatic-success{color:#38a169}div.staatic-github-status .staatic-error{color:#e53e3e}div.staatic-github-status .staatic-detail{color:#718096;font-style:italic}div.staatic-netlify-status .staatic-success{color:#38a169}div.staatic-netlify-status .staatic-error{color:#e53e3e}div.staatic-netlify-status .staatic-detail{color:#718096;font-style:italic}div.staatic-publication-logs li{overflow:hidden;padding:0 .25em;text-overflow:ellipsis;white-space:nowrap}div.staatic-publication-logs span.staatic-date{color:#9ca3af;font-size:.8em}div.staatic-publication-logs .staatic-log-level-notice{background-color:#f3f4f6;padding:.25em}div.staatic-publication-logs .staatic-log-level-notice span.staatic-message{font-weight:700}div.staatic-publication-status .dashicon{margin-right:.25em}div.staatic-publication-status .staatic-maybe-stuck{color:#dd6b20}#staatic-settings div.staatic-redirect-item select{width:100px}div.staatic-s3-endpoint{align-items:center;display:inline-flex;justify-content:center;max-width:800px}div.staatic-s3-endpoint input{margin-left:.25rem}div.staatic-sftp-status .staatic-success{color:#38a169}div.staatic-sftp-status .staatic-error{color:#e53e3e}div.staatic-sftp-status .staatic-detail{color:#718096;font-style:italic}.dashicons.spin{animation:dashicons-spin 1s infinite;animation-timing-function:linear}@keyframes dashicons-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.staatic-progress-bar{background-color:#ccc;max-width:600px}.staatic-progress-bar-inner{background-color:#3182ce;color:#fff;height:24px}.staatic-progress-bar-inner span{display:inline-block;padding-left:5px;padding-top:2px;position:absolute}#staatic-publication-logs-widget ul{max-height:300px;overflow-x:hidden;overflow-y:scroll}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-label.staatic-publish{font-weight:600}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-loading:before{content:"";display:inline-block;top:2px}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-spin:before{animation:dashicons-spin 1s infinite;animation-timing-function:linear}.form-table.staatic-dense th{padding:10px 10px 10px 0}.form-table.staatic-dense td{padding:10px}div.staatic-max-length{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.staatic-max-lines{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}#staatic-settings{max-width:1000px}#staatic-settings div[data-staatic-component]{width:100%}#staatic-settings table.form-table{margin-top:0}#staatic-settings textarea{resize:both}#staatic-settings textarea.large-text{min-height:140px;width:100%}#staatic-settings fieldset>fieldset:not(:last-child){margin-bottom:1em}#staatic-settings a.nav-tab.staatic-premium{background:#059669;color:#fff}#staatic-settings a.nav-tab.staatic-premium:hover{background:#047857}#staatic-settings div.staatic-list{margin:0 0 .5em;max-height:400px;overflow-y:scroll;width:100%}#staatic-settings div.staatic-list-toggle{margin-bottom:.5em}#staatic-settings div.staatic-list-toggle a{color:#777;cursor:pointer;font-size:.9em;margin-right:1em}#staatic-settings div.staatic-list-toggle a:hover{color:#333}#staatic-settings div.staatic-list button.staatic-add{margin-top:.5em}#staatic-settings div.staatic-item{align-items:center;display:flex;gap:.25em;justify-content:space-between;margin-bottom:.25em}#staatic-settings div.staatic-item .staatic-value{flex:1;max-width:none;width:100%}#staatic-settings div.staatic-item .staatic-value.staatic-focused{flex:4}#staatic-settings div.staatic-item .staatic-disabled{opacity:.5}#staatic-settings div.staatic-item label{align-self:flex-start;margin:.35em 0 .5em;padding:0 .25em;white-space:nowrap}#staatic-settings div.staatic-item>button.staatic-delete{white-space:nowrap}.staatic-settings-welcome{display:flex}.staatic-settings-welcome p{max-width:800px}.staatic-settings-welcome svg.staatic-badge{width:300px}.staatic-settings-welcome .dashicons-welcome-learn-more:before{color:#0284c7}.staatic-settings-welcome .dashicons-star-filled:before{color:#ca8a04}.staatic-settings-premium .dashicons-superhero:before{color:#0891b2}.staatic-settings-premium .dashicons-heart:before{color:#dc2626}.staatic-settings-premium .dashicons-flag:before{color:#059669}.staatic-publication-error{word-wrap:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;margin:.5rem 0}.staatic-publication-error summary{margin-bottom:.5rem}.staatic-publication-error p{border-left:1px solid #ddd;color:#555;font-family:monospace;font-size:.7rem;padding:0 1rem}.staatic-log-level-warning span{color:#dd6b20}.staatic-log-level-critical span,.staatic-log-level-error span{color:#e53e3e}.staatic-log-break{color:#999;font-size:.8em;-webkit-user-select:none;-moz-user-select:none;user-select:none}span.staatic-log-debug{color:#999;font-size:.8em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.staatic-site-health-signature{color:#999;display:flex;font-size:12px;margin-top:1em}.staatic-site-health-signature-icon{margin-right:8px}1 div.staatic-destination-url{display:flex;flex-direction:column;gap:1em;margin-bottom:1em;max-width:800px}div.staatic-destination-url fieldset{align-items:center;background-color:#fefefe;border:1px solid #9ca3af;display:flex;gap:1em;justify-content:space-between;padding:1em}.form-table .staatic_destination_url td fieldset label{margin:0!important}div.staatic-destination-url .staatic-field{display:flex;flex-direction:column;gap:.25em}div.staatic-destination-url .staatic-offline-append-index,div.staatic-destination-url .staatic-value{margin-top:.25em}div.staatic-destination-url .staatic-offline-append-index .description{margin-top:.5em}div.staatic-github-status .staatic-success{color:#38a169}div.staatic-github-status .staatic-error{color:#e53e3e}div.staatic-github-status .staatic-detail{color:#718096;font-style:italic}div.staatic-netlify-status .staatic-success{color:#38a169}div.staatic-netlify-status .staatic-error{color:#e53e3e}div.staatic-netlify-status .staatic-detail{color:#718096;font-style:italic}div.staatic-publication-logs li{overflow:hidden;padding:0 .25em;text-overflow:ellipsis;white-space:nowrap}div.staatic-publication-logs span.staatic-date{color:#9ca3af;font-size:.8em}div.staatic-publication-logs .staatic-log-level-notice{background-color:#f3f4f6;padding:.25em}div.staatic-publication-logs .staatic-log-level-notice span.staatic-message{font-weight:700}div.staatic-publication-status .dashicon{margin-right:.25em}div.staatic-publication-status .staatic-maybe-stuck{color:#dd6b20}#staatic-settings div.staatic-redirect-item select{width:100px}div.staatic-s3-endpoint{align-items:center;display:inline-flex;justify-content:center;max-width:800px}div.staatic-s3-endpoint input{margin-left:.25rem}div.staatic-sftp-status .staatic-success{color:#38a169}div.staatic-sftp-status .staatic-error{color:#e53e3e}div.staatic-sftp-status .staatic-detail{color:#718096;font-style:italic}.dashicons.spin{animation:dashicons-spin 1s infinite;animation-timing-function:linear}@keyframes dashicons-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.staatic-progress-bar{background-color:#ccc;max-width:600px}.staatic-progress-bar-inner{background-color:#3182ce;color:#fff;height:24px}.staatic-progress-bar-inner span{display:inline-block;padding-left:5px;padding-top:2px;position:absolute}#staatic-publication-logs-widget ul{max-height:300px;overflow-x:hidden;overflow-y:scroll}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-label.staatic-publish{font-weight:600}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-loading:before{content:"";display:inline-block;top:2px}#wpadminbar #wp-admin-bar-staatic-toolbar .ab-icon.staatic-spin:before{animation:dashicons-spin 1s infinite;animation-timing-function:linear}.form-table.staatic-dense th{padding:10px 10px 10px 0}.form-table.staatic-dense td{padding:10px}div.staatic-max-length{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.staatic-max-lines{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}#staatic-settings{max-width:1000px}#staatic-settings div[data-staatic-component]{width:100%}#staatic-settings table.form-table{margin-top:0}#staatic-settings textarea{resize:both}#staatic-settings textarea.large-text{min-height:140px;width:100%}#staatic-settings fieldset>fieldset:not(:last-child){margin-bottom:1em}#staatic-settings a.nav-tab.staatic-premium{background:#059669;color:#fff}#staatic-settings a.nav-tab.staatic-premium:hover{background:#047857}#staatic-settings div.staatic-list{margin:0 0 .5em;max-height:400px;overflow-y:scroll;width:100%}#staatic-settings div.staatic-list-toggle{margin-bottom:.5em}#staatic-settings div.staatic-list-toggle a{color:#777;cursor:pointer;font-size:.9em;margin-right:1em}#staatic-settings div.staatic-list-toggle a:hover{color:#333}#staatic-settings div.staatic-list button.staatic-add{margin-top:.5em}#staatic-settings div.staatic-item{align-items:center;display:flex;gap:.25em;justify-content:space-between;margin-bottom:.25em}#staatic-settings div.staatic-item .staatic-value{flex:1;max-width:none;width:100%}#staatic-settings div.staatic-item .staatic-value.staatic-focused{flex:4}#staatic-settings div.staatic-item .staatic-disabled{opacity:.5}#staatic-settings div.staatic-item label{align-self:flex-start;margin:.35em 0 .5em;padding:0 .25em;white-space:nowrap}#staatic-settings div.staatic-item>button.staatic-delete{white-space:nowrap}.staatic-settings-welcome{display:flex}.staatic-settings-welcome p{max-width:800px}.staatic-settings-welcome svg.staatic-badge{width:300px}.staatic-settings-welcome .dashicons-welcome-learn-more:before{color:#0284c7}.staatic-settings-welcome .dashicons-star-filled:before{color:#ca8a04}.staatic-settings-premium .dashicons-superhero:before{color:#0891b2}.staatic-settings-premium .dashicons-heart:before{color:#dc2626}.staatic-settings-premium .dashicons-flag:before{color:#059669}.staatic-publication-error{word-wrap:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;margin:.5rem 0}.staatic-publication-error summary{margin-bottom:.5rem}.staatic-publication-error p{border-left:1px solid #ddd;color:#555;font-family:monospace;font-size:.7rem;padding:0 1rem}.staatic-log-level-warning span{color:#dd6b20}.staatic-log-level-critical span,.staatic-log-level-error span{color:#e53e3e}.staatic-log-break{color:#999;font-size:.8em;-webkit-user-select:none;-moz-user-select:none;user-select:none}span.staatic-log-debug{color:#999;font-size:.8em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.staatic-site-health-signature{color:#999;display:flex;font-size:12px;margin-top:1em}.staatic-site-health-signature-icon{margin-right:8px} -
staatic/trunk/assets/admin.js
r3058395 r3179309 1 (()=>{var e={369:(e,t,s)=>{"use strict";s.r(t),s.d(t,{AdditionalPaths:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{constructor(e){super(e),this.state={focusedInput:null}}setInputFocus=e=>{this.setState({focusedInput:e})};resetInputFocus=()=>{this.setState({focusedInput:null})};onKeyUp(e){13===e.charCode&&this.setState({inputValue:e.target.value})}uriBasePathPlaceholder(e){const{rootPath:t,rootUrlPath:s}=this.props;if(!(e=(e=function(e){return(e=(e=e.replace(/\\/g,"/")).replace(/(?<=.)(\/+)/g,"/")).length>1&&":"===e[1]&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}(e)).replace(/[/\\]+$/,"")))return(0,n.__)("URL base path","staatic");if(t==e)return(0,n.__)("Path cannot be used.","staatic");if(!e.startsWith(t))return(0,n.__)("Provide URL base path manually.","staatic");let a=("/"===s?"":s)+e.substring(t.length);return/[^\/]+\.[^\/]+$/.test(a)&&(a=a.substring(0,a.lastIndexOf("/"))),a}render(){const{index:e,item:t,onChange:s,onDelete:l,placeholderText:o,showUriBasePath:r,showFollow:d,showSave:c,showRecursive:h}=this.props,u=e=>{"Enter"===e.key&&e.preventDefault()},p=t.isEnabled?"":"staatic-disabled",m=e=>this.state.focusedInput===e?"staatic-focused":"",g=this.uriBasePathPlaceholder(t.path);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:u}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:o||"",className:`staatic-value ${p} ${m("path")}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:u,onFocus:()=>this.setInputFocus("path"),onBlur:this.resetInputFocus}),r?(0,a.createElement)("input",{type:"text",value:t.uriBasePath,placeholder:g||"",className:`staatic-value ${p} ${m("uriBasePath")}`,onChange:t=>s(e,"uriBasePath",t.target.value),onKeyDown:u,onFocus:()=>this.setInputFocus("uriBasePath"),onBlur:this.resetInputFocus}):null,d?(0,a.createElement)("label",{title:(0,n.__)("Enable to extract links from this item.","staatic"),className:p},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontFollow,onChange:t=>s(e,"dontFollow",!t.target.checked),onKeyDown:u}),(0,n.__)("Follow","staatic")):null,c?(0,a.createElement)("label",{title:(0,n.__)("Enable to include this item in the build.","staatic"),className:p},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontSave,onChange:t=>s(e,"dontSave",!t.target.checked),onKeyDown:u}),(0,n.__)("Save","staatic")):null,h?(0,a.createElement)("label",{title:(0,n.__)("Enable to scan this path recursively.","staatic"),className:p},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.nonRecursive,onChange:t=>s(e,"nonRecursive",!t.target.checked),onKeyDown:u}),(0,n.__)("Recursive","staatic")):null,(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired,rootPath:r().string.isRequired,rootUrlPath:r().string.isRequired,placeholderText:r().string,showUriBasePath:r().bool,showFollow:r().bool,showSave:r().bool,showRecursive:r().bool};var c=s(934),h=s(234);class u extends l.Component{static format=["path","uriBasePath","flags"];constructor(e){super(...arguments);const t=this.getItems(),s=this.shouldShowAdvancedOptions(t);this.state={items:t,editAsText:"text"===e.defaultMode,showAdvancedOptions:s},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleToggleShowAdvancedOptions=this.handleToggleShowAdvancedOptions.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="text"===this.props.defaultMode?"block":"none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||"",uriBasePath:e.uriBasePath||"",dontTouch:e.flags&&e.flags.includes("T"),dontFollow:e.flags&&e.flags.includes("F"),dontSave:e.flags&&e.flags.includes("S"),nonRecursive:e.flags&&e.flags.includes("R")}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:"",uriBasePath:"",dontTouch:!1,dontFollow:!1,dontSave:!1,nonRecursive:!1}),t}shouldShowAdvancedOptions(e){let t=!1;return e.forEach((function(e){(e.uriBasePath||e.dontTouch||e.dontFollow||e.dontSave)&&(t=!0)})),t}updateItems(){const e=this.state.items.map((e=>{let t="";return e.dontTouch&&(t+="T"),e.dontFollow&&(t+="F"),e.dontSave&&(t+="S"),e.nonRecursive&&(t+="R"),{isEnabled:e.isEnabled?"true":"false",path:e.path,uriBasePath:e.uriBasePath,flags:t}})).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleToggleShowAdvancedOptions(){this.setState({showAdvancedOptions:!this.state.showAdvancedOptions})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:"",uriBasePath:"",dontTouch:!1,dontFollow:!1,dontSave:!1,nonRecursive:!1}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){const{rootPath:e,rootUrlPath:t,placeholderText:s,addButtonText:l}=this.props,{editAsText:o,showAdvancedOptions:r}=this.state;return o?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic")),(0,a.createElement)("a",{onClick:this.handleToggleShowAdvancedOptions},r?(0,n.__)("Hide advanced options","staatic"):(0,n.__)("Advanced options","staatic"))),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((n,i)=>(0,a.createElement)("div",{key:i,className:"staatic-item"},(0,a.createElement)(d,{index:i,item:n,rootPath:e,rootUrlPath:t,onChange:this.handleChange,onDelete:this.handleDelete,showUriBasePath:r,showFollow:r,showSave:r,showRecursive:!0,placeholderText:s})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),l||(0,n.__)("Add item","staatic"))))}}u.propTypes={name:r().string.isRequired,rootPath:r().string.isRequired,rootUrlPath:r().string.isRequired,defaultMode:r().string,placeholderText:r().string,addButtonText:r().string};const p=u},641:(e,t,s)=>{"use strict";s.r(t),s.d(t,{CrawlItems:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{onKeyUp(e){13===e.charCode&&this.setState({inputValue:e.target.value})}render(){const{index:e,item:t,onChange:s,onDelete:l,placeholderText:o,showFollow:r,showSave:d}=this.props,c=e=>{"Enter"===e.key&&e.preventDefault()},h=t.isEnabled?"":"staatic-disabled";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:c}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:o||"",className:`staatic-value ${h}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:c}),r?(0,a.createElement)("label",{title:(0,n.__)("Enable to extract links from this item.","staatic"),className:h},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontFollow,onChange:t=>s(e,"dontFollow",!t.target.checked),onKeyDown:c}),(0,n.__)("Follow","staatic")):null,d?(0,a.createElement)("label",{title:(0,n.__)("Enable to include this item in the build.","staatic"),className:h},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontSave,onChange:t=>s(e,"dontSave",!t.target.checked),onKeyDown:c}),(0,n.__)("Save","staatic")):null,(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired,placeholderText:r().string,showFollow:r().bool,showSave:r().bool};var c=s(934),h=s(234);class u extends l.Component{static format=["path","flags"];constructor(e){super(...arguments);const t=this.getItems(),s=this.shouldShowAdvancedOptions(t);this.state={items:t,editAsText:"text"===e.defaultMode,showAdvancedOptions:s},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleToggleShowAdvancedOptions=this.handleToggleShowAdvancedOptions.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="text"===this.props.defaultMode?"block":"none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||"",dontTouch:e.flags&&e.flags.includes("T"),dontFollow:e.flags&&e.flags.includes("F"),dontSave:e.flags&&e.flags.includes("S")}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:"",dontTouch:!1,dontFollow:!1,dontSave:!1}),t}shouldShowAdvancedOptions(e){if("true"!==this.props.hasAdvancedOptions)return!1;let t=!1;return e.forEach((function(e){(e.dontTouch||e.dontFollow||e.dontSave)&&(t=!0)})),t}updateItems(){const e=this.state.items.map((e=>{let t="";return e.dontTouch&&(t+="T"),e.dontFollow&&(t+="F"),e.dontSave&&(t+="S"),e.nonRecursive&&(t+="R"),{isEnabled:e.isEnabled?"true":"false",path:e.path,flags:t}})).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleToggleShowAdvancedOptions(){this.setState({showAdvancedOptions:!this.state.showAdvancedOptions})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:"",dontTouch:!1,dontFollow:!1,dontSave:!1}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){const{placeholderText:e,addButtonText:t,hasAdvancedOptions:s}=this.props,{editAsText:l,showAdvancedOptions:o}=this.state;return l?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic")),"true"===s?(0,a.createElement)("a",{onClick:this.handleToggleShowAdvancedOptions},o?(0,n.__)("Hide advanced options","staatic"):(0,n.__)("Advanced options","staatic")):null),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((t,s)=>(0,a.createElement)("div",{key:s,className:"staatic-item"},(0,a.createElement)(d,{index:s,item:t,onChange:this.handleChange,onDelete:this.handleDelete,placeholderText:e,showFollow:o,showSave:o})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),t||(0,n.__)("Add item","staatic"))))}}u.propTypes={name:r().string.isRequired,defaultMode:r().string,placeholderText:r().string,addButtonText:r().string,hasAdvancedOptions:r().string};const p=u},845:(e,t,s)=>{"use strict";s.r(t),s.d(t,{DestinationUrl:()=>r,default:()=>d});var a=s(196),n=s(736),i=s(307),l=s(697),o=s.n(l);class r extends i.Component{constructor(e){super(e),this.valueInputRef=React.createRef(),this.setInitialState()}setInitialState(){const e=document.getElementById(this.props.name).value;this.state=""===e ?{type:"offline",value:""}:{type:"regular",value:e}}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(){this.updateExternalValue()}updateExternalValue(){const e="offline"===this.state.type?"":this.state.value;document.getElementById(this.props.name).value=e}handleChange(e,t){this.setState({[e]:t}),"type"===e&&"regular"===t&&setTimeout((()=>this.valueInputRef.current.focus()),50)}render(){return(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-destination-url"},(0,a.createElement)("fieldset",null,(0,a.createElement)("div",null,(0,a.createElement)("input",{id:"destination-url-type-regular",type:"radio",value:"regular",checked:"regular"===this.state.type,onChange:e=>this.handleChange("type",e.target.value)})),(0,a.createElement)("div",{className:"staatic-field"},(0,a.createElement)("label",{htmlFor:"destination-url-type-regular"},(0,n.__)("Regular URL","staatic")),(0,a.createElement)("input",{ref:this.valueInputRef,className:"staatic-value",type:"text",value:this.state.value,disabled:"regular"!==this.state.type,onChange:e=>this.handleChange("value",e.target.value)}),(0,a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:(0,n.__)("Using an <em>absolute</em> URL (e.g. <code>https://example.com/</code>) is recommended for production use. Alternatively a <em>relative</em> URL (e.g. <code>//example.com/</code> or <code>/</code>) can be used to host your site on multiple schemes or domains. If the URL contains a <em>path</em> other than <code>/</code>, it will be prepended to all URLs, allowing the site to be placed in a subdirectory.","staatic")}}))),this.props.hideOfflineUrl?null:(0,a.createElement)("fieldset",null,(0,a.createElement)("div",null,(0,a.createElement)("input",{id:"destination-url-type-offline",type:"radio",value:"offline",checked:"offline"===this.state.type,onChange:e=>this.handleChange("type",e.target.value)})),(0,a.createElement)("div",{className:"staatic-field"},(0,a.createElement)("label",{htmlFor:"destination-url-type-offline"},(0,n.__)("Offline URL","staatic")),(0,a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:(0,n.__)("Using offline URLs is recommended only when you would like to be able to browse your site locally, without hosting it on a webserver.","staatic")}})))))}}r.propTypes={name:o().string.isRequired,hideOfflineUrl:o().bool};const d=r},713:(e,t,s)=>{"use strict";s.r(t),s.d(t,{ExcludeUrls:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{render(){const{index:e,item:t,onChange:s,onDelete:l}=this.props,o=e=>{"Enter"===e.key&&e.preventDefault()},r=t.isEnabled?"":"staatic-disabled";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:o}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:(0,n.__)("URL","staatic"),className:`staatic-value ${r}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:o}),(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired};var c=s(934),h=s(234);class u extends l.Component{static format=["path"];constructor(e){super(...arguments),this.state={items:this.getItems(),editAsText:!1},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||""}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:""}),t}updateItems(){const e=this.state.items.map((e=>({isEnabled:e.isEnabled?"true":"false",path:e.path}))).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:""}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){return this.state.editAsText?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic"))),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"staatic-item"},(0,a.createElement)(d,{index:t,item:e,onChange:this.handleChange,onDelete:this.handleDelete})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),(0,n.__)("Add URL","staatic"))))}}u.propTypes={name:r().string.isRequired};const p=u},143:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GithubStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.tokenInput=document.getElementById(this.props.token),this.token=this.tokenInput.value,this.state={loading:!1,error:!1,status:null},this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){this.bindInputs(),this.setupIntersectionObserver()}bindInputs(){this.tokenInput.addEventListener("change",(e=>this.handleTokenInput(e)))}componentWillUnmount(){this.observer&&this.observer.disconnect()}setupIntersectionObserver(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.updateStatus(),this.observer.unobserve(this.tokenInput))}))}),{root:null,threshold:.1}),this.observer.observe(this.tokenInput)}handleTokenInput(e){const{value:t}=e.target;this.token=t,this.updateStatus()}updateStatus(){this.token&&(this.setState({loading:!0,error:!1}),i()({path:"staatic-github/v1/github-status",method:"POST",data:{token:this.token}}).then((({status:e})=>{this.setState({loading:!1,status:e})})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e)})))}render(){const{instanceId:e}=this.props;if(this.state.error)return(0,a.createElement)("div",{className:"staatic-github-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to verify connection status, please try again later.","staatic")));if(this.state.loading)return(0,a.createElement)("div",{className:"staatic-github-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Verifying connection status...","staatic")));const{status:t}=this.state;return t?(0,a.createElement)("div",{className:"staatic-github-status"},(0,a.createElement)("p",{className:t.success?"staatic-success":"staatic-error"},(0,a.createElement)(o.Dashicon,{icon:t.success?"yes":"no"}),t.message),t.detail?(0,a.createElement)("p",{className:"staatic-detail"},t.detail):""):null}}h.propTypes={token:c().string.isRequired};const u=h},996:(e,t,s)=>{"use strict";s.r(t),s.d(t,{NetlifyStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.tokenInput=document.getElementById(this.props.token),this.siteIdInput=document.getElementById(this.props.siteId),this.token=this.tokenInput.value,this.siteId=this.siteIdInput.value,this.state={loading:!1,error:!1,status:null},this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){this.bindInputs(),this.setupIntersectionObserver()}bindInputs(){this.tokenInput.addEventListener("change",(e=>this.handleTokenInput(e))),this.siteIdInput.addEventListener("change",(e=>this.handleSiteIdInput(e)))}componentWillUnmount(){this.observer&&this.observer.disconnect()}setupIntersectionObserver(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.updateStatus(),this.observer.unobserve(this.tokenInput))}))}),{root:null,threshold:.1}),this.observer.observe(this.tokenInput)}handleTokenInput(e){const{value:t}=e.target;this.token=t,this.updateStatus()}handleSiteIdInput(e){const{value:t}=e.target;this.siteId=t,this.updateStatus()}updateStatus(){this.token&&(this.setState({loading:!0,error:!1}),i()({path:"staatic-netlify/v1/netlify-status",method:"POST",data:{token:this.token,siteId:this.siteId}}).then((({status:e})=>{this.setState({loading:!1,status:e})})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e)})))}render(){const{instanceId:e}=this.props;if(this.state.error)return(0,a.createElement)("div",{className:"staatic-netlify-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to verify connection status, please try again later.","staatic")));if(this.state.loading)return(0,a.createElement)("div",{className:"staatic-netlify-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Verifying connection status...","staatic")));const{status:t}=this.state;return t?(0,a.createElement)("div",{className:"staatic-netlify-status"},(0,a.createElement)("p",{className:t.success?"staatic-success":"staatic-error"},(0,a.createElement)(o.Dashicon,{icon:t.success?"yes":"no"}),t.message),t.detail?(0,a.createElement)("p",{className:"staatic-detail"},t.detail):""):null}}h.propTypes={token:c().string.isRequired,siteId:c().string};const u=h},325:(e,t,s)=>{"use strict";s.r(t),s.d(t,{PublicationLogs:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.state={loading:!0,error:!1,publication:null,logs:[],unloaded:!1},this.interval=null,this.updateLogs=this.updateLogs.bind(this)}componentDidMount(){window.addEventListener("beforeunload",this.handleBeforeUnload),this.updateLogs()}componentWillUnmount(){this.interval&&clearInterval(this.interval),window.removeEventListener("beforeunload",this.handleBeforeUnload)}handleBeforeUnload=()=>{this.setState({unloaded:!0})};updateLogs(){i()({path:"staatic/v1/publication-logs",method:"POST",data:{id:this.props.id}}).then((({publication:e,logs:t})=>{this.setState({loading:!1,publication:e,logs:t});const s="pending"===e.status||"in_progress"===e.status;s&&!this.interval?this.interval=setInterval(this.updateLogs,2e3):!s&&this.interval&&clearInterval(this.interval)})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e),this.interval&&clearInterval(this.interval)}))}render(){const{instanceId:e}=this.props;return this.state.error&&!this.state.unloaded?(0,a.createElement)("div",{className:"staatic-publication-logs"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to load publication logs, please try again later","staatic"))):this.state.loading?(0,a.createElement)("div",{className:"staatic-publication-logs"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Loading publication logs","staatic"))):(0,a.createElement)("div",{className:"staatic-publication-logs"},(0,a.createElement)("ul",null,this.state.logs.map((e=>(0,a.createElement)("li",{key:e.id,className:"staatic-log-level-"+e.level},(0,a.createElement)("span",{className:"staatic-date"},e.dateFormatted," - "),e.source?(0,a.createElement)("span",null,e.source," - "):"",(0,a.createElement)("span",{className:"staatic-message"},e.message))))))}}h.propTypes={id:c().string.isRequired};const u=h},27:(e,t,s)=>{"use strict";s.r(t),s.d(t,{PublicationStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.state={loading:!0,error:!1,publication:{status:"pending"},progress:null,unloaded:!1},this.interval=null,this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){window.addEventListener("beforeunload",this.handleBeforeUnload),this.updateStatus()}componentWillUnmount(){this.interval&&clearInterval(this.interval),window.removeEventListener("beforeunload",this.handleBeforeUnload)}handleBeforeUnload=()=>{this.setState({unloaded:!0})};updateStatus(){i()({path:"staatic/v1/publication-status",method:"POST",data:{id:this.props.id}}).then((({publication:e,progress:t})=>{this.setState({loading:!1,publication:e,progress:t});const s="pending"===e.status||"in_progress"===e.status;s&&!this.interval?this.interval=setInterval(this.updateStatus,2e3):!s&&this.interval&&(clearInterval(this.interval),location.reload())})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e),this.interval&&clearInterval(this.interval)}))}renderProgressBar(e,t){switch(e){case"crawl":return this.renderCrawlProgressBar(t);case"deploy":return this.renderDeployProgressBar(t);default:return""}}renderCrawlProgressBar(e){const t=e.crawlPercent,s=parseInt(t)+"%";return(0,a.createElement)("div",{className:"staatic-progress-bar"},(0,a.createElement)("div",{className:"staatic-progress-bar-inner",style:{width:t+"%"}},(0,a.createElement)("span",null,e.numUrlsCrawled," / ~",e.numUrlsCrawlable," (",s,")")))}renderMaybeStuck(){const e=sprintf(/* translators: 1: Link to troubleshooting guide. */1 (()=>{var e={369:(e,t,s)=>{"use strict";s.r(t),s.d(t,{AdditionalPaths:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{constructor(e){super(e),this.state={focusedInput:null}}setInputFocus=e=>{this.setState({focusedInput:e})};resetInputFocus=()=>{this.setState({focusedInput:null})};onKeyUp(e){13===e.charCode&&this.setState({inputValue:e.target.value})}uriBasePathPlaceholder(e){const{rootPath:t,rootUrlPath:s}=this.props;if(!(e=(e=function(e){return(e=(e=e.replace(/\\/g,"/")).replace(/(?<=.)(\/+)/g,"/")).length>1&&":"===e[1]&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}(e)).replace(/[/\\]+$/,"")))return(0,n.__)("URL base path","staatic");if(t==e)return(0,n.__)("Path cannot be used.","staatic");if(!e.startsWith(t))return(0,n.__)("Provide URL base path manually.","staatic");let a=("/"===s?"":s)+e.substring(t.length);return/[^\/]+\.[^\/]+$/.test(a)&&(a=a.substring(0,a.lastIndexOf("/"))),a}render(){const{index:e,item:t,onChange:s,onDelete:l,placeholderText:o,showUriBasePath:r,showFollow:d,showSave:c,showRecursive:h}=this.props,u=e=>{"Enter"===e.key&&e.preventDefault()},p=t.isEnabled?"":"staatic-disabled",m=e=>this.state.focusedInput===e?"staatic-focused":"",g=this.uriBasePathPlaceholder(t.path);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:u}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:o||"",className:`staatic-value ${p} ${m("path")}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:u,onFocus:()=>this.setInputFocus("path"),onBlur:this.resetInputFocus}),r?(0,a.createElement)("input",{type:"text",value:t.uriBasePath,placeholder:g||"",className:`staatic-value ${p} ${m("uriBasePath")}`,onChange:t=>s(e,"uriBasePath",t.target.value),onKeyDown:u,onFocus:()=>this.setInputFocus("uriBasePath"),onBlur:this.resetInputFocus}):null,d?(0,a.createElement)("label",{title:(0,n.__)("Enable to extract links from this item.","staatic"),className:p},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontFollow,onChange:t=>s(e,"dontFollow",!t.target.checked),onKeyDown:u}),(0,n.__)("Follow","staatic")):null,c?(0,a.createElement)("label",{title:(0,n.__)("Enable to include this item in the build.","staatic"),className:p},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontSave,onChange:t=>s(e,"dontSave",!t.target.checked),onKeyDown:u}),(0,n.__)("Save","staatic")):null,h?(0,a.createElement)("label",{title:(0,n.__)("Enable to scan this path recursively.","staatic"),className:p},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.nonRecursive,onChange:t=>s(e,"nonRecursive",!t.target.checked),onKeyDown:u}),(0,n.__)("Recursive","staatic")):null,(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired,rootPath:r().string.isRequired,rootUrlPath:r().string.isRequired,placeholderText:r().string,showUriBasePath:r().bool,showFollow:r().bool,showSave:r().bool,showRecursive:r().bool};var c=s(934),h=s(234);class u extends l.Component{static format=["path","uriBasePath","flags"];constructor(e){super(...arguments);const t=this.getItems(),s=this.shouldShowAdvancedOptions(t);this.state={items:t,editAsText:"text"===e.defaultMode,showAdvancedOptions:s},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleToggleShowAdvancedOptions=this.handleToggleShowAdvancedOptions.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="text"===this.props.defaultMode?"block":"none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||"",uriBasePath:e.uriBasePath||"",dontTouch:e.flags&&e.flags.includes("T"),dontFollow:e.flags&&e.flags.includes("F"),dontSave:e.flags&&e.flags.includes("S"),nonRecursive:e.flags&&e.flags.includes("R")}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:"",uriBasePath:"",dontTouch:!1,dontFollow:!1,dontSave:!1,nonRecursive:!1}),t}shouldShowAdvancedOptions(e){let t=!1;return e.forEach((function(e){(e.uriBasePath||e.dontTouch||e.dontFollow||e.dontSave)&&(t=!0)})),t}updateItems(){const e=this.state.items.map((e=>{let t="";return e.dontTouch&&(t+="T"),e.dontFollow&&(t+="F"),e.dontSave&&(t+="S"),e.nonRecursive&&(t+="R"),{isEnabled:e.isEnabled?"true":"false",path:e.path,uriBasePath:e.uriBasePath,flags:t}})).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleToggleShowAdvancedOptions(){this.setState({showAdvancedOptions:!this.state.showAdvancedOptions})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:"",uriBasePath:"",dontTouch:!1,dontFollow:!1,dontSave:!1,nonRecursive:!1}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){const{rootPath:e,rootUrlPath:t,placeholderText:s,addButtonText:l}=this.props,{editAsText:o,showAdvancedOptions:r}=this.state;return o?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic")),(0,a.createElement)("a",{onClick:this.handleToggleShowAdvancedOptions},r?(0,n.__)("Hide advanced options","staatic"):(0,n.__)("Advanced options","staatic"))),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((n,i)=>(0,a.createElement)("div",{key:i,className:"staatic-item"},(0,a.createElement)(d,{index:i,item:n,rootPath:e,rootUrlPath:t,onChange:this.handleChange,onDelete:this.handleDelete,showUriBasePath:r,showFollow:r,showSave:r,showRecursive:!0,placeholderText:s})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),l||(0,n.__)("Add item","staatic"))))}}u.propTypes={name:r().string.isRequired,rootPath:r().string.isRequired,rootUrlPath:r().string.isRequired,defaultMode:r().string,placeholderText:r().string,addButtonText:r().string};const p=u},641:(e,t,s)=>{"use strict";s.r(t),s.d(t,{CrawlItems:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{onKeyUp(e){13===e.charCode&&this.setState({inputValue:e.target.value})}render(){const{index:e,item:t,onChange:s,onDelete:l,placeholderText:o,showFollow:r,showSave:d}=this.props,c=e=>{"Enter"===e.key&&e.preventDefault()},h=t.isEnabled?"":"staatic-disabled";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:c}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:o||"",className:`staatic-value ${h}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:c}),r?(0,a.createElement)("label",{title:(0,n.__)("Enable to extract links from this item.","staatic"),className:h},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontFollow,onChange:t=>s(e,"dontFollow",!t.target.checked),onKeyDown:c}),(0,n.__)("Follow","staatic")):null,d?(0,a.createElement)("label",{title:(0,n.__)("Enable to include this item in the build.","staatic"),className:h},(0,a.createElement)("input",{type:"checkbox",defaultChecked:!t.dontSave,onChange:t=>s(e,"dontSave",!t.target.checked),onKeyDown:c}),(0,n.__)("Save","staatic")):null,(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired,placeholderText:r().string,showFollow:r().bool,showSave:r().bool};var c=s(934),h=s(234);class u extends l.Component{static format=["path","flags"];constructor(e){super(...arguments);const t=this.getItems(),s=this.shouldShowAdvancedOptions(t);this.state={items:t,editAsText:"text"===e.defaultMode,showAdvancedOptions:s},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleToggleShowAdvancedOptions=this.handleToggleShowAdvancedOptions.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="text"===this.props.defaultMode?"block":"none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||"",dontTouch:e.flags&&e.flags.includes("T"),dontFollow:e.flags&&e.flags.includes("F"),dontSave:e.flags&&e.flags.includes("S")}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:"",dontTouch:!1,dontFollow:!1,dontSave:!1}),t}shouldShowAdvancedOptions(e){if("true"!==this.props.hasAdvancedOptions)return!1;let t=!1;return e.forEach((function(e){(e.dontTouch||e.dontFollow||e.dontSave)&&(t=!0)})),t}updateItems(){const e=this.state.items.map((e=>{let t="";return e.dontTouch&&(t+="T"),e.dontFollow&&(t+="F"),e.dontSave&&(t+="S"),e.nonRecursive&&(t+="R"),{isEnabled:e.isEnabled?"true":"false",path:e.path,flags:t}})).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleToggleShowAdvancedOptions(){this.setState({showAdvancedOptions:!this.state.showAdvancedOptions})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:"",dontTouch:!1,dontFollow:!1,dontSave:!1}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){const{placeholderText:e,addButtonText:t,hasAdvancedOptions:s}=this.props,{editAsText:l,showAdvancedOptions:o}=this.state;return l?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic")),"true"===s?(0,a.createElement)("a",{onClick:this.handleToggleShowAdvancedOptions},o?(0,n.__)("Hide advanced options","staatic"):(0,n.__)("Advanced options","staatic")):null),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((t,s)=>(0,a.createElement)("div",{key:s,className:"staatic-item"},(0,a.createElement)(d,{index:s,item:t,onChange:this.handleChange,onDelete:this.handleDelete,placeholderText:e,showFollow:o,showSave:o})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),t||(0,n.__)("Add item","staatic"))))}}u.propTypes={name:r().string.isRequired,defaultMode:r().string,placeholderText:r().string,addButtonText:r().string,hasAdvancedOptions:r().string};const p=u},845:(e,t,s)=>{"use strict";s.r(t),s.d(t,{DestinationUrl:()=>r,default:()=>d});var a=s(196),n=s(736),i=s(307),l=s(697),o=s.n(l);class r extends i.Component{constructor(e){super(e),this.valueInputRef=React.createRef(),this.setInitialState()}setInitialState(){const e=document.getElementById(this.props.name).value;this.state=""===e||"#no-index"===e?{type:"offline",value:"",appendIndex:""===e}:{type:"regular",value:e,appendIndex:!0}}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(){this.updateExternalValue()}updateExternalValue(){const e="offline"===this.state.type?this.state.appendIndex?"":"#no-index":this.state.value;document.getElementById(this.props.name).value=e}handleChange(e,t){this.setState({[e]:t}),"type"===e&&"regular"===t&&setTimeout((()=>this.valueInputRef.current.focus()),50)}render(){return(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-destination-url"},(0,a.createElement)("fieldset",null,(0,a.createElement)("div",null,(0,a.createElement)("input",{id:"destination-url-type-regular",type:"radio",value:"regular",checked:"regular"===this.state.type,onChange:e=>this.handleChange("type",e.target.value)})),(0,a.createElement)("div",{className:"staatic-field"},(0,a.createElement)("label",{htmlFor:"destination-url-type-regular"},(0,n.__)("Regular URL","staatic")),(0,a.createElement)("input",{ref:this.valueInputRef,className:"staatic-value",type:"text",value:this.state.value,disabled:"regular"!==this.state.type,onChange:e=>this.handleChange("value",e.target.value)}),(0,a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:(0,n.__)("Using an <em>absolute</em> URL (e.g. <code>https://example.com/</code>) is recommended for production use. Alternatively a <em>relative</em> URL (e.g. <code>//example.com/</code> or <code>/</code>) can be used to host your site on multiple schemes or domains. If the URL contains a <em>path</em> other than <code>/</code>, it will be prepended to all URLs, allowing the site to be placed in a subdirectory.","staatic")}}))),this.props.hideOfflineUrl?null:(0,a.createElement)("fieldset",null,(0,a.createElement)("div",null,(0,a.createElement)("input",{id:"destination-url-type-offline",type:"radio",value:"offline",checked:"offline"===this.state.type,onChange:e=>this.handleChange("type",e.target.value)})),(0,a.createElement)("div",{className:"staatic-field"},(0,a.createElement)("label",{htmlFor:"destination-url-type-offline"},(0,n.__)("Offline URL","staatic")),(0,a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:(0,n.__)("Using offline URLs is recommended only when you would like to be able to browse your site locally, without hosting it on a webserver.","staatic")}}),"offline"===this.state.type&&(0,a.createElement)("div",{class:"staatic-offline-append-index"},(0,a.createElement)("label",{htmlFor:"destination-url-offline-append-index"},(0,a.createElement)("input",{id:"destination-url-offline-append-index",type:"checkbox",checked:this.state.appendIndex,onChange:e=>this.handleChange("appendIndex",!!e.target.checked)}),(0,a.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,n.__)("Append <code>/index.html</code> to directory URLs","staatic")}})),(0,a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:(0,n.__)("Ensures compatibility with browsers when loading pages directly.","staatic")}}))))))}}r.propTypes={name:o().string.isRequired,hideOfflineUrl:o().bool};const d=r},713:(e,t,s)=>{"use strict";s.r(t),s.d(t,{ExcludeUrls:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{render(){const{index:e,item:t,onChange:s,onDelete:l}=this.props,o=e=>{"Enter"===e.key&&e.preventDefault()},r=t.isEnabled?"":"staatic-disabled";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:o}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:(0,n.__)("URL","staatic"),className:`staatic-value ${r}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:o}),(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired};var c=s(934),h=s(234);class u extends l.Component{static format=["path"];constructor(e){super(...arguments),this.state={items:this.getItems(),editAsText:!1},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||""}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:""}),t}updateItems(){const e=this.state.items.map((e=>({isEnabled:e.isEnabled?"true":"false",path:e.path}))).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:""}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){return this.state.editAsText?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic"))),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"staatic-item"},(0,a.createElement)(d,{index:t,item:e,onChange:this.handleChange,onDelete:this.handleDelete})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),(0,n.__)("Add URL","staatic"))))}}u.propTypes={name:r().string.isRequired};const p=u},143:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GithubStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.tokenInput=document.getElementById(this.props.token),this.token=this.tokenInput.value,this.state={loading:!1,error:!1,status:null},this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){this.bindInputs(),this.setupIntersectionObserver()}bindInputs(){this.tokenInput.addEventListener("change",(e=>this.handleTokenInput(e)))}componentWillUnmount(){this.observer&&this.observer.disconnect()}setupIntersectionObserver(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.updateStatus(),this.observer.unobserve(this.tokenInput))}))}),{root:null,threshold:.1}),this.observer.observe(this.tokenInput)}handleTokenInput(e){const{value:t}=e.target;this.token=t,this.updateStatus()}updateStatus(){this.token&&(this.setState({loading:!0,error:!1}),i()({path:"staatic-github/v1/github-status",method:"POST",data:{token:this.token}}).then((({status:e})=>{this.setState({loading:!1,status:e})})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e)})))}render(){const{instanceId:e}=this.props;if(this.state.error)return(0,a.createElement)("div",{className:"staatic-github-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to verify connection status, please try again later.","staatic")));if(this.state.loading)return(0,a.createElement)("div",{className:"staatic-github-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Verifying connection status...","staatic")));const{status:t}=this.state;return t?(0,a.createElement)("div",{className:"staatic-github-status"},(0,a.createElement)("p",{className:t.success?"staatic-success":"staatic-error"},(0,a.createElement)(o.Dashicon,{icon:t.success?"yes":"no"}),t.message),t.detail?(0,a.createElement)("p",{className:"staatic-detail"},t.detail):""):null}}h.propTypes={token:c().string.isRequired};const u=h},996:(e,t,s)=>{"use strict";s.r(t),s.d(t,{NetlifyStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.tokenInput=document.getElementById(this.props.token),this.siteIdInput=document.getElementById(this.props.siteId),this.token=this.tokenInput.value,this.siteId=this.siteIdInput.value,this.state={loading:!1,error:!1,status:null},this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){this.bindInputs(),this.setupIntersectionObserver()}bindInputs(){this.tokenInput.addEventListener("change",(e=>this.handleTokenInput(e))),this.siteIdInput.addEventListener("change",(e=>this.handleSiteIdInput(e)))}componentWillUnmount(){this.observer&&this.observer.disconnect()}setupIntersectionObserver(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.updateStatus(),this.observer.unobserve(this.tokenInput))}))}),{root:null,threshold:.1}),this.observer.observe(this.tokenInput)}handleTokenInput(e){const{value:t}=e.target;this.token=t,this.updateStatus()}handleSiteIdInput(e){const{value:t}=e.target;this.siteId=t,this.updateStatus()}updateStatus(){this.token&&(this.setState({loading:!0,error:!1}),i()({path:"staatic-netlify/v1/netlify-status",method:"POST",data:{token:this.token,siteId:this.siteId}}).then((({status:e})=>{this.setState({loading:!1,status:e})})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e)})))}render(){const{instanceId:e}=this.props;if(this.state.error)return(0,a.createElement)("div",{className:"staatic-netlify-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to verify connection status, please try again later.","staatic")));if(this.state.loading)return(0,a.createElement)("div",{className:"staatic-netlify-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Verifying connection status...","staatic")));const{status:t}=this.state;return t?(0,a.createElement)("div",{className:"staatic-netlify-status"},(0,a.createElement)("p",{className:t.success?"staatic-success":"staatic-error"},(0,a.createElement)(o.Dashicon,{icon:t.success?"yes":"no"}),t.message),t.detail?(0,a.createElement)("p",{className:"staatic-detail"},t.detail):""):null}}h.propTypes={token:c().string.isRequired,siteId:c().string};const u=h},325:(e,t,s)=>{"use strict";s.r(t),s.d(t,{PublicationLogs:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.state={loading:!0,error:!1,publication:null,logs:[],unloaded:!1},this.interval=null,this.updateLogs=this.updateLogs.bind(this)}componentDidMount(){window.addEventListener("beforeunload",this.handleBeforeUnload),this.updateLogs()}componentWillUnmount(){this.interval&&clearInterval(this.interval),window.removeEventListener("beforeunload",this.handleBeforeUnload)}handleBeforeUnload=()=>{this.setState({unloaded:!0})};updateLogs(){i()({path:"staatic/v1/publication-logs",method:"POST",data:{id:this.props.id}}).then((({publication:e,logs:t})=>{this.setState({loading:!1,publication:e,logs:t});const s="pending"===e.status||"in_progress"===e.status;s&&!this.interval?this.interval=setInterval(this.updateLogs,2e3):!s&&this.interval&&clearInterval(this.interval)})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e),this.interval&&clearInterval(this.interval)}))}render(){const{instanceId:e}=this.props;return this.state.error&&!this.state.unloaded?(0,a.createElement)("div",{className:"staatic-publication-logs"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to load publication logs, please try again later","staatic"))):this.state.loading?(0,a.createElement)("div",{className:"staatic-publication-logs"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Loading publication logs","staatic"))):(0,a.createElement)("div",{className:"staatic-publication-logs"},(0,a.createElement)("ul",null,this.state.logs.map((e=>(0,a.createElement)("li",{key:e.id,className:"staatic-log-level-"+e.level},(0,a.createElement)("span",{className:"staatic-date"},e.dateFormatted," - "),e.source?(0,a.createElement)("span",null,e.source," - "):"",(0,a.createElement)("span",{className:"staatic-message"},e.message))))))}}h.propTypes={id:c().string.isRequired};const u=h},27:(e,t,s)=>{"use strict";s.r(t),s.d(t,{PublicationStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.state={loading:!0,error:!1,publication:{status:"pending"},progress:null,unloaded:!1},this.interval=null,this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){window.addEventListener("beforeunload",this.handleBeforeUnload),this.updateStatus()}componentWillUnmount(){this.interval&&clearInterval(this.interval),window.removeEventListener("beforeunload",this.handleBeforeUnload)}handleBeforeUnload=()=>{this.setState({unloaded:!0})};updateStatus(){i()({path:"staatic/v1/publication-status",method:"POST",data:{id:this.props.id}}).then((({publication:e,progress:t})=>{this.setState({loading:!1,publication:e,progress:t});const s="pending"===e.status||"in_progress"===e.status;s&&!this.interval?this.interval=setInterval(this.updateStatus,2e3):!s&&this.interval&&(clearInterval(this.interval),location.reload())})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e),this.interval&&clearInterval(this.interval)}))}renderProgressBar(e,t){switch(e){case"crawl":return this.renderCrawlProgressBar(t);case"deploy":return this.renderDeployProgressBar(t);default:return""}}renderCrawlProgressBar(e){const t=e.crawlPercent,s=parseInt(t)+"%";return(0,a.createElement)("div",{className:"staatic-progress-bar"},(0,a.createElement)("div",{className:"staatic-progress-bar-inner",style:{width:t+"%"}},(0,a.createElement)("span",null,e.numUrlsCrawled," / ~",e.numUrlsCrawlable," (",s,")")))}renderMaybeStuck(){const e=sprintf(/* translators: 1: Link to troubleshooting guide. */ 2 2 (0,r.__)("This process is taking longer than anticipated. Please consider restarting the publication or consulting our %1$s for assistance.","staatic"),`<a href="https://staatic.com/wordpress/troubleshooting/" target="_blank" rel="noopener">${(0,r.__)("troubleshooting guide","staatic")}</a>`);return(0,a.createElement)("p",{className:"staatic-maybe-stuck",dangerouslySetInnerHTML:{__html:e}})}renderDeployProgressBar(e){const t=e.deployPercent,s=parseInt(t)+"%";return(0,a.createElement)("div",{className:"staatic-progress-bar"},(0,a.createElement)("div",{className:"staatic-progress-bar-inner",style:{width:t+"%"}},(0,a.createElement)("span",null,e.numResultsDeployed," / ~",e.numResultsDeployable," (",s,")")))}renderStatus(e){const{publication:t,progress:s}=this.state;switch(e){case"pending":return(0,a.createElement)("p",null,(0,r.__)("Publication is pending processing.","staatic"));case"in_progress":return(0,a.createElement)("div",null,(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),t.currentTask?t.currentTask.description:(0,r.__)("Preparing publication.","staatic")),t.isMaybeStuck?this.renderMaybeStuck():null,t.currentTask?this.renderProgressBar(t.currentTask.name,s):"");case"finished":return(0,a.createElement)("div",null,(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"smiley"}),(0,r.__)("Deployed","staatic")+" "+s.dateDeploymentFinished,t.publisher?" "+(0,r.__)("by","staatic")+" "+t.publisher:""),(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"clock"}),(0,r.__)("Total time taken:","staatic")+" "+s.timeTaken));default:return(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Publication has failed.","staatic"))}}render(){const{instanceId:e}=this.props;return this.state.error&&!this.state.unloaded?(0,a.createElement)("div",{className:"staatic-publication-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to load publication status, please try again later.","staatic"))):this.state.loading?(0,a.createElement)("div",{className:"staatic-publication-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Loading publication status.","staatic"))):(0,a.createElement)("div",{className:"staatic-publication-status"},this.renderStatus(this.state.publication.status))}}h.propTypes={id:c().string.isRequired};const u=h},181:(e,t,s)=>{"use strict";s.r(t),s.d(t,{RedirectItems:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{constructor(e){super(e),this.state={focusedInput:null}}setInputFocus=e=>{this.setState({focusedInput:e})};resetInputFocus=()=>{this.setState({focusedInput:null})};render(){const{index:e,item:t,onChange:s,onDelete:l}=this.props,o=e=>{"Enter"===e.key&&e.preventDefault()},r=t.isEnabled?"":"staatic-disabled",d=e=>this.state.focusedInput===e?"staatic-focused":"";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:o}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:(0,n.__)("Original path","staatic"),className:`staatic-value ${r} ${d("path")}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:o,onFocus:()=>this.setInputFocus("path"),onBlur:this.resetInputFocus}),(0,a.createElement)("input",{type:"text",value:t.redirectUrl,placeholder:(0,n.__)("Redirect URL","staatic"),className:`staatic-value ${r} ${d("redirectUrl")}`,onChange:t=>s(e,"redirectUrl",t.target.value),onKeyDown:o,onFocus:()=>this.setInputFocus("redirectUrl"),onBlur:this.resetInputFocus}),(0,a.createElement)("select",{value:t.statusCode,className:r,onChange:t=>s(e,"statusCode",t.target.value),onKeyDown:o},(0,a.createElement)("option",null),(0,a.createElement)("option",{value:"301"},"301 Moved Permanently"),(0,a.createElement)("option",{value:"302"},"302 Found"),(0,a.createElement)("option",{value:"307"},"307 Temporary Redirect"),(0,a.createElement)("option",{value:"308"},"308 Permanent Redirect")),(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired};var c=s(934),h=s(234);class u extends l.Component{static format=["path","redirectUrl","statusCode"];static defaultStatusCode="302";constructor(e){super(...arguments),this.state={items:this.getItems(),editAsText:!1},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||"",redirectUrl:e.redirectUrl||"",statusCode:e.statusCode||u.defaultStatusCode}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:"",redirectUrl:"",statusCode:u.defaultStatusCode}),t}updateItems(){const e=this.state.items.map((e=>({isEnabled:e.isEnabled?"true":"false",path:e.path,redirectUrl:e.redirectUrl,statusCode:e.statusCode===u.defaultStatusCode?"":e.statusCode}))).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:"",redirectUrl:"",statusCode:u.defaultStatusCode}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){return this.state.editAsText?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic"))),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"staatic-item staatic-redirect-item"},(0,a.createElement)(d,{index:t,item:e,onChange:this.handleChange,onDelete:this.handleDelete})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),(0,n.__)("Add Redirect","staatic"))))}}u.propTypes={name:r().string.isRequired};const p=u},723:(e,t,s)=>{"use strict";s.r(t),s.d(t,{RetainPaths:()=>u,default:()=>p});var a=s(196),n=s(736),i=s(609),l=s(307),o=s(697),r=s.n(o);class d extends l.Component{render(){const{index:e,item:t,onChange:s,onDelete:l}=this.props,o=e=>{"Enter"===e.key&&e.preventDefault()},r=t.isEnabled?"":"staatic-disabled";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{type:"checkbox",defaultChecked:t.isEnabled,onChange:t=>s(e,"isEnabled",t.target.checked),onKeyDown:o}),(0,a.createElement)("input",{type:"text",value:t.path,placeholder:(0,n.__)("Path","staatic"),className:`staatic-value ${r}`,onChange:t=>s(e,"path",t.target.value),onKeyDown:o}),(0,a.createElement)("button",{onClick:t=>{t.preventDefault(),l(e)},className:"staatic-delete"},(0,a.createElement)(i.Dashicon,{icon:"trash"}),(0,n.__)("Delete","staatic")))}}d.propTypes={index:r().number.isRequired,item:r().object.isRequired};var c=s(934),h=s(234);class u extends l.Component{static format=["path"];constructor(e){super(...arguments),this.state={items:this.getItems(),editAsText:!1},this.handleToggleEditMode=this.handleToggleEditMode.bind(this),this.handleChange=this.handleChange.bind(this),this.handleDelete=this.handleDelete.bind(this)}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(e,t){t.items!==this.state.items&&this.updateItems()}getItems(){const e=document.getElementById(this.props.name).value,t=(0,c.Z)(e,u.format).map((e=>({isEnabled:"true"===e.isEnabled,path:e.path||""}))).filter((e=>e.path));return 0===t.length&&t.push({isEnabled:!0,path:""}),t}updateItems(){const e=this.state.items.map((e=>({isEnabled:e.isEnabled?"true":"false",path:e.path}))).filter((e=>e.path));document.getElementById(this.props.name).value=(0,h.Z)(e,u.format)}handleToggleEditMode(){document.getElementById(this.props.name).style.display=this.state.editAsText?"none":"inline-block",this.state.editAsText&&this.setState({items:this.getItems()}),this.setState({editAsText:!this.state.editAsText})}handleAddItem(){this.setState({items:[...this.state.items,{isEnabled:!0,path:""}]})}handleChange(e,t,s){const a=[...this.state.items];a[e][t]=s,this.setState({items:a})}handleDelete(e){const t=[...this.state.items];t.splice(e,1),this.setState({items:t})}render(){return this.state.editAsText?(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Visual mode","staatic"))):(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-list-toggle"},(0,a.createElement)("a",{onClick:this.handleToggleEditMode},(0,n.__)("Text mode","staatic"))),(0,a.createElement)("div",{className:"staatic-list"},this.state.items.map(((e,t)=>(0,a.createElement)("div",{key:t,className:"staatic-item"},(0,a.createElement)(d,{index:t,item:e,onChange:this.handleChange,onDelete:this.handleDelete})))),(0,a.createElement)("button",{className:"staatic-add",onClick:e=>{e.preventDefault(),this.handleAddItem()}},(0,a.createElement)(i.Dashicon,{icon:"plus"}),(0,n.__)("Add Path","staatic"))))}}u.propTypes={name:r().string.isRequired};const p=u},421:(e,t,s)=>{"use strict";s.r(t),s.d(t,{S3Endpoint:()=>r,default:()=>d});var a=s(196),n=s(736),i=s(307),l=s(697),o=s.n(l);class r extends i.Component{constructor(e){super(e),this.providers=[{name:"aws",label:"Amazon S3 ("+(0,n.__)("automatic","staatic")+")"},{name:"custom",label:(0,n.__)("Custom endpoint","staatic")}],this.setInitialState()}setInitialState(){const e=document.getElementById(this.props.name).value;this.state={provider:e?"custom":"aws",endpoint:e}}componentDidMount(){document.getElementById(this.props.name).style.display="none"}componentDidUpdate(){this.updateExternalValue()}updateExternalValue(){document.getElementById(this.props.name).value=this.state.endpoint}handleProviderChange(e){this.setState({provider:e,endpoint:""})}handleEndpointChange(e){this.setState({endpoint:e})}render(){return(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"staatic-s3-endpoint"},(0,a.createElement)("select",{value:this.state.provider,onChange:e=>this.handleProviderChange(e.target.value)},(0,a.createElement)("option",null),this.providers.map((e=>(0,a.createElement)("option",{key:e.name,value:e.name},e.label)))),"custom"===this.state.provider?(0,a.createElement)("input",{className:"regular-text code",type:"text",value:this.state.endpoint,onChange:e=>this.handleEndpointChange(e.target.value),placeholder:"https://"}):null))}}r.propTypes={name:o().string.isRequired};const d=r},473:(e,t,s)=>{"use strict";s.r(t),s.d(t,{SftpStatus:()=>h,default:()=>u});var a=s(196),n=s(989),i=s.n(n),l=s(307),o=s(609),r=s(736),d=s(697),c=s.n(d);class h extends l.Component{constructor(e){super(...arguments),this.hostInput=document.getElementById(this.props.host),this.portInput=document.getElementById(this.props.port),this.usernameInput=document.getElementById(this.props.username),this.passwordInput=document.getElementById(this.props.password),this.sshKeyInput=document.getElementById(this.props.sshKey),this.sshKeyPasswordInput=document.getElementById(this.props.sshKeyPassword),this.host=this.hostInput.value,this.port=this.portInput.value,this.username=this.usernameInput.value,this.password=this.passwordInput.value,this.sshKey=this.sshKeyInput.value,this.sshKeyPassword=this.sshKeyPasswordInput.value,this.state={loading:!1,error:!1,status:null},this.updateStatus=this.updateStatus.bind(this)}componentDidMount(){this.bindInputs(),this.setupIntersectionObserver()}bindInputs(){this.hostInput.addEventListener("change",(e=>this.handleHostInput(e))),this.portInput.addEventListener("change",(e=>this.handlePortInput(e))),this.usernameInput.addEventListener("change",(e=>this.handleUsernameInput(e))),this.passwordInput.addEventListener("change",(e=>this.handlePasswordInput(e))),this.sshKeyInput.addEventListener("change",(e=>this.handleSshKeyInput(e))),this.sshKeyPasswordInput.addEventListener("change",(e=>this.handleSshKeyPasswordInput(e)))}componentWillUnmount(){this.observer&&this.observer.disconnect()}setupIntersectionObserver(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.updateStatus(),this.observer.unobserve(this.usernameInput))}))}),{root:null,threshold:.1}),this.observer.observe(this.usernameInput)}handleHostInput(e){const{value:t}=e.target;this.host=t,this.updateStatus()}handlePortInput(e){const{value:t}=e.target;this.port=t,this.updateStatus()}handleUsernameInput(e){const{value:t}=e.target;this.username=t,this.updateStatus()}handlePasswordInput(e){const{value:t}=e.target;this.password=t,this.updateStatus()}handleSshKeyInput(e){const{value:t}=e.target;this.sshKey=t,this.updateStatus()}handleSshKeyPasswordInput(e){const{value:t}=e.target;this.sshKeyPassword=t,this.updateStatus()}updateStatus(){this.host&&this.port&&this.username&&(this.password||this.sshKey)&&(this.setState({loading:!0,error:!1}),i()({path:"staatic-sftp/v1/sftp-status",method:"POST",data:{host:this.host,port:this.port,username:this.username,password:this.password,sshKey:this.sshKey,sshKeyPassword:this.sshKeyPassword}}).then((({status:e})=>{this.setState({loading:!1,status:e})})).catch((e=>{this.setState({loading:!1,error:!0}),console.error(e)})))}render(){const{instanceId:e}=this.props;if(this.state.error)return(0,a.createElement)("div",{className:"staatic-sftp-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"warning"}),(0,r.__)("Unable to verify connection status, please try again later.","staatic")));if(this.state.loading)return(0,a.createElement)("div",{className:"staatic-sftp-status"},(0,a.createElement)("p",null,(0,a.createElement)(o.Dashicon,{icon:"update",className:"spin"}),(0,r.__)("Verifying connection status...","staatic")));const{status:t}=this.state;return t?(0,a.createElement)("div",{className:"staatic-sftp-status"},(0,a.createElement)("p",{className:t.success?"staatic-success":"staatic-error"},(0,a.createElement)(o.Dashicon,{icon:t.success?"yes":"no"}),t.message),t.detail?(0,a.createElement)("p",{className:"staatic-detail"},t.detail):""):null}}h.propTypes={host:c().string.isRequired,port:c().string.isRequired,username:c().string.isRequired,password:c().string,sshKey:c().string,sshKeyPassword:c().string};const u=h},934:(e,t,s)=>{"use strict";function a(e,t){const s=[],a=["isEnabled",...t];return e.trim().split("\n").forEach((e=>{let t=!1,n=!1,i="",l=[],o=!0;e.startsWith("#")&&(o=!1,e=e.substring(1).trim());for(let s of e)n?(i+=s,n=!1):"\\"===s?n=!0:'"'!==s||n?" "!==s||t?i+=s:(l.push(i),i=""):t=!t;l.push(i),l.unshift(o.toString());const r=a.reduce(((e,t,s)=>(e[t]=s<l.length?l[s]:null,e)),{});s.push(r)})),s}s.d(t,{Z:()=>a})},234:(e,t,s)=>{"use strict";function a(e,t){const s=["isEnabled",...t].filter(((e,t,s)=>s.indexOf(e)===t));let a="";return e.forEach((e=>{let t=[];"false"!==e.isEnabled||t.push("#"),s.forEach((s=>{if("isEnabled"!==s){let a=e[s]||"";a=a.replace(/"/g,'\\"'),(a.indexOf(" ")>=0||a.indexOf('\\"')>=0)&&(a=`"${a}"`),t.push(a)}})),a+=t.join(" ").trim()+"\n"})),a.trim()}s.d(t,{Z:()=>a})},703:(e,t,s)=>{"use strict";var a=s(414);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,i,l){if(l!==a){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:n};return s.PropTypes=s,s}},697:(e,t,s)=>{e.exports=s(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},323:(e,t,s)=>{var a={"./AdditionalPaths/index.js":369,"./CrawlItems/index.js":641,"./DestinationUrl/index.js":845,"./ExcludeUrls/index.js":713,"./GithubStatus/index.js":143,"./NetlifyStatus/index.js":996,"./PublicationLogs/index.js":325,"./PublicationStatus/index.js":27,"./RedirectItems/index.js":181,"./RetainPaths/index.js":723,"./S3Endpoint/index.js":421,"./SftpStatus/index.js":473};function n(e){var t=i(e);return s(t)}function i(e){if(!s.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}n.keys=function(){return Object.keys(a)},n.resolve=i,e.exports=n,n.id=323},196:e=>{"use strict";e.exports=window.React},989:e=>{"use strict";e.exports=window.wp.apiFetch},609:e=>{"use strict";e.exports=window.wp.components},307:e=>{"use strict";e.exports=window.wp.element},736:e=>{"use strict";e.exports=window.wp.i18n}},t={};function s(a){var n=t[a];if(void 0!==n)return n.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,s),i.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.domReady;var t=s.n(e),a=s(307);class n{constructor(){this.settings=[]}setup(e){this.findSettings(),this.toggleRelevantSettingsFor(e.value),e.addEventListener("change",(e=>{this.toggleRelevantSettingsFor(e.target.value)}))}findSettings(){document.querySelectorAll("#staatic-settings tr").forEach(((e,t)=>{e.classList.contains("staatic_deployment_method")||e.classList.forEach((t=>{const s=t.match(/^staatic_(.+?)_(.+)$/);s&&this.settings.push({name:s[0],group:s[1],element:e})}))}))}toggleRelevantSettingsFor(e){this.settings.forEach((t=>{const s=t.group===e;t.element.style.display=s?"":"none"}))}}var i=s(196);t()((function(){const e=document.querySelector("select#staatic_deployment_method");var t;e&&(new n).setup(e),t=a.createRoot,document.querySelectorAll("[data-staatic-component]").forEach((e=>{const a=s(323)(`./${e.dataset.staaticComponent}/index.js`).default;t(e).render((0,i.createElement)(a,{...e.dataset}))}))}))})()})(); -
staatic/trunk/generated/container.php
r3162550 r3179309 842 842 yield 5 => $this->privates['Staatic\WordPress\Module\RegisterSettings'] ?? $this->getRegisterSettingsService(); 843 843 yield 6 => $this->privates['Staatic\WordPress\Module\Admin\RegisterAssets'] = $this->privates['Staatic\WordPress\Module\Admin\RegisterAssets'] ?? new RegisterAssets( 844 '1.10. 6'844 '1.10.7-beta1' 845 845 ); 846 846 yield 7 => $this->privates['Staatic\WordPress\Module\Admin\RegisterNavigation'] ?? $this->getRegisterNavigationService(); … … 1797 1797 return $this->privates['Staatic\WordPress\Migrations\MigrationCoordinatorFactory'] = new MigrationCoordinatorFactory( 1798 1798 $this->privates['wpdb'] ?? $this->getWpdbService(), 1799 '1.10. 6'1799 '1.10.7-beta1' 1800 1800 ); 1801 1801 } … … 3443 3443 { 3444 3444 return [ 3445 'staatic.version' => '1.10. 6'3445 'staatic.version' => '1.10.7-beta1' 3446 3446 ]; 3447 3447 } -
staatic/trunk/languages/staatic-nl_NL-staatic-admin.json
r3162550 r3179309 1 {"translation-revision-date":"2024-10- 04 09:46+0200","generator":"WP-CLI\/2.10.0","source":"assets\/admin.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl_NL","plural-forms":"nplurals=2; plural=(n != 1);"},"URL":["URL"],"Add URL":["URL toevoegen"],"Path":["Pad"],"Add Path":["Pad toevoegen"],"Redirect URL":["Doorverwijs-URL"],"Delete":["Verwijderen"],"Visual mode":["Visuele modus"],"Text mode":["Tekstmodus"],"Hide advanced options":["Verberg geavanceerde opties"],"Advanced options":["Geavanceerde opties"],"Add item":["Item toevoegen"],"URL base path":["URL basispad"],"Path cannot be used.":["Pad kan niet gebruikt worden."],"Provide URL base path manually.":["Geef het URL-basispad handmatig op."],"Enable to extract links from this item.":["Schakel in om links uit dit item te extraheren."],"Follow":["Volgen"],"Enable to include this item in the build.":["Schakel in om dit item onderdeel van de build te maken."],"Save":["Opslaan"],"Enable to scan this path recursively.":["Schakel in om dit pad recursief te scannen."],"Recursive":["Recursief"],"Regular URL":["Reguliere URL"],"Using an <em>absolute<\/em> URL (e.g. <code>https:\/\/example.com\/<\/code>) is recommended for production use. Alternatively a <em>relative<\/em> URL (e.g. <code>\/\/example.com\/<\/code> or <code>\/<\/code>) can be used to host your site on multiple schemes or domains. If the URL contains a <em>path<\/em> other than <code>\/<\/code>, it will be prepended to all URLs, allowing the site to be placed in a subdirectory.":["Het gebruik van een <em>absolute<\/em> URL (bijv. <code>https:\/\/voorbeeld.nl\/<\/code>) wordt aangeraden voor productiegebruik. Als alternatief kan een <em>relatieve<\/em> URL (bijv. <code>\/\/voorbeeld.nl\/<\/code> of <code>\/<\/code>) gebruikt worden om uw site te hosten met meerdere schema's of domeinen. Indien de URL een <em>pad<\/em> anders dan <code>\/<\/code> bevat, dan wordt deze voorgevoegd aan alle URL's, waarmee de site in een subdirectory geplaatst kan worden."],"Offline URL":["Offline URL"],"Using offline URLs is recommended only when you would like to be able to browse your site locally, without hosting it on a webserver.":["Het gebruik van offline URL's wordt alleen aangeraden indien u de mogelijkheid wilt hebben om uw site lokaal te bekijken, zonder deze te hosten op een webserver."],"Unable to verify connection status, please try again later.":["Kan connectiestatus niet verifi\u00ebren; probeer het later opnieuw."],"Verifying connection status...":["Verifi\u00ebren van verbindingsstatus..."],"Unable to load publication logs, please try again later":["Publicatielogs laden mislukt, probeer het later opnieuw"],"Loading publication logs":["Laden van publicatielogs"],"This process is taking longer than anticipated. Please consider restarting the publication or consulting our %1$s for assistance.":["Dit proces duurt langer dan verwacht. Overweeg alstublieft de publicatie opnieuw te starten of raadpleeg onze %1$s voor hulp."],"troubleshooting guide":["probleemoplossingsgids"],"Publication is pending processing.":["Publicatie wacht op verwerking."],"Preparing publication.":["Voorbereiden van publicatie."],"Deployed":["Live-gezet"],"by":["door"],"Total time taken:":["Totale duur:"],"Publication has failed.":["Publicatie is mislukt."],"Unable to load publication status, please try again later.":["Kan de publicatiestatus niet laden, probeer het later opnieuw."],"Loading publication status.":["Laden van publicatiestatus."],"Add Redirect":["Doorverwijzing toevoegen"],"Original path":["Oorspronkelijk pad"],"automatic":["automatisch"],"Custom endpoint":["Aangepast endpoint"]}}}1 {"translation-revision-date":"2024-10-31 10:00+0100","generator":"WP-CLI\/2.10.0","source":"assets\/admin.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"nl_NL","plural-forms":"nplurals=2; plural=(n != 1);"},"URL":["URL"],"Add URL":["URL toevoegen"],"Path":["Pad"],"Add Path":["Pad toevoegen"],"Redirect URL":["Doorverwijs-URL"],"Delete":["Verwijderen"],"URL base path":["URL basispad"],"Path cannot be used.":["Pad kan niet gebruikt worden."],"Provide URL base path manually.":["Geef het URL-basispad handmatig op."],"Enable to extract links from this item.":["Schakel in om links uit dit item te extraheren."],"Follow":["Volgen"],"Enable to include this item in the build.":["Schakel in om dit item onderdeel van de build te maken."],"Save":["Opslaan"],"Enable to scan this path recursively.":["Schakel in om dit pad recursief te scannen."],"Recursive":["Recursief"],"Visual mode":["Visuele modus"],"Text mode":["Tekstmodus"],"Hide advanced options":["Verberg geavanceerde opties"],"Advanced options":["Geavanceerde opties"],"Add item":["Item toevoegen"],"Regular URL":["Reguliere URL"],"Using an <em>absolute<\/em> URL (e.g. <code>https:\/\/example.com\/<\/code>) is recommended for production use. Alternatively a <em>relative<\/em> URL (e.g. <code>\/\/example.com\/<\/code> or <code>\/<\/code>) can be used to host your site on multiple schemes or domains. If the URL contains a <em>path<\/em> other than <code>\/<\/code>, it will be prepended to all URLs, allowing the site to be placed in a subdirectory.":["Het gebruik van een <em>absolute<\/em> URL (bijv. <code>https:\/\/voorbeeld.nl\/<\/code>) wordt aangeraden voor productiegebruik. Als alternatief kan een <em>relatieve<\/em> URL (bijv. <code>\/\/voorbeeld.nl\/<\/code> of <code>\/<\/code>) gebruikt worden om uw site te hosten met meerdere schema's of domeinen. Indien de URL een <em>pad<\/em> anders dan <code>\/<\/code> bevat, dan wordt deze voorgevoegd aan alle URL's, waarmee de site in een subdirectory geplaatst kan worden."],"Offline URL":["Offline URL"],"Using offline URLs is recommended only when you would like to be able to browse your site locally, without hosting it on a webserver.":["Het gebruik van offline URL's wordt alleen aangeraden indien u de mogelijkheid wilt hebben om uw site lokaal te bekijken, zonder deze te hosten op een webserver."],"Append <code>\/index.html<\/code> to directory URLs":["Voeg <code>\/index.html<\/code> toe aan directory-URL's"],"Ensures compatibility with browsers when loading pages directly.":["Zorgt voor compatibiliteit met browsers bij het direct laden van pagina's."],"Unable to verify connection status, please try again later.":["Kan connectiestatus niet verifi\u00ebren; probeer het later opnieuw."],"Verifying connection status...":["Verifi\u00ebren van verbindingsstatus..."],"Unable to load publication logs, please try again later":["Publicatielogs laden mislukt, probeer het later opnieuw"],"Loading publication logs":["Laden van publicatielogs"],"This process is taking longer than anticipated. Please consider restarting the publication or consulting our %1$s for assistance.":["Dit proces duurt langer dan verwacht. Overweeg alstublieft de publicatie opnieuw te starten of raadpleeg onze %1$s voor hulp."],"troubleshooting guide":["probleemoplossingsgids"],"Publication is pending processing.":["Publicatie wacht op verwerking."],"Preparing publication.":["Voorbereiden van publicatie."],"Deployed":["Live-gezet"],"by":["door"],"Total time taken:":["Totale duur:"],"Publication has failed.":["Publicatie is mislukt."],"Unable to load publication status, please try again later.":["Kan de publicatiestatus niet laden, probeer het later opnieuw."],"Loading publication status.":["Laden van publicatiestatus."],"Original path":["Oorspronkelijk pad"],"Add Redirect":["Doorverwijzing toevoegen"],"automatic":["automatisch"],"Custom endpoint":["Aangepast endpoint"]}}} -
staatic/trunk/languages/staatic-nl_NL.po
r3162550 r3179309 8 8 "Content-Type: text/plain; charset=UTF-8\n" 9 9 "Content-Transfer-Encoding: 8bit\n" 10 "POT-Creation-Date: 2024-10- 04T07:44:52+00:00\n"11 "PO-Revision-Date: 2024-10- 04 09:46+0200\n"10 "POT-Creation-Date: 2024-10-31T08:58:53+00:00\n" 11 "PO-Revision-Date: 2024-10-31 10:00+0100\n" 12 12 "Language: nl_NL\n" 13 13 "Plural-Forms: nplurals=2; plural=(n != 1);\n" … … 203 203 #: partials/admin/settings/additional_urls.php:18 204 204 #: src/Module/Admin/Page/PublicationResults/PublicationResultsTable.php:50 205 #: assets/admin.js:1094 206 #: assets/admin.js:1015 205 #: assets/admin.js:1 207 206 msgid "URL" 208 207 msgstr "URL" … … 210 209 #: partials/admin/publish-subset.php:40 211 210 #: partials/admin/settings/additional_urls.php:19 212 #: assets/admin.js:1038 213 #: assets/admin.js:975 211 #: assets/admin.js:1 214 212 msgid "Add URL" 215 213 msgstr "URL toevoegen" … … 232 230 #: partials/admin/publish-subset.php:72 233 231 #: partials/admin/settings/additional_paths.php:17 234 #: assets/admin.js:2213 235 #: assets/admin.js:2092 232 #: assets/admin.js:2 236 233 msgid "Path" 237 234 msgstr "Pad" … … 239 236 #: partials/admin/publish-subset.php:73 240 237 #: partials/admin/settings/additional_paths.php:18 241 #: assets/admin.js:2157 242 #: assets/admin.js:2052 238 #: assets/admin.js:2 243 239 msgid "Add Path" 244 240 msgstr "Pad toevoegen" … … 742 738 743 739 #: src/Module/Admin/Page/PublicationResults/PublicationResultsTable.php:72 744 #: assets/admin.js:1979 745 #: assets/admin.js:1883 740 #: assets/admin.js:2 746 741 msgid "Redirect URL" 747 742 msgstr "Doorverwijs-URL" … … 826 821 #: src/Module/Admin/Page/Publications/PublicationsTable.php:104 827 822 #: src/Module/Admin/Page/Publications/PublicationsTable.php:118 828 #: assets/admin.js:456 829 #: assets/admin.js:771 830 #: assets/admin.js:1106 831 #: assets/admin.js:2006 832 #: assets/admin.js:2225 833 #: assets/admin.js:424 834 #: assets/admin.js:725 835 #: assets/admin.js:1029 836 #: assets/admin.js:1912 837 #: assets/admin.js:2106 823 #: assets/admin.js:1 824 #: assets/admin.js:2 838 825 msgid "Delete" 839 826 msgstr "Verwijderen" -
staatic/trunk/languages/staatic.pot
r3162550 r3179309 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-10- 04T07:58:02+00:00\n"12 "POT-Creation-Date: 2024-10-31T09:12:58+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" -
staatic/trunk/readme.txt
r3162550 r3179309 99 99 == Changelog == 100 100 101 = 1.10.7 = 102 103 Release date: TBD. 104 105 **Improvements** 106 107 * Adds option to disable `/index.html` suffix on directory URLs for offline usage. 108 101 109 = 1.10.6 = 102 110 -
staatic/trunk/src/Bridge/CrawlProfile.php
r3112562 r3179309 23 23 'lowercase' => $lowercaseUrls 24 24 ]); 25 if ((string) $destinationUrl === '') { 26 $this->urlTransformer = new OfflineUrlTransformer(); 25 $destinationUrlStr = (string) $destinationUrl; 26 if ($destinationUrlStr === '' || $destinationUrlStr === '#no-index') { 27 $this->urlTransformer = new OfflineUrlTransformer($destinationUrlStr === ''); 27 28 } else { 28 29 $this->urlTransformer = new StandardUrlTransformer($baseUrl, $destinationUrl); -
staatic/trunk/src/Factory/UrlTransformerFactory.php
r3112562 r3179309 39 39 $destinationUrl = new Uri($this->destinationUrl->value()); 40 40 } 41 if ((string) $destinationUrl === '') { 42 return new OfflineUrlTransformer(); 41 $destinationUrlStr = (string) $destinationUrl; 42 if ($destinationUrlStr === '' || $destinationUrlStr === '#no-index') { 43 return new OfflineUrlTransformer($destinationUrlStr === ''); 43 44 } 44 45 if ($baseUrl === null) { -
staatic/trunk/staatic.php
r3162550 r3179309 7 7 * Plugin URI: https://staatic.com/wordpress 8 8 * Description: Staatic for WordPress allows you to generate a highly optimized static version of your WordPress site. 9 * Version: 1.10. 69 * Version: 1.10.7-beta1 10 10 * Requires at least: 5.0 11 11 * Requires PHP: 7.1 … … 25 25 } 26 26 27 define('STAATIC_VERSION', '1.10. 6');27 define('STAATIC_VERSION', '1.10.7-beta1'); 28 28 29 29 define('STAATIC_FILE', __FILE__); -
staatic/trunk/vendor/composer/installed.php
r3162550 r3179309 3 3 namespace Staatic\Vendor; 4 4 5 return array('root' => array('name' => 'staatic/staatic-wordpress', 'pretty_version' => 'v1.10. 6', 'version' => '1.10.6.0', 'reference' => 'e0a9bf643347a72df131fb78e0886e397540abd1', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('async-aws/cloud-front' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => '32f89cd21f6ceb756d7ab25cd7b44e155d73f31b', 'type' => 'library', 'install_path' => __DIR__ . '/../async-aws/cloud-front', 'aliases' => array(), 'dev_requirement' => \false), 'async-aws/core' => array('pretty_version' => '1.22.0', 'version' => '1.22.0.0', 'reference' => 'cbd7012890a35a9b21f7235817a627488709551b', 'type' => 'library', 'install_path' => __DIR__ . '/../async-aws/core', 'aliases' => array(), 'dev_requirement' => \false), 'async-aws/s3' => array('pretty_version' => '2.3.0', 'version' => '2.3.0.0', 'reference' => 'a09f7258ee6f09dffcd57b612d72aefea7783649', 'type' => 'library', 'install_path' => __DIR__ . '/../async-aws/s3', 'aliases' => array(), 'dev_requirement' => \false), 'brick/math' => array('pretty_version' => '0.12.1', 'version' => '0.12.1.0', 'reference' => 'f510c0a40911935b77b86859eb5223d58d660df1', 'type' => 'library', 'install_path' => __DIR__ . '/../brick/math', 'aliases' => array(), 'dev_requirement' => \false), 'caseyamcl/guzzle_retry_middleware' => array('pretty_version' => 'v2.11.0', 'version' => '2.11.0.0', 'reference' => '319829956ad61be3f48fba8f79e789b92538e56f', 'type' => 'library', 'install_path' => __DIR__ . '/../caseyamcl/guzzle_retry_middleware', 'aliases' => array(), 'dev_requirement' => \false), 'deliciousbrains/wp-background-processing' => array('pretty_version' => '1.3.1', 'version' => '1.3.1.0', 'reference' => '6d1e48165e461260075b9f161b3861c7278f71e7', 'type' => 'library', 'install_path' => __DIR__ . '/../deliciousbrains/wp-background-processing', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/guzzle' => array('pretty_version' => '7.9.2', 'version' => '7.9.2.0', 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/promises' => array('pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/psr7' => array('pretty_version' => '2.7.0', 'version' => '2.7.0.0', 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => \false), 'maennchen/zipstream-php' => array('pretty_version' => '2.4.0', 'version' => '2.4.0.0', 'reference' => '3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3', 'type' => 'library', 'install_path' => __DIR__ . '/../maennchen/zipstream-php', 'aliases' => array(), 'dev_requirement' => \false), 'masterminds/html5' => array('pretty_version' => '2.9.0', 'version' => '2.9.0.0', 'reference' => 'f5ac2c0b0a2eefca70b2ce32a5809992227e75a6', 'type' => 'library', 'install_path' => __DIR__ . '/../masterminds/html5', 'aliases' => array(), 'dev_requirement' => \false), 'myclabs/php-enum' => array('pretty_version' => '1.8.4', 'version' => '1.8.4.0', 'reference' => 'a867478eae49c9f59ece437ae7f9506bfaa27483', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), 'dev_requirement' => \false), 'paragonie/constant_time_encoding' => array('pretty_version' => 'v3.0.0', 'version' => '3.0.0.0', 'reference' => 'df1e7fde177501eee2037dd159cf04f5f301a512', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding', 'aliases' => array(), 'dev_requirement' => \false), 'paragonie/random_compat' => array('pretty_version' => 'v9.99.100', 'version' => '9.99.100.0', 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/random_compat', 'aliases' => array(), 'dev_requirement' => \false), 'php-http/async-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '*')), 'php-http/client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '*')), 'phpseclib/phpseclib' => array('pretty_version' => '3.0.42', 'version' => '3.0.42.0', 'reference' => 'db92f1b1987b12b13f248fe76c3a52cadb67bb98', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/phpseclib', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/http-client' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-factory' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '1.1', 'version' => '1.1.0.0', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '3.0.2', 'version' => '3.0.2.0', 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/simple-cache' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), 'dev_requirement' => \false), 'ramsey/collection' => array('pretty_version' => '2.0.0', 'version' => '2.0.0.0', 'reference' => 'a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/collection', 'aliases' => array(), 'dev_requirement' => \false), 'ramsey/uuid' => array('pretty_version' => '4.7.6', 'version' => '4.7.6.0', 'reference' => '91039bc1faa45ba123c4328958e620d382ec7088', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/uuid', 'aliases' => array(), 'dev_requirement' => \false), 'rhumsaa/uuid' => array('dev_requirement' => \false, 'replaced' => array(0 => '4.7.6')), 'scotteh/php-dom-wrapper' => array('pretty_version' => '2.0.5', 'version' => '2.0.5.0', 'reference' => '351e9c635c9aa65c8cedaeefcac3a49581ad2529', 'type' => 'library', 'install_path' => __DIR__ . '/../scotteh/php-dom-wrapper', 'aliases' => array(), 'dev_requirement' => \false), 'staatic/crawler' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'a24093bf5691cc6e68167e83974341837a28d58a', 'type' => 'library', 'install_path' => __DIR__ . '/../staatic/crawler', 'aliases' => array(0 => '1.x-dev'), 'dev_requirement' => \false), 'staatic/framework' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '288bff665d3c0c62164071dd8dbb4a2ca1880cd6', 'type' => 'library', 'install_path' => __DIR__ . '/../staatic/framework', 'aliases' => array(0 => '1.x-dev'), 'dev_requirement' => \false), 'staatic/staatic-wordpress' => array('pretty_version' => 'v1.10.6', 'version' => '1.10.6.0', 'reference' => 'e0a9bf643347a72df131fb78e0886e397540abd1', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/config' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '12e7e52515ce37191b193cf3365903c4f3951e35', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/css-selector' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '4b61b02fe15db48e3687ce1c45ea385d1780fe08', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.2.13', 'version' => '6.2.13.0', 'reference' => 'd977404486b419bedf450739a9f8992a88c1d6e3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.12', 'version' => '6.4.12.0', 'reference' => 'f810e3cbdf7fdc35983968523d09f349fa9ada12', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client' => array('pretty_version' => 'v6.2.13', 'version' => '6.2.13.0', 'reference' => '297374a399ce6852d5905d92a1351df00bb9dd10', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => '20414d96f391677bf80078aa55baece78b82647d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '3.0')), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '85181ba99b2345b0ef10ce42ecac37612d9fd341', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php71' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-php72' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => 'fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce', 'type' => 'metapackage', 'install_path' => null, 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php73' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '0f68c03565dcaaf25a890667542e8bd75fe7e5bb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php74' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '9589537d05325fb5d88a20d8926823e5b827a43e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php74', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '60328e362d4c2c802a54fcbf04f9d3fb892b4cf8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php81' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => 'bd1d9e59a81d8fa4acdcea3f617c581f7475a80f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/var-exporter' => array('pretty_version' => 'v6.4.9', 'version' => '6.4.9.0', 'reference' => 'f9a060622e0d93777b7f8687ec4860191e16802e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'dev_requirement' => \false), 'voku/simple_html_dom' => array('pretty_version' => '4.8.10', 'version' => '4.8.10.0', 'reference' => '716822ed52ed3a1881542be07a786270de390e99', 'type' => 'library', 'install_path' => __DIR__ . '/../voku/simple_html_dom', 'aliases' => array(), 'dev_requirement' => \false)));5 return array('root' => array('name' => 'staatic/staatic-wordpress', 'pretty_version' => 'v1.10.7-beta1', 'version' => '1.10.7.0-beta1', 'reference' => '83eda590b7f20dcf36f761efb9c9d47a856b2423', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('async-aws/cloud-front' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => '32f89cd21f6ceb756d7ab25cd7b44e155d73f31b', 'type' => 'library', 'install_path' => __DIR__ . '/../async-aws/cloud-front', 'aliases' => array(), 'dev_requirement' => \false), 'async-aws/core' => array('pretty_version' => '1.22.0', 'version' => '1.22.0.0', 'reference' => 'cbd7012890a35a9b21f7235817a627488709551b', 'type' => 'library', 'install_path' => __DIR__ . '/../async-aws/core', 'aliases' => array(), 'dev_requirement' => \false), 'async-aws/s3' => array('pretty_version' => '2.3.0', 'version' => '2.3.0.0', 'reference' => 'a09f7258ee6f09dffcd57b612d72aefea7783649', 'type' => 'library', 'install_path' => __DIR__ . '/../async-aws/s3', 'aliases' => array(), 'dev_requirement' => \false), 'brick/math' => array('pretty_version' => '0.12.1', 'version' => '0.12.1.0', 'reference' => 'f510c0a40911935b77b86859eb5223d58d660df1', 'type' => 'library', 'install_path' => __DIR__ . '/../brick/math', 'aliases' => array(), 'dev_requirement' => \false), 'caseyamcl/guzzle_retry_middleware' => array('pretty_version' => 'v2.11.0', 'version' => '2.11.0.0', 'reference' => '319829956ad61be3f48fba8f79e789b92538e56f', 'type' => 'library', 'install_path' => __DIR__ . '/../caseyamcl/guzzle_retry_middleware', 'aliases' => array(), 'dev_requirement' => \false), 'deliciousbrains/wp-background-processing' => array('pretty_version' => '1.3.1', 'version' => '1.3.1.0', 'reference' => '6d1e48165e461260075b9f161b3861c7278f71e7', 'type' => 'library', 'install_path' => __DIR__ . '/../deliciousbrains/wp-background-processing', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/guzzle' => array('pretty_version' => '7.9.2', 'version' => '7.9.2.0', 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/promises' => array('pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'reference' => '6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), 'dev_requirement' => \false), 'guzzlehttp/psr7' => array('pretty_version' => '2.7.0', 'version' => '2.7.0.0', 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => \false), 'maennchen/zipstream-php' => array('pretty_version' => '2.4.0', 'version' => '2.4.0.0', 'reference' => '3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3', 'type' => 'library', 'install_path' => __DIR__ . '/../maennchen/zipstream-php', 'aliases' => array(), 'dev_requirement' => \false), 'masterminds/html5' => array('pretty_version' => '2.9.0', 'version' => '2.9.0.0', 'reference' => 'f5ac2c0b0a2eefca70b2ce32a5809992227e75a6', 'type' => 'library', 'install_path' => __DIR__ . '/../masterminds/html5', 'aliases' => array(), 'dev_requirement' => \false), 'myclabs/php-enum' => array('pretty_version' => '1.8.4', 'version' => '1.8.4.0', 'reference' => 'a867478eae49c9f59ece437ae7f9506bfaa27483', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), 'dev_requirement' => \false), 'paragonie/constant_time_encoding' => array('pretty_version' => 'v3.0.0', 'version' => '3.0.0.0', 'reference' => 'df1e7fde177501eee2037dd159cf04f5f301a512', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/constant_time_encoding', 'aliases' => array(), 'dev_requirement' => \false), 'paragonie/random_compat' => array('pretty_version' => 'v9.99.100', 'version' => '9.99.100.0', 'reference' => '996434e5492cb4c3edcb9168db6fbb1359ef965a', 'type' => 'library', 'install_path' => __DIR__ . '/../paragonie/random_compat', 'aliases' => array(), 'dev_requirement' => \false), 'php-http/async-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '*')), 'php-http/client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '*')), 'phpseclib/phpseclib' => array('pretty_version' => '3.0.42', 'version' => '3.0.42.0', 'reference' => 'db92f1b1987b12b13f248fe76c3a52cadb67bb98', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/phpseclib', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/http-client' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-factory' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-factory', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-factory-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/http-message' => array('pretty_version' => '1.1', 'version' => '1.1.0.0', 'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-message', 'aliases' => array(), 'dev_requirement' => \false), 'psr/http-message-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0')), 'psr/log' => array('pretty_version' => '3.0.2', 'version' => '3.0.2.0', 'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/simple-cache' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'ralouphie/getallheaders' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'type' => 'library', 'install_path' => __DIR__ . '/../ralouphie/getallheaders', 'aliases' => array(), 'dev_requirement' => \false), 'ramsey/collection' => array('pretty_version' => '2.0.0', 'version' => '2.0.0.0', 'reference' => 'a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/collection', 'aliases' => array(), 'dev_requirement' => \false), 'ramsey/uuid' => array('pretty_version' => '4.7.6', 'version' => '4.7.6.0', 'reference' => '91039bc1faa45ba123c4328958e620d382ec7088', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/uuid', 'aliases' => array(), 'dev_requirement' => \false), 'rhumsaa/uuid' => array('dev_requirement' => \false, 'replaced' => array(0 => '4.7.6')), 'scotteh/php-dom-wrapper' => array('pretty_version' => '2.0.5', 'version' => '2.0.5.0', 'reference' => '351e9c635c9aa65c8cedaeefcac3a49581ad2529', 'type' => 'library', 'install_path' => __DIR__ . '/../scotteh/php-dom-wrapper', 'aliases' => array(), 'dev_requirement' => \false), 'staatic/crawler' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => 'a24093bf5691cc6e68167e83974341837a28d58a', 'type' => 'library', 'install_path' => __DIR__ . '/../staatic/crawler', 'aliases' => array(0 => '1.x-dev'), 'dev_requirement' => \false), 'staatic/framework' => array('pretty_version' => 'dev-master', 'version' => 'dev-master', 'reference' => '288bff665d3c0c62164071dd8dbb4a2ca1880cd6', 'type' => 'library', 'install_path' => __DIR__ . '/../staatic/framework', 'aliases' => array(0 => '1.x-dev'), 'dev_requirement' => \false), 'staatic/staatic-wordpress' => array('pretty_version' => 'v1.10.7-beta1', 'version' => '1.10.7.0-beta1', 'reference' => '83eda590b7f20dcf36f761efb9c9d47a856b2423', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/config' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '12e7e52515ce37191b193cf3365903c4f3951e35', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/css-selector' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '4b61b02fe15db48e3687ce1c45ea385d1780fe08', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/css-selector', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.2.13', 'version' => '6.2.13.0', 'reference' => 'd977404486b419bedf450739a9f8992a88c1d6e3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.12', 'version' => '6.4.12.0', 'reference' => 'f810e3cbdf7fdc35983968523d09f349fa9ada12', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client' => array('pretty_version' => 'v6.2.13', 'version' => '6.2.13.0', 'reference' => '297374a399ce6852d5905d92a1351df00bb9dd10', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => '20414d96f391677bf80078aa55baece78b82647d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '3.0')), 'symfony/polyfill-ctype' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '85181ba99b2345b0ef10ce42ecac37612d9fd341', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php71' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-php72' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => 'fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce', 'type' => 'metapackage', 'install_path' => null, 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php73' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '0f68c03565dcaaf25a890667542e8bd75fe7e5bb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php74' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '9589537d05325fb5d88a20d8926823e5b827a43e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php74', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php80' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '60328e362d4c2c802a54fcbf04f9d3fb892b4cf8', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-php81' => array('pretty_version' => 'v1.31.0', 'version' => '1.31.0.0', 'reference' => '4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => 'bd1d9e59a81d8fa4acdcea3f617c581f7475a80f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/var-exporter' => array('pretty_version' => 'v6.4.9', 'version' => '6.4.9.0', 'reference' => 'f9a060622e0d93777b7f8687ec4860191e16802e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-exporter', 'aliases' => array(), 'dev_requirement' => \false), 'voku/simple_html_dom' => array('pretty_version' => '4.8.10', 'version' => '4.8.10.0', 'reference' => '716822ed52ed3a1881542be07a786270de390e99', 'type' => 'library', 'install_path' => __DIR__ . '/../voku/simple_html_dom', 'aliases' => array(), 'dev_requirement' => \false))); -
staatic/trunk/vendor/staatic/crawler/src/UrlTransformer/OfflineUrlTransformer.php
r3112562 r3179309 8 8 final class OfflineUrlTransformer implements UrlTransformerInterface 9 9 { 10 /** 11 * @var bool 12 */ 13 private $appendIndex = \true; 14 public function __construct(bool $appendIndex = \true) 15 { 16 $this->appendIndex = $appendIndex; 17 } 10 18 /** 11 19 * @param UriInterface $url … … 22 30 $transformedUrl = (new Uri())->withPath($url->getPath())->withQuery($url->getQuery())->withFragment($url->getFragment()); 23 31 $effectiveUrl = $foundOnUrl ? UriResolver::relativize($foundOnUrl, $url) : new Uri(''); 24 $effectiveUrl = $this->addIndexIfNeeded($effectiveUrl); 32 if ($this->appendIndex) { 33 $effectiveUrl = $this->maybeAppendIndex($effectiveUrl); 34 } 25 35 return new UrlTransformation($transformedUrl, $effectiveUrl); 26 36 } 27 private function addIndexIfNeeded(UriInterface $url): UriInterface37 private function maybeAppendIndex(UriInterface $url): UriInterface 28 38 { 29 39 $path = $url->getPath();
Note: See TracChangeset
for help on using the changeset viewer.